Transform-based mass spectrometry data qualification method

By using a Transformer-based deep learning model for qualitative analysis of mass spectrometry data, the problem of low efficiency in existing mass spectrometry qualitative analysis techniques is solved. This enables high-throughput and high-precision acquisition of analyte chemical formulas, making it suitable for rapid analysis of large batches of complex samples.

CN115862749BActive Publication Date: 2025-12-16QINGDAO INST OF BIOENERGY & BIOPROCESS TECH CHINESE ACADEMY OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211548308.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-05
Publication Date
2025-12-16
Estimated Expiration
2042-12-05

AI Technical Summary

Technical Problem

Existing qualitative methods for mass spectrometry data are inefficient in the analysis of large batches of complex samples. Traditional mass-to-charge ratio-database matching methods cannot meet the needs of high-throughput analysis, and the accuracy of unknown spectrum analysis is low.

Method used

We employ a Transformer-based deep learning model to collect and process first-level high-resolution mass spectrometry data, construct training, validation, and test sets, and utilize Embedding layers, multi-head attention layers, LayerNorm layers, Linear layers, encoders, and decoders for model training and validation, thereby achieving efficient qualitative analysis of the data.

Benefits of technology

It achieves high-throughput, high-precision first-level mass spectrometry qualitative analysis, rapidly obtains the chemical formula of analytes, has short calculation time, high efficiency, and can provide accurate results without relying on a database, making it suitable for large-scale data analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115862749B_ABST
    Figure CN115862749B_ABST
Patent Text Reader

Abstract

The application provides a mass spectrum data qualitative method based on a Transformer. Primary high-resolution mass spectrum data are collected, and a basic data set is constructed, wherein the data of the data set comprises isotope distribution data, mass-to-charge ratio data and abundance data of compound ions; the data set data are randomly sampled, and a training set, a verification set and a test set are respectively constructed; the training set data are used for training a model to obtain a deep learning model; the training set data are subjected to deep data processing, are converted into an index data format, are subjected to model training, and an optimal model is selected; and the verification set data are used for model verification of the deep learning model, and optimal model parameters are adjusted. Compared with a traditional mass-to-charge ratio-database matching method, the primary high-resolution mass spectrum data qualitative method based on the Transformer designed by the application can quickly obtain a chemical formula of an analyte, and the analysis time is short and the efficiency is high.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of mass spectrometry of organic molecules, and more particularly relates to a mass spectrometry data qualitative method based on a Transformer. BACKGROUND

[0002] Mass spectrometry is a modern analytical technique for detecting compounds by detecting gas-phase ions, and is widely used in practical fields due to high specificity, high sensitivity, and high universality. Accurate mass measurement is a routine experiment performed by a modern mass spectrometer. For qualitative analysis of an analyte, an accurate mass-to-charge ratio is first obtained by high-resolution mass spectrometry, and a database search gives a list of matching elemental compositions and corresponding molecular formulas. However, the database often gives a list of a series of molecular formulas (some as many as dozens of molecular formulas) of the analyte by using the spectral peak mass-to-charge ratio-database matching method to identify the analyte, and the efficiency is often low. In addition, when analyzing complex samples of large mass, a data set of mixed analytes of the sample is obtained by a first-order mass spectrometry, and the traditional mass-to-charge ratio-database matching method cannot meet the high-throughput mass spectrometry analysis demand of a large number of samples.

[0003] The application of machine learning technology, especially deep learning, to spectral analysis can realize a data-driven form design of spectral analysis.

[0004] One of the most famous methods based on machine learning is MS2PIP, which is constructed based on a random forest and then improved by using an XGBoost algorithm. The method can realize qualitative analysis of mass spectrometry. However, the method relies on the auxiliary analysis of a database and the analysis accuracy of unknown spectra will decrease significantly.

[0005] The Transformer network structure has dominated the field of natural language and has outperformed other methods in many tasks, such as machine translation and text generation. More and more researchers are now trying to apply the powerful modeling capability of the Transformer model to the field of natural science. SUMMARY

[0006] The application aims to provide a mass spectrometry data qualitative method based on a Transformer to realize high-throughput and high-precision qualitative analysis of first-order mass spectrometry.

[0007] To achieve the above object, the technical scheme adopted by the application is:

