Quantitative Analysis Model for the Powder Content of Zanthoxylum bungeanum Based on IncepSpect-CBAM
Abstract
1. Introduction
- (1)
- A one-dimensional convolutional neural network incorporating the Inception module, CBAM attention mechanism, and ResNet architecture is designed and implemented. This model eliminates the need for complex preprocessing, adapts well to small datasets, and achieves a balance between high performance and implementation simplicity.
- (2)
- While most traditional studies on food adulteration detection focus on the content of the adulterant, this study shifts attention to detecting the content of Zanthoxylum bungeanum powder itself, aiming to build a generalized detection model unaffected by adulterant types. This provides a new perspective and approach for food adulteration detection.
- (3)
- This study evaluates the proposed IncepSpect-CBAM model against several benchmark models including the 1D-CNN and DeepSpectra deep learning architectures as well as traditional PLSR and SVR methods, convincingly demonstrating its performance advantages.
2. Materials and Methods
2.1. Sample Preparation
2.2. Spectral Data Acquisition
2.3. Sample Set Partitioning
2.4. IncepSpect-CBAM Model Architecture
2.5. Quantitative Prediction Models for Comparison
2.5.1. DeepSpectra Model
2.5.2. 1 D-CNN Model
2.5.3. Traditional Quantitative Modeling Methods
2.6. Model Performance Evaluation Metrics
3. Results and Discussion
3.1. Spectral Feature Analysis
3.2. Performance Comparison with Baseline Models
3.2.1. Comparative Analysis of Deep Learning Models
3.2.2. Benchmarking Against Traditional Chemometric Methods
3.3. Ablation Study Analysis
3.4. Comparison Between Single-Adulterant and Multi-Adulterant IncepSpect-CBAM Models
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
| NIRS | Near-infrared spectroscopy |
| CBAM | Convolutional Block Attention Module |
| PLSR | Partial Least Squares Regression |
| SVR | Support Vector Regression |
References
- Zhang, D.; Sun, X.X.; Battino, M.; Wei, X.O.; Shi, J.Y.; Zhao, L.; Liu, S.; Xiao, J.B.; Shi, B.L.; Zou, X.B. A comparative overview on chili pepper (capsicum genus) and sichuan pepper (zanthoxylum genus): From pungent spices to pharma-foods. Trends Food Sci. Technol. 2021, 117, 148–162. [Google Scholar] [CrossRef]
- Sun, X.X.; Zhang, D.; Zhao, L.; Shi, B.L.; Sun, Y.; Shi, J.Y.; Battino, M.; Wang, G.C.; Wang, W.; Zou, X.B. A novel strategy based on dynamic surface-enhanced Raman scattering spectroscopy (D-SERS) for the discrimination and quantification of hydroxyl-sanshools in the pericarps of genus Zanthoxylum. Ind. Crops Prod. 2022, 183, 114940. [Google Scholar] [CrossRef]
- Wu, X.Y.; Zhu, S.P.; Wang, Q.; Long, Y.K.; Xu, D.; Tang, C. Qualitative Identification of Adulterated Huajiao Powder Using Near Infrared Spectroscopy Based on DPLS and SVM. Spectrosc. Spectr. Anal. 2018, 38, 2369. [Google Scholar]
- Wu, X.Y. Identification of Geographical Origin, Freshness and Adulteration of Huajiao by Near Infrared Spectroscopy. Ph.D. Thesis, Southwest University, Chongqing, China, 2018. [Google Scholar]
- Pan, J.X. Construction of Detection Method Based on Deep Learning and Its Application in Identification of Spices Adulteration. Master’s Thesis, Fuzhou University, Fuzhou, China, 2022. [Google Scholar]
- Zhang, M.T.; Shi, Y.H.; Sun, W.; Wu, L.; Xiong, C.; Zhu, Z.H.; Zhao, H.F.; Zhang, B.L.; Wang, C.X.; Liu, X. An efficient DNA barcoding based method for the authentication and adulteration detection of the powdered natural spices. Food Control 2019, 106, 106745. [Google Scholar] [CrossRef]
- Yu, Y.; Chai, Y.H.; Yan, Y.J.; Li, Z.M.; Huang, Y.; Chen, L.; Dong, H. Near-infrared spectroscopy combined with support vector machine for the identification of Tartary buckwheat (Fagopyrum tataricum (L.) Gaertn) adulteration using wavelength selection algorithms. Food Chem. 2025, 463, 141548. [Google Scholar] [CrossRef]
- Chen, X.Y.; Chai, Q.Q.; Lin, N.; Li, X.H.; Wang, W. 1D convolutional neural network for the discrimination of aristolochic acids and their analogues based on near-infrared spectroscopy. Anal. Methods 2019, 11, 5118–5125. [Google Scholar] [CrossRef]
- Oliveira, V.M.A.T.d.; Baqueta, M.R.; Marção, P.H.; Valderrama, P. Authentication of organic sugars by NIR spectroscopy and partial least squares with discriminant analysis. Anal. Methods 2020, 12, 701–705. [Google Scholar] [CrossRef]
- Turgut, S.S.; Ayvaz, H.; Dogan, M.A.; Pérez Marín, D.; Menevseoglu, A. Detecting carob powder adulteration in cocoa using near and mid-infrared spectroscopy: A comprehensive classification and regression analysis. Food Res. Int. 2025, 208, 116132. [Google Scholar] [CrossRef]
- Chao, J.; Ba, H.R.; Dai, J.R.; Xie, Y.X.; Zang, T.Y.; Sun, Y.; Shi, R.; Zhao, L.J.; Yang, M.; He, X.H.; et al. Developing a quantitative adulteration discrimination model for forest-grown Panax notoginseng using near-infrared spectroscopy with a dual-branch network. Food Res. Int. 2025, 205, 115879. [Google Scholar]
- Luo, W.F.; Deng, J.H.; Li, C.X.; Jiang, H. Quantitative Analysis of Peanut Skin Adulterants by Fourier Transform Near-Infrared Spectroscopy Combined with Chemometrics. Foods 2025, 14, 466. [Google Scholar] [CrossRef] [PubMed]
- Menevseoglu, A.; Entrenas, J.A.; Gunes, N.; Dogan, M.A.; Pérez Marín, D. Machine learning-assisted near-infrared spectroscopy for rapid discrimination of apricot kernels in ground almond. Food Control 2024, 159, 110272. [Google Scholar] [CrossRef]
- Wang, Z.Z.; Wu, Q.Y.; Mohammed, K. Portable NIR spectroscopy and PLS based variable selection for adulteration detection in quinoa flour. Food Control 2022, 138, 108970. [Google Scholar] [CrossRef]
- Castell, A.; Arroyo Manzanares, N.; López García, I.; Zapata, F.; Viñas, P. Authentication strategy for paprika analysis according to geographical origin and study of adulteration using near infrared spectroscopy and chemometric approaches. Food Control 2024, 161, 110397. [Google Scholar] [CrossRef]
- Wang, R.; Fang, Y.; Luo, W.F.; Chen, M.T.; Li, Z.M.; Yu, Y.; Ren, Z.Y.; Huang, Y.; Dong, H. Quantitative analysis of camellia oil binary adulteration using near infrared spectroscopy combined with chemometrics. Microchem. J. 2025, 217, 115018. [Google Scholar] [CrossRef]
- Souza, L.L.d.; Chaves Candeias, D.N.; Moreira, E.D.T.; Diniz, P.H.G.D.; Springer, V.H.; Sousa Fernandes, D.D.d. UV–Vis spectralprint-based discrimination and quantification of sugar syrup adulteration in honey using the Successive Projections Algorithm (SPA) for variable selection. Chemom. Intell. Lab. Syst. 2025, 257, 105314. [Google Scholar] [CrossRef]
- Rani, A.; Sarma, M. Rapid detection of sunset yellow adulteration in tea powder with variable selection coupled to machine learning tools using spectral data. J. Food Sci. Technol. 2023, 60, 1530–1540. [Google Scholar] [CrossRef]
- Li, Z.M.; Song, J.H.; Ma, Y.X.; Yu, Y.; He, X.M.; Guo, Y.X.; Dou, J.X.; Dong, H. Identification of aged-rice adulteration based on near-infrared spectroscopy combined with partial least squares regression and characteristic wavelength variables. Food Chem. X 2023, 17, 100539. [Google Scholar] [CrossRef]
- Rosa, D.G.; Malik, V.V.; Patle, L.B.; Parab, J.S.; Lanjewar, M.G. Detection and quantification of formaldehyde adulteration in cow and buffalo milk using UV–Vis-NIR spectroscopy with machine learning. Food Chem. 2025, 492, 145485. [Google Scholar] [CrossRef]
- Pereira, H.J.d.N.; Pereira, E.V.d.S.; Ferreira, J.L.A.; Ramalho, R.T.E.; Sousa Fernandes, D.D.d.; Diniz, P.H.G.D. A miniaturized NIR-based approach for quantifying fat content and cow milk adulteration in goat milk. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2025, 340, 126341. [Google Scholar] [CrossRef]
- Casarin, P.; Viell, F.L.G.; Kitzberger, C.S.G.; Santos, L.D.d.; Melquiades, F.; Bona, E. Determination of the proximate composition and detection of adulterations in teff flours using near-infrared spectroscopy. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2025, 334, 125955. [Google Scholar] [CrossRef]
- Li, M.M.; Lai, L.F.; Yuan, J.J.; Xu, Y.S.; Li, X.Y.; Zhang, H.X.; Zhu, Q.; Xu, M.; Liu, Y.; Ding, W.W. Deep learning-based multimodal fusion for quality prediction of chili paste using hyperspectral imaging and near-infrared spectroscopy. Food Chem. 2025, 493, 145712. [Google Scholar] [CrossRef]
- He, M.Y.; Zhai, Y.N.; Qi, H.N.; Zhang, C. Freshness evaluation of cucumber and carrot using hyperspectral imaging and portable near-infrared spectrometers with deep learning. Microchem. J. 2025, 215, 114470. [Google Scholar] [CrossRef]
- Hu, X.J.; Zeng, J.H.; Dai, M.K.; Li, A.J.; Liang, Y.; Lu, W.; Peng, J.H.; Tian, J.P.; Chen, M.J.; Huang, D. Hyperspectral-driven PSO-SVM model and optimized CNN-LSTM-Attention fusion network for qualitative and quantitative non-destructive detection of adulteration in strong-aroma Baijiu. Food Chem. 2025, 490, 145197. [Google Scholar] [CrossRef]
- Bu, Y.H.; Luo, J.N.; Tian, Q.J.; Li, J.B.; Cao, M.K.; Yang, S.H.; Guo, W.C. Nondestructive detection of internal quality in multiple peach varieties by Vis/NIR spectroscopy with multi-task CNN method. Postharvest Biol. Technol. 2025, 227, 113579. [Google Scholar] [CrossRef]
- Li, Z.Y.; Huang, X.; Yang, J.X.; Luo, S.H.; Wang, J.; Fang, Q.L.; Hui, A.L.; Liang, F.X.; Wu, C.Y.; Wang, L.; et al. An improved 1D CNN with multi-sensor spectral fusion for Detection of SSC in pears. J. Food Compos. Anal. 2025, 144, 107732. [Google Scholar] [CrossRef]
- Zhang, X.L.; Lin, T.; Xu, J.F.; Luo, X.; Ying, Y.B. DeepSpectra: An end-to-end deep learning approach for quantitative spectral analysis. Anal. Chim. Acta 2019, 1058, 48–57. [Google Scholar] [CrossRef]
- Chakravartula, N.S.S.; Moscetti, R.; Bedini, G.; Nardella, M.; Massantini, R. Use of convolutional neural network (CNN) combined with FT-NIR spectroscopy to predict food adulteration: A case study on coffee. Food Control 2022, 135, 108816. [Google Scholar] [CrossRef]
- Zhang, S.L.; Jing, Y.Y.; Liang, Y.Y. EACVP: An ESM-2 LM Framework Combined CNN and CBAM Attention to Predict Anti-coronavirus Peptides. Curr. Med. Chem. 2024, 32, 2040–2054. [Google Scholar] [CrossRef]
- Scarpa, G.; Gargiulo, M.; Mazza, A.; Gaetano, R. A CNN-Based Fusion Method for Feature Extraction from Sentinel Data. Remote Sens. 2018, 10, 236. [Google Scholar] [CrossRef]
- Khan, A.; Vibhute, A.D.; Mali, S.; Patil, C.H. A systematic review on hyperspectral imaging technology with a machine and deep learning methodology for agricultural applications. Ecol. Inform. 2022, 69, 101678. [Google Scholar] [CrossRef]
- Yan, J.; Wang, G.T.; Du, H.L.; Liu, Y.D.; Ouyang, A.G.; Hu, M.M. Convolutional neural networks fusing spectral shape features with attentional mechanisms for accurate prediction of soluble solids content in apples. J. Food Meas. Charact. 2025, 19, 412–423. [Google Scholar] [CrossRef]
- Li, Y.J. Types and Proportions of Adulteration in Six Types of Seasoning Powders. China Condiment 2008, 33, 81–83. [Google Scholar]
- Fan, L.H. The Research on Rapid Quality Evaluation of Sichuan Genuine Medicinal Materials Fritillariae cirrhosae and Zanthoxyli Pericarpium Based on Portable Near-Infrared Spectrometer. Master’s Thesis, Chengdu University of Traditional Chinese Medicine, Chengdu, China, 2021. [Google Scholar]
- Zhang, Y.L.; Yang, G.H.; Wang, M.P.; Han, Z.Y.; Zhu, G.F.; Shi, J.F.; Liu, X.; Han, T.L.; Zhou, X.Q. Factors affecting the non-destructive detection of water contentsin fresh corn cobs by near-infrared spectroscopy. J. Agric. Eng. 2024, 40, 262–270. [Google Scholar]
- Wang, Z.; Ding, F.; Ge, Y.; Wang, M.; Zuo, C.; Song, J.; Tu, K.; Lan, W.; Pan, L. Comparing visible and near infrared ‘point’ spectroscopy and hyperspectral imaging techniques to visualize the variability of apple firmness. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2024, 316, 124344. [Google Scholar] [CrossRef]
- Peng, L.; Wen, X.L.; Ma, S.X.; Liu, X.C.; Xiao, R.H.; Gu, Y.F.; Chen, G.H.; Han, Y.X.; Dong, D.M. Rapid identification of the geographical origins of crops using laser-induced breakdown spectroscopy combined with transfer learning. Spectrochim. Acta Part B At. Spectrosc. 2023, 206, 106729. [Google Scholar]
- Haffner, F.; Lacoue Negre, M.; Pirayre, A.; Gonçalves, D.; Gornay, J.; Moreaud, M. IPA: A deep CNN based on Inception for Petroleum Analysis. Fuel 2025, 379, 133016. [Google Scholar] [CrossRef]
- Yan, Y.; Huang, J.P.; Wang, L.M.; Liang, S.L. A 1D-inception-ResNet based global detection model for thin-skinned multifruit spectral quantitative analysis. Food Control 2025, 167, 110823. [Google Scholar]
- Szegedy, C.; Liu, W.; Jia, Y.Q.; Sermanet, P.; Reed, S.E.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going Deeper with Convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015. [Google Scholar]
- Szegedy, C.; Ioffe, S.; Vanhoucke, V. Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning. In Proceedings of the AAAI Conference on Artificial Intelligence, San Francisco, CA, USA, 4–9 February 2017. [Google Scholar]
- Vera, W.; Reyes, R.S.; Santivañez, G.Q.; Kemper, G. Detection of Adulterants in Powdered Foods Using Near-Infrared Spectroscopy and Chemometrics: Recent Advances, Challenges, and Future Perspectives. Foods 2025, 14, 3195. [Google Scholar] [CrossRef]







