There are a large number of both commercial and in-house-written digital tools that attempt to classify and predict food safety risks based upon historic records in the EU Rapid Alert Service in Food and Feeds (RASFF) database. With all such tools, it is important to remember that RASFF records are not a representative sample of either tests or results, and were never intended as a source of trends; the purpose of RASFF is rather to share specific individual alerts which may require regulatory action on a cross-border basis. Official tests are highly targeted, and often informed by previous RASFF alerts, so more alerts about a specific issue drives more official tests which drives more alerts (i.e. a feedback mechanism). Also, RASFF only records the “positive” results, so there is no denominator; no indication of the number of “negative” results or the % incidence of an issue. And finally, RASFF only records issues with a food safety concern so most food authenticity test results are excluded.
Despite these caveats, RASFF is still one of the most extensive and systematic public databases of food safety incidents and is likely to form the basis of many AI risk-prediction systems for years to come.
This paper (purchase required) evaluated the effectiveness of the Machine Learning models that sit behind such systems. The authors report that transformer-based models significantly outperform traditional machine learning methods, with RoBERTa achieving the highest classification accuracy. SHAP analysis highlights key hazards salmonella, aflatoxins, listeria and sulphites as primary factors in serious risk classification, while procedural attributes like certification status and temperature control are less impactful.
They conclude that despite improvements in accuracy, computational efficiency and scalability remain challenges for real-world deployment of AI risk-scoring and prediction systems.
Photo by Clarisse Croset on Unsplash