Single cell mass spectrum feature classification method and system based on momentum comparison network

Through the single-cell mass spectrometry feature classification method based on momentum comparison network, the problem of insufficient feature extraction ability of mass spectrometry data in the prior art is solved, and efficient classification and identification of single-cell mass spectrometry data is achieved, which significantly improves the classification accuracy and generalization ability of the model.

CN120067663APending Publication Date: 2025-05-30HANGZHOU DIANZI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510195103.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The prior art has problems such as insufficient feature extraction capability and difficulty in fully digging out potential data information and laws in the classification and identification of single-cell mass spectrometer data, especially in the case of high-dimensional features and small sample sizes, which are not effective.

Method used

The single-cell mass spectrometry feature classification method based on momentum comparison network is adopted. By constructing the momentum comparison network, the momentum update mechanism and comparative mutual information estimating the loss function is used, the encoder network is trained to extract the mass spectrometry features, and the precise classification of single-cell mass spectrometry features is achieved through the classifier.

Benefits of technology

It significantly improves the model's ability to discriminate different categories of single-cell mass spectrometry data, improves the accuracy and reliability of classification, alleviates the training oscillation problem, and ensures the stability and generalization ability of the features learned by the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067663A_ABST
    Figure CN120067663A_ABST
Patent Text Reader

Abstract

The invention discloses a single cell mass spectrum feature classification method and system based on a momentum comparison network. The method comprises the following steps: firstly, pre-processing mass spectrum data to be detected, constructing a query sample, a positive sample queue form and a negative sample queue form for the data according to own labels, and respectively inputting the query sample, the positive sample queue form and the negative sample queue form into an encoder network 1 and an encoder network 2, and the encoder network 1 and the encoder network 2 respectively extract data features and map high-dimensional data to a low-dimensional potential space through training in a form of constructing a plurality of negative samples in each data sample so as to realize data dimension reduction. And finally, the model learns the characteristics with higher discrimination capability, so that the high-dimensional problem encountered in the detection task in the aspect of single cell mass spectrum is effectively solved. And finally, the extracted coding features are used for classification, so that the model shows better performance in a single cell detection task, and the method can be widely applied to efficient and accurate detection of single cells.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of detection and classification of metabolites in single-cell science, and particularly relates to a single-cell mass spectrometry feature classification method and system based on a momentum contrast network. Background Art

[0002] Early and accurate diagnosis of bladder cancer is crucial for the treatment and prognosis of patients. Early detection and finding of treatment methods in time can avoid the further development and spread of cancer.

[0003] Cells are the most basic units of organisms. Metabolic analysis of cells can characterize their physiological states. Mass spectrometry analysis methods are increasingly widely used in today's medical development due to their high sensitivity, high selectivity, rich structural information, wide applicability and other characteristics, and have become the preferred technology for metabolomics research. At present, most mass spectrometry metabolomic analyses rely on population cell samples, masking the heterogeneity between single cells, while cell heterogeneity is of great significance for understanding some key biological processes. Therefore, the application of mass spectrometry technology in the detection of bladder cancer is a feasible measure to solve the early detection and treatment of cancer. Based on the research of single-cell technology, a deeper understanding of bladder cancer tumor cells and the tumor microenvironment can provide more targeted solutions for the precise treatment of cancer. At present, the application of single-cell technology in early cancer diagnosis still faces some challenges, such as the scarcity of cancer cells in samples and the need to improve detection sensitivity. At the same time, the mass spectrometry data obtained according to mass spectrometry technology also often faces the characteristics of small samples and high dimensions. At present, the solution direction is mainly to improve the classification and recognition ability of mass spectrometry data through machine learning. Machine learning uses methods such as support vector machine SVM, random forest RF, and logistic regression. It often requires manual feature engineering, is prone to missing important features, and is difficult to fully explore the potential information and rules in the data, and may not work well for such high-dimensional features as mass spectrometry.

[0004] Therefore, there is an urgent need in this field to provide a model that can enhance the feature extraction ability of mass spectrometry data, so as to effectively classify various cancers, improve the early detection of cancer, and achieve the effect of timely treatment. Summary of the Invention

[0005] The purpose of the present invention is to overcome the above-mentioned deficiencies of the prior art and provide a single-cell mass spectrometry feature classification method and system based on a momentum contrast network.

