Qualitative Prediction of Aflatoxin in Raw Milk Based on Transformer Architecture

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.

Institutions

Publication Details

Journal
SHILAP Revista de lepidopterología
Published
2025-10-01
DOI
https://doi.org/10.7506/spkx1002-6630-20250303-013
Primary Topic
Agricultural risk and resilience
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Qualitative Prediction of Aflatoxin in Raw Milk Based on Transformer Architecture

SHILAP Revista de lepidopterología
Agricultural risk and resilience
article

Qualitative Prediction of Aflatoxin in Raw Milk Based on Transformer Architecture

article en

Abstract

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.

SHILAP Revista de lepidopterología
Jiangnan University (CN)
Responsible consumption and production
Openalex Percentile: Top 42%
Agricultural risk and resilience
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.