A three-dimensional convolutional neural network with joint spectral-spatial attention for celery adulteration detection using hyperspectral imaging.
- 1School of Mathematics and Physics, Bengbu University, Bengbu, Anhui, China.
- 2Department of Computer Science, National University of Life and Environmental Sciences of Ukraine, Kyiv, Ukraine.
- 3Faculty of Food Technology and Quality Control of Agricultural Products, National University of Life and Environmental Sciences of Ukraine, Kyiv, Ukraine.
Abstract
Introduction
Stalk celery (Apium graveolens var. dulce) commands a market premium that invites substitution with cheaper Apiaceae relatives, yet conventional authentication is either destructive, slow, or insensitive at the low blending ratios that are hardest to catch.Methods
We acquired 420 visible-near-infrared hyperspectral cubes (400-1,000 nm) of celery adulterated with parsley, water dropwort, and lower celery petiole across seven mass ratios from 0 to 50%, each dish prepared as an independent weighing-mixing-filling event, and released the dataset under CC-BY. A parameter-efficient three-dimensional convolutional network was constructed in which a joint spectral-spatial attention module reweights wavelengths and spatial positions in series through a gated residual path, feeding shared features to paired classification and regression heads.Results
Averaged over five seeds on dish-level held-out data, the model reached 95.2 ± 0.5% accuracy with a Kappa of 0.944, exceeding PLS-DA, SVM, random forest, 1D-CNN, 2D-CNN, and an attention-free 3D-CNN; the margin over that backbone is significant by a dish-level McNemar test ( p = 0.008). The advantage concentrated at 5-10% adulteration, where accuracy remained 91.7% against 79.2% for the plain backbone. Ratio prediction achieved R2 = 0.973 and RMSE = 2.14 percentage points.Discussion
Once back-projected onto the original wavelength axis, the learned band weights localized to the chlorophyll a trough, the red edge, and the short-wavelength shoulder of the water band near 950-958 nm, and occluding exactly those windows cost the most accuracy, which supports a pigment-and-moisture reading of the model rather than a claim of chemical species recognition. With 1.42 M parameters and 47 ms of GPU inference per sample, the framework suits portable screening under the acquisition and preparation conditions studied here, although single-provenance sampling, a single instrument, and limited adulterant diversity still bound its generalization.
Related
- Targeted HPLC-MS/MS Profiling of Diacylglycerols for Krill Oil Authentication and Adulteration Detection
- Sudan Dye Adulteration in Foods: A Comprehensive Review of Health Risks, Detection Methods, Regulatory Responses, and Preventive Strategies.
- Predicting Adsorbate-Solvent Interaction Energies in Zeolite Pores Using Convolutional Neural Networks with Attention Mechanisms.
- HSI-AgriFoodAnomaly, a hyperspectral dataset for foreign object detection in agri-food inspection
- Non-destructive hyperspectral imaging and machine learning for detection of pea seed-borne mosaic virus in faba bean seeds.
BibTeX
@article{gao2026threedimensional,
title = {{A three-dimensional convolutional neural network with joint spectral-spatial attention for celery adulteration detection using hyperspectral imaging.}},
author = {Hui Gao and Tong Wu and Yuanxia Fu and Li Xu and Li Li and Li Wang},
journal = {Frontiers in nutrition},
year = {2026},
month = nov,
doi = {10.3389/fnut.2026.1972199},
url = {https://europepmc.org/article/MED/43060916},
note = {CC BY},
}
RIS
TY - JOUR
TI - A three-dimensional convolutional neural network with joint spectral-spatial attention for celery adulteration detection using hyperspectral imaging.
AU - Hui Gao
AU - Tong Wu
AU - Yuanxia Fu
AU - Li Xu
AU - Li Li
AU - Li Wang
PY - 2026
DA - 2026/11/05
JO - Frontiers in nutrition
DO - 10.3389/fnut.2026.1972199
UR - https://europepmc.org/article/MED/43060916
AB - Introduction Stalk celery (Apium graveolens var. dulce) commands a market premium that invites substitution with cheaper Apiaceae relatives, yet conventional authentication is either destructive, slow, or insensitive at the low blending ratios that are hardest to catch.Methods We acquired 420 visible-near-infrared hyperspectral cubes (400-1,000 nm) of celery adulterated with parsley, water dropwort, and lower celery petiole across seven mass ratios from 0 to 50%, each dish prepared as an independent weighing-mixing-filling event, and released the dataset under CC-BY. A parameter-efficient three-dimensional convolutional network was constructed in which a joint spectral-spatial attention module reweights wavelengths and spatial positions in series through a gated residual path, feeding shared features to paired classification and regression heads.Results Averaged over five seeds on dish-level held-out data, the model reached 95.2 ± 0.5% accuracy with a Kappa of 0.944, exceeding PLS-DA, SVM, random forest, 1D-CNN, 2D-CNN, and an attention-free 3D-CNN; the margin over that backbone is significant by a dish-level McNemar test ( p = 0.008). The advantage concentrated at 5-10% adulteration, where accuracy remained 91.7% against 79.2% for the plain backbone. Ratio prediction achieved R2 = 0.973 and RMSE = 2.14 percentage points.Discussion Once back-projected onto the original wavelength axis, the learned band weights localized to the chlorophyll a trough, the red edge, and the short-wavelength shoulder of the water band near 950-958 nm, and occluding exactly those windows cost the most accuracy, which supports a pigment-and-moisture reading of the model rather than a claim of chemical species recognition. With 1.42 M parameters and 47 ms of GPU inference per sample, the framework suits portable screening under the acquisition and preparation conditions studied here, although single-provenance sampling, a single instrument, and limited adulterant diversity still bound its generalization.
SN - 2296-861X
ER -