A three-dimensional convolutional neural network with joint spectral–spatial attention for celery adulteration detection using hyperspectral imaging
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 R 2 = 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.
Authors
- Li Wang (ORCID: https://orcid.org/0009-0007-7925-4773)
- Li Li
- Tong Wu
- Li Xu
- Hui Gao
- Yuanxia Fu
Institutions
- National University of Life and Environmental Sciences of Ukraine (UA)
- Bengbu University (CN)
Publication Details
- Journal
- Frontiers in Nutrition
- Published
- 2026-11-05
- DOI
- https://doi.org/10.3389/fnut.2026.1972199
- Primary Topic
- Spectroscopy and Chemometric Analyses
- Type
- article
- Field-Weighted Citation Impact
- 0.00