Molecules, Vol. 31, Pages 1083: Key Indicator Detection and Authenticity Identification of Beer Based on Near-Infrared Spectroscopy Combined with Multi-Task Feature Extraction

Fuente: Molecules - Revista científica (MDPI)
Molecules, Vol. 31, Pages 1083: Key Indicator Detection and Authenticity Identification of Beer Based on Near-Infrared Spectroscopy Combined with Multi-Task Feature Extraction
Molecules doi: 10.3390/molecules31071083
Authors:
Yongshun Wei
Guiqing Xi
Jinming Liu
Yuhao Lu
Chong Tan
Changan Xu
Weite Li

To address traditional beer detection limitations, this study proposes a rapid NIRS-based method for detecting key indicators and verifying authenticity. Designing Single-task (STL) and Multi-task learning (MTL) strategies, it employs Variable Importance in Projection for wavelength selection. Deep spectral features were extracted utilizing a Multi-Head Attention (MHA)-fused Convolutional Neural Network (CNN-MHA), Long Short-Term Memory (LSTM-MHA), and hybrid CNN-LSTM-MHA networks. To further enhance model performance, the Bayesian Optimization Algorithm globally optimized network hyperparameters in STL, alongside hyperparameters and multi-task loss weights in MTL. Partial least squares regression, support vector machine regression, and partial least squares discriminant analysis models were established using these features. Results indicate that the MTL-based CNN-LSTM-MHA network effectively learns shared features across multiple tasks, significantly improving model generalization. Specifically, the coefficients of determination (R2) for alcohol content and original wort concentration in the validation set were 0.996 and 0.997, respectively, with relative root mean square errors (rRMSE) of 2.024% and 2.515%. In the independent test set, the R2 were 0.995 and 0.991, with rRMSE of 2.515% and 2.087%, respectively. Furthermore, 100% classification accuracy was achieved across all datasets. This method provides an efficient technical solution for beer market regulation and real-time detection in production processes.