[0008] A mass spectrometry data qualitative method based on a Transformer, comprising the following steps:

[0009] S1: data collection step: collect primary high-resolution mass spectrometry data, construct a basic data set, the data of the data set including isotope distribution data, mass-to-charge ratio data and abundance data of compound ions;

[0010] S2: data set classification step: randomly sampling data set data, respectively constructing training set, validation set and test set;

[0011] S3: model training step: training the model using training set data to obtain a deep learning model; the model includes an Embedding layer, a position embedding layer, a multi-head attention layer, a LayerNorm layer, a Linear layer, an encoder layer and a decoder layer; the training set data is deep data processed, converted into index data format, the model is trained, and the optimal model is selected as the deep learning model;

[0012] S4: model verification step: using the validation set data to verify the deep learning model, and adjusting the parameters of the deep learning model, including: deep data processing the mass spectrometry data of the validation set, inputting the isotope data of the data set into the encoder layer for encoding, and inputting the encoded data into the decoder layer; the real molecular formula data is deep processed and input into the decoder layer, the decoded data is searched using a greedy search to obtain the final result and converted into a molecular formula.

[0013] In some embodiments of the application, the method further comprises S5 model testing step:

[0014] The data in the test set is deep data processed and input into the encoder for encoding, and then the inference result is obtained through the decoder to test the accuracy of the model.

[0015] In some embodiments of the application, the data collection step further comprises a data preprocessing step, and the data preprocessing method comprises:

[0016] The high-resolution mass spectrometry data is converted into a csv format, and the csv format file is used as the basic data set for model training, and the isotope data in character format.

[0017] In some embodiments of the application, the data set data is deep processed to obtain a mass spectrometry data index sequence, and the deep processing step comprises:

[0018] The isotope data in csv format is converted into data in FloatTensor format, and the token function is used to split the molecular formula into a list in units of elements and element numbers;

[0019] The split data is indexed and mapped by constructing a target dictionary and an input dictionary;

[0020] The input dictionary comprises:

[0021] Molecular mass mark: used to represent the mass of each molecular formula in a certain mass spectrum data set;

[0022] Ion relative abundance representation: used to represent the relative abundance of each ion in each molecular formula in a certain mass spectrum data set, the relative abundance is data within 0-100;

[0023] The target dictionary includes:

[0024] Sequence start mark and sequence end mark: used to represent the index sequence corresponding to each molecular formula respectively;

[0025] Molecular formula padding mark: due to the different number of elements, the length of the molecular formula is not the same, and the analysis training process needs to ensure the fixed length of the molecular formula, therefore, it is necessary to pad each molecular formula to the same length;

[0026] Element mark: used to represent the element type in a certain molecular formula;

[0027] Element number mark: used to represent the number of each element in a certain molecular formula;

[0028] The data after deep processing is used for model training.

[0029] In some embodiments of the application, in step S4, the decoding data is searched and converted into a molecular formula by using a greedy search according to the target dictionary.

[0030] In some embodiments of the application, the different index mark segments in the index sequence of the mass spectrum data after deep processing are generated into mark embedding and position embedding, and then input into the encoder layer,

[0031] The position embedding algorithm includes:

[0032]

[0033]

[0034] Wherein: PE (pos,2i) , PE (pos,2i+1) Indicates the embedding position, Pos represents the relative position of the character in the index mark segment of the mass spectrum data, d_model is the output vector dimension after the meridian shape layer is artificially specified, 2i is the even dimension in the vector dimension, and 2i+1 is the odd dimension in the vector dimension.

[0035] In some embodiments of the application, in the process of model training, the model error is calculated, the error calculation result is back propagated, and the weight of the model is updated.

[0036] In some embodiments of the present application, the data quantity ratio of the training set, the validation set and the test set is 7:2:1.

[0037] The mass spectrometry data qualitative method provided by the present application has the beneficial effects of:

[0038] (1) Compared with the traditional mass-to-charge ratio-database matching method, the first-order high-resolution mass spectrometry data qualitative method based on the Transformer designed by the present application can quickly obtain the chemical formula of the analyte, and the analysis time is short and the efficiency is high.

[0039] (2) The present application does not need to rely on the database, and the chemical formula of the analyte is obtained based on the mass spectrometry data of the analyte by the model training analysis method. In the case where the database cannot be searched, a relatively accurate result can still be given.

