A method for classification of raw mass spectrometry data based on multi-channel embedded representation

By using a multi-channel embedding representation method, the problems of low efficiency and low accuracy in mass spectrometry data classification are solved. Through binning, normalization and joint optimization training of multi-channel embedding modules, the accuracy and efficiency of mass spectrometry data classification are improved, and efficient feature representation and computational resource utilization are achieved.

CN120524271BActive Publication Date: 2026-05-12NATIONAL INSTITUTE OF METROLOGY CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NATIONAL INSTITUTE OF METROLOGY CHINA
Filing Date
2025-05-28
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing technologies suffer from low efficiency and low classification accuracy in mass spectrometry data analysis, especially in classification tasks involving high-dimensional and large-volume data. Furthermore, traditional methods rely on complex preprocessing procedures, which may lead to the loss of critical information.

Method used

A multi-channel embedding representation method is adopted. Standardized intensity data is obtained through binning and normalization. A multi-channel embedding module is constructed and jointly optimized and trained with a preset classification model. Multi-channel embedding representation is generated by using encoder sub-module, channel embedding sub-module and channel splicing operation. The model performance is improved by early stopping mechanism and phased optimization strategy.

Benefits of technology

It significantly improves the accuracy and efficiency of mass spectrometry data classification, enhances the generalization level of the model, reduces computational costs, and captures multidimensional correlations of data through multi-channel collaborative modeling, thereby enhancing the feature representation capability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120524271B_ABST
    Figure CN120524271B_ABST
Patent Text Reader

Abstract

The application provides a raw mass spectrum data classification method based on a multi-channel embedded representation, and belongs to the technical fields of mass spectrum data analysis and deep learning, and the method comprises the following steps: obtaining raw mass spectrum data, performing binning processing and normalization processing on the raw mass spectrum data to obtain standardized intensity data, performing global feature dimension reduction on the raw mass spectrum data through a multi-channel embedded module to generate global embedded representation, inputting the global embedded representation into a channel embedded submodule to extract local structure information, performing channel splicing operation to fuse global and local features, forming multi-channel embedded representation, constructing a learnable deep learning pre-module, and performing end-to-end joint optimization training through an integrated deep learning classification model to realize data-driven adaptive feature optimization and obtain a classification result; through multi-channel feature cooperation and dimension compression, the classification performance is improved, the calculation cost is reduced, and the efficiency of mass spectrum data classification and the accuracy of a classification task are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of mass spectrometry data analysis and deep learning technology, and particularly relates to a method for classifying raw mass spectrometry data based on multi-channel embedded representation. Background Technology

[0002] Mass spectrometry, as a highly efficient and versatile detection method, can accurately identify, analyze, and quantify various target substances based on their mass-to-charge ratio (m / z). With technological advancements, the efficiency of mass spectrometry data generation and its structural complexity have significantly improved. However, its high dimensionality and large volume pose serious challenges to data analysis, especially in scenarios with extremely high precision requirements, such as cancer screening.

[0003] In the field of mass spectrometry data analysis, traditional machine learning algorithms (such as support vector machines, random forests, and XGBoost) are widely used in benchmarking, but they rely on complex preprocessing procedures. For example, steps such as denoising, baseline correction, peak identification, and peak alignment are required to eliminate interference factors during signal acquisition, thereby enhancing the stability and interpretability of subsequent multivariate analysis. These preprocessing operations are not only time-consuming but may also lead to the loss of critical information due to human intervention.

[0004] In recent years, deep learning technology has gradually become a core method in data analysis due to its advantages in automatic feature extraction. The continuous innovation of architectures such as Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), and Transformers has significantly expanded the boundaries of data processing capabilities. However, the core challenge in mass spectrometry data analysis lies in how to construct high-information-density feature representations. To balance computational efficiency and model performance, existing methods typically map high-dimensional mass spectrometry vectors to a low-dimensional space, but such strategies are mostly limited to single-channel representations and struggle to fully capture the multidimensional relationships in the data. In contrast, the field of image classification has demonstrated the superiority of multi-channel representation—different channels can capture complementary information such as the spectrum and texture of the target, thus providing a more comprehensive description. This idea provides important insights for mass spectrometry analysis: through multi-channel collaborative modeling, it is possible to more flexibly represent features at different levels in mass spectrometry data (such as global intensity distribution and local peak patterns), thereby generating more discriminative embedding vectors. Therefore, developing an efficient and robust multi-channel representation method is crucial for improving classification accuracy and optimizing computational resource utilization.

[0005] Against this backdrop, Convolutional Neural Networks (CNNs) have become an ideal choice for multi-channel modeling due to their unique feature extraction mechanism. CNNs, through the spatial invariance properties of convolutional kernels (such as translation invariance), can mine latent features from raw mass spectrometry signals and further enhance the identification of key structures through pooling operations. More importantly, CNNs do not rely on manually designed feature engineering and can directly learn multi-scale feature representations from the data autonomously. By combining stacked convolutional layers with nonlinearity, CNNs can dynamically construct multi-channel feature maps, simultaneously capturing global trends and local details in mass spectrometry data. This multi-level feature fusion not only enhances the model's representational ability but also significantly improves its adaptability to high-dimensional data. Experiments show that even in scenarios with noise or signal shifts, CNN-based multi-channel models can still maintain high classification accuracy. Currently, this type of method has demonstrated significant advantages in direct classification tasks using raw mass spectrometry data, becoming an important technical path in this field. Summary of the Invention

