Method for analyzing liquid chromatograph diode array spectrogram based on machine learning

By analyzing the liquid chromatograph data based on the machine learning model based on the TRANSFORMER architecture, the accuracy of the hand -based compound EE value recognition was solved, the efficient feature extraction and classification were achieved, the chemical synthesis path was optimized, and the experimental efficiency was improved.

CN119355191APending Publication Date: 2025-01-24GANSU WANWEI INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411454934.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The prior art is difficult to accurately identify the ee value of chiral compounds, especially in complex mixtures, and impurities and noise interference are prone to occur during the experiment, affecting the accuracy of the analysis results.

Method used

A machine learning model based on the Transformer architecture is used to analyze the diode array spectrum of the liquid chromatograph, extract multi-dimensional feature vectors, and combine the convolution layer and attention mechanism to train the model to identify chiral molecules and predict ee values.

Benefits of technology

It improves the accuracy of the identification of handicap compounds and the predictive accuracy of the EE value, reduce artificial intervention and experimental errors, optimize the chemical synthesis path, and improve the degree of experimental efficiency and data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119355191A_ABST
    Figure CN119355191A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data models, in particular to a method for analyzing a liquid chromatograph diode array spectrogram based on machine learning. The method has the specific effects that the model can accurately identify the chromatogram through a Transform architecture, chromatographic data of a chiral compound is used as a training set, the training purpose is used for identifying a chiral molecular enantiomer, especially a complex mixture, and ee values under different conditions are predicted through learning, so that a synthesis path is optimized. AI assists in identifying different chiral molecules in the compound, and through a large amount of training, an optimal synthesis path of the known chiral molecules is found out, so that experimenters are helped to improve the experiment process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data models, and specifically to a method for analyzing a liquid chromatograph diode array spectrum based on machine learning. The specific function is to enable the model to accurately identify chromatograms through the Transformer architecture, using the chromatographic data of chiral compounds as a training set, and the training purpose is to identify chiral molecular enantiomers, especially in complex mixtures, and to optimize the synthesis path by predicting the ee value under different conditions through learning. Background Art

[0002] The chemical detection technology of chiral compounds plays a very important role in the field of chemistry. For example, the drug thalidomide, one of its two enantiomers has a sedative effect and is used to treat morning sickness in pregnant women (R configuration), while the other enantiomer (S configuration) causes severe fetal malformations. In production and preparation, the ee of the R configuration of thalidomide is required to account for 100%. To achieve this goal, repeated experiments are required to select a suitable chiral compound preparation route. In the chromatographic analysis of chiral compounds, due to various problems such as preparation routes, human operations and experimental environments, the experimental products are not single target chemical products, which will cause chiral compounds to produce different ee values. This patent proposes an AI model, the main function of which is to help experimenters remove impurities from chiral compounds, identify chiral compounds, and infer ee values ​​based on preparation characteristics. Summary of the invention

[0003] The present invention solves the problems of the prior art by adopting the following technical solutions: a method for analyzing the diode array spectra of a liquid chromatograph based on machine learning, data preparation, collecting a large amount of chromatographic data, the data set includes chromatograms with interference information of known chiral compound enantiomers (including impurities) and the corresponding ee values ​​that have been measured, as well as the required catalysts and experimental temperatures. Data cleaning and enhancement mainly remove noise and outliers. The noise here refers to the unexpected data generated in the detection equipment environment. Data combination, based on the known experimental peak shape, absorption value, time, corresponding wavelength, temperature, and catalyst combination into a multidimensional feature vector. The chromatogram is converted into an input format suitable for Transformer through code. Model design, select the convolution kernel size, the number of convolution layers and the number of pooling layers. Determine the activation function, select the FNN function and the loss function . Model construction, according to the FNN function, accumulate it to form a model. Model training, the data set is divided into training set, validation set and test set, with a ratio of 80:10:10. After inputting the training set, the prediction value is calculated by forward propagation, and the loss function is calculated by back propagation. Model evaluation, using the test set that has not appeared for evaluation and comparing it with artificial data.

[0004] Beneficial effects of the invention: Transformer has broad application prospects in the field of chemical analysis. It can improve the efficiency of feature extraction and classification, enhance the automation and accuracy of data processing, and thus promote the development of chemical research and analysis methods. AI assists in identifying different chiral molecules in compounds, and through a large amount of training, finds the best synthesis path for known chiral molecules, helps experimenters improve the experimental process, and designs chemical synthesis processes under controllable conditions through AI models. BRIEF DESCRIPTION OF THE DRAWINGS