[0040] (3) In terms of efficiency and cost, the present application does not need to perform a large number of searches, consumes less calculation, and has short calculation time, and can perform high-throughput data analysis. Under the analysis of 3080TiGPU, the calculation time of a single data is about 0.12s, and the qualitative analysis of the mass spectrometry data can be completed. Through parallel computing technology, a large amount of data can be calculated in a short time. BRIEF DESCRIPTION OF DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0042] Figure 1 The high-resolution mass spectrometry data qualitative method flowchart of the present application;

[0043] Figure 2 The mass spectrum of C 53 H 103 O6 isotope distribution;

[0044] Figure 3 The schematic diagram of the Transformer model architecture. DETAILED DESCRIPTION

[0045] In order to make the technical problems to be solved by the present application, the technical solutions and beneficial effects more clear and obvious, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0046] The application provides a mass spectrum data qualitative method based on a transformer, which can quickly analyze the chemical formula composition of a chemical based on the first high-resolution mass spectrum data of the chemical.

[0047] The mass spectrum data qualitative method provided by the application comprises the following steps, and the overall process refers to Figure 1 .

[0048] S1: data collection step.

[0049] Collect the first high-resolution mass spectrum data, and construct a basic data set, wherein the data of the data set comprises isotope distribution data of compound ions.

[0050] The constructed data set will be used as a public data set for subsequent model training, model testing and model verification. The data set comprises general names, systematic names, accurate masses, molecular formulas of compounds, and important information such as ion mass-to-charge ratios and corresponding relative abundances, ion molecular formulas and isotope distributions of the compounds. Among them, the isotope distribution of the compound comprises the accurate mass-to-charge ratios and corresponding relative abundance values of ion peak M and its isotope peaks M+1, M+2, M+3 and M+4. According to the ratio of the particle peaks, the number of elements can be estimated.

[0051] Since the mass spectrum data comprises information of molecular weight and element composition, molecular structure unit information and interconnection sequence information, based on the analysis of the mass spectrum data, the composition results of the compound can be obtained, including the element composition and the corresponding molecular formula list.

[0052] The data set is preliminarily processed, and the processing steps comprise:

[0053] (1) Extracting the isotope distribution data of the compound ions and deleting the missing data.

[0054] (2) In order to facilitate data reading during training of the model, the data is converted into csv format data, and the obtained csv format file is used as the basic data set for model training. The csv format stores the isotope data in character format.

[0055] S2: data set classification step.

[0056] Randomly sampling the data of the public data set, and constructing a training set, a validation set and a test set respectively; wherein the training set is used for training the mass spectrum data qualitative model, the validation set is used for verifying the accuracy of the model after training, and the test set is used for testing whether the model meets the training requirements.

[0057] The data amount of the training set, the validation set and the test set is not limited, and in some embodiments, the data amount ratio of the training set, the validation set and the test set is 7:2:1.

[0058] S3: Model training step, refer to the flow Figure 3 .

[0059] The model is trained using the training set data to obtain a deep learning model.

[0060] The model to be trained is a Transformer-based primary high-resolution mass spectrometry data qualitative model, which specifically includes: an Embedding layer, a position embedding layer, a multi-head attention layer, a LayerNorm layer, a Linear layer, 12 layers of encoder, and 6 layers of decoder.

[0061] Before model training, the dataset data is further processed in depth, and the processing steps include the following.

[0062] S31: Data index mapping step.

[0063] Convert the isotope data in csv format to FloatTensor format data, use the token function to split the molecular formula into a list in units of elements and element counts, and use the target dictionary constructed to index map the split data.

[0064] Split the molecular formula into a list in units of elements and element counts, construct an input dictionary, and use the target dictionary and input dictionary constructed to index map the split data to an index sequence;

[0065] The input dictionary includes:

[0066] Molecular mass identifier: used to represent the mass of each molecular formula in a mass spectrometry data set;

[0067] Ion relative abundance representation: used to represent the relative abundance of each ion in each molecular formula in a mass spectrometry data set, the relative abundance being data within 0-100.

[0068] Table 1 Input dictionary identifier example

[0069]

[0070]

[0071] The target dictionary includes:

