Decision Tree and K-Means Analysis of Raman Spectra for Edible Oils: A Physics-Informed AI Approach
Researchers developed an AI framework combining Raman spectroscopy and machine learning to authenticate edible oils, achieving 100% accuracy for pure oils and over 85% for oils in a fried-potato-chip matrix.
Intelligence analysis by Gemini 2.5 Flash

This study introduces a novel Physics-Informed AI approach for food quality and fraud prevention, leveraging Raman spectra and machine learning algorithms like Decision Trees and K-Means. It demonstrates highly accurate and efficient identification of edible oils, even within complex food matrices, by significantly reducing the data footprint required for analysis.
Imagine you have different types of cooking oils, and you want to know which one is which, even if it's hidden inside a potato chip. Scientists used a special light, like a super-smart flashlight called Raman spectroscopy, to get a unique "fingerprint" for each oil. Then, they taught a computer brain, called AI, to recognize these fingerprints. The AI learned to tell pure oils apart perfectly, using just a tiny bit of the fingerprint. For oils mixed in chips, they used a clever trick to separate the oil's fingerprint from the chip's, so the AI could still tell them apart almost perfectly. This helps make sure our food is real and safe.
Analysis
Raman Spectroscopy
The study centers on Raman spectroscopy as the primary data source for analyzing edible oils. This technique provides intrinsic spectral organization, capturing unique chemical fingerprints of different oils. The initial unsupervised analyses using t-SNE and K-means clustering revealed that pure oils exhibit strong class organization and separability in their Raman spectra. However, the presence of a food matrix, specifically a fried-potato-chip, introduced significant spectral overlap, complicating direct classification. This highlights the challenge of applying spectral analysis in complex real-world food products.
Decision Trees
A key finding was the exceptional performance of Decision Trees in classifying pure edible oils. The models achieved a perfect 100% classification accuracy using an incredibly small subset of the spectral data. Specifically, only four Raman variables, representing approximately 0.21% of the original 1866-feature spectral space, were sufficient to maintain this perfect test-set performance. This demonstrates the power of interpretable machine learning models to identify highly discriminative features, leading to extremely compact and efficient classification systems. The consistency of these four variables across different pruning strategies further validates their importance.
Physics-Informed AI
To address the challenges posed by the food matrix, the researchers integrated a Physics-Informed AI approach using Non-Negative Least Squares (NNLS)-based spectral decomposition. This method was crucial for separating the oil-related spectral signatures from contributions made by the paper and potato components of the matrix. By effectively isolating the relevant oil signals, the PI-AI framework substantially improved classification accuracy for matrix-containing samples. Optimized post-pruned models achieved accuracies of 86.4% for paper-subtracted and 85.4% for paper-plus-potato-subtracted datasets, while further reducing the number of important Raman variables to five and four, respectively. This compact representation, reducing the data footprint by 99.44%, paves the way for Frugal AI, Edge AI, and portable food quality monitoring systems.
Key points
- An integrated Raman spectroscopy and machine learning framework was developed for edible oil authentication.
- The system achieved 100% classification accuracy for pure oils using only four Raman variables.
- Physics-Informed AI (NNLS decomposition) significantly improved classification for oils within a fried-potato-chip matrix.
- Optimized models for matrix samples reached over 85% accuracy with a highly reduced data footprint (99.44%).
- The approach supports Frugal AI, Edge AI, and portable food quality monitoring.
This physics-informed AI framework offers a promising foundation for developing highly accurate, compact, and interpretable food quality monitoring systems. Its efficiency and reduced data footprint could enable widespread adoption of Frugal AI and Edge AI in portable sensing devices, significantly enhancing food safety and fraud prevention globally.
While promising, the study's findings are based on five specific edible oils and a single food matrix (fried potato chips), meaning its generalizability to a wider variety of oils or more complex food products might require further validation. The "pronounced spectral overlap" in matrix samples still presents a challenge, even with PI-AI, suggesting limitations in highly complex real-world scenarios.

