Machine learning and food inspection: use of Bayesian Network modeling to support official controls in the food industries

Authors

  • Luca Nalbone Department of Veterinary Sciences, University of Messina https://orcid.org/0000-0001-9657-2377
  • Salvatore Forgia Department of Veterinary Sciences, University of Messina
  • Filippo Giarratana Department of Veterinary Sciences, University of Messina https://orcid.org/0000-0003-0892-4884
  • Graziella Ziino Department of Veterinary Sciences, University of Messina
  • Salvatore Monaco Structural Department of Veterinary Prevention, Provincial Health Authority of Messina
  • Santino La Macchia Structural Department of Veterinary Prevention, Provincial Health Authority of Messina
  • Alessandro Giuffrida Department of Veterinary Sciences, University of Messina

DOI:

https://doi.org/10.4081/ijfs.2026.13491

Keywords:

Artificial intelligence, AI, food control, neural network, naïve Bayes

Abstract

This study aims to develop a machine learning model capable of predicting the type of non-compliance (NC) most likely to be detected by competent authorities during official control of food establishments based on their structural, product, and management characteristics. A Bayesian Network (BN) model was developed using data from 145 NCs detected by the Local Health Authority of Messina during 588 official controls performed on 101 approved food establishments between 2018 and 2021. The NCs were classified into 10 distinct categories based on the requirement not met: i) structural and equipment conditions; ii) water supply; iii) fight against pests; iv) hygiene of staff and processing; v) cleaning and sanitizing conditions; vi) raw materials, semi-finished and finished products; vii) labeling; viii) traceability; ix) Hazard Analysis and Critical Control Points (HACCP); and x) microbiological criteria according to Regulation (EC) 2005/2073. The model was constructed by associating the number and type of NC with the criteria and corresponding evaluations established by the Veterinary Services for each food establishment risk categorization according to Annex 2 of the Intesa Stato-Regioni CSR 212/2016. In detail, 8 different criteria were considered: i) date of construction or renovation; ii) general maintenance conditions; iii) marketing area; iv) food category; v) product intended use; vi) professionalism of management; vii) hygienic-sanitary training of employees; and viii) HACCP self-control plan. The BN model was implemented using the Hugin Lite software, considering the NC type as the parent node and the 8 different criteria as the child nodes. The implemented model allowed the prediction of the most probable type of NCs by inputting the evaluations of each risk categorization criterion for a given food establishment into the child nodes. A total of 25 NCs detected in 10 food establishments during 2024 were used to validate the model. The validation cases were not included in the learning dataset. The model correctly predicted the occurrence of 19 NCs (76%), while 6 NCs (24%) were not predicted, and 3 NCs (12%) were rightly predicted as the most probable ones. Although further efforts are needed to implement the model with a greater number of data, this study highlights the potential of a BN-based approach as a valuable tool for competent authorities in organizing and performing official controls from a new technological and sustainable perspective.

Downloads

Download data is not yet available.

References

Ancione G, Bragatto P, Milazzo MF, 2020. A Bayesian network-based approach for the assessment and management of ageing in major hazard establishments. J Loss Prev Process Ind 64:104080.

Bouzembrak Y, Marvin HJP, 2016. Prediction of food fraud type using data from Rapid Alert System for Food and Feed (RASFF) and Bayesian network modelling. Food Control 61:180-7.

Commission of the European Communities, 2005. Regulation of the European Commission on microbiological criteria for foodstuffs, 2073/2005/CE. In: Official Journal, L 338/1, 22/12/2005.

European Parliament, Council of the European Union, 2004a. Regulation of the European Parliament and of the Council of 29 April 2004 on official controls performed to ensure the verification of compliance with feed and food law, animal health and animal welfare rules, 882/2004/CE. In: Official Journal, L 165/1, 30/04/2004.

European Parliament, Council of the European Union, 2004b. Regulation of the European Parliament and of the Council of 29 April 2004 laying down specific hygiene rules for on the hygiene of foodstuffs, 853/2004/CE. In: Official Journal, L 139/55, 30/04/2004.

European Parliament, Council of the European Union, 2017. Regulation of the European Parliament and of the Council of 15 March 2017 on official controls and other official activities performed to ensure the application of food and feed law, rules on animal health and welfare, plant health and plant protection products, amending Regulations (EC) No 999/2001, (EC) No 396/2005, (EC) No 1069/2009, (EC) No 1107/2009, (EU) No 1151/2012, (EU) No 652/2014, (EU) 2016/429 and (EU) 2016/2031 of the European Parliament and of the Council, Council Regulations (EC) No 1/2005 and (EC) No 1099/2009 and Council Directives 98/58/EC, 1999/74/EC, 2007/43/EC, 2008/119/EC and 2008/120/EC, and repealing Regulations (EC) No 854/2004 and (EC) No 882/2004 of the European Parliament and of the Council, Council Directives 89/608/EEC, 89/662/EEC, 90/425/EEC, 91/496/EEC, 96/23/EC, 96/93/EC and 97/78/EC and Council Decision 92/438/EEC (Official Controls Regulation), 625/2017/EU. In: Official Journal, L 95/1, 7/4/2017.

Gbashi S, Njobeh PB, 2024. Enhancing food integrity through artificial intelligence and machine learning: a comprehensive review. Appl Sci 14:3421.

Gong Y, Liu G, Xue Y, Li R, Meng L, 2023. A survey on dataset quality in machine learning. Inf Softw Technol 162:107268.

Ministero della Salute Italiana, 2016. Intesa Stato-Regioni CSR 212/2016. Linee guida per il controllo ufficiale ai sensi dei Regolamenti CE/882/2004 e CE/854/2004. Ministero della Salute Italiana. https://www.salute.gov.it/portale/documentazione/p6_2_2_1.jsp?id=906&lingua=italiano.

Jacxsens L, Luning PA, Marcelis WJ, Boekel TA, Rovira J, Oses SM, Kousta M, Drosinos EH, Jasson V, Uyttendaele M, 2011. Tools for the performance assessment and improvement of food safety management systems. Trends Food Sci Technol 22:80-9.

Liu Z, Wang S, Zhang Y, Feng Y, Liu J, Zhu H, 2023. Artificial intelligence in food safety: A decade review and bibliometric analysis. Foods 12:1242.

Marvin HJP, Bouzembrak Y, Janssen EM, van der Fels- Klerx HV, van Asselt ED, Kleter GA, 2016. A holistic approach to food safety risks: food fraud as an example. Food Res Int 89:463-70.

Soon J M, 2020. Application of Bayesian network modelling to predict food fraud products from China. Food Control 114:107232.

Zarei E, Khakzad N, Cozzani V, Reniers G, 2019. Safety analysis of process systems using Fuzzy Bayesian Network (FBN). J Loss Prev Process Ind 57:7-16.

Zhou L, Pan S, Wang J, Vasilakos AV, 2017. Machine learning on big data: opportunities and challenges. Neurocomputing 237:350-61.

Downloads

Published

15-01-2026

Issue

Section

Original Articles

How to Cite

1.
Machine learning and food inspection: use of Bayesian Network modeling to support official controls in the food industries. Ital J Food Safety [Internet]. 2026 Jan. 15 [cited 2026 Jan. 29];. Available from: https://www.pagepressjournals.org/ijfs/article/view/13491