XAI-Supported Electronic Tongue for Estimating Milk Composition and Adulteration Indicators
Keywords:
Electronic tongue, Machine learning, Multispectral sensor, Milk quality controlAbstract
In this study, a low-cost AS7265x-based multispectral electronic tongue system was developed for estimating milk composition and adulteration indicators and supported with an explainable artificial intelligence (XAI) framework. Experimental analyses were conducted on 190 augmented commercial milk samples, where fat, protein, solids-not-fat (SNF), density, freezing point, and added water ratio were treated as target variables. Sensor data were modeled as RAW, DERIVED, and FUSION feature sets, and regression performance was compared using Random Forest, Gradient Boosting, AdaBoost, KNN, and XGBoost. Model validation was carried out with both five-fold cross-validation and Leave-One-Out (LOO) strategies to assess field-level generalizability. Results showed that a narrow-band, low-cost optical sensor platform can estimate not only fat and protein but also SNF, density, and freezing point with high accuracy. Within the XAI framework, permutation-based importance analysis and SHAP were used to identify critical spectral bands for each target parameter, enabling data-driven recommendations for band-oriented sensor design optimization. The study presents a scalable methodology that integrates low-cost sensor design, multi-parameter quality estimation, and explainable modeling beyond traditional fat–protein-focused approaches. Across all six targets, the XAI analysis consistently identified the near-infrared channel at 860 nm (asIR_3) as the most informative band, reflecting the combined effect of water absorption and Mie scattering by fat globules; the visible channel at 680 nm (asVIS_4) emerged as a secondary band, reflecting dissolved-matter scattering. These bands are therefore the natural starting point for cost-reduced versions of the sensor. Among the compared feature sets (RAW, DERIVED, FUSION), the 18-band RAW configuration provided the most balanced performance across all six targets.