[0072] Sequence start identifier and sequence end representation: used to represent the index sequence corresponding to a molecular formula, respectively; molecular formula padding identifier: due to the different number of elements, the length of the molecular formula is not the same, and the analysis training process needs to ensure a fixed length of the molecular formula, therefore, each molecular formula needs to be padded to the same length;

[0073] Element identifier: used to represent the element type in a molecular formula;

[0074] Element number identifier: used to represent the number of each element in a certain molecular formula.

[0075] In some embodiments of the present application, the target dictionary can use numbers to represent the index mapping. For example, for C 46 H 86 O 10 , the index mapping table is designed as follows:

[0076] Table 2 target dictionary identification example

[0077]

[0078]

[0079] Therefore, for the input data:

[0080] 798.6, 799.6, 800.6, 801.6, 0.0, 100, 52, 15, 3, 0; C 46H 86O 10;

[0081] The mass spectrometry data and the real molecular formula data are respectively mapped according to the foregoing rules, and the index data format after mapping is as follows:

[0082] tensor([4,5,6,7,8,9,10,11,12,13]), tensor([4,5,6,7,8,9]).

[0083] Wherein tensor([4,5,6,7,8,9,10,11,12,13]) corresponds to the molecular formula and mass-to-charge ratio and abundance index sequence, and tensor([4,5,6,7,8,9]) corresponds to the real molecular formula index sequence. The two groups of mapping data will be used as input data for subsequent model training, for model training.

[0084] S32: model training step.

[0085] The label embedding and the position embedding are generated for different index markers in the index sequence of the mass spectrometry data, and the position embedding information is used to associate the correlation of isotopes before and after.

[0086] The position embedding algorithm includes:

[0087]

[0088]

[0089] Wherein: PE (pos,2i) , PE (pos,2i+1)Position embedding, Pos represents the relative position of the character in the mass spectrum data index fragment, d_model is the output vector dimension after the meridian shape layer, which is usually selected according to experience; 2i is the even dimension in the vector dimension, and 2i+1 is the odd dimension in the vector dimension.

[0090] Since the mass spectrum data has a time before and after association, the relative information of the position needs to be obtained by using position embedding, and then the mass spectrum data after position embedding and label embedding is sent to the input encoder layer.

[0091] The encoder layer first calculates by MHA (multi-head attention) to obtain local attention information, and the calculation formula is as follows:

[0092]

[0093] In the formula, Q, K and V are calculated by linear layer, which is data for calculating self-attention, d k Variance, Attention (Q, K, V) represents local attention; Q, K and V are calculated by linear layer.

[0094] After the calculation is completed, a residual operation and a LayerNorm normalization operation are performed, and then a linear layer is calculated, and the final calculation result is input into the Transformer module decoder. At the same time, the molecular formula mapping data corresponding to the mass spectrum data is input into the decoder.

[0095] After the decoder obtains the input, the input obtained by the encoder and the target after the mask of the decoder are input into the multi-head attention, and the calculation method of the multi-head attention is consistent with that of the encoder. The decoder calculates the final result, performs a softmax layer calculation, and then inputs a linear layer for output.

[0096] S33: Model error accounting step.

[0097] The error of the input and output is calculated, and the error function is CrossEntropyLoss, and the calculation formula is as follows:

[0098]

[0099] Where: x represents the index corresponding to the current sample category, class represents the actual category, x[j] represents the jth output, and loss (x, class) represents the mass spectrum data qualitative analysis model error.

[0100] S34: Model weight updating step.

[0101] The calculated loss is back propagated to update the weight of the model.

[0102] S35: a dynamic learning rate adjustment step.

[0103] dynamic learning rate adjustment, wherein d model is the vector dimension of the linear layer output, stepNum is the current step number, warmupSteps is the warm-up step length, and the calculation formula is as follows:

[0104]

[0105] wherein lr represents the dynamic learning rate. The dynamic learning rate is combined with the optimizer after the current learning rate value is calculated via the above formula.

[0106] S36: a model optimization step.

[0107] The model is saved according to the returned validation set result, and the saving rule is to save the model with the lowest validation set loss as the current optimal model.

[0108] S4: a model verification step.

[0109] The validation set data is used to verify the deep learning model, and the parameters of the deep learning model are adjusted. During real-time training, the loss and accuracy of the validation set are compared with the loss and accuracy of the training set to determine whether the model needs to be terminated early to avoid overfitting, and the optimal model is saved according to the loss of the validation set.