[0005] Figure 1 This is a data graph after processing the data using conventional noise reduction and exponential noise reduction; Figure 2 is a schematic diagram of data collection; Figure 2a For AN-34; Figure 2b AN-34-B; Figure 2c AN-58; Figure 3 is a diagram showing the effect of collecting raw data and converting them into 3D data; Figure 3a For AN-34; Figure 3b AN-34-B; Figure 3c AN-58; Figure 4 is a schematic diagram of the attention mechanism performing convolution in the time dimension and feature dimension; Figure 4a For AN-34; Figure 4b AN-34-B; Figure 4c AN-58. DETAILED DESCRIPTION

[0006] A method for analyzing a liquid chromatograph diode array spectrum based on machine learning specifically comprises the following steps: S1 first collects data. The source data format is .arw, and the original data mainly contains three types of data, namely wavelength, time, absorption value, temperature and catalyst of the chiral compound corresponding to the data source. We use Python language, open the address with the open(filepath,'r') method, set the encoding format to 'ISO-8859-1', split the stream with a newline as the terminator, and store the data in numpy in the format of X-axis as time, Y-axis as wavelength, and Z-axis as absorption value.

[0007] The main purpose of step S2 is to remove noise. The original .arw of S1 has relatively obvious peaks and valleys, and the noise from impurities and environment is short-term noise. In order to better maintain the long-term trend of the data, exponential smoothing is used to remove noise. Compared with the previous method of removing noise by standard deviation, this noise removal algorithm is more accurate when there are multiple continuous peaks. For absorption value data , set the window size to 5, in, represents the smoothed value at the tth time point, represents the actual data value at the tth time point, is the smoothing coefficient, and its value range is Figure 1 This is the data graph after processing the data using conventional noise reduction and exponential noise reduction. It can be seen that the noise reduction at the position where the peak is not obvious is more obvious than the conventional noise reduction, and the peak will not be deformed.

[0008] S3 combines S2 with the wavelength and time data of the original data into a matrix, which specifically has absorption value S, wavelength and time t: S4 defines the temperature vector, where temperature is expressed as: ,in is the mean temperature, is the standard deviation of temperature.

[0009] S5 defines the catalyst vector and encodes the catalysts in a One-Hot manner. If there are n catalysts, represented by C, then For The catalyst is a vector of length n, where The first position is 1, and the rest are 0. Therefore, the encoded vector The code is represented by one-hot coding of catalysts according to their types. data = {'Catalyst': ['C1','C2','C3','C4','C5']}; df = pd.DataFrame(data); df_encoded = pd.get_dummies(df['Catalyst'], prefix='Catalyst').

[0010] S6 expands the matrix of S3 again, adding S4 and S5 to S3, combining these vectors, keeping the shape of S3 according to the shape of S3, and encoding the redundant positions of S4 and S5 with 0. Thus, the new input vector is formed. .

[0011] S7 performs position encoding on X, and there exists =X +PE, where PE is the position encoding vector. The purpose of this is to allow the self-attention mechanism to perceive the position order. PE is: for the position pos and , pos represents the position in the sequence (starting from 0). i represents the dimension index. There are: = , = ,in is the dimension of the model, i.e. the length of the vector of position encoding. The constant 10000 can make the function have different frequencies and increase the stability in long sequences. In lower dimensions, the frequency changes slowly, and in higher dimensions, the frequency changes quickly. mode is the dimension of the model. Indicates the current dimension, pos is the position. For position pos=1 and dimension i=0, the value is approximately 0.8415, and pos is 1 and dimension is 3, which is approximately 0.00000001. Specifically expressed as: PE= Where L is the length of X of S6, and Take sine and cosine respectively to calculate. For the matrix in S6, we know that L is the data length, The feature point value is 5+n, where n is the catalyst type after one-hot encoding.

[0012] S8 uses the self-attention formula: Attention(Q,K,V)=soft V, where Q, K, and V are matrices of query, key, and value, respectively. is the dimension of the key.

[0013] S9 introduces multi-head attention mechanism =Attention Connect the outputs of all headers together. (Q,K,V)= S10 introduces the FNN function, where Relu is the activation function ReLu(x)=max(0,x), using , where the bias vector It is obtained by gradual updating through training. We can superimpose the output of the position encoding, and it will get an output structure: FFN(H)= , this structure is used in S11 to output the position specifically.

[0014] S11 Order Bring multi-head attention into the encoder formula for normalization and convert the data , the data As input to the feedforward neural network, in are the weights and biases of the feedforward neural network. The output of the feedforward neural network is added to the normalized output to perform layer normalization: So right Continue to iterate until . Taking wavelength as one of the attentions, the generated As shown in Figure 3.

