Classification and quantification of sodium metabisulfite in goji berry powder: Applications of hyperspectral technology and transformer-based hybrid models.
Journal:
Spectrochimica acta. Part A, Molecular and biomolecular spectroscopy
Published Date:
Dec 22, 2025
Abstract
Sodium metabisulfite (Na2S2O5) is widely used as an antioxidant and preservative in food products, but excessive residues pose health risks and are strictly regulated. Rapid and non-destructive detection methods are therefore essential, particularly for goji berry powder where sulfite addition is common during processing. In this study, near-infrared hyperspectral imaging (HSI, 900-1700 nm) was employed in combination with advanced deep learning models to classify and quantify sodium metabisulfite concentrations. A total of 360 samples (nine concentration levels including control, 40 replicates each) were prepared, with 70 % allocated for training and 30 % for testing. For classification, a hybrid ResLocalformer model that integrates local attention and residual paths within a Transformer framework achieved an accuracy of 97.22 %. For regression, the Resformer model, combining Transformer's global attention with dense layers, yielded an R2 of 0.9945 and RMSE of 0.0343. Spectral preprocessing using first-derivative Gaussian smoothing (1DER-GS) significantly enhanced feature quality, improving overall model performance by more than 40 %. Compared with conventional approaches such as CNN and LSTM, the proposed models demonstrated superior robustness and predictive accuracy. These results indicate that HSI combined with transformer-based hybrid models provides an effective and non-destructive approach for monitoring sodium metabisulfite in goji berry powder, with strong potential for extension to the detection of other food additives and matrices.
Authors
Keywords
No keywords available for this article.