Leveraging SERS and Transformer Models for Simultaneous Detection of Multiple Pesticides in Fresh Produce
Akshata Hegde, Mehdi Hajikhani, John Snyder, Jianlin Cheng, Mengshi Lin
Abstract
The widespread use of pesticides in agriculture poses food safety and environmental risks, highlighting the need for rapid detection techniques to mitigate contamination. Surface-enhanced Raman spectroscopy (SERS) coupled with machine learning provides a powerful approach for the detection and quantification of multiple pesticides in agricultural products. This study introduces the SERSFormer-2.0 model, which excels in both multilabel classification and multiregression tasks for pesticide analysis, leveraging the power of transformer-based machine learning architectures. SERSFormer-2.0 employs novel multitask learning approach with task specific feature representation layers, shared multihead attention transformer encoder, and task-specific output layers to detect pesticides and estimate the precise concentrations of each pesticide simultaneously. By utilizing core-shell gold-silver nanoparticles, the model achieves near-perfect performance in identifying and quantifying pesticide residues, with multilabel metrics and regression accuracy demonstrating exceptional reliability (accuracy = 0.999; F1 score = 0.992; precision = 0.990; recall = 0.996). A detailed examination of the Raman spectra reveals the predominant influence of certain pesticides, and the mechanisms behind spectral dominance were elucidated. Our findings underscore the SERSFormer-2.0 model 's robustness and its potential to detect mixed contaminants in agricultural products, enhancing food safety and regulatory practices.