InvertResNet: A Qualitative Analysis Method for Drug Products Based on Deep Learning and Near-Infrared Spectroscopy
HUANG Tian-yu1, YANG Hui-hua1, 2, LI Ling-qiao1*
1. School of Computer Science and Information Security, Guilin University of Electronic Technology, Guilin 541004, China
2. School of Intelligent Engineering and Automation, Beijing University of Posts and Telecommunications, Beijing 100876, China
Abstract:Classification or qualitative analysis is a key technique for drug traceability and authentication applications. However, in practical applications, we often face technical challenges such as the nonlinear characteristics of near-infrared spectral data, insufficient sample size, data noise interference, and complex preprocessing processes. Traditional machine learning methods cannot fully capture the deep information in spectral data, resulting in limited classification performance. With the rapid development of deep learning technology, its automatic feature extraction and processing capabilities provide a new solution for near-infrared spectral data analysis. In this study, a convolutional neural network named InvertResNet is proposed: the method first converts one-dimensional spectral data into two-dimensional pseudo-images and fills the data with bilinear interpolation during the conversion process to ensure the completeness of the two-dimensionalized spectral data; InvertResNet introduces an inverted residual structure based on the classical convolutional neural network (CNN) framework. By first expanding and then compressing the feature dimensions, the model's depth and width are optimized, effectively suppressing the noise interference and improving the feature extraction and expression capabilities while maintaining the lightweight characteristics. The method adopts a two-dimensional transformation that solves the problem of insufficient data length and preserves the spectral data's local and global spatial correlation, thus enhancing the model's ability to recognize complex patterns and nonlinear information. To evaluate the performance of InvertResNet, this study first utilizes the strawberry puree near-infrared spectral dataset to carry out a preliminary validation of the method, and the results show that it has demonstrated good adaptability and preliminary effectiveness in strawberry puree spectral data processing, which has laid a solid foundation for subsequent in-depth research. Thereafter, the research focus shifts to the publicly available near-infrared spectral classification dataset of pharmaceuticals. On this dataset, the method of this thesis was compared with the traditional partial least squares (PLS), support vector machine (SVM), random forest (RF), standard convolutional neural network (CNN), Swin-Transformer model (SwinTR), GhostNetV2, and SpectraTr model based on the Transformer architecture. Comparative test experiments were conducted. The results show that InvertResNet outperforms traditional algorithms such as PLS and standard CNN structures at different training sample ratios. At low training sample ratios, InvertResNet achieves a classification accuracy of 95.97%, which is significantly better than PLS-DA (79.39%), SVM (68.44%), RF (67.74%), CNN (91.94%), SwinTR (92.74%) and GhostNetV2 (89.91%). With the increase of training samples, the classification accuracy of InvertResNet further improves and reaches 100% under the condition of a high percentage of training samples, which still shows a clear advantage over other models, such as 98.39% for CNN, 98.38% for SwinTR and 98.39% for GhostNetV2. In summary, InvertResNet, with its innovative inverted residual structure and two-dimensional spectral data variation and enhancement method, performs well in the near-infrared spectral analysis of pharmaceuticals, significantly improves the classification accuracy, and has a broad application prospect in the field of near-infrared spectral analysis.
黄天宇,杨辉华,李灵巧. InvertResNet:基于深度学习和近红外光谱的药品定性分析方法[J]. 光谱学与光谱分析, 2025, 45(08): 2218-2227.
HUANG Tian-yu, YANG Hui-hua, LI Ling-qiao. InvertResNet: A Qualitative Analysis Method for Drug Products Based on Deep Learning and Near-Infrared Spectroscopy. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(08): 2218-2227.
[1] Badman C, Cooney C L, Florence A, et al. Journal of Pharmaceutical Sciences, 2019, 108(11): 3521.
[2] Yu L X, Kopcha M. International Journal of Pharmaceutics, 2017, 528(1-2): 354.
[3] O'Connor T F, Yu L X, Lee S L. International Journal of Pharmaceutics, 2016, 509(1-2): 492.
[4] Peterson J J, Snee R D, McAllister P R, et al. Journal of Quality Technology, 2009, 41(2): 111.
[5] Mühlebach S, Borchard G, Yildiz S. Nanomedicine, 2015, 10(4): 659.
[6] Ekeigwe A A. AAPS Open, 2019, 5(1): 3(https://doi.org/10.1186/s41120-019-0032-X).
[7] Sorato M M, Davari M, Kebriaeezadeh A. The Journal of Medicine Access, 2024, 8: 1.
[8] Mensah G B, Mijwil M M, Adamopoulos I. Babylonian Journal of Artificial Intelligence, 2024, 2024: 14.
[9] Kumar A, Gupta G D, Raikwar S. Current Pharmaceutical Design, 2024, 30(6): 407.
[10] Rafiq H, Hartung J, Schober T, et al. Plants, 2024, 13(6): 833.
[11] Tian S, Zhang J, Zhang Z, et al. Infrared Physics & Technology, 2019, 100: 117.
[12] Paudel D, Caffe-Treml M, Krishnan P. Cereal Foods World, 2018, 63(1): 17.
[13] Miao X, Miao Y, Gong H, et al. Spectrochimica Acta Part A: Molecular and Biomolecular Spectroscopy, 2021, 257: 119700.
[14] Chen W, Li H, Zhang F, et al. Infrared Physics & Technology, 2021, 115: 103732.
[15] Sharma G, Chowdhury S R. Journal of Medical Systems, 2018, 42(12): 244.
[16] He K, Zhong M, Du W. Chemometrics and Intelligent Laboratory Systems, 2020, 196: 103909.
[17] Webster G T, Soriano-Disla J M, Kirk J, et al. Talanta, 2016, 160: 410.
[18] Xu X, Fu C, Gao Y, et al. Agriculture, 2024, 14(3): 466.
[19] Huang J D, Wang H, Power U, et al. Sensors, 2024, 24(1): 308.
[20] Huang X, Luo Y P, Xia L. Chemometrics and Intelligent Laboratory Systems, 2019, 194: 103872.
[21] Mishra P, Roger J M, Marini F, et al. Chemometrics and Intelligent Laboratory Systems, 2021, 212: 104190.
[22] Acquarelli J, Van Laarhoven T, Gerretzen J, et al. Analytica Chimica Acta, 2017, 954: 22.
[23] Jiang D, Qi G, Hu G, et al. Infrared Physics &Technology, 2020, 111: 103494.
[24] Fu P, Wen Y, Zhang Y, et al. Journal of Innovative Optical Health Sciences, 2022, 15(03): 2250021.
[25] Holland J K, Kemsley E K, Wilson R H. Journal of the Science of Food and Agriculture, 1998, 76(2): 263.
[26] Domnik J A N, Holland A. 35th Bled eConference Digital Restructuring and Human (Re) action, 2022: 695.
[27] Dong Q. Computational Intelligence and Neuroscience, 2022, 2022(1): 5314671.
[28] Li X, Fan P, Li Z, et al. Journal of Spectroscopy, 2021, 2021(1): 1508267.
[29] Liu Z, Lin Y, Cao Y, et al. Swin Transformer: Hierarchical Vision Transformer Using Shifter Windows, Proceedings of the IEEE/CVF International Conference on Computer Vision. 2021: 10012.
[30] Tang Y, Han K, Guo J, et al. GhostNetV2: Enhance Cheap Operation With Long-Range Attention, in Advances in Neural Information Processing Systems, 2022, 35: 9969.