[0006] In view of the above-mentioned shortcomings in the prior art, the present invention provides a raw mass spectrometry data classification method based on multi-channel embedded representation, which solves the problems of low efficiency and low accuracy of raw mass spectrometry data classification.

[0007] To achieve the above objectives, the technical solution adopted by this invention is: a method for classifying raw mass spectrometry data based on multi-channel embedding representation, comprising the following steps:

[0008] S1. Obtain raw mass spectrometry data, perform binning and normalization on the raw mass spectrometry data to obtain standardized intensity data;

[0009] S2. Construct a multi-channel embedding module and use the multi-channel embedding module as a feature representation layer. Connect it structurally with the preset classification model to obtain the connected preset classification model.

[0010] S3. Based on the standardized intensity data, perform joint optimization training on the parameters of the pre-connected classification model, and use an early stopping mechanism to obtain the trained pre-connected classification model.

[0011] S4. Using a trained pre-defined classification model, classify the standardized intensity data to obtain the classification results.

[0012] The beneficial effects of this invention are as follows: This invention proposes an innovative multi-channel embedding representation method and constructs a highly targeted multi-channel embedding module, which aims to mine and utilize the interrelationships between different representation channels within the data, thereby generating features with stronger expressive power and higher information density; and by jointly optimizing and training the multi-channel embedding module with a preset classification model, it significantly improves the accuracy and efficiency of the classification task and enhances the generalization level of the preset classification model used.

[0013] Further, S1 includes the following steps:

[0014] S101. Obtain raw mass spectrometry data, classify the raw mass spectrometry data according to the data characteristics of different mass spectrometry preparation techniques, and obtain the first mass spectrometry data and the second mass spectrometry data.

[0015] S102. Based on the user-defined mass-to-charge ratio, the first mass spectrometry data is binned to form binning intervals. Based on the binning intervals, the mass spectrometry data with a total ion intensity greater than a preset threshold in the first mass spectrometry data are used as the first training samples.

[0016] S103. Based on the user-defined mass-to-charge ratio, the second mass spectrometry data is binned to form bin intervals. Based on the bin intervals, the user-defined retention time is used as a window to align the signals of the second mass spectrometry data. The signal intensity values ​​of the same bin interval are superimposed and averaged to obtain the second training sample.

[0017] S104. Normalize the total number of ions for each first training sample and each second training sample to obtain standardized intensity data.

[0018] Furthermore, the first mass spectrometry data is water-assisted laser desorption / ionization mass spectrometry data;

[0019] The second mass spectrometry data is mass spectrometry data obtained using liquid chromatography-mass spectrometry (LC-MS).

[0020] The beneficial effects of the above-mentioned further solutions are as follows: By performing binning and normalization on the original mass spectrometry data, the present invention eliminates noise caused by differences in instrument resolution, removes interference from low-quality data, eliminates absolute intensity differences between sample data, and improves the quality of the original data.

[0021] Furthermore, S2 includes the following steps:

[0022] S201. Construct a multi-channel embedding module using the encoder submodule, the channel embedding submodule, and the channel splicing operation;

[0023] S202. Based on the end-to-end architecture, the multi-channel embedding module is used as the feature representation layer and structurally connected with the preset classification model to obtain the connected preset classification model.

[0024] The beneficial effects of the above-mentioned further solutions are as follows: The present invention constructs a multi-channel embedding module through an encoder sub-module, a channel embedding sub-module, and a channel splicing operation, and structurally connects the multi-channel embedding module with a preset classification model based on an end-to-end architecture, thereby constructing a learnable deep learning pre-module, which significantly improves classification performance and reduces computational costs.

[0025] Furthermore, step S3 includes the following steps:

[0026] S301. The standardized intensity data is divided into training set, validation set and test set using a hierarchical random sampling strategy.

[0027] S302. Take the mass spectrometry data in the training set as input data and input it into the multi-channel embedding module for processing to generate the optimal multi-channel embedding representation;

[0028] S303. Input the optimal multi-channel embedding representation into the preset classification model for joint optimization training, validate it through the validation set, and use an early stopping mechanism to test the classification model with the optimal parameters using the test set to obtain the trained preset classification model.

[0029] The beneficial effects of the above-mentioned further solutions are as follows: This invention achieves data-driven adaptive feature optimization by integrating advanced deep learning classification models for end-to-end joint training, and converts the mass spectrometry data in the training set into a multi-channel embedded expression to simultaneously capture the macro-global features and micro-local features of the data, providing higher quality and more comprehensive input information for the classification model.

[0030] Furthermore, step S302 includes the following steps:

[0031] S3021. The mass spectrometry data in the training set is used as input data and input into the multi-channel embedding module. The first fully connected layer in the encoder submodule is used to compress the dimension of the input data to the intermediate dimension. Then, the layer normalization, the corrected linear unit and the random deactivation unit are used to extract features to obtain the initial latent embedding representation.

[0032] S3022. Using the second fully connected layer in the encoder submodule, the input data is compressed from the intermediate dimension to the embedding dimension, and a global embedding representation is generated.