[0015] S12 aims at the locality of the self-attention mechanism and makes up for its shortcomings by introducing the design of convolution kernels. The attention mechanism in this example needs to perform convolution in the time dimension and feature dimension to capture the local relationship between adjacent time steps and adjacent features. 1-3 convolution layers are used, and each convolution layer is followed by a pooling layer. Each convolution layer performs convolution operations according to convolution kernels that gradually increase from 3×3 to 5×5 to 7×7. The main function of step S11 is to make up for the fact that when resources are sufficient, a good balance is achieved between local features and global modeling, so as not to lose global adaptability due to excessive attention to local changes. Step S11 will be placed after S6 and before S7.

[0016] S13 predicts the output. The final output After the linear layer, the predicted ee value y is obtained. + .

[0017] S14 uses the mean square error loss function to train the model in is the true ee value, is the predicted ee value, and N is the number of samples. S15 divides the data into 80:10:10. Compile the model through the compile function. Use fit to train the divided training set. Use mealuate to evaluate the model, and finally use predict to predict the model. Now prepare a fixed sample AN-34. The two training samples are AN-34B and AN-58, where AN-34 AN-34B contains enantiomers in the same ratio, and AN-58 is another chiral molecular compound. The result is (178,)(2548,)(2548,178)result 0.3125. The similarity between AN-34 and AN-58 is 0.3125, and the result is (178,)(2548,)(2548,178)result 0.8713. The similarity between AN-34 and AN-34-B is 0.8713.

[0018] The specific technical effects of the present invention are as follows: 1. Efficient feature extraction Transformer can automatically extract complex features from raw data, which is particularly important in chemical analysis. For example, in one-dimensional or two-dimensional data such as chromatographic data and spectral data, the model can identify important features such as peak position, peak width, shape features, etc., without the need for manual search for these features. Manual search only requires providing the temperature and catalyst in the corresponding experimental results, as shown in step 1 to extract data. Figure 2 extracts features from 3D data of raw data to Figure 3.

[0019] 2. Noise Reduction and Preprocessing like Figure 1 The model can be used for denoising and preprocessing of optical rotation data. In chromatographic data, before using the Transformer architecture for model training, effective denoising methods are used to improve signal quality and analysis accuracy. This makes subsequent analysis more reliable, and exponential smoothing is more suitable for processing noise in optical rotation data.

[0020] 3. Classification and identification As shown in Figure 2, classification and identification tasks are common applications in chemical analysis. Through this model, different compounds can be classified, enantiomers, meso-isomers, and impurities can be identified, etc. Due to the model's strong ability in processing image data and pattern recognition, it can process complex spectral data and achieve high-precision classification and identification.

[0021] 4. Real-time analysis With the help of this efficient model, real-time data analysis can be achieved. For chemical experiments and process monitoring that require rapid response, the model can provide real-time analysis results to help researchers make decisions quickly and adjust experimental conditions.

[0022] 5. Automated Workflow The use of this model can greatly automate the workflow in chemical analysis. For example, through automated feature extraction and classification, human intervention is reduced, errors and workload are reduced, and the efficiency and consistency of analysis are improved.

[0023] 6. Improve analysis accuracy Due to the model's deep learning capabilities, it can capture subtle changes and complex relationships in the data, thereby improving the accuracy of the analysis. For example, in quantitative analysis, the model can provide more accurate concentration predictions and component analysis.

[0024] Glossary Chiral molecules: molecules whose structure cannot be superimposed on their mirror images. This property is called chirality. The relationship between a chiral molecule and its mirror image is like that between the left hand and the right hand. Even through rotation and flipping, they cannot completely overlap. Chiral molecules usually have 2 chiral centers, depending on the number of chiral centers.n There are stereoisomers, among which stereoisomers are divided into (enantiomers and diastereomers).

[0025] Enantiomers: An important property of chiral molecules is that they exist as enantiomers, each of which is the mirror image of the other. Enantiomers have the same basic physical and basic chemical properties (melting point, boiling point, reactivity) in an achiral environment, but exhibit different behaviors in interactions with a chiral environment (for example, other chiral molecules or chiral light). According to the CIP rule, the clockwise configuration is the R configuration and the counterclockwise configuration is the S configuration.

[0026] ee value: ee value: enantiomeric excess, also known as enantiomeric excess. It is defined as the amount of one isomer a in excess of its enantiomer b in a mixture of enantiomers. It is used to indicate the optical purity of a chiral compound. The higher the ee value, the higher the optical purity and the higher the proportion of a certain enantiomer in the compound.

Claims

