Near-Infrared Spectroscopy Measurement of Contrastive Variational Autoencoder and Its Application in the Detection of Liquid Sample
YUAN Zhuang1, DONG Da-ming2*
1. Guangxi University, Nanning 530004, China
2. Research Center of Intelligent Equipment, Beijing Academy of Agriculture and Forestry Sciences, Beijing 100097, China
Abstract:Near-infrared spectroscopy is one of the popular food detection methods. Analyzing such high-dimensional spectral data often requires using data dimensionality reduction algorithms to extract features. However, most algorithms can only analyze a single data set.Although the contrastive principal component analysis based on contrastive learning has been successfully applied to the near-infrared spectroscopy detection of pesticide residues on the surface of different fruits, this method can only linearly combine the original features, and the feature extraction effect has limitations and needs to be adjusted. Comparing parameters to control the influence of the background set requires more time and cost.cVAE (contrastive variational autoencoder) is an improved algorithm based on contrastive learning and variational autoencoder, which is used in image denoising and RNA sequence analysis. It still has the characteristics of analyzing multiple data sets, and at the same time, it can extract nonlinear hidden features because of the combination of the probability generation model of the neural network. The cVAE algorithm is applied to near-infrared spectroscopy analysis, and an accurate dimensionality reduction model of near-infrared spectroscopy data is established. In actual verification, the cVAE algorithm was used to detect melamine adulteration in pure milk purchased by different brands and batches. The results show that when analyzing whether melamine is adulterated in pure milk purchased by different brands and batches, the VAE algorithm can only distinguish between different brands and batches of pure milk, and the important information about whether or not melamine is adulterated is not available. When using the cVAE algorithm for data analysis, because the background data set is added to separate irrelevant variables, it is possible to classify samples with or without adulterated melamine clearly.This shows that cVAE has the advantages of cPCA (contrastive principle component analysis) in dimensionality reduction of near-infrared spectroscopy data and can extract nonlinear features without the need to adjust variable parameters.The dimensionality reduction model of the near-infrared spectroscopy can be established more conveniently.
Key words:Near-infrared; cVAE; Data dimensionality reduction; Feature extraction
袁 壮,董大明. 对比变分自编码器的近红外光谱测量及其在液态样品检测中的应用[J]. 光谱学与光谱分析, 2022, 42(11): 3637-3641.
YUAN Zhuang, DONG Da-ming. Near-Infrared Spectroscopy Measurement of Contrastive Variational Autoencoder and Its Application in the Detection of Liquid Sample. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2022, 42(11): 3637-3641.
[1] Huang Y, Sun X, Liao K, et al. Journal of Near Infrared Spectroscopy, 2020, 28(5): 334.
[2] Harohally N V, Thomas C. ACS Food Science & Technology, 2021, 1(4): 524.
[3] Mateen M, Wen J, Song S, et al. Symmetry, 2018, 11(1): 1.
[4] de la Fuente R L N, García-Muñoz S, Biegler L T. Journal of Chemometrics, 2010, 24(6): 301.
[5] Urtubia A, Roger J M. Journal of Chemometrics, 2011, 25(7): 382.
[6] Zhang S, Zhao C. Chemometrics and Intelligent Laboratory Systems, 2019, 185: 47.
[7] Zhao Z, Li Q, Huang B, et al. Chemometrics and Intelligent Laboratory Systems, 2015, 142: 18.
[8] Abid A, Zhang M J, Bagaria V K, et al. Nature Communications, 2018, 9(1): 1.
[9] CHEN Shu-yi, ZHAO Quan-ming, DONG Da-ming(陈淑一,赵全明,董大明). Spectroscopy and Spectral Analysis(光谱学与光谱分析), 2020, 40(3): 917.
[10] Kingma D P, Welling M. Foundations and Trends in Machine Learning, 2019, 12(4): 307.
[11] Zou J Y, Hsu D J, Parkes D C, et al. Advances in Neural Information Processing Systems, 2013, 26: 2238.
[12] An J, Cho S. Variational Autoencoder Based Anomaly Detection Using Reconstruction Probability. Special Lecture on IE, 2015, 2(1): 1.
[13] LIU Rong, MIAO Jing, YANG Ren-jie(刘 蓉,苗 静,杨仁杰). Physical Testing and Chemical Analysis (Part B: Chemical Analysis)(理化检验,化学分册),2013,49(4):386.