[0033] S3023. Reshape the global embedding representation into a three-dimensional tensor, extract features using the first one-dimensional convolutional layer in the channel embedding submodule, and obtain an initial first multi-channel embedding representation with half the preset number of channels. Through batch normalization, correction of the linear unit activation function, and random deactivation, the initial first multi-channel embedding representation is processed to obtain an enhanced first multi-channel embedding representation.

[0034] S3024. Using the second one-dimensional convolutional layer in the channel embedding submodule, feature extraction is performed on the enhanced first multi-channel embedding representation to obtain an initial second multi-channel embedding representation with a preset number of channels. Then, through batch normalization, correction of the linear unit activation function, and random deactivation, the enhanced second multi-channel embedding representation is obtained.

[0035] S3025. Using the channel residual connection submodule, the global embedding representation reshaped into a three-dimensional tensor is spliced ​​with the enhanced second multi-channel embedding representation to obtain the optimal multi-channel embedding representation.

[0036] Furthermore, the expression for concatenating the global embedding representation reshaped into a three-dimensional tensor with the enhanced second multi-channel embedding representation is as follows:

[0037] O = Concat(E′, C2) ∈ R B×(1+C)×d

[0038] Where O represents the optimal multichannel embedding representation, Concat(·) represents the concatenation operation, E′ represents the global embedding representation reshaped into a three-dimensional tensor, and E′∈R B×1×d C2 represents the enhanced second multi-channel embedding representation, R B×(1+C)×d The dimensions of the three-dimensional tensor are represented by B, B represents the batch size, 1 represents dimension 1, d represents the embedding dimension, and C represents the user-defined number of channels.

[0039] The beneficial effects of the above-mentioned further solutions are as follows: The present invention utilizes the encoder submodule to transform the original high-dimensional mass spectrum vector into a lower-dimensional space through nonlinear mapping, ensuring the retention of key information and removing redundant data, forming a more refined feature representation. Dimensionality reduction in the early stage significantly reduces the computational burden of subsequent processing and improves overall efficiency.

[0040] By utilizing the channel embedding submodule, two identical one-dimensional convolutional layers are used to maintain the consistency of the data in the length dimension, avoiding changes in feature scale. Convolutional operations are used to effectively identify the local arrangement structure and spatial correlation within the input data, and the embedding representation of a single channel is transformed into an embedding representation containing multiple channels, which is more conducive to the execution of subsequent classification tasks.

[0041] By utilizing channel splicing operations, the output features can simultaneously retain global information and local details, achieving effective feature fusion and mutual enhancement. This results in fused features with greater diversity and information content, enabling efficient capture of key discriminative information in mass spectrometry data. The generated multi-channel embedding representation can be seamlessly integrated and directly used as input to downstream classification models, forming a complete end-to-end learning system.

[0042] Furthermore, step S303 includes the following steps:

[0043] S3031. Input the multi-channel embedded representation into the preset classification model, and update the parameters of the preset classification model using an adaptive moment estimation optimizer based on a phased optimization strategy.

[0044] S3032. Based on the validation set, the learning rate of the adaptive moment estimation optimizer is dynamically adjusted using a preset learning rate scheduler. In response to the validation set loss not decreasing for a consecutive preset decay round, the learning rate is decayed by a preset decay factor.

[0045] S3033. Calculate the validation set accuracy and F1 score, save the model weights with the best performance, reverse the weights of the loss function according to the class frequency of the training set, and calculate the validation loss using the weighted cross-entropy loss function according to the validation set. Adopt an early stopping mechanism. If the validation loss does not decrease after a preset number of early stopping rounds, stop training and proceed to step S3035.

[0046] S3034. Determine whether the preset training period has been reached. If not, return to step S3031 to perform joint optimization training again. If yes, proceed to step S3035.

[0047] S3035. Based on the weights of the optimal performance model saved in the last round, test the classification model with the optimal parameters using the test set to obtain the trained preset classification model.

[0048] Furthermore, the preset classification model includes: a convolutional neural network, a long short-term memory network, and a converter model;

[0049] The convolutional neural network takes multi-channel embedded representations as multi-channel inputs and uses hierarchical convolution and pooling operations to gradually fuse the global distribution and local peak details in the multi-channel array to complete the classification.

[0050] The Long Short-Term Memory (LSTM) network uses multi-channel embedded representation as the input model for the time sequence. Each time step corresponds to a feature vector of one channel. The LSM layer captures cross-channel temporal patterns, and the fully connected layer maps the hidden state of the last time step to the classification label to complete the classification.

[0051] The converter model expands the multi-channel embedding representation along the embedding dimension and uses it as a multi-sequence input. It adds a learnable preset label at the beginning of the sequence to obtain the input sequence. It uses a multi-layer multi-head self-attention module to form an encoder to capture the cross-channel dependencies of the input sequence. By extracting the hidden states corresponding to the preset labels, it uses a fully connected layer for mapping to obtain the classification result.

[0052] The beneficial effects of the above-mentioned further solutions are as follows: This invention achieves collaborative learning of feature representation and classification decision by jointly optimizing the multi-channel embedding module and the preset classification model parameters, and adopts a phased optimization strategy to balance efficiency and stability; by using weighted cross-entropy loss as the loss function, the problem of data imbalance is alleviated, and an early stopping mechanism is introduced to prevent overfitting, thereby improving the training efficiency of the preset classification model.

[0053] To achieve the above objectives, according to a second aspect of the present invention, a raw mass spectrometry data classification system based on multi-channel embedding representation is provided for performing the raw mass spectrometry data classification method based on multi-channel embedding representation as described above, characterized in that it includes:

[0054] The data preprocessing subsystem is used to perform binning and normalization on the raw mass spectrometry data.

[0055] The multi-channel embedding subsystem is used to construct the multi-channel embedding module and use the multi-channel embedding module as a feature representation layer to structurally connect with the preset classification model.

[0056] The classification subsystem is used to jointly optimize and train the parameters of the pre-connected classification model and perform the classification prediction step.

[0057] The beneficial effects of the above scheme are as follows: The original mass spectrometry data classification system based on multi-channel embedded representation provided by this invention breaks through the limitations of single-channel representation through multi-channel collaborative feature extraction and the joint design of global dimensionality reduction and local convolution, realizing multi-level semantic mining of mass spectrometry data; the dynamic feature fusion mechanism preserves the original information while strengthening feature interaction through channel residual connections, avoiding information loss and improving the model's generalization ability; the end-to-end training process and modular design take into account both performance and efficiency, providing a scalable solution for high-dimensional mass spectrometry data analysis. Attached Figure Description

[0058] Figure 1 This is a flowchart of the method of the present invention.

[0059] Figure 2 This is a reference diagram for the multi-channel embedding representation generation stage in this embodiment. Detailed Implementation

[0060] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0061] Before describing this embodiment, the following terms will be explained:

[0062] SpiderMass: Water-assisted laser desorption or ionization technology;

[0063] LC-MS: Liquid Chromatography-Mass Spectrometry;

[0064] TIC: Total ion number normalized;

[0065] LayerNorm: Layer normalization;

[0066] BatchNorm: Batch normalization;

[0067] ReLU: Corrected Linear Unit;

[0068] Dropout: Random deactivation unit;

[0069] Transformer model: Transformer model;

[0070] Adam: An adaptive learning rate optimization method;

[0071] CLS_token: A special token is added to the beginning of the input sequence for sequence-level downstream tasks;

[0072] ReduceLROnPlateau: A learning rate scheduler used in the training process of deep learning models;

[0073] FLOPS: Floating-point operations per second.

[0074] Example

[0075] In this embodiment, as Figure 1 As shown, the classification process includes the following stages: data preprocessing stage, in which the raw mass spectrometry data is binned and normalized to generate standardized intensity data; multi-channel embedding feature generation stage, in which the preprocessed data is input into the multi-channel embedding module to generate multi-channel embedding representation; and module and deep learning classification model co-optimization training stage, in which the multi-channel embedding representation is input into the classification model, and the module is co-optimized and the classification result is output during the training process.

[0076] like Figure 1 As shown, this invention provides a method for classifying raw mass spectrometry data based on multi-channel embedding representation, the implementation of which is as follows:

[0077] S1. Obtain the raw mass spectrometry data, perform binning and normalization on the raw mass spectrometry data to obtain standardized intensity data. The specific steps are as follows:

[0078] S101. Obtain raw mass spectrometry data, classify the raw mass spectrometry data according to the data characteristics of different mass spectrometry preparation techniques, and obtain the first mass spectrometry data and the second mass spectrometry data.

[0079] S102. Based on the user-defined mass-to-charge ratio, the first mass spectrometry data is binned to form binning intervals. Based on the binning intervals, the mass spectrometry data with a total ion intensity greater than a preset threshold in the first mass spectrometry data are used as the first training samples.

[0080] S103. Based on the user-defined mass-to-charge ratio, the second mass spectrometry data is binned to form bin intervals. Based on the bin intervals, the user-defined retention time is used as a window to align the signals of the second mass spectrometry data. The signal intensity values ​​of the same bin interval are superimposed and averaged to obtain the second training sample.

[0081] S104. Normalize the total number of ions for each first training sample and each second training sample to obtain standardized intensity data.

[0082] In this embodiment, during the data preprocessing stage, raw mass spectrometry data is acquired. Based on the data characteristics of different mass spectrometry preparation techniques (such as LC-MS and SpiderMass), the raw mass spectrometry data is classified to obtain first mass spectrometry data (SpiderMass mass spectrometry data) and second mass spectrometry data (LC-MS mass spectrometry data).

[0083] For SpiderMass mass spectrometry data, binning is performed with a fixed width of 0.1 Da based on the user-defined mass-to-charge ratio (m / z). For example, each mass spectrum vector is divided into 12,000 intervals within the range of 400-1600 Da. The intensity values ​​within each interval are accumulated to eliminate noise caused by differences in instrument resolution and to pass threshold filtering (e.g., total ion count below 1 × 10⁻⁶). 4 (The mass spectrometer is considered low-quality data) to remove interference from low-quality data and obtain the first training sample;

[0084] For LC-MS mass spectrometry data, the data is binned with a fixed width of 0.1 Da according to the user-defined mass-to-charge ratio (m / z), and further aligned with a 10-second window according to the retention time (RT). The signal intensity values ​​within the same bin are superimposed and averaged to obtain the second training sample.

[0085] Total Ion Count Normalization (TIC) is performed on each sample (first training sample and second training sample) to scale the total intensity to 1.0 and eliminate the absolute intensity difference between samples.

[0086] S2. Construct a multi-channel embedding module and use it as a feature representation layer. Connect this module to the pre-defined classification model to obtain the connected pre-defined classification model. The specific steps are as follows:

[0087] S201. Construct a multi-channel embedding module using the encoder submodule, the channel embedding submodule, and the channel splicing operation;

[0088] S202. Based on an end-to-end architecture, the multi-channel embedding module is used as a feature representation layer and structurally connected with the preset classification model to obtain the connected preset classification model.

[0089] In this embodiment, the multi-channel embedding module includes: an encoder submodule, a channel embedding submodule, and a channel splicing operation that realizes the fusion of information between channels;

[0090] The encoder submodule includes: a two-layer fully connected neural network, with a normalization, correction linear unit and random deactivation unit connected after the first fully connected layer;

[0091] The channel embedding submodule includes: two one-dimensional convolutional layers, and after each convolutional layer, BatchNorm, ReLU activation function and Dropout unit are executed in sequence, wherein the Dropout probability is configurable;

[0092] The channel splicing operation is used to perform splicing operations in the channel dimension.

[0093] S3. Based on the standardized intensity data, jointly optimize and train the parameters of the pre-defined classification model that has been concatenated, using an early stopping mechanism to obtain the trained pre-defined classification model. The specific steps are as follows:

[0094] S301. The standardized intensity data is divided into training set, validation set and test set using a hierarchical random sampling strategy.

[0095] In this embodiment, after the preprocessing stage, a hierarchical random sampling strategy is used to divide the standardized intensity data into a training set (70%), a validation set (20%), and a test set (10%) to ensure that the class distribution of each subset is consistent with the original dataset, while also addressing the class imbalance problem.

[0096] S302. The mass spectrometry data in the training set is used as input data and fed into the multi-channel embedding module for processing to generate the optimal multi-channel embedding representation, as follows:

[0097] S3021. The mass spectrometry data in the training set is used as input data and input into the multi-channel embedding module. The first fully connected layer in the encoder submodule is used to compress the dimension of the input data to the intermediate dimension. Then, the layer normalization, the corrected linear unit and the random deactivation unit are used to extract features to obtain the initial latent embedding representation.

[0098] S3022. Using the second fully connected layer in the encoder submodule, the input data is compressed from the intermediate dimension to the embedding dimension, and a global embedding representation is generated.

[0099] In this embodiment, as Figure 2As shown, the multi-channel embedding module uses the encoder submodule to reduce the dimensionality of the high-dimensional mass spectrum vector, preserving key features while reducing computational complexity. Subsequently, through the stacking of convolutional layers in the channel embedding submodule, the dimensionality-reduced single-channel mass spectrum vector is embedded into multiple complementary channel representations. This multi-channel embedding method can capture feature information at different levels in the original mass spectrum data and establish deep correlations between channels, thereby effectively improving the classification performance of subsequent classification models. The multi-channel embedding submodule serves as a pre-feature extraction layer for the classification model, achieving deep coupling with downstream models through an end-to-end architecture.

[0100] Specifically: The preprocessed mass spectrometry data X∈R from the training set... B×D As input data (where B represents the batch size and D is the original dimension of each mass spectrometry vector), the data is fed into the multi-channel embedding module. The fully connected encoder performs nonlinear dimensionality reduction, using the first fully connected layer to compress the dimension of the mass spectrometry data from the original dimension D of the mass spectrometry vector to a preset intermediate dimension of 2048. Then, the intermediate dimension mass spectrometry data is processed using LayerNorm, ReLU activation function, and random deactivation to obtain an initial latent embedding representation. This is further reduced to an embedding dimension d of 1024 using the second fully connected layer, generating a low-dimensional global embedding representation E∈R. B×d ;

[0101] The mathematical process for generating the low-dimensional global embedding representation can be summarized by the following expression:

[0102] H1 = ReLU(LayerNorm(XW1+b1))

[0103] H′1 = Dropout(H1)

[0104] E = H1′W2 + b2

[0105] Where H1 represents the intermediate-dimensional mass spectrometry data after LayerNorm and ReLU activation function processing, ReLU(·) represents the ReLU activation function processing, LayerNorm(·) represents LayerNorm processing, X represents the preprocessed mass spectrometry data, and W1 represents the weight matrix of the first fully connected layer, where W1∈R D×2048 It linearly projects a mass spectrum vector X of dimension D into a 2048-dimensional intermediate feature space, where b1 represents the bias vector of the first fully connected layer, and b1∈R. 2048 After the linear transformation of XW1, the bias vector b1 is added to each dimension of the 2048-dimensional intermediate result. H1′ represents the initial latent embedding representation, Dropout(·) represents random deactivation, E represents the global embedding representation, and W2 represents the weight matrix of the second fully connected layer, where W2∈R. 2048×db2 represents the bias vector of the second fully connected layer, and b2∈R d .

[0106] S3023. Reshape the global embedding representation into a three-dimensional tensor, extract features using the first one-dimensional convolutional layer in the channel embedding submodule, and obtain an initial first multi-channel embedding representation with half the preset number of channels. Through batch normalization, correction of the linear unit activation function, and random deactivation, the initial first multi-channel embedding representation is processed to obtain an enhanced first multi-channel embedding representation.

[0107] S3024. Using the second one-dimensional convolutional layer in the channel embedding submodule, feature extraction is performed on the enhanced first multi-channel embedding representation to obtain an initial second multi-channel embedding representation with a preset number of channels. Then, through batch normalization, correction of the linear unit activation function, and random deactivation, the enhanced second multi-channel embedding representation is obtained.