1. A method for analyzing a liquid chromatograph diode array spectrum based on machine learning, characterized in that The steps include: Data preparation, collection of chromatographic data. The data set includes known chiral compound pairs containing impurity enantiomers, chromatograms with interference information and the corresponding measured ee values, as well as the required catalyst and experimental temperature; Data cleaning and enhancement to remove noise and outliers. Noise refers to unexpected data generated in the detection equipment environment. Data combination, based on the known experimental peak shape, absorption value, time, corresponding wavelength, temperature, and catalyst, is combined into a multi-dimensional feature vector; Convert the color spectrum into a format suitable for Transformer input through code; Model design, select the convolution kernel size, number of convolution layers and number of pooling layers; determine the activation function, select the FNN function and loss function ; Model construction, forming a model by accumulating it according to the FNN function; For model training, the data set is divided into training set, validation set and test set with a ratio of 80:10:

10. After inputting the training set, the prediction value is calculated by forward propagation, and the loss function is calculated by back propagation; Model evaluation,is performed using the unseen test set.

2. The method for analyzing a liquid chromatograph diode array spectrum based on machine learning according to claim 1, characterized in that The steps include: S1. Data collection: The source data format is .arw. The original data mainly contains three types of data, namely wavelength, time, absorption value, temperature and catalyst of the chiral compound corresponding to the data source; use Python language, use open(filepath,'r') method to open the address, set the encoding format to 'ISO-8859-1', split the stream with the newline character as the terminator, and store the data in numpy in the format of X-axis as time, Y-axis as wavelength, and Z-axis as absorption value; S2, noise removal: The original .arw of S1, due to the relatively obvious peaks and valleys of chiral compounds, and the noise of impurities, environment, etc. is short-term noise, exponential smoothing is used to remove noise. For the absorption value data , set the window size to 5, in, represents the smoothed value at the tth time point, represents the actual data value at the tth time point, is the smoothing coefficient, and its value range is ; S3, combine S2 with the wavelength and time data of the original data into a matrix, which specifically contains the absorption value S, wavelength λ and time t: S4. Define the temperature vector, where The temperature vector is expressed as: , where T is the current temperature, μT is the mean temperature, and σT is the standard deviation of the temperature; S5. Define the catalyst vector and encode the catalysts in one-hot encoding. If there are n catalysts, represented by C, then For The catalysts are is a vector of length n, where the The first position is 1, and the rest are 0. Therefore, the encoded vector ; S6, expand the matrix of S3 again, add S4 and S5 to S3, combine these vectors to maintain the shape of S3, and encode the redundant positions of S4 and S5 with 0; thus forming a new input vector ; S7, position encode X, there is , where PE is the position encoding vector so that the self-attention mechanism can perceive the position order; where PE is: for the position pos and , pos represents the position in the sequence, starting from 0; i represents the dimension index, , ,in is the dimension of the model, that is, the length of the positional encoding vector; the constant 10000 makes the function have different frequencies, increasing stability in long sequences; the frequency changes slowly in lower dimensions and quickly in higher dimensions, mode is the dimension of the model, Indicates the current dimension, pos is the position; For position pos=1 and dimension i=0, the value is approximately 0.8415, pos is 1 and dimension is 3, which is approximately 0.00000001; Where L is the length of X of S6, and Take sine and cosine respectively to calculate; for the matrix in S6, we know that L is the data length, The characteristic point value is 5+n, where n is the catalyst type after one-hot encoding; S8. Use the self-attention formula: , where Q, K, and V are the matrices of query, key, and value, respectively. is the dimension of the key; S9. Introducing multi-head attention mechanism Connect the outputs of all headers together. ; S10, introduce FNN function, where Relu is the activation function ,use The bias vector , It is obtained by gradually updating through training. By superimposing the output of the position encoding, it will get an output structure as follows: ; S11. Order Bring multi-head attention into the encoder formula for normalization , the data As input to the feedforward neural network, are the weights and biases of the feedforward neural network; the output of the feedforward neural network is added to the normalized output to perform layer normalization: So right Continue to iterate until ; Taking wavelength as one of the attentions, the generated ; S12. Introduce the design of convolution kernels. The attention mechanism needs to perform convolution in the time dimension and feature dimension to capture the local relationship between adjacent time steps and adjacent features. Use 1-3 convolution layers, and each convolution layer is followed by a pooling layer. Each convolution layer performs convolution operations based on convolution kernels that gradually increase from 3×3 to 5×5 to 7×7. S13, predicted output, final output After the linear layer, the predicted ee value y is obtained. ; S14 uses the mean square error loss function to train the model in is the true ee value, is the predicted ee value, N is the number of samples; S15 divides the data into 80:10:10 ratios; Compile the model through the compile function, use fit to train the divided training set, use mealuate to evaluate the model, and finally use predict to predict the model.