[0006] The present invention is implemented as follows. In the first aspect, the present invention provides a single-cell mass spectrometry feature classification method based on a momentum contrast network, including: Step S1: Obtain single-cell mass spectrometry data and preprocess it to form a data set; Step S2: Construct a momentum contrast network and train it using a dataset; The momentum contrast network includes an encoder network 1 and an encoder network 2 with the same structure, where the network parameters of the encoder network 2 are updated by momentum using weight parameters; The input of the encoder network 1 is a query sample, and the output is the first mass spectrometry feature; The input of the encoder network 2 is a contrast sample, and the output is the second mass spectrometry feature; The query sample is any mass spectrometry data after preprocessing; The contrast sample includes a positive sample and a negative sample; among them, the positive sample is mass spectrometry data of the same category as the query sample; the negative sample is mass spectrometry data of a different category from the query sample; Step S3: Calculate the contrastive mutual information estimation loss by comparing the first mass spectrometry feature output by the encoder network 1 and the second mass spectrometry feature output by the encoder network 2, thereby improving the similarity of the mass spectrometry features between the query sample and the positive sample and reducing the similarity of the mass spectrometry features between the query sample and the negative sample; Step S4: Construct the encoder network 1 that has been trained into a single-cell mass spectrometry feature extraction model; use the single-cell mass spectrometry feature extraction model and a classifier to achieve single-cell mass spectrometry feature classification.

[0007] Preferably, the encoder network 1 and the encoder network 2 have the same structure, and both include a first convolutional layer, a first max pooling layer, a second convolutional layer, a second max pooling layer, a flattening layer, and a fully connected layer connected in series in sequence.

[0008] Preferably, the calculation of the contrastive mutual information estimation loss is specifically: where q is the mass spectrometry feature of the query sample, is the mass spectrometry feature of the positive sample, is the mass spectrometry feature of the i-th negative sample, τ is the temperature coefficient, is the similarity of the mass spectrometry features between the query sample and the positive sample ; is the similarity of the mass spectrometry features between the query sample and the negative sample ;

[0009] Preferably, the similarity of the mass spectrometry features between the query sample and the positive sample and the similarity of the mass spectrometry features between the query sample and the negative sample both satisfy: ; where m represents the length of the abscissa of the mass spectrometry graph, and a and b represent the intensity values of each mass-to-charge ratio on the two mass spectrometry graphs.

[0010] Preferably, the network parameters of the encoder network 2 are updated by momentum with weight parameters: + where m is a custom parameter, 0 < m < 1, represents the weight parameters of the encoder network 1, represents the weight parameters of the encoder network 2.

[0011] In a second aspect, the present invention provides a single-cell mass spectrometry feature classification system, including: A data acquisition module, responsible for acquiring single-cell mass spectrometry data and preprocessing it; A classification module, responsible for implementing single-cell mass spectrometry feature classification by using the trained single-cell mass spectrometry feature extraction model and classifier.

[0012] In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed on a computer, the computer is made to execute the method.

[0013] In a fourth aspect, the present invention provides a computing device, including a memory and a processor. An executable code is stored in the memory. When the processor executes the executable code, the method is implemented.

[0014] The present invention has the following beneficial effects: In the training process of the momentum contrast network constructed by the present invention, a negative sample queue is constructed for each query sample. A large number of negative samples comprehensively cover the underlying data distribution, greatly enriching the differential information learned by the model and significantly improving the model's ability to discriminate different categories of single-cell mass spectrometry data. By constructing positive and negative sample pairs based on labels and training with the contrastive mutual information estimation loss function, the inter-class difference can be maximized and the intra-class difference can be minimized, enabling the model to accurately distinguish different categories of data and improving the accuracy and reliability of classification by using mass spectrometry similarity. By maintaining the moving generated sample pairs of the momentum contrast network, the relationship between positive and negative samples is effectively stabilized, the training oscillation problem is alleviated, the model is prevented from fluctuating excessively, and the features learned by the model are ensured to be stable and reliable, enhancing the generalization ability of the model. Facing the high-dimensional problem of single-cell mass spectrometry data, the data is preprocessed first, and then input into the encoder network 1 and encoder network 2 with weight updates in the form of a specific sample queue. The encoder is used to extract features and construct multiple negative samples to achieve data dimensionality reduction, enabling the model to focus on key features and learn more discriminative feature representations. This dimensionality reduction operation not only reduces the dimensionality of the data and the complexity of data processing, but also allows the model to focus on more critical features and learn more discriminative feature representations, effectively solving the problem brought by the high dimensionality of data in single-cell mass spectrometry detection tasks. Description of the Drawings