[0108] S3025. Using the channel residual connection submodule, the global embedding representation reshaped into a three-dimensional tensor is spliced ​​with the enhanced second multi-channel embedding representation to obtain the optimal multi-channel embedding representation.

[0109] In this embodiment, the global embedding representation is reshaped into a three-dimensional tensor E′∈R. B×1×d The input is fed into the channel embedding submodule, and then passed through two layers of one-dimensional convolution (kernel size 3, stride 1, padding 1). After each convolution layer, BatchNorm, ReLU activation function, and Dropout are executed sequentially to enhance generalization ability. The Dropout probability is configurable. The first one-dimensional convolutional layer outputs half of the preset number of channels. The first multi-channel embedding representation is processed by a second one-dimensional convolutional layer, which outputs a second multi-channel embedding representation with a preset number of channels C=256. After enhancement generalization, an enhanced multi-channel embedding representation is obtained. Then, through channel concatenation, the global embedding representation, which is reshaped into a three-dimensional tensor, is concatenated with the enhanced second multi-channel embedding representation (i.e., multi-channel local features) to obtain the fused feature. The channel dimension of the fused feature is expanded to 257 (original channels + 256 convolutional channels), so that the fused feature can be directly adapted to various classification models.

[0110] The expression for reshaping the global embedding representation into a three-dimensional tensor is as follows:

[0111]

[0112] Where E′ represents the global embedding representation reshaped into a 3D tensor, which is composed of the global embedding representation plus one channel dimension, and E represents the global embedding representation. This indicates an expansion in the channel dimension;

[0113] The expression for feature extraction in the channel embedding submodule is as follows:

[0114]

[0115] Where C1 represents the first multi-channel embedding representation after batch normalization and ReLU activation processing, and BatchNorm(·) represents batch normalization, Conv1D(·) represents one-dimensional convolution, and K1 represents the kernel parameters of the first one-dimensional convolutional layer. C2 represents the enhanced second multichannel embedding representation, and C2∈R B×C×d Dropout(·) represents random deactivation, K2 represents the kernel parameter of the second one-dimensional convolutional layer, and

[0116] The expression for concatenating the global embedding representation reshaped into a three-dimensional tensor with the enhanced second multi-channel embedding representation is as follows:

[0117] O = Concat(E′, C2) ∈ R B×(1+C)×d

[0118] Where O represents the optimal multichannel embedding representation, Concat(·) represents the concatenation operation, E′ represents the global embedding representation reshaped into a three-dimensional tensor, and E′∈R B×1×d C2 represents the enhanced second reshaping into a global embedding representation of a three-dimensional tensor, and R B ×(1+C)×d The dimensions of the three-dimensional tensor are represented by B, B represents the batch size, 1 represents dimension 1, d represents the embedding dimension, and C represents the user-defined number of channels.

[0119] S303. Input the multi-channel embedding representation into the preset classification model for joint optimization training, validate it using a validation set, and use an early stopping mechanism to test the classification model with the optimal parameters using a test set to obtain the trained preset classification model. The specific steps are as follows:

[0120] S3031. Input the multi-channel embedded representation into the preset classification model, and update the parameters of the preset classification model using an adaptive moment estimation optimizer based on a phased optimization strategy.

[0121] S3032. Based on the validation set, the learning rate of the adaptive moment estimation optimizer is dynamically adjusted using a preset learning rate scheduler. In response to the validation set loss not decreasing for a consecutive preset decay round, the learning rate is decayed by a preset decay factor.

[0122] S3033. Calculate the validation set accuracy and F1 score, save the model weights with the best performance, reverse the weights of the loss function according to the class frequency of the training set, and calculate the validation loss using the weighted cross-entropy loss function according to the validation set. Adopt an early stopping mechanism. If the validation loss does not decrease after a preset number of early stopping rounds, stop training and proceed to step S3035.

[0123] S3034. Determine whether the preset training period has been reached. If not, return to step S3031 to perform joint optimization training again. If yes, proceed to step S3035.

[0124] S3035. Based on the weights of the optimal performance model saved in the last round, test the classification model with the optimal parameters using the test set to obtain the trained preset classification model.

[0125] In this embodiment, during joint optimization training, the parameters of the multi-channel embedding module and the parameters of the preset classification model will be optimized together;

[0126] The pre-defined classification model training employs a phased optimization strategy, balancing efficiency and stability. First, the Adam optimizer is used (with an initial learning rate set to 1e). -3 The attenuation rate is set to 1e. -5 Update parameters and dynamically adjust the learning rate using the ReduceLROnPlateau scheduler: If the validation set loss does not decrease for 5 consecutive rounds (preset decay rounds), the learning rate decays to a preset decay factor of 0.1 times the current value, with a minimum limit of 1e. -32 The preset training cycle is fixed at 64 rounds. After each round, the validation set accuracy and F1 score are calculated, and only the weights of the best-performing model are saved. The loss function uses weighted cross-entropy loss to calculate the validation loss. The weights are inversely distributed according to the frequency of the training set classes (e.g., the weight of the minority class is the total number of samples or the number of samples of that class) to alleviate the problem of data imbalance. To prevent overfitting, an early stopping mechanism is introduced. If the validation loss does not decrease for 10 consecutive rounds (preset early stopping rounds), the training is terminated. In terms of training acceleration, a parallel computing strategy is adopted to improve data throughput in a multi-GPU environment.

