Allergen Detection

Real World Challenge

Food manufacturers face a persistent risk of allergen contamination — a single mistake such as loading the wrong powder onto a production line can compromise food safety, product quality, and regulatory compliance. Even trace amounts of allergenic ingredients like peanuts can trigger severe reactions, making detection at the earliest possible stage critical. Traditional allergen testing methods are often slow, lab-based, and unsuitable for inline monitoring, meaning contaminated batches may only be identified after costly production runs.

In powdered ingredient handling, this challenge is compounded by visually similar materials, variable ingredient origins, and changing production conditions. Detecting and quantifying allergens in real time, directly on the line, requires technology that is fast, accurate, adaptable, and cost-effective — capable of working with both stationary and moving samples without extensive retraining for each new set of operating conditions.

A flow chart of spectral pre-processing, feature selection and machine learning algorithms.

Our AI Solution

At the Food AI Lab, we have developed advanced allergen detection systems that combine Near-Infrared (NIR) spectroscopy with state-of-the-art machine learning.

Our research demonstrates that:

  • High-accuracy powder classification under real production conditions is possible, with models achieving over 99% accuracy even on moving samples by using optimised pre-processing (e.g., autoencoders) and classification algorithms (e.g., SVM with boosting).

  • Targeted allergen quantification, such as detecting peanut powder in garlic powder down to 0.01%, can be achieved with low-cost NIR sensors, supporting both contamination detection and concentration prediction for different allergen levels.

  • Domain adaptation techniques allow models trained on stationary samples to be transferred to moving production-line conditions, dramatically reducing the need for new labelled data while maintaining up to 99.68% accuracy.

  • Ensemble learning and model interpretability improve both reliability and trust, providing manufacturers with clear insight into prediction confidence and the spectral features driving decisions.

This AI-driven approach enables real-time, inline allergen detection that is rapid, non-destructive, and scalable. By reducing testing time from hours to seconds, and by adapting seamlessly to new production scenarios, our solution helps food manufacturers safeguard consumers, meet strict regulatory requirements, and avoid costly product recalls.

References