Guiyu Zhang, Maohan Qin, Kerong Chen, Shiliao Deng, Xianglin Zeng, Longxin Li
Near-infrared (NIR) spectroscopy offers a rapid and non-destructive approach for Baijiu quality evaluation, but interpreting nonlinear spectral classifiers remains challenging because NIR bands are broad, overlapping, and highly collinear. This study applied an interpretable eXtreme Gradient Boosting (XGBoost)-based NIR strategy to Baijiu base liquor grade classification, with particular emphasis on characterizing the spectral response patterns underlying model decisions. A total of 482 samples from three production grades were analyzed. The stable-feature XGBoost model achieved 93.26% accuracy in repeated stratified cross-validation and retained useful discrimination performance under leakage-controlled, repeated hold-out, and production-batch-grouped validation, with a batch-grouped accuracy of 88.14%. To move beyond label prediction, Sobol sensitivity analysis, Shapley additive explanations (SHAP), accumulated local effects (ALE), and SHAP waterfall analysis were integrated to examine global sensitivity, grade-specific attribution, nonlinear response behavior, pairwise effects, and instance-level decision pathways. The interpretation results identified a shared discriminative anchor near 4663 cm-1, Grade 2-related contributions near 5812-5836 cm-1, and broader Grade 3-associated responses within 5800-6600 cm-1. ALE further showed nonlinear transitions, plateau behavior, and pairwise response surfaces, while waterfall analysis illustrated how competing local contributions led to an individual misclassification. These results indicate that Baijiu grade discrimination was governed by distributed and interaction-associated spectral patterns rather than isolated single-band responses. The identified regions are broadly consistent with O-H- and C-H-related NIR absorption intervals, but should be interpreted as model-level spectral associations. Overall, the combined analysis supports more transparent and traceable interpretation of NIR-based Baijiu grade classification and provides an auxiliary strategy for rapid quality screening.