A model combining near-infrared spectroscopy (NIRS) with artificial intelligence (AI) to predict the presence of allergenic proteins in food, achieved a classification accuracy of 87 percent and a false-negative rate of 3.3 percent. The study tested whether spectra could flag foods known to contain nonspecific lipid transfer proteins (nsLTPs).
NsLTPs are found in a range of plant foods and can retain their allergenic potential after heating or digestion. The authors investigated whether optical measurements could provide a rapid screening step, and contrasted the approach with established techniques such as enzyme-linked immunosorbent assays (ELISA) and immunoblotting, which require laboratory preparation.
The team collected near-infrared absorbance and reflectance spectra over approximately 900–1,700 nm. The dataset included peaches, apples, strawberries, and tomatoes, as well as cucumber, potato, albumin, and powdered milk. Researchers assigned positive and negative labels using curated allergen databases and published literature rather than a reference assay on each specimen. They excluded foods with ambiguous labels.
A deep neural network performed best among the six models evaluated. On the test set, it achieved an area under the receiver operating characteristic curve of 0.94 and a positive-class F1 score of about 90 percent. The F1 score combines precision and recall; it does not indicate the lowest concentration the method can detect. The five other models achieved test-set accuracies of 41–57 percent. Two of them, a decision tree and XGBoost, exceeded 95 percent accuracy during validation but fell to 41 percent on the held-out set.
The labeling strategy limits what the results mean for food-testing laboratories. Because the labels were based on documented allergen content for each food type, the study cannot show whether the network recognized signals attributable to nsLTPs or broader spectral differences between foods. The authors also noted that sample shape, condition, moisture, and heterogeneity can affect the spectra.
The reported accuracy reflects how often the model matched the study’s food-category labels. The researchers did not compare predictions with direct measurements of nsLTPs in individual samples, so the study did not establish how reliably the method detects the protein at different concentrations within the same food type.
