GAN-FixMatch: A generative-semi-supervised deep learning framework for small-sample quantitative analysis in near-infrared spectroscopy of agricultural and pharmaceutical materials.
Journal:
Analytica chimica acta
Published Date:
Mar 27, 2026
Abstract
BACKGROUND: Near-infrared (NIR) spectroscopy has become a key analytical tool for rapid and non-destructive quantification in agricultural, pharmaceutical, and medicinal materials. However, the predictive performance of deep learning models remains heavily constrained by the limited availability of labeled NIR spectra, as chemical reference measurements are labor-intensive, costly, and slow. Existing augmentation strategies either generate unrealistic spectral variations or introduce label drift that degrades model reliability. Thus, the central challenge is to achieve accurate and robust NIR quantitative modeling when only a limited number of samples can be labeled by reference chemical measurements. RESULTS: We propose GAN-FixMatch, a hybrid generative-semi-supervised framework that synthesizes large quantities of realistic unlabeled spectra while enforcing prediction consistency for robust quantitative modeling. The one-dimensional GAN accurately captured the global absorption patterns and fine-grained spectral variations in real samples, thereby expanding the training distribution without introducing regression-label drift. Building on these synthetic spectra, FixMatch applied dual perturbations-low-magnitude additive Gaussian noise to generate reliable pseudo-labels and high-magnitude additive Gaussian noise to regularize the model toward invariant predictions-effectively exploiting unlabeled information to stabilize learning under small-sample constraints. Extensive experiments on three representative NIR datasets-pharmaceutical granules, maize kernels, and American ginseng-demonstrated that GAN-FixMatch consistently surpassed fully supervised baselines, classical unsupervised augmentation, and GAN-labeled synthesis across multiple 1D CNN architectures. Notably, the method yielded substantial gains in coefficient of determination (R2), root mean square error (RMSE), and residual predictive deviation (RPD), with the best model achieving R2 = 0.993 and RPD = 12.3051, indicating markedly improved accuracy, robustness, and generalization. SIGNIFICANCE AND NOVELTY: This work introduces the first framework that jointly leverages generative spectral modeling and semi-supervised consistency learning for NIR quantitative analysis. The method overcomes the inherent limitations of conventional augmentation and GAN-labeled strategies, enabling high-precision prediction under scarce labeled data. GAN-FixMatch provides a robust, scalable pathway for NIR-based quality assessment and offers significant potential for broader applications in pharmaceutical analysis, food quality evaluation, and biomaterial characterization.
Authors
Keywords
No keywords available for this article.