[0110] Step S41: obtaining the required isotope verification mass spectrum data in the verification data set.

[0111] Step S42: storing the data in the csv floating point tensor format.

[0112] Step S43: loading the preferred model saved in step S3.

[0113] Step S44: referring to the data index conversion method described above, the isotope data is indexed and processed, then input into the encoder for encoding, and the extracted verification data set data is converted into a mass spectrum data index sequence.

[0114] Step S45: inputting the encoded data into the decoder, and simultaneously inputting the corresponding real molecular formula data into the decoder for decoding, using a greedy search to search for the final result and converting it into a molecular formula using the above dictionary. The dictionary described herein corresponds to the input dictionary and target dictionary described above.

[0115] Step S46: loop reasoning until the reasoning position reaches the eos end, stop reasoning, and output the result.

[0116] S5: a model test step.

[0117] The test set input is encoded in the encoder, and then the inference result is obtained through the decoder. The result is obtained by a greedy search algorithm to get the probability of the highest set of results. Through the test set, it can be determined whether the generalization of the trained model meets the final requirements. Use the model to perform a round of inference on all data in the test set to obtain the final accuracy.

[0118] In the following, the implementation process of the present scheme will be described in combination with a specific analysis process for certain mass spectrometry data. Tables 3 and 4 respectively illustrate the isotopic distribution of mass spectrometry data and the isotopic distribution table of a specific compound, which can be embodied in high-resolution mass spectrometry data.

[0119] Table 3 Isotopic distribution chart of mass spectrometry data

[0120]

[0121]

[0122] Table 4 C 53 H 103 O6 Isotopic distribution chart

[0123] Isotope peak Mass-to-charge ratio Relative abundance M 835.7755 100 M+1 836.7788 60.7610 M+2 837.7822 19.1828 M+3 838.7855 4.0285 M+4 839.7889 0.4709

[0124] The construction of the lipidomics isotopic dataset includes the following steps.

[0125] (1) First, the mass (m / z) calculation tool is used to construct the isotopic dataset of oil molecules such as fatty acids, glycerides, phospholipids, and sphingolipids. The dataset mainly contains the molecular formula and isotopic distribution of oil compound ions, wherein the isotopic distribution includes the accurate mass-to-charge ratio m / z, m / z1, m / z2, m / z3 and m / z4 of the isotopic ion peaks M, M+1, M+2, M+3 and M+4 and the corresponding relative abundance I, I1, I2, I3 and I4, wherein I is the base peak, and I1, I2, I3 and I4 are the percentages relative to I after normalization, i.e. the relative abundance.

[0126] Secondly, after preliminary processing of these mass spectrometry data, 76951 data are obtained as the basic dataset, which is converted into csv format.

[0127] Finally, the basic dataset is randomly divided into a training set, a validation set and a test set in a ratio of 7:2:1.

[0128] (2) Construct a first-level high-resolution mass spectrometry qualitative analysis data model based on Transformer. The data model mainly includes an Embedding layer, a position embedding layer, a multi-head attention layer, a LayerNorm layer, a Linear layer, 12 layers of encoders, and 6 layers of decoders.

[0129] (3) Model training is performed. The training process is as described above, and will not be repeated here.

[0130] (4) The model is verified and tested using the segmented verification set and test set, wherein the verification set is mainly used to adjust some hyperparameters in the model training process, and to view the accuracy and loss indicators of the model in the training process. The test set is used to test the generalization of the model. After the model training is completed and converges, the model is tested. First, the model weight is loaded, then the abundance and mass-to-charge ratio data are read in, the data is preliminarily processed, the batch dimension is added to 1, converted to tensor format and sent to the model for inference, the final result is obtained by using the greedy search algorithm and output, and finally the final accuracy in the test set is obtained.

[0131] (5) The constructed Transformer model is used to infer the oil molecule isotope data set. First, the information is compressed using the encoder, then the features are decoded using the decoder, the final result is output using the greedy search, a probability distribution of one character is generated at each time step, the maximum value is taken, and then the value is transmitted to the next time step, and finally all character indexes are generated. The character index is converted to a string by using a known dictionary, and the molecular formula inference is completed. The GPU serial inference time of each sequence is about 0.1s. The overall accuracy is as high as 98%.