[0015] To more clearly illustrate the technical solutions of the present invention, the accompanying drawings required for use in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0016] Figure 1 is the method technical route provided by the embodiment of the present invention.

[0017] Figure 2 is the structural architecture diagram of the single-cell query sample mass spectrometry feature extraction model provided by the embodiment of the present invention.

[0018] Figure 3 is the structural architecture diagram of the single-cell comparison sample mass spectrometry feature extraction model provided by the embodiment of the present invention.

[0019] Figure 4 is the calculation process of the mutual information estimation loss for comparing each query sample provided by the embodiment of the present invention. Detailed implementation manners

[0020] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention.

[0021] As Figure 1 shown, the embodiment of the present invention provides a single-cell mass spectrometry feature classification method based on a momentum contrast network, including: Step S1, obtain bladder cancer cell mass spectrometry data and preprocess it; allocate all preprocessed mass spectrometry data and corresponding labels to the training set and test set according to 8:2, where the label categories include four categories, labeled as 0, 1, 2, and 3.

[0022] The bladder cancer single-cell data set used in this embodiment has four bladder cancer cell lines, namely 5637, TCC, CDDP, and UMUC3, including 11 files of the 5637 type, 15 files of the CDDP type, 17 files of the TCC type, and 7 files of the UMUC3 type, and a total of 666 cell number samples are obtained. Among them, 5637 is 169, CDDP is 141, TCC is 178, and UMUC3 is 188, which respectively correspond to the above label categories.

[0023] In one implementation manner, the preprocessing of the single-cell mass spectrometry data is specifically to perform zero-padding and equal-length processing on the mass spectrometry data, set the same dimension, and then normalize the mass spectrometry intensity value to keep it within the range of 0 to 1. Denote L = ( ), where the mass-to-charge ratio , and the corresponding mass spectrometry intensity , where N represents the total length of the mass spectrum.

[0024] In one implementation, the normalization process of the above mass spectrometry intensity values is to normalize the intensity on each mass spectrum by dividing it by the base peak: Equation (1) Step S2: Construct a momentum contrast network and train it using the dataset; The momentum contrast network includes an encoder network 1 and an encoder network 2. For the network structure during the feature extraction process of query samples in the mass spectrometry and the mass spectrometry data state parameters of each layer obtained, refer to Appendix Figure 2 , and for the network structure during the feature extraction process of contrast samples in the mass spectrometry and the mass spectrometry data state parameters of each layer obtained, refer to Appendix Figure 3 , where x is the number of negative samples corresponding to each query sample in each batch. The parameters of the encoder network 2 are updated by momentum through the weight parameters after each batch: + Equation (2) where m is a custom parameter, 0 < m < 1, and in this embodiment, m is taken as 0.95, represents the weight parameters of the encoder network 1, represents the weight parameters of the encoder network 2.

[0025] The input of the encoder network 1 is the query sample, and it extracts the low-dimensional hidden layer space features of the input query sample's mass spectrometry data to obtain the features of the encoder network 1; The input of the encoder network 2 is the contrast sample. The contrast sample includes a positive sample and multiple negative samples. It extracts the low-dimensional hidden layer space features of the input contrast sample's mass spectrometry data to obtain the features of the encoder network 2; The query sample is a preprocessed mass spectrometry data randomly selected from the training dataset.

[0026] The contrast sample includes a positive sample and negative samples; among them, the positive sample is a different mass spectrometry data of the same category (same label) as the query sample; the negative samples are all other mass spectrometry data in the batch that are different from the query sample, that is, multiple negative samples selected from different categories of mass spectrometry data in each batch, and then jointly enter the encoder network 2 with the positive sample.

