The New Technologies That Could Make Our Food Safer
Explore how new AI tools and sensors are improving the detection of food contaminants and spoilage.
The decisions we make at the grocery store are often low stakes. Chicken or beef for dinner? Which box of fruit looks freshest? We don’t have to ask ourselves whether the food on sale will harm our health, because food safety technology works across the supply chain to ensure our groceries are free of biological and chemical contamination.
But safety isn’t always guaranteed. The Centers for Disease Control and Prevention monitor dozens of foodborne disease outbreaks every week across the United States. There’s growing appreciation of the risk that chemical contaminants, like per- and polyfluoroalkyl substances (PFAS), pose to long-term health, too.
Luckily, applied and analytical science is rising to the challenge. Analytical techniques for monitoring contaminants are becoming more sensitive and specific. These techniques provide valuable data sources, but their full potential can only be realized if they are handled properly. Researchers say the advent of predictive and generative AI can help academia and industry anticipate and prevent food spoilage and contamination.1 In this article, we explore some of the latest advances in food safety and how AI can accelerate insight generation.
Analytical chemistry and food safety
Separation-based techniques, such as gas chromatography–mass spectrometry (GC–MS) and liquid chromatography–mass spectrometry (LC–MS), are used to detect trace amounts of chemical contaminants in food samples. Compounds in a sample are separated by chromatography, and the mass spectrometer identifies and quantifies them based on their mass-to-charge ratios.
These highly sensitive techniques are especially useful because they can analyze multiple compounds in a single sample. Researchers at Gyeongsang National University in South Korea developed a method to detect residual pesticides in vegetables using GC–MS/MS and LC–MS/MS, which further enhances analysis.2 This approach could detect more than 200 different compounds in each sample.
Analytical techniques, such as targeted LC-MS or targeted nuclear magnetic resonance spectroscopy, cannot identify novel contaminants, as they are designed to only highlight preselected molecules. These approaches may miss unheralded toxins. In the decade from 2010 to 2020, over 100 new pesticides were launched.3 But newer mass spectrometry-based techniques, such as Orbitrap and spatial mass spectrometry imaging (MSI), enable untargeted imaging of all compounds in a sample.4 MSI imaging has been used to identify illegal additives in coffee and toxins in maize and peanuts.5,6
The chemical composition of food samples can also be assessed using spectroscopic techniques. These methods reveal how molecules absorb, emit, or scatter light to provide chemical information. Analytical chemists can use this information to detect traces of elemental contaminants, including heavy metals such as lead and cadmium. Spectroscopic techniques are simple, fast, and, in some variants, such as Raman spectroscopy, are non-destructive.
There have been several recent leaps forward in spectroscopic analysis techniques. Wide-line surface-enhanced Raman scattering (WL-SERS) spectroscopy, developed in 2020, offers dramatically increased sensitivity compared to traditional methods and can identify food contaminants, such as melamine in raw milk, at levels that were undetectable using earlier techniques.7
Other advances are focused on making spectroscopic techniques more portable and flexible. Handheld near-infrared spectrometers have advanced in the last decade and can provide near real-time, on-site screening of food quality and some contaminants.8
Smarter, simpler food safety testing at scale
Laboratory-based techniques require extensive personnel training and complex sample preparation, making them less practical for commercial-scale use. Even portable devices require some training and lack some of the analytical power of their laboratory counterparts. Further, they may struggle to process samples of some food types.9
Biosensors that provide real-time readouts go some way toward simplifying analysis. Dpyt, a near-infrared (NIR) fluorescent probe, can accurately identify spoilage in salmon, providing a rapid visual readout for easy use.10 Nanocellulose-based sensors that detect food freshness by recording pH levels have also been developed, providing an eco-friendly detection method.11
The advent of powerful predictive and generative AI tools has created opportunities to augment analytical techniques or bypass their limitations. Jiyoon Yi, a biosystems engineer at Michigan State University, studies how AI can optimize food safety. If AI can reduce the barriers to accessing reliable food safety testing, she says, “We can really do preventive monitoring instead of doing the testing after something happens.”
There are rich opportunities to improve analytical chemistry techniques through the application of AI. Fluorescence spectroscopy is a useful tool for testing food quality and purity, but the resulting data is high-dimensional and may be complicated by spectral interference from the environment or instruments.
At scale, this complex data needs to be simplified through algorithmic dimensionality reduction. A recent review highlighted that traditional machine learning techniques struggle with this task and showed that workflows using deep learning could enhance the models’ predictive ability.12
Other AI approaches can be used to identify samples that should be prioritized for more complex analysis. Scientists have used predictive AI algorithms as pre-screening tools to identify food samples at higher risk of contamination. Algorithms have been used to identify the source of foodborne listeriosis, diseases of citrus leaf, and sickness in fish.13,14,15
One research team used machine learning algorithms to identify raw milk samples that tested positive for a carcinogenic mycotoxin.16 Five machine learning techniques were evaluated, with the most successful achieving an accuracy of above 80%. This level of accuracy is roughly the goal for detection in biological samples, which vary enough to make perfect prediction unlikely, said Yi.
AI-based approaches to food safety need good data
AI-based approaches to food safety hinge on their ability to access relevant data, said Luke Qian, a postdoctoral researcher at Cornell University. “Data for food safety are often stored in siloes,” he explained. “These data are very hard to retrieve because they're not in a standardized format.”
The mycotoxin detection algorithm was fed data on the milk samples’ protein, fat, and sugar levels, as well as their acidity, temperature, and viscosity. The study was able to collate these diverse data sources because it tracked data from a single factory. Qian says the industry needs to improve its data collection capabilities to maximize the value of predictive AI. “To make accurate predictions, you really need good signals,” he said.
That’s where generative AI might be able to help. Qian continued: “These models are really good at reading files and then capturing the patterns within these files, as well as summarizing and documenting the key information.”
Qian’s research focuses on microbial contamination in the food pipeline. In this area, bacterial culture methods are still regularly used. But bacteria take time to grow. Qian says that computer vision technologies could accelerate the timeline. These techniques, he emphasized, need bespoke training data sources to work effectively. But when that data is available, the results are impressive.
Yi’s team at Michigan State University trained an AI-based classification system to detect Escherichia coli in food samples. This process usually takes days, but the algorithm could identify E. coli microcolonies after just three hours.17
Some prototype AI systems can even run outside of the lab. A team at Oregon State University developed a smartphone-based AI system that predicts the freshness and consistency of avocados based solely on images of the fruit. The scientists hope that the tool could be used at every stage of the production process, in factories, retailers, and even by consumers.18
According to Qian, to make these tools practical at scale, standardizing data-capture processes is essential. If data from different production processes that use different scoring scales or detection limits, “you are comparing apples to oranges,” said Qian.
In Yi’s opinion, the main barrier to industry-wide adoption is less about the technology gap and more about communication between industry and academia, as well as between different fields of academia. Applying AI effectively to applied sciences requires knowledge of both how models work and what biological data is needed to make them excel.
Yi noted that motivating consumers to prioritize food safety could be the first step in pushing the industry to embrace new technologies. Those grocery store decisions might be more important than you first thought.
“I feel like as a world, if we have some variations on all the motivations to focus on food safety with help from AI, then probably that'll be just win‒win for all of us,” she concluded.