[0132] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A qualitative method for mass spectrometry data based on Transformer, characterized in that: Includes the following steps: S1: Data collection steps: Collect first-level high-resolution mass spectrometry data and construct a basic dataset. The data in the dataset includes isotope distribution data of compounds, mass-to-charge ratio data of isotope peaks, and relative abundance data. S2: Dataset classification steps: Randomly sample the dataset data to construct training set, validation set, and test set respectively; S3: Model training steps: The model includes an embedding layer, a location embedding layer, a multi-head attention layer, a LayerNorm layer, a Linear layer, an encoder layer, and a decoder layer; deep data processing is performed on the training set data, which is converted into an indexed data format, the model is trained, and the optimal model is selected as the deep learning model; S4: Model Validation Steps: Use validation set data to validate the deep learning model and adjust the parameters of the deep learning model. This includes: performing deep data processing on the validation set mass spectrometry data, inputting the dataset isotope data into the encoder layer for encoding, and inputting the encoded data into the decoder layer. The real molecular formula data is processed in depth and input into the decoder layer. A greedy search is used on the decoded data to search for the final result and convert it into a molecular formula.

2. The qualitative method for mass spectrometry data based on Transformer as described in claim 1, characterized in that, Further steps include S5 model testing: The data in the test set is processed using deep data processing and input into the encoder for encoding. Then, the inference result is obtained through the decoder to test and verify the accuracy of the model.

3. The qualitative method for mass spectrometry data based on Transformer as described in claim 1, characterized in that, The data collection step further includes a data preprocessing step, and the data preprocessing method includes: The high-resolution mass spectrometry data was converted to CSV format, and the CSV file was used as the base dataset for model training, along with isotope data in character format.

4. The qualitative method for mass spectrometry data analysis using Transformer as described in claim 1, 2, or 3, characterized in that, The dataset undergoes deep processing to obtain a mass spectrometry data index sequence. The deep processing steps include: Convert isotope data in CSV format to FloatTensor format, and use the token function to split the molecular formula into a list of elements and the number of elements. Construct target and input dictionaries to index and map the split data; The input dictionary includes: Molecular mass identifier: Used to indicate the mass of each molecular formula in a mass spectrometry dataset; Ion relative abundance representation: used to represent the relative abundance of each ion in each molecular formula in a certain mass spectrometry dataset, wherein the relative abundance is data within the range of 0-100; The target dictionary includes: Sequence start identifier and sequence end identifier: used to represent the index sequence corresponding to a certain molecular formula; Molecular formula completion marker: Due to the different number of elements, the length of the molecular formula is different, but the analysis and training process requires the molecular formula to be of a fixed length. Therefore, it is necessary to complete each molecular formula to the same length. Element identifier: Used to indicate the types of elements in a molecular formula; Element quantity identifier: used to indicate the quantity of each element in a molecular formula; The model is trained using data that has undergone deep processing.

5. The qualitative method for mass spectrometry data of Transformer as described in claim 4, characterized in that, In step S4, based on the target dictionary, a greedy search is used to search the decoded data for the final result and convert it into a molecular formula.

6. The qualitative method for mass spectrometry data of Transformer as described in claim 4, characterized in that, For different indexed fragments in the indexed sequence of the deep-processed mass spectrometry data, marker embeddings and position embeddings are generated and then input into the encoder layer. The location embedding algorithm includes: Among them: PE (pos,2i) PE (pos,2i+1) Indicates the embedding position, Pos represents the relative position of the character in the mass spectrometry data index marker fragment, d_model is the output vector dimension specified by the user after the linear layer, 2i is the even dimension of the vector dimension, and 2i+1 is the odd dimension of the vector dimension.

7. The qualitative method for mass spectrometry data analysis using Transformer as described in claim 6, characterized in that, During model training, the model error is calculated, and backpropagation is performed based on the error calculation results to update the model weights.

8. The qualitative method for mass spectrometry data of Transformer as described in claim 1, characterized in that, The ratio of training set, validation set, and test set data volume is 7:2:1.

Citation Information

Patent Citations

  • Password guessing system and method based on Transform model and deep reinforcement learning

    CN114462018A

  • Runoff prediction method based on Transform sequence-to-sequence model

    CN115146700A