Haohan Ding, Long Wang, Xiaodong Song, Xiaohui Cui, David I. Wilson, Wei Yu, Cheng Zhang, Guanjun Dong
Aflatoxin M 1 (AFM 1 ) is a carcinogenic and teratogenic mycotoxin that may be present in raw milk. Therefore, continuous monitoring of AFM 1 levels is essential to ensure dairy safety and regulatory compliance. Although laboratory-based analytical techniques such as ELISA and LC-MS/MS offer high accuracy, their cost, sample preparation requirements, and dependence on specialized personnel make them less practical for high-frequency or large-volume screening in dairy processing facilities. This creates a need for complementary, cost-effective prescreening approaches. This study proposed a qualitative AFM 1 prediction method based on routinely measured physicochemical indicators of raw milk, combined with machine learning algorithms. Five classical machine learning models were evaluated under a binary classification framework to determine whether AFM 1 levels exceed the regulatory threshold. Experimental results show that the multilayer perceptron achieves an accuracy and negative-sample recall rate above 80%, demonstrating the potential of machine learning as an effective prescreening tool for AFM 1 . The findings provide a feasible direction for supporting rapid, economical, and large-scale monitoring of raw milk safety. In this study, a method based on machine learning approach to predict whether Aflatoxin M 1 (AFM 1 ) is exceeded in raw milk is proposed. The study predicts AFM 1 by using different machine learning algorithms for modeling the selected basic indicators in raw milk. This method has the advantages of lower cost and higher detection efficiency than the traditional detection methods, which provides a new idea for the prevention and control of AFM 1 in milk. • Pioneered the first ML application for AFM1 prediction in raw milk, enabling low-cost detection • MLP model achieves over 80% accuracy/recall in five classical machine learning models (LR, RF, SVM, XGBoost, MLP) • Introduces the “AI+” methodology, advancing intelligent solutions for food safety detection and encouraging the transformation of traditional detection technologies • Methodology adaptable for detecting diverse foodborne hazards, broadening its impact on food safety