[0127] After one round of training, determine whether the preset training cycle of 64 rounds has been reached. If not, perform joint optimization training again. If so, test the classification model with the best parameters using the test set based on the weights of the best performance model saved in the last round, and obtain the trained preset classification model.

[0128] In this embodiment, during the collaborative optimization training phase, the present invention combines the multi-channel embedding module with various mainstream deep learning model architectures, including convolutional neural networks (CNNs) such as ResNet, EfficientNet, and DenseNet, as well as sequence modeling networks such as LSTM and Transformer. The present invention does not adopt a model ensemble learning strategy, but instead uses the multi-channel embedding module as a feature representation layer to directly connect structurally with the classification model in order to optimize the feature input.

[0129] The preset classification model includes: convolutional neural network, long short-term memory network, and converter model;

[0130] For CNNs (such as ResNet-50, EfficientNetB0, DenseNet121, etc.), O can be directly used as multi-channel input. Through hierarchical convolution and pooling operations, the global distribution and local peak details in the multi-channel features are gradually fused.

[0131] For the Transformer, O is taken as the input of multiple sequences. The embedding dimension of the multi-channel embedding module is the sequence dimension of the model. In order to meet the requirements of the classification task, a learnable preset label CLS_token(B,1,d) is added at the beginning of the sequence. Then it is input into the encoder of the Transformer, which consists of multiple multi-head self-attention modules. Each layer captures cross-channel dependencies through the self-attention mechanism. Finally, the hidden state (B,d) corresponding to CLS_token is extracted and mapped using a fully connected layer to obtain the classification result.

[0132] For the LSTM model, the multi-channel features output by the multi-channel embedding module are directly used as the time sequence input to the model. Each time step corresponds to a feature vector of one channel. The LSTM layer captures the time sequence pattern across channels. The hidden state of the last time step is mapped to the classification label through a fully connected layer to complete the classification.

[0133] S4. Using a trained pre-defined classification model, classify the standardized intensity data to obtain the classification results.

[0134] In this embodiment, the deep learning classification model without the integrated multi-channel embedding module has larger values ​​in terms of FLOPs and model size, indicating higher computational overhead. After integrating the module, the FLOPs of all models are significantly reduced, the model size is also greatly decreased, and the classification accuracy is significantly improved. This performance improvement is due to the characteristics of the multi-channel embedding module, which first performs dimensionality reduction on the high-dimensional data before channel embedding, significantly reducing the data dimensionality. This means that subsequent convolution operations no longer require excessive convolution calculations to capture the structural information of the data, reducing unnecessary computational overhead in sparse high-dimensional space. In addition, although the computational requirements of sequence models such as LSTM and Transformer increase (FLOPs) after integrating the module, the training stability of the models is significantly improved, avoiding crashes during training.

[0135] The multi-channel embedding representation classification method proposed in this invention significantly enhances feature representation capabilities by transforming the original mass spectrometry vectors into multi-channel embedding representations. Compared with traditional feature engineering methods, the method in this study is more adaptable and maintains robust performance across different datasets and tasks. Overall, this research provides a novel deep feature representation method for mass spectrometry data analysis, expands the application prospects of deep representation learning in the field of mass spectrometry, and provides new technical support for mass spectrometry data analysis.

Claims

1. A method for classifying raw mass spectrometry data based on multi-channel embedding representation, characterized in that, Includes the following steps: S1. Obtain raw mass spectrometry data, perform binning and normalization on the raw mass spectrometry data to obtain standardized intensity data; S2. Construct a multi-channel embedding module, and use the multi-channel embedding module as a feature representation layer. Then, structurally connect this module with the pre-defined classification model to obtain the connected pre-defined classification model, specifically: S201. Construct a multi-channel embedding module using the encoder submodule, the channel embedding submodule, and the channel splicing operation; S202. Based on an end-to-end architecture, the multi-channel embedding module is used as a feature representation layer and structurally connected with the preset classification model to obtain the connected preset classification model. S3. Based on the standardized intensity data, jointly optimize and train the parameters of the concatenated preset classification model, using an early stopping mechanism, to obtain the trained preset classification model, specifically: S301. The standardized intensity data is divided into training set, validation set and test set using a hierarchical random sampling strategy. S302. The mass spectrometry data in the training set is used as input data and processed by the multi-channel embedding module to generate the optimal multi-channel embedding representation, specifically: S3021. The mass spectrometry data in the training set is used as input data and input into the multi-channel embedding module. The first fully connected layer in the encoder submodule is used to compress the dimension of the input data to the intermediate dimension. Then, the layer normalization, the corrected linear unit and the random deactivation unit are used to extract features to obtain the initial latent embedding representation. S3022. Using the second fully connected layer in the encoder submodule, the input data is compressed from the intermediate dimension to the embedding dimension, and a global embedding representation is generated. S3023. Reshape the global embedding representation into a three-dimensional tensor, extract features using the first one-dimensional convolutional layer in the channel embedding submodule, and obtain an initial first multi-channel embedding representation with half the preset number of channels. Through batch normalization, correction of the linear unit activation function, and random deactivation, the initial first multi-channel embedding representation is processed to obtain an enhanced first multi-channel embedding representation. S3024. Using the second one-dimensional convolutional layer in the channel embedding submodule, feature extraction is performed on the enhanced first multi-channel embedding representation to obtain an initial second multi-channel embedding representation with a preset number of channels. Then, through batch normalization, correction of the linear unit activation function, and random deactivation, the enhanced second multi-channel embedding representation is obtained. S3025. Using the channel residual connection submodule, the global embedding representation reshaped into a three-dimensional tensor is spliced ​​with the enhanced second multi-channel embedding representation to obtain the optimal multi-channel embedding representation. The expression for concatenating the global embedding representation reshaped into a three-dimensional tensor with the enhanced second multi-channel embedding representation is as follows: in, This represents the optimal multichannel embedding representation. This indicates a splicing operation. This represents the global embedding representation reshaped into a three-dimensional tensor. , This represents the enhanced second multi-channel embedding representation. Representing the dimensions of a three-dimensional tensor. Indicates batch size, Indicates dimension 1, Indicates the embedding dimension. This represents the number of user-defined channels; S303. Input the optimal multi-channel embedding representation into the preset classification model for joint optimization training, validate it through the validation set, and use an early stopping mechanism to test the classification model with the optimal parameters using the test set to obtain the trained preset classification model. S4. Using a trained pre-defined classification model, classify the standardized intensity data to obtain the classification results.

