Ensuring food safety and freshness is one of the most persistent challenges in a globalized food system. Traditional approaches – from microbial culture tests to chromatographic assays – remain the gold standard for accuracy, but they are slow, labor-intensive, and unsuitable for the continuous monitoring required in complex supply chains. Meanwhile, consumer expectations for transparency and regulatory demands for traceability are rising.
Volatile gases, emitted as by-products of ripening, fermentation, spoilage, or microbial growth, offer a powerful indirect route to assessing food condition. The difficulty lies in capturing those signals in real-world environments, where concentrations may be low and background noise high. Here, according to a recent review by researchers from Nanjing Agricultural University, China, and University of Seville, Spain, spectroscopic gas sensing (SGS) – and AI – comes to the fore.
The SGS toolkit
The review highlighted three SGS techniques:
Non-dispersive infrared spectroscopy (NDIR): the workhorse
Tunable diode laser absorption spectroscopy (TDLAS)
Photoacoustic spectroscopy (PAS)
NDIR is the most widely adopted SGS technique, using broadband infrared sources and filters to detect gases such as CO₂, ethylene, and ammonia. Its strengths are simplicity, low cost, and portability, which make it attractive for large-scale deployment. Field studies show NDIR sensors can flag CO₂ buildup during meat spoilage or ethylene bursts that trigger premature ripening in fruit stores.
Yet NDIR has limitations: sensitivity is typically restricted to the parts-per-million range, leaving trace gases below detection. Humidity and cross-interference between gases also introduce noise. Researchers have developed multi-channel NDIR systems to partly overcome these challenges, incorporating longer optical paths, miniaturized Fresnel optics, and even preconcentration modules that adsorb target gases before measurement. With these tweaks, detection limits for ethylene in apples have been driven down below 10 ppm.
TDLAS, on the other had, brings sharper resolution by replacing broadband lamps with narrow-linewidth tunable lasers, enabling precise alignment with absorption lines of target gases. This boosts sensitivity to the parts-per-billion range and makes it possible to discriminate between overlapping signals.
TDLAS is already proving its worth in food applications. In dairy monitoring, sensors have tracked microbial spoilage of yogurt by detecting CO₂ accumulation. In wine analysis, TDLAS-based devices quantify dissolved CO₂ in the headspace with far greater precision than traditional methods. For packaged foods, TDLAS has been integrated into in-line production systems, where it measures residual oxygen in modified atmosphere packaging (MAP) at concentrations as low as 1000 ppm – a critical threshold for microbial growth control.
However, TDLAS systems are more complex and costly than NDIR. They require careful temperature control and calibration, and measurements can drift in heterogeneous environments. Wavelength modulation spectroscopy (WMS), which extracts harmonic signals from laser modulation, has been adopted to improve noise resistance and extend detection limits, paving the way for industrial deployment.
PAS takes a fundamentally different approach. Instead of measuring transmitted light, it converts absorbed photons into acoustic waves via non-radiative relaxation. Microphones or quartz tuning forks detect these sound waves, enabling extraordinary sensitivity – down to parts-per-trillion in some cases.
This makes PAS especially well suited to trace gases like ethylene, a key marker of fruit ripening. PAS has revealed physiological differences between organic and non-organic berries, detected early signs of citrus infection, and tracked ethanol and ammonia release from apples during maturation. Emerging quartz-enhanced PAS (QEPAS) variants replace microphones with quartz resonators, reducing size and energy demand while suppressing ambient noise.
The trade-off is cost and complexity: PAS systems remain expensive, fragile, and difficult to scale for industrial use. But their ability to detect spoilage markers at ultra-low levels means they could become indispensable for high-value supply chains where precision trumps cost.
The AI advantage
Although SGS techniques may be promising, overlapping absorption bands, variable humidity, background gases, and fluctuating temperature all conspire to obscure weak signals. Enter artificial intelligence (AI), which has become an exciting enabler of SGS in food systems.
Machine learning methods such as random forests, gradient boosting, and support vector machines are already being used to correct for temperature and humidity drift in CO₂ sensors, reducing error margins by over 60 percent. Deep learning goes further: convolutional neural networks (CNNs) and residual networks (ResNets) can denoise complex PAS signals, while hybrid CNN–LSTM models have been trained to separate overlapping gas signatures, achieving near-perfect classification accuracy in laboratory tests.
Explainable AI (XAI) adds another layer of value by making these models interpretable. Using SHapley Additive exPlanations (SHAP), researchers can identify which environmental factors (e.g. ambient temperature, sensor chamber temperature, or soil pH) most influence predictions. This transparency is critical for regulatory acceptance and industrial trust.
AI also enables fusion of multiple sensing modalities. For example, hyperspectral imaging (HSI) data on fruit surface color can be combined with NDIR gas measurements of ethylene release. Machine learning models that integrate both sources outperform either sensor alone, providing more robust predictions of fruit sweetness, ripeness, or storage stability.
Decision-level fusion frameworks – which aggregate outputs from separate Raman, FTIR, or SGS models – are emerging as powerful tools for enhancing reliability in noisy real-world environments. These fusion strategies mirror approaches in biomedicine, where multimodal models integrate imaging, spectroscopy, and metabolomics to diagnose disease more accurately than single modalities.
Perhaps the most exciting AI-driven advance is the shift from monitoring to feedback-enabled control. By embedding lightweight AI models on sensors and edge devices, it becomes possible to not just detect spoilage gases, but to act on them in real time. Imagine a cold storage facility where a spike in ethylene automatically triggers ventilation fans, or a meat transport unit that deploys neutralizing sprays when ammonia levels rise.
“AI technologies empower spectroscopic gas sensing technologies to expand their applicability in the food sector by enhancing signal quality, improving model interpretability, enabling multimodal data fusion, and facilitating real-time monitoring with dynamic feedback,” the authors concluded.
Towards digital food systems
The authors of the review envision a hierarchical system in which responsibility is distributed across three levels. At the device level, low-power models would run on microcontrollers, allowing portable NDIR or PAS sensors to preprocess signals and flag anomalies locally. Moving up to the edge level, processors in warehouses or trucks could handle multimodal data fusion and resource optimization, reducing latency and energy demand. Finally, at the cloud level, data aggregated from distributed nodes would support system-wide optimization, retrospective analysis, and the retraining of models through federated learning approaches.
Future visions extend to the Internet of Things (IoT) and flexible packaging. Imagine a strawberry punnet embedded with a thin-film infrared sensor, powered by a printed micro-battery, transmitting real-time ethylene levels to a mobile app. Consumers could be notified when fruit is approaching peak ripeness, while retailers receive shelf-life forecasts to optimize sales.
“Progress in flexible electronics and nanomaterials is expected to promote the incorporation of SGS into smart packaging systems, allowing for continuous monitoring and digital representation of the internal gaseous environment,” the authors noted.
But perhaps the boldest prospect is the digital twin: a virtual representation of a food product or supply chain, continuously updated with sensor data. By feeding real-time ethylene, CO₂, or ammonia levels into predictive models of ripening, microbial growth, or enzymatic activity, digital twins could simulate future quality states, enabling predictive interventions.
For example, a twin of an apple shipment could forecast browning risk days in advance, guiding adjustments in transport temperature or atmospheric composition. Such predictive capabilities could drastically reduce waste and improve food safety.
“Looking ahead, building a reliable and scalable AI-driven SGS ecosystem for food applications requires collective efforts from the sensing, food science, AI, and regulatory communities,” the authors noted. “In addition to open-access datasets, validated calibration protocols, and standardized reporting guidelines, future efforts should prioritize the design of benchmarking frameworks that can be adapted to the specific demands of different food scenarios.”
Barriers to adoption
Despite the promise, several challenges remain. One is standardization: sensor performance metrics are often reported under inconsistent conditions, making it difficult to compare results across studies. The authors stress the urgent need for unified calibration protocols and open spectral datasets.
Another issue is environmental variability. Sensors must continue to function reliably despite shifts in temperature, humidity, and background gas composition that are inevitable in real-world supply chains.
Cost and scalability also pose obstacles: while NDIR sensors are relatively inexpensive, PAS and TDLAS systems remain costly and complex to scale.
Finally, there is the question of workforce readiness. Food handlers and logistics staff cannot be expected to act as spectroscopists, so intuitive interfaces, automated quality checks, and clear operating protocols will be essential for widespread adoption.
“Future efforts should also focus on the development of intuitive system interfaces, guided workflows, and modular training programs tailored to different user groups,” the authors wrote.
Nevertheless, the authors argue that AI-enhanced SGS – by offering non-contact, real-time, and predictive monitoring – could replace reactive testing with proactive control, supporting a more transparent, resilient, and sustainable food system.