Automated food safety early warning system in the dairy supply chain using machine learning

Ningjing Liu, Yamine Bouzembrak, Leonieke M. van den Bulk, Anand Gavai, Lukas J. van den Heuvel, Hans J.P. Marvin*

*Corresponding author for this work

Research output: Contribution to journalArticleAcademicpeer-review

21 Citations (Scopus)
32 Downloads (Pure)


Traditionally, early warning systems for food safety are based on monitoring targeted food safety hazards. Optimal early warning systems, however, should identify signals that precede the development of a food safety risk. Moreover, such signals could be identified in factors from domains adjacent to the food supply chain, so-called drivers of change and other indicators. In this study, we show for the first time that such drivers and indicators may indeed represent signals that precede the detection of a food safety risk. The dairy supply chain in Europe was used as an application case. Using dynamic unsupervised anomaly detection models, anomalies were detected in indicator data expected by domain experts to impact the development of food safety risks in milk. Additionally, a Bayesian network was used to identify the chemical food safety hazards in milk associated with an anomaly for the Netherlands. The results showed that the frequency of anomalies varied per country and indicator. However, all countries showed in the period investigated (2008–2019), anomalies in the indicators “raw milk price” and “barely milk price” and no anomalies in the indicator” income of dairy farms”. A cross-correlation analysis of the number of Rapid Alert for Food and Feed (RASFF) notifications and anomalies in indicators revealed significant correlations of many indicators but difference between countries was observed. Interesting, for all countries the cross corelation with indicator “milk price” was significant, albeit the lag time varied from 5 months (United Kingdom) to 22 months (Italy). This finding suggests that severe changes in domains adjacent to the food supply chain may trigger the development of food safety problems that become visible many months later. Awareness of such relationships will provide the opportunity for food producers or inspectors to take timely measures to prevent food safety problems.

Original languageEnglish
Article number108872
Number of pages11
JournalFood control
Early online date5 Feb 2022
Publication statusPublished - Jun 2022
Externally publishedYes


  • Anomaly detection
  • Bayesian network
  • Detrended cross-correlation analysis
  • Dynamic unsupervised anomaly detection
  • Emerging risk
  • Milk safety
  • UT-Hybrid-D


Dive into the research topics of 'Automated food safety early warning system in the dairy supply chain using machine learning'. Together they form a unique fingerprint.

Cite this