[0027] In one implementation, the structures of the encoder network 1 and the encoder network 2 are the same, and both include a first convolutional layer, a first max-pooling layer, a second convolutional layer, a second max-pooling layer, a flattening layer, and a fully connected layer connected in series in sequence; The fully connected layer maps the feature maps output by the convolution to the contrast learning space.

[0028] Both the first convolutional layer and the second convolutional layer use one-dimensional convolutions.

[0029] Step S3: By calculating the contrastive mutual information estimation loss for the first mass spectrometry feature output by the encoder network 1 and the second mass spectrometry feature output by the encoder network 2, the similarity of the mass spectrometry features between the query sample and the positive sample is improved, and the similarity of the mass spectrometry features between the query sample and the negative sample is reduced. See Appendix Figure 4 Calculate the similarity of the mass spectrometry features of the positive and negative samples through each query sample, and then calculate the overall cross-entropy based on the index of the mass spectrometry features of the positive sample.

[0030] Equation (3) where q is the mass spectrometry feature of the query sample, is the mass spectrometry feature of the positive sample, is the mass spectrometry feature of the i-th negative sample, and τ is the temperature coefficient (usually set to 0.07), which is used to adjust the smoothness of the similarity distribution. is the similarity of the mass spectrometry features between the query sample and the positive sample ; is the similarity of the mass spectrometry features between the query sample and the negative sample ; Mass spectrometry feature similarity 、 is measured by dot product, which satisfies: Equation (4) where m represents the length of the abscissa of the mass spectrometry graph, and a and b represent the intensity values of each mass-to-charge ratio on two mass spectrometry graphs; In each training batch, first calculate the similarity for each query sample in the batch and the corresponding one positive sample and multiple negative samples, and then calculate the cross-entropy loss for the overall multiple groups of data in the batch. During the training process, the Adam optimizer is used to update the parameters of the encoder network 1, and the parameters of the encoder network 2 are slowly updated through the momentum formula (2). When the loss function converges or reaches the preset number of training rounds (such as 100 rounds), the training stops.

[0031] Step S4: Construct a single-cell mass spectrometry feature extraction model with the trained and tested encoder network 1; use the single-cell mass spectrometry feature extraction model and the classifier to achieve single-cell mass spectrometry feature classification.

[0032] In one implementation, the classifier uses KNN.

[0033] This embodiment also tests and validates the above single-cell mass spectrometry feature extraction model in the above bladder cancer single-cell dataset: Use the trained encoder network 1 as the single-cell mass spectrometry feature extraction model. Input the mass spectrometry data of the test dataset into the encoder network 1, and output the low-dimensional feature vector.

[0034] The classifier adopts the KNN algorithm. Input the low-dimensional feature vector of the test set into the classifier to obtain the prediction result. The model performance evaluation metrics include accuracy, precision, recall, and F1-Measure value. Five-fold cross-validation is used to ensure the stability of the results, and the average metrics are taken as the final performance.

[0035] The classification accuracy (Accuracy) of the model is defined as follows: Accuracy = The classification precision (Precision) of the model is defined as follows: Precision = The classification recall (Recall) of the model is defined as follows: Recall = The F1-Measure value (the harmonic mean of precision and recall) of the model is defined as follows: F1-score = Table 1 Evaluation classification results of different methods Among them, the siamese network adopts two identical network units with weight sharing, and this network unit adopts the same architecture as the encoder network 1 in the momentum contrast network of the present invention.

[0036] The present invention stabilizes the feature representation by slowly updating the parameters of the encoder network 2 to avoid training oscillation; introduces a large number of negative sample contrast learning to enhance the model's ability to distinguish different categories of data; directly learns discriminative features from high-dimensional mass spectrometry data through the encoder without manual feature design, realizing end-to-end feature extraction. It can be seen from Table 1 that the method of the present invention has an accuracy of 91.7% on the bladder cancer single-cell dataset, which is significantly better than traditional methods such as CNN and PCA+RF. This method effectively solves the challenges of high-dimensionality and small samples of single-cell mass spectrometry data through contrast learning and momentum update mechanism, providing an efficient and reliable classification tool for early cancer diagnosis.

[0037] This embodiment also provides a single-cell mass spectrometry feature classification system, including: A data acquisition module, responsible for acquiring single-cell mass spectrometry data and preprocessing it; A classification module, responsible for using the trained Figure 2 model and classifier to implement single-cell mass spectrometry feature classification.