2. The method for classifying raw mass spectrometry data based on multi-channel embedding representation according to claim 1, characterized in that, S1 includes the following steps: S101. Obtain raw mass spectrometry data, classify the raw mass spectrometry data according to the data characteristics of different mass spectrometry preparation techniques, and obtain the first mass spectrometry data and the second mass spectrometry data. S102. Based on the user-defined mass-to-charge ratio, the first mass spectrometry data is binned to form binning intervals. Based on the binning intervals, the mass spectrometry data with a total ion intensity greater than a preset threshold in the first mass spectrometry data are used as the first training samples. S103. Based on the user-defined mass-to-charge ratio, the second mass spectrometry data is binned to form bin intervals. Based on the bin intervals, the user-defined retention time is used as a window to align the signals of the second mass spectrometry data. The signal intensity values ​​of the same bin interval are superimposed and averaged to obtain the second training sample. S104. Normalize the total number of ions for each first training sample and each second training sample to obtain standardized intensity data.

3. The method for classifying raw mass spectrometry data based on multi-channel embedding representation according to claim 2, characterized in that, The first mass spectrometry data is water-assisted laser desorption / ionization mass spectrometry data; The second mass spectrometry data is mass spectrometry data obtained using liquid chromatography-mass spectrometry (LC-MS).

4. The method for classifying raw mass spectrometry data based on multi-channel embedding representation according to claim 1, characterized in that, S303 includes the following steps: S3031. Input the multi-channel embedded representation into the preset classification model, and update the parameters of the preset classification model using an adaptive moment estimation optimizer based on a phased optimization strategy. S3032. Based on the validation set, the learning rate of the adaptive moment estimation optimizer is dynamically adjusted using a preset learning rate scheduler. In response to the validation set loss not decreasing for a consecutive preset decay round, the learning rate is decayed by a preset decay factor. S3033. Calculate the validation set accuracy and F1 score, save the model weights with the best performance, reverse the weights of the loss function according to the class frequency of the training set, and calculate the validation loss using the weighted cross-entropy loss function according to the validation set. Adopt an early stopping mechanism. If the validation loss does not decrease after a preset number of early stopping rounds, stop training and proceed to step S3035. S3034. Determine whether the preset training period has been reached. If not, return to step S3031 to perform joint optimization training again. If yes, proceed to step S3035. S3035. Based on the weights of the optimal performance model saved in the last round, test the classification model with the optimal parameters using the test set to obtain the trained preset classification model.

5. The method for classifying raw mass spectrometry data based on multi-channel embedding representation according to claim 1, characterized in that, The preset classification model includes: convolutional neural network, long short-term memory network, and converter model; The convolutional neural network takes multi-channel embedded representations as multi-channel inputs and uses hierarchical convolution and pooling operations to gradually fuse the global distribution and local peak details in the multi-channel array to complete the classification. The Long Short-Term Memory (LSTM) network uses multi-channel embedded representation as the input model for the time sequence. Each time step corresponds to a feature vector of one channel. The LSM layer captures cross-channel temporal patterns, and the fully connected layer maps the hidden state of the last time step to the classification label to complete the classification. The converter model expands the multi-channel embedding representation along the embedding dimension and uses it as a multi-sequence input. It adds a learnable preset label at the beginning of the sequence to obtain the input sequence. It uses a multi-layer multi-head self-attention module to form an encoder to capture the cross-channel dependencies of the input sequence. By extracting the hidden states corresponding to the preset labels, it uses a fully connected layer for mapping to obtain the classification result.

6. A raw mass spectrometry data classification system based on multi-channel embedding representation, used to execute the raw mass spectrometry data classification method based on multi-channel embedding representation as described in any one of claims 1-5, characterized in that, include: The data preprocessing subsystem is used to perform binning and normalization on the raw mass spectrometry data. The multi-channel embedding subsystem is used to construct the multi-channel embedding module and use the multi-channel embedding module as a feature representation layer to structurally connect with the preset classification model. The classification subsystem is used to jointly optimize and train the parameters of the pre-connected classification model and perform the classification prediction step.