In this study, using machine learning and deep learning techniques, we collected raw milk composition data from different regions and seasons in China during the period of 2022-2024 and proposed a method for qualitative prediction of aflatoxin M1 (AFM1) based on easy-to-measure data, aiming to reduce the cost of batch testing in dairy factories. Based on the 16 selected classes of feature datasets, we conducted prediction experiments using various machine learning methods such as linear regression (LR), random forest (RF), support vector machine (SVM) and a method based on Transformer architecture, and analyzed the prediction performance and variance stability of these models on negative samples and positive samples through comparative experiments. The experimental results confirmed that the prediction method based on Transformer architecture had the best overall performance. Meanwhile, we also explored the effect of location coding and attention mechanism on model performance under Transformer architecture through ablation experiments. Overall, the new method based on deep learning enabled efficient qualitative prediction of AFM1, which can meet the demand for high throughput and significantly reduce the detection cost by eliminating redundant detection steps when compared with the traditional method, providing a solution of digital transformation and a theoretical basis for model optimization for dairy product safety detection.
Publications
- Article type
- Year
- Co-author
Year
Open Access
Issue
Food Science 2025, 46(19): 1-9
Published: 15 October 2025
Downloads:0
Total 1
京公网安备11010802044758号