Key Indicator Detection and Authenticity Identification of Beer Based on Near-Infrared Spectroscopy Combined with Multi-Task Feature Extraction

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.

Authors

Institutions

Publication Details

Journal
Molecules
Published
2026-03-26
DOI
https://doi.org/10.3390/molecules31071083
Primary Topic
Spectroscopy and Chemometric Analyses
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Key Indicator Detection and Authenticity Identification of Beer Based on Near-Infrared Spectroscopy Combined with Multi-Task Feature Extraction

Guiqing Xi, Weite Li, Chong Tan, Yuhao Lu et al.
Molecules
Spectroscopy and Chemometric Analyses
article

Key Indicator Detection and Authenticity Identification of Beer Based on Near-Infrared Spectroscopy Combined with Multi-Task Feature Extraction

Guiqing Xi, Weite Li, Chong Tan, Yuhao Lu, Yongshun Wei, Jinming Liu, Changan Xu
article en

Abstract

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.

MoleculesVol. 31(7)
South China Agricultural University (CN), Chongqing Technology and Business University (CN), Harbin University of Commerce (CN), Heilongjiang Bayi Agricultural University (CN)
Reduced inequalities
Openalex Percentile: Top 6%
Spectroscopy and Chemometric Analyses
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.