[0038] This embodiment also provides an electronic device. Specifically, the electronic device includes a memory and a processor. An executable code is stored in the memory. When the processor executes the executable code, the method according to any one of the above embodiments is implemented.

[0039] Among them, the memory may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface (which can be wired or wireless). The Internet, wide area network, local area network, metropolitan area network, etc. can be used.

[0040] The bus can be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0041] Among them, the memory is used to store a program. After receiving an execution instruction, the processor executes the program. The method executed by the device defined by the flow process disclosed in any one of the foregoing embodiments of the present invention can be applied to or implemented by the processor.

[0042] A processor may be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor or instructions in the form of software. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present invention can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method.

[0043] The computer program product of the readable storage medium provided by the embodiments of the present invention includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the method described in the foregoing method embodiments. For the specific implementation, reference can be made to the foregoing method embodiments, and details are not described herein again.

[0044] If the above functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disc that can store program code.

[0045] Finally, it should be noted that the above-described embodiments are only specific implementation manners of the present invention, used to illustrate the technical solutions of the present invention, rather than limiting it. The protection scope of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that any person skilled in the technical field of the present invention can still modify the technical solutions recorded in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A single cell mass spectrometry feature classification method based on momentum contrast network, characterized in that include: Step S1, acquiring single cell mass spectrometry data, and preprocessing it to form a data set; Step S2, constructing a momentum contrast network and using the data set for training; The momentum comparison network includes an encoder network 1 and an encoder network 2 having the same structure, wherein the network parameters of the encoder network 2 are momentum updated through weight parameters; The encoder network 1 receives a query sample as input and outputs a first mass spectrum feature; The input of the encoder network 2 is the comparison sample, and the output is the second mass spectrum feature; The query sample is any mass spectrometry data after preprocessing; The comparison samples include positive samples and negative samples; wherein the positive samples are mass spectrum data of the same category as the query sample; and the negative samples are mass spectrum data of a different category from the query sample; Step S3, by comparing the first mass spectrum feature and the second mass spectrum feature and calculating the mutual information estimation loss, thereby improving the mass spectrum feature similarity between the query sample and the positive sample and reducing the mass spectrum feature similarity between the query sample and the negative sample; Step S4, constructing a single-cell mass spectrometry feature extraction model with the trained encoder network 1; and implementing single-cell mass spectrometry feature classification using the single-cell mass spectrometry feature extraction model and the classifier.

2. The method according to claim 1, characterized in that: The encoder network 1 and the encoder network 2 both include a first convolutional layer, a first maximum pooling layer, a second convolutional layer, a second maximum pooling layer, a flattening layer, and a fully connected layer which are connected in series in sequence.

3. The method according to claim 1, characterized in that: The calculation of the comparison mutual information estimation loss is specifically: Where q is the mass spectrum characteristic of the query sample, is the mass spectrum characteristic of the positive sample, is the mass spectrum characteristic of the i-th negative sample, τ is the temperature coefficient, is the query sample and the positive sample Similarity of mass spectrometric features; are query samples and negative samples The similarity of mass spectral features.

4. The method according to claim 3, characterized in that: Query samples and positive samples The mass spectral feature similarity between the query sample and the negative sample The similarity of mass spectra characteristics satisfies: ; Where m represents the horizontal axis length of the mass spectrum, and a and b represent the intensity values ​​of each mass-to-charge ratio on the two mass spectra.

5. The method according to claim 1, characterized in that: The network parameters of the encoder network 2 are updated with momentum through the weight parameters: + Where m is a custom parameter, 0<m<1, represents the encoder network 1 weight parameters, Represents the encoder network 2 weight parameters.

6. A single cell mass spectrometry feature classification system based on the method according to any one of claims 1 to 5, characterized in that include: The data acquisition module is responsible for acquiring single-cell mass spectrometry data and preprocessing it; The classification module is responsible for realizing single-cell mass spectrometry feature classification using the trained single-cell mass spectrometry feature extraction model and classifier.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 5.

8. A computing device, comprising a memory and a processor, wherein the memory stores executable code, characterized in that: When the processor executes the executable code, the method according to any one of claims 1 to 5 is implemented.