Masked Spectral Patch Pretraining and Prototype Classification for Near-Infrared Spectroscopic Discrimination of Eight Commercial Tea Products
Near-infrared (NIR) spectroscopy enables rapid tea-product screening, but classification studies can contain many spectra from a small number of physical subsamples. Accordingly, this evaluation grouped repeated measurements at the physical-subsample level. This study developed Masked Spectral Patch Pretraining and Prototype Classification (MSPPC), which integrates local spectral patches, self-supervised masked reconstruction, and class-centered prototype decisions. The dataset comprised 168 spectra from 56 physical subsamples across eight commercial tea products, with one package sampled per product. The confirmatory comparison used a 40-physical-subsample modeling set, five prespecified seeds, and group-aware five-fold cross-validation at the physical-subsample level. MSPPC achieved 96.50% ± 0.91% spectrum-level Accuracy and 96.54% ± 0.90% Macro-F1. Radial basis function support vector machine (RBF-SVM), multilayer perceptron (MLP), and Bayesian-optimized least-squares support vector machine (BO-LSSVM) occupied the same approximately 96–97% predictive range, and paired physical-subsample bootstrap comparisons showed closely matched predictive performance. After the normalized class outputs of three replicate spectra were averaged, all four confirmatory models produced 100% physical-subsample-level Accuracy and Macro-F1. The comparison also distinguished the models by between-seed variability and computational complexity, providing a broader basis for model selection than small differences in mean Accuracy. MSPPC therefore provides a competitive spectral representation-learning route for small-sample NIR analysis under rigorous repeated-measure evaluation.
Authors
- Menglong Cong
- Kunpeng Zhou (ORCID: https://orcid.org/0000-0002-4907-2764)
- De-Xin Wang (ORCID: https://orcid.org/0000-0002-3980-9910)
- Suyalatu Zhang (ORCID: https://orcid.org/0000-0002-9580-4209)
- Taiping Zhang
Institutions
- Inner Mongolia University for Nationalities (CN)
Publication Details
- Journal
- Foods
- Published
- 2026-12-01
- DOI
- https://doi.org/10.3390/foods15234331
- Primary Topic
- Spectroscopy and Chemometric Analyses
- Type
- article
- Field-Weighted Citation Impact
- 0.00