| Type | Set | Number | Range |
|---|---|---|---|
| corn flour | Calibration | 84 | 0~100% |
| Prediction | 21 | 0~95% | |
| wheat bran powder | Calibration | 84 | 0~100% |
| Prediction | 21 | 0~75% | |
| rice bran powder | Calibration | 84 | 0~100% |
| Prediction | 21 | 0~85% | |
| Zanthoxylum bungeanum stem powder | Calibration | 84 | 0~100% |
| Prediction | 21 | 10~95% | |
| Combined (Multi-Adulterant) | Calibration | 336 | 0~100% |
| Prediction | 84 | 0~95% |
| Module | Parameter Name | Parameter Value |
|---|---|---|
| Input | Spectral Length | 213 |
| Conv1 | Kernel Size/Stride/Filters | 5/3/4 |
| Inception | Branch 1 Kernels | 1, 3 |
| Branch 2 Kernels | 1, 5 | |
| Branch 3 Kernels | 3, 3 | |
| Output Channels | 8, 8, 8 | |
| FC | FC1 Neurons | 100 |
| Output | Output Neurons | 1 |
| Regularization | Dropout Rate | 0.1 |
| Training | Learning Rate | 0.001 |
| Batch Size | 32 |
| Module | Parameter Name | Parameter Value |
|---|---|---|
| Input | Spectral Length | 213 |
| Conv1 | Kernel Size/Stride/Filters | 7/1/16 |
| Conv2 | Kernel Size/Stride/Filters | 5/1/32 |
| Conv3 | Kernel Size/Stride/Filters | 3/1/64 |
| Pooling | Adaptive Max Pooling Output Size | 128 |
| FC | FC1/FC2/FC3 Neurons | 8192/128/64 |
| Output | Output Neurons | 1 |
| Regularization | Dropout Rate | 0.2 |
| L2 Regularization Coefficient | 0.001 | |
| Training | Learning Rate | 0.001 |
| Batch Size | 32 |
| Model | Processing Strategy | Optimal Hyperparameters |
|---|---|---|
| PLSR | Raw | LVs: 12 |
| MSC + CARS | LVs: 8 | |
| SNV + CARS | LVs: 10 | |
| MSC + SPA | LVs: 9 | |
| SNV + SPA | LVs: 11 | |
| SVR | Raw | C: 10, gamma: 0.01 |
| MSC + CARS | C: 100, gamma: 0.001 | |
| SNV + CARS | C: 10, gamma: 0.01 | |
| MSC + SPA | C: 100, gamma: 0.01 | |
| SNV + SPA | C: 10, gamma: 0.1 |
| Model | RMSECV | RMSEP | RPD | ||
|---|---|---|---|---|---|
| 1D-CNN | 0.925 | 0.105 | 0.903 | 0.108 | 3.189 |
| DeepSpectra | 0.962 | 0.079 | 0.950 | 0.078 | 4.105 |
| IncepSpect-CBAM | 0.985 | 0.055 | 0.980 | 0.058 | 6.203 |
| Model | Methods | RMSECV | RMSEP | RPD | ||
|---|---|---|---|---|---|---|
| PLSR | Raw | 0.899 | 0.127 | 0.891 | 0.116 | 3.073 |
| MSC + CARS | 0.858 | 0.132 | 0.851 | 0.128 | 2.812 | |
| SNV + CARS | 0.902 | 0.118 | 0.893 | 0.113 | 3.126 | |
| MSC + SPA | 0.870 | 0.135 | 0.860 | 0.120 | 2.907 | |
| SNV + SPA | 0.885 | 0.130 | 0.875 | 0.118 | 2.951 | |
| SVR | Raw | 0.908 | 0.120 | 0.743 | 0.140 | 1.971 |
| MSC + CARS | 0.911 | 0.115 | 0.914 | 0.093 | 3.411 | |
| SNV + CARS | 0.908 | 0.103 | 0.597 | 0.160 | 1.574 | |
| MSC + SPA | 0.737 | 0.149 | 0.632 | 0.156 | 1.648 | |
| SNV + SPA | 0.925 | 0.098 | 0.776 | 0.135 | 2.113 | |
| IncepSpect-CBAM | Raw | 0.985 | 0.055 | 0.980 | 0.058 | 6.203 |
| MSC + CARS | 0.960 | 0.075 | 0.950 | 0.075 | 4.806 | |
| SNV + CARS | 0.970 | 0.065 | 0.960 | 0.065 | 4.904 | |
| MSC + SPA | 0.940 | 0.110 | 0.930 | 0.115 | 4.509 | |
| SNV + SPA | 0.975 | 0.060 | 0.970 | 0.062 | 5.046 |
| Model | RMSECV | RMSEP | RPD | ||
|---|---|---|---|---|---|
| Proposed (Full) | 0.985 | 0.055 | 0.980 | 0.058 | 6.203 |
| w/o CBAM | 0.963 | 0.078 | 0.955 | 0.082 | 4.721 |
| w/o Inception | 0.970 | 0.070 | 0.962 | 0.075 | 4.987 |
| w/o Residual | 0.975 | 0.065 | 0.972 | 0.068 | 5.312 |
| Type | RMSECV | RMSEP | RPD | ||
|---|---|---|---|---|---|
| corn flour | 0.955 | 0.065 | 0.977 | 0.060 | 6.171 |
| wheat bran powder | 0.919 | 0.121 | 0.912 | 0.079 | 3.365 |
| rice bran powder | 0.923 | 0.084 | 0.915 | 0.072 | 3.436 |
| Zanthoxylum bungeanum stem powder | 0.872 | 0.099 | 0.917 | 0.089 | 3.464 |
| Combined (Multi-Adulterant) | 0.985 | 0.055 | 0.980 | 0.058 | 6.203 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Wang, Y.; Liu, P.; Liang, S.; Zhang, Y.; Zhu, K.; Yu, Q. Quantitative Analysis Model for the Powder Content of Zanthoxylum bungeanum Based on IncepSpect-CBAM. Foods 2026, 15, 169. https://doi.org/10.3390/foods15010169
Wang Y, Liu P, Liang S, Zhang Y, Zhu K, Yu Q. Quantitative Analysis Model for the Powder Content of Zanthoxylum bungeanum Based on IncepSpect-CBAM. Foods. 2026; 15(1):169. https://doi.org/10.3390/foods15010169
Chicago/Turabian StyleWang, Yue, Pingzeng Liu, Sicheng Liang, Yan Zhang, Ke Zhu, and Qun Yu. 2026. "Quantitative Analysis Model for the Powder Content of Zanthoxylum bungeanum Based on IncepSpect-CBAM" Foods 15, no. 1: 169. https://doi.org/10.3390/foods15010169
APA StyleWang, Y., Liu, P., Liang, S., Zhang, Y., Zhu, K., & Yu, Q. (2026). Quantitative Analysis Model for the Powder Content of Zanthoxylum bungeanum Based on IncepSpect-CBAM. Foods, 15(1), 169. https://doi.org/10.3390/foods15010169
