1. Introduction
Mycotoxins have long been considered one of the greatest threats to global food safety. They often appear at low levels in the food chain, but due to their persistent nature and ability to accumulate, they can cause long-term harm to health. These impacts include liver and kidney toxicity, carcinogenic potential, immune suppression, and impaired growth in children (Bennett & Klich, 2003). For decades, chemical analysis methods such as LC-MS/MS and ELISA have been the primary tools for detecting mycotoxins. However, despite their high accuracy, these methods often require advanced equipment, complex processing procedures, and skilled personnel, making them difficult to apply for widespread monitoring (Marin et al., 2013). In light of these limitations, the application of new technologies, especially artificial intelligence (AI), has emerged as a promising trend. AI has the ability to handle large datasets, analyze complex samples, and automate the identification process, thereby enhancing efficiency and reducing costs in food safety testing (IGIP, 2025).
2. Impact of AI Techniques in Detecting Mycotoxins in Food
During the development and storage of crops and food products such as cereals, grains, spices, and dairy products, certain fungi produce hazardous natural chemical compounds known as mycotoxins. These toxins can cause a range of severe health problems in both humans and animals, from acute poisoning to chronic issues, including liver cancer, and in some cases, even death. The most common mycotoxins are produced by microorganisms such as Aspergillus, Fusarium, and Penicillium, with well-known examples like aflatoxin, fumonisin, zearalenone, ochratoxin, and patulin. The levels of mycotoxin contamination in agricultural products can vary greatly depending on the region and annual weather conditions, with studies indicating that mycotoxin contamination may affect 60–80% of the world’s agricultural supply.
Estimates suggest that mycotoxins are causing significant damage to the agricultural industry. A recent study by Latham, R.L. and colleagues (2023) found that aflatoxin caused a loss of about 4.2% of the wheat used for food between 2010 and 2020, equivalent to an economic loss of around 2.5 billion euros. Therefore, detecting and controlling mycotoxins in crops and food is crucial not only to protect consumer health but also to maintain food safety and support a stable economy.
In this context, the application of artificial intelligence (AI) in detecting mycotoxins in food has become a noteworthy trend. Traditional mycotoxin detection methods are gradually being replaced or supported by machine learning (ML) and deep learning (DL) techniques. The use of artificial neural network (ANN) algorithms and other detection techniques is increasingly being implemented to accurately and quickly identify the presence of mycotoxins in food. This demonstrates the potential of AI to improve detection efficiency, thereby reducing public health risks and enhancing food safety.
3. Artificial Intelligence Techniques in Mycotoxin Detection in Food
Artificial intelligence (AI) techniques are demonstrating significant advantages in mycotoxin detection, including high reliability, cost-effectiveness, the ability to handle large datasets, and the capacity to address situations with various uncertainties. Specifically, AI helps shorten analysis time in many practical applications, facilitating large-scale food safety control. However, the effectiveness of AI heavily depends on the specific task and, particularly, the quality and scale of the dataset used to train the model (Eskola et al., 2020).
One prominent example is the detection of aflatoxin B1 (AFB1) in peanuts—a common yet vulnerable ingredient susceptible to mycotoxin contamination. The "olfactory visualization" method has been applied, in which color sensor images are preprocessed and optimized using genetic algorithms (GA) combined with a backpropagation neural network (BPNN) to predict AFB1 levels (Zhu et al., 2022). Additionally, other machine learning algorithms such as Support Vector Machine (SVM), Artificial Neural Network (ANN), and Adaptive Neuro-Fuzzy Inference System (ANFIS) have also been implemented and yielded effective results in detecting aflatoxin and the fungi producing aflatoxin in peanuts. Notably, newer algorithms, such as transformer models, have been shown to accurately identify mycotoxins with high precision.
Moreover, studies involving the cultivation of various fungal strains, such as Aspergillus nidulans, Aspergillus niger, Penicillium citrinum, Aspergillus oryzae, and Aspergillus versicolor on wheat samples have opened up opportunities for AI application in fungal identification through imaging (Sun, Wang, Tu, Wang, & Pan, 2016). Data collected from a specialized imaging system using a Sony Nex-6 camera were analyzed using SVM, BPNN, Convolutional Neural Networks (CNN), and Deep Belief Network (DBN) models. Among these, the DBN model achieved exceptional results, with accuracy rates of up to 100% in fungal classification, while SVM and BPNN were also applied to assess fungal contamination levels through the combination with "electronic nose" technology—a sensor system capable of simulating human olfaction (Gu, Wang, & Wang, 2019).
In addition to wheat, AI techniques combined with hyperspectral imaging (HSI) and Sparse Autoencoder (SAE) have proven effective in classifying mold-contaminated corn kernels. Similarly, AI-integrated electronic noses have been used to detect Penicillium expansum, which causes spoilage in apples, and predict patulin levels during apple juice processing (Erdem & Senturk, 2024). AI applications are not limited to molds but also extend to detecting antibiotic residues in raw milk, thanks to systems that combine nanotechnology, optical mechanics, and advanced spectral analysis algorithms.
AI models have demonstrated high efficacy in detecting mycotoxin contamination in various food products, beyond cereals, peanuts, and milk. Specifically, near-infrared (NIR) spectroscopy combined with machine learning has been successfully employed to determine contamination levels in coffee beans (Ruttanadech et al., 2023). Additionally, Raman spectroscopy-based methods, combined with Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN), have achieved 100% accuracy in the qualitative detection of Aflatoxin B1 (AFB1) in cooking oil, while also showing high performance in quantitative detection. The integration of Raman spectroscopy with chemometric methods such as Partial Least Squares (PLS) has also provided reliable results in predicting AFB1 levels in pressed peanut oil (Zhu, Jiang, & Chen, 2022).
For almonds—one of the nuts most susceptible to aflatoxin contamination—recent studies have focused on non-destructive optical techniques. The use of fluorescence imaging combined with deep neural networks has yielded promising classification results, with accuracy ranging from 84.7% to 93.0%. The combination of fluorescence spectra with machine learning algorithms also allowed for the detection of Aflatoxin B in almonds with an accuracy of up to 94% (Bertani et al., 2020). These studies highlight the immense potential of AI in developing rapid, accurate, and cost-effective testing methods, contributing to more efficient control of mycotoxins in a wide range of food products.
4. Advantages and Challenges in AI Application
Compared to traditional methods, AI offers several notable advantages. First, AI can quickly process large amounts of data in a short period, significantly accelerating detection speed. Second, AI minimizes dependence on human manual operations, thereby reducing errors and enhancing the consistency of results. Third, AI models are flexible and can integrate with various types of analytical technologies, from spectroscopy to biosensors, thus expanding their practical applications in production and testing.
However, successful implementation of AI still faces several challenges. Data quality is one of the biggest barriers. To train AI models effectively, a large, diverse dataset with accurate labels is required, which is difficult in the context of food products with varying origins and storage conditions. Furthermore, the generalization ability of the model is still limited, as many AI systems perform well in laboratory conditions but may not be stable in real-world production. Reliability and explainability of the models are also other challenges, as many deep learning models are still considered "black boxes," making it difficult for regulatory agencies to accept them as legal evidence. In addition, computational infrastructure and the need for standardized legal requirements are still not fully developed, making it difficult to widely implement AI in food testing (IGIP, 2025).
5. Conclusion
Overall, artificial intelligence is ushering in a new era in the detection of mycotoxins, contributing to enhanced food safety control. Recent studies have demonstrated that AI, particularly deep learning combined with spectroscopy and biosensor technology, can deliver high accuracy and practical applicability. However, for AI to become a widespread tool, close collaboration is needed between researchers, regulatory bodies, and businesses in developing quality databases, establishing legal standards, and developing transparent and explainable systems. In the future, integrating AI with new technologies like blockchain could provide a more comprehensive, transparent, and reliable monitoring system, contributing to global food safety.
References:
Ahsan, M.M.; Luna, S.A.; Siddique, Z. (2022). Machine-Learning-Based Disease Diagnosis: A Comprehensive Review. Healthcare, 10, 541. https://doi.org/10.3390/healthcare10030541
Bennett, J.W.; Klich, M. (2003). Mycotoxins. Clin. Microbiol. Rev., 16, 497–516. https://doi.org/10.1128/CMR.16.3.497-516.2003
Beia, I.S.; Ciceoi, R.; Beia, V.E.; Bădulescu, L.; Smedescu, D.I.; Fîntîneru, A. (2023). Mycotoxins-incidence, impact on feed, food safety, food chain and economic losses. Sci. Pap. Ser. Manag. Econ. Eng. Agric. Rural Dev., 23, 85–94.
Bertani, F.R.; Businaro, L.; Gambacorta, L.; Mencattini, A.; Brenda, D.; Di Giuseppe, D.; De Ninno, A.; Solfrizzo, M.; Martinelli, E.; Gerardino, A. (2020). Optical detection of aflatoxins B in grained almonds using fluorescence spectroscopy and machine learning algorithms. Food Control, 112, 107073. https://doi.org/10.1016/j.foodcont.2019.107073
Eskola, M.; Kos, G.; Elliott, C.T.; Hajšlová, J.; Mayar, S.; Krska, R. (2020). Worldwide contamination of food-crops with mycotoxins: Validity of the widely cited ‘FAO estimate’ of 25. Critical Reviews in Food Science and Nutrition, 60(17), 2773–2789. https://doi.org/10.1080/10408398.2019.1658570
Erdem, A.; Senturk, H. (2024). Smartphone-controlled aptasensor for voltammetric detection of patulin in apple juice. Sensors, 24, 754. https://doi.org/10.3390/s24030754
Gu, S.; Wang, J.; Wang, Y. (2019). Early discrimination and growth tracking of Aspergillus spp. contamination in rice kernels using electronic nose. Food Chem., 292, 325–335. https://doi.org/10.1016/j.foodchem.2019.04.054
Ruttanadech, N.; Phetpan, K.; Srisang, N.; Srisang, S.; Chungcharoen, T.; Limmun, W.; Youryon, P.; Kongtragoul, P. (2023). Rapid and accurate classification of Aspergillus ochraceous contamination in Robusta green coffee bean through near-infrared spectral analysis using machine learning. Food Control, 145, 109446. https://doi.org/10.1016/j.foodcont.2022.109446
Sun, K.; Wang, Z.; Tu, K.; Wang, S.; Pan, L. (2016). Recognition of mould colony on unhulled paddy based on computer vision using conventional machine-learning and deep learning techniques. Sci. Rep., 6, 37994. https://doi.org/10.1038/srep37994
Zhu, C.; Deng, J.; Jiang, H. (2022). Parameter Optimization of Support Vector Machine to Improve the Predictive Performance for Determination of Aflatoxin B1 in Peanuts by Olfactory Visualization Technique. Molecules, 27, 6730. https://doi.org/10.3390/molecules27196730
Zhu, C.; Jiang, H.; Chen, Q. (2022). High precisive prediction of aflatoxin B1 in pressing peanut oil using Raman spectra combined with multivariate data analysis. Foods, 11, 1565. https://doi.org/10.3390/foods11101565