A method and system for constructing an intelligent screening model for lung cancer based on sputum direct mass spectrum data
By employing a two-stage collaborative feature screening and a heterogeneous integrated diagnostic model, the matrix effect and reproducibility issues of sputum mass spectrometry data were resolved, achieving high-precision and robust lung cancer screening and improving the stability of the model and the reliability of diagnostic results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU PUSAIS MEDICAL TESTING CO LTD
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies for direct mass spectrometry of sputum data suffer from problems such as strong matrix effects, poor reproducibility of feature screening, insufficient model generalization ability, and lack of quality control mechanisms, leading to unreliable diagnostic results in lung cancer screening.
A two-stage collaborative feature screening and heterogeneous ensemble diagnostic model were adopted. Through orthogonal partial least squares discriminant analysis, multiple resampling and signal-to-noise ratio adaptive threshold adjustment, core metabolic fingerprint features were screened out. A heterogeneous ensemble diagnostic model of support vector machine, random forest and one-dimensional convolutional neural network was constructed, and the ensemble weights were dynamically adjusted in combination with the sample quality index.
It achieves highly robust and accurate non-invasive intelligent screening for lung cancer, improves the reproducibility of feature sets and the stability of the model, and can maintain stable predictive ability under low-quality samples.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to a method and system for constructing an intelligent screening model for lung cancer, specifically a method and system for constructing an intelligent screening model for lung cancer based on direct sputum mass spectrometry data, belonging to the fields of bioinformatics and medical artificial intelligence. Background Technology
[0002] Lung cancer is one of the malignant tumors with the highest incidence and mortality rates worldwide, and early screening is crucial for improving patient prognosis. Traditional imaging screening methods, such as low-dose spiral CT, are effective but have limitations including radiation exposure, high cost, and high false-positive rates. In recent years, fluid biopsy technology based on body fluid metabolomics has become a research hotspot due to its non-invasiveness, repeatability, and rich information content. Sputum, as a direct respiratory secretion, is rich in metabolite information reflecting the pathophysiological state of the lungs, making it an ideal biological sample for lung cancer screening.
[0003] However, when using neutral desorption electrospray extraction ionization mass spectrometry (ND-EESI-MS) for direct mass spectrometry analysis of sputum samples, the viscosity of sputum varies greatly from person to person, spanning several orders of magnitude. This leads to drastic fluctuations in ionization efficiency and a strong matrix effect. Furthermore, direct mass spectrometry data, lacking chromatographic separation, exhibits high dimensionality (typically containing thousands to tens of thousands of m / z features), high noise, and high redundancy. Effective signals are easily submerged in background noise, resulting in inconsistent data quality.
[0004] Secondly, traditional univariate statistical screening methods, such as t-tests and ANOVA, only focus on the statistical significance of a single feature, making them highly susceptible to batch effects and inter-individual biological differences, resulting in extremely poor reproducibility of the selected features across different datasets. While multivariate analysis methods can consider the correlation between features, they lack a fundamental fusion mechanism for the physical signal quality of mass spectrometry data, failing to distinguish between real metabolite signals and instrument noise, thus resulting in insufficient robustness of the feature set.
[0005] Subsequently, single traditional machine learning models, such as support vector machines and logistic regression, have limited ability to fit complex nonlinear metabolic patterns and struggle to capture the metabolic pathway interaction information implicit in mass spectrometry data. While general-purpose deep learning models possess powerful expressive capabilities, they are prone to overfitting in small-sample medical data scenarios and cannot adaptively handle model performance fluctuations caused by differences in sample quality. When faced with low-quality samples, the reliability of model predictions drops sharply or even collapses.
[0006] Finally, existing algorithmic frameworks generally employ static and unchanging model weight allocation strategies, failing to fundamentally couple the physical signal quality parameters of direct mass spectrometry with the weight allocation of machine learning algorithms. When input samples suffer from poor data quality due to improper acquisition or processing, the model cannot dynamically adjust its internal decision-making logic, leading to unreliable diagnostic results and severely limiting the feasibility of clinical deployment. Summary of the Invention
[0007] Based on the above background, the purpose of this invention is to provide a method and system for constructing an intelligent lung cancer screening model based on direct sputum mass spectrometry data, so as to achieve a non-invasive intelligent lung cancer screening with high robustness, high precision, and strong interpretability, and solve the problems of strong matrix effect, poor reproducibility of feature screening, insufficient model generalization ability, and lack of quality control mechanism in the prior art.
[0008] To achieve the above-mentioned objectives, the present invention provides the following technical solution:
[0009] A method for constructing an intelligent lung cancer screening model based on direct sputum mass spectrometry data, comprising the following steps:
[0010] S1. Obtain raw mass spectrometry data of sputum samples detected by neutral desorption electrospray extraction ionization mass spectrometry, wherein the raw mass spectrometry data includes lung cancer samples of known classification and non-lung cancer control samples; perform preprocessing on the raw mass spectrometry data including mass spectrometry peak detection, peak alignment and intensity normalization to form an initial feature matrix, wherein the rows of the initial feature matrix represent samples and the columns of the initial feature matrix represent the m / z values or intensities of the m / z intervals of the mass spectrometry features.
[0011] S2. Extract the core metabolic fingerprint feature set from the initial feature matrix, including:
[0012] An orthogonal partial least squares discriminant analysis model is constructed, and mass spectrometry features with variable projection importance values greater than a first threshold are selected. Multiple resampling operations are then performed to construct sub-models. Based on the average signal-to-noise ratio (SNR) of the mass spectrometry features in the original mass spectrometry data, a retention frequency threshold is calculated for each mass spectrometry feature. Mass spectrometry features whose frequency in the sub-model is greater than the corresponding retention frequency threshold are retained, forming a subset of candidate features. The retention frequency threshold is negatively correlated with the average SNR.
[0013] The candidate feature subset is input into an embedded feature selection algorithm for dimensionality reduction, and M core differential metabolite ion features are selected to form a core metabolic fingerprint feature set.
[0014] S3. Construct and train a heterogeneous integrated diagnostic model, including:
[0015] At least three base classifiers with different structures are trained in parallel, including support vector machines, random forests, and one-dimensional convolutional neural networks containing residual structures; wherein, the one-dimensional convolutional neural network is used to directly process the one-dimensional intensity vector of the m / z value or m / z interval.
[0016] Extract the mass spectrometry data quality features of the sample to construct a sample quality index; integrate the outputs of each base classifier using a meta-classifier containing a gating network, wherein the gating network takes the sample quality index as input, dynamically outputs the integration weights of each base classifier for the current sample, and performs weighted fusion of the prediction results of each base classifier based on the integration weights to generate the heterogeneous integrated diagnostic model;
[0017] S4. Perform hyperparameter tuning and verification on the heterogeneous integrated diagnostic model, and encapsulate the tuned heterogeneous integrated diagnostic model and the screening rules of the core metabolic fingerprint feature set into a lung cancer screening deployment module.
[0018] Step S1 transforms the raw, unstructured mass spectrometry signal into a standardized numerical matrix, laying a unified data foundation for subsequent analysis. Specifically, intensity normalization effectively eliminates fluctuations in overall ionization efficiency caused by differences in viscosity among different samples, significantly improving data comparability. Step S2 performs a two-stage collaborative feature selection process, extracting a core metabolic fingerprint feature set from the initial feature matrix. The first stage introduces a signal-to-noise ratio-based threshold adjustment mechanism, achieving cross-boundary integration of statistical algorithms and mass spectrometry physical parameters. This requires low signal-to-noise ratio features to meet stricter stability requirements, effectively eliminating noise interference and improving the physical reliability of the feature set. The second stage further compresses the feature dimension through regularization mechanisms such as LASSO regression or gradient boosting decision trees, retaining the most discriminative metabolite ion features, achieving an accurate mapping from high-dimensional raw data to low-dimensional biomarker fingerprints. Step S3 enables the heterogeneous ensemble diagnostic model to adjust the level of trust in different base classifiers based on the quality of the input samples. For example, in low-quality sample scenarios, it automatically enhances the weights of the noise-resistant random forest and reduces the weights of the noise-sensitive deep network, thereby solving the technical problem that traditional ensemble models are prone to collapse under poor data conditions. Step S4 engineeres the aforementioned algorithm flow into a reusable software module for rapid clinical deployment and iterative optimization.
[0019] Preferably, in step S1, the intensity normalization specifically includes:
[0020] The original mass spectrometry data are corrected using a probability quotient normalization algorithm or a total ion current normalization algorithm to eliminate fluctuations in overall ionization efficiency caused by differences in viscosity among different sputum samples.
[0021] Preferably, in step S2, the formula for calculating the retention frequency threshold is:
[0022]
[0023] in, For the first The retention frequency threshold of each mass spectrometry feature Based on the fundamental frequency threshold, For the first Average signal-to-noise ratio of each mass spectrometry feature and This is the preset adjustment coefficient.
[0024] Preferably, in step S2, the embedded feature selection algorithm is the LASSO regression algorithm or a feature importance evaluation algorithm based on gradient boosting decision tree; when the LASSO regression algorithm is used, the regularization penalty coefficient that minimizes the mean square error of the model is determined by k-fold cross-validation, thereby compressing the feature dimension to the M.
[0025] Preferably, between step S2 and step S3, the method further includes:
[0026] Based on the selected M core differential metabolite ion features, the ratio of the intensities of any two features is calculated to generate metabolite ratio feature pairs.
[0027] The M core differential metabolite ion features and the metabolite ratio features are concatenated and used as the input of the heterogeneous integrated diagnostic model.
[0028] Preferably, in step S3, the construction of the sample quality index includes:
[0029] The proportion of non-zero values of the current sample on the M core differential metabolite ion features is calculated to characterize data sparsity, and the total ion current variance of the current sample is calculated to characterize signal variability.
[0030] The sample quality index is obtained by normalizing and fusing the data sparsity and the total ion current variance.
[0031] Preferably, in step S3, the structure of the one-dimensional convolutional neural network includes an input layer, at least two one-dimensional residual blocks, a global average pooling layer, and a fully connected layer; wherein each one-dimensional residual block contains two one-dimensional convolutional layers and a skip connection path, which is used to alleviate gradient vanishing while extracting local dependencies between adjacent m / z intervals.
[0032] A lung cancer intelligent screening system based on sputum direct mass spectrometry data is provided to implement the lung cancer intelligent screening model construction method based on sputum direct mass spectrometry data as described in any of the preceding claims. The system includes:
[0033] The data acquisition and preprocessing module is configured to: acquire raw mass spectrometry data of sputum samples detected by neutral desorption electrospray extraction ionization mass spectrometry, wherein the raw mass spectrometry data includes lung cancer samples of known classification and non-lung cancer control samples; and perform preprocessing on the raw mass spectrometry data, including mass spectrometry peak detection, peak alignment and intensity normalization, to form an initial feature matrix, wherein the rows of the initial feature matrix represent samples and the columns of the initial feature matrix represent the m / z values or intensities of the m / z intervals of the mass spectrometry features.
[0034] The feature selection module is configured to extract a core metabolic fingerprint feature set from the initial feature matrix, including:
[0035] An orthogonal partial least squares discriminant analysis model is constructed, and mass spectrometry features with variable projection importance values greater than a first threshold are selected. Multiple resampling operations are then performed to construct sub-models. Based on the average signal-to-noise ratio (SNR) of the mass spectrometry features in the original mass spectrometry data, a retention frequency threshold is calculated for each mass spectrometry feature. Mass spectrometry features whose frequency in the sub-model is greater than the corresponding retention frequency threshold are retained, forming a subset of candidate features. The retention frequency threshold is negatively correlated with the average SNR.
[0036] The candidate feature subset is input into an embedded feature selection algorithm for dimensionality reduction, and M core differential metabolite ion features are selected to form a core metabolic fingerprint feature set.
[0037] The model building and training module is configured to build and train a heterogeneous ensemble diagnostic model, including:
[0038] At least three base classifiers with different structures are trained in parallel, including support vector machines, random forests, and one-dimensional convolutional neural networks containing residual structures; wherein, the one-dimensional convolutional neural network is used to directly process the one-dimensional intensity vector of the m / z value or m / z interval.
[0039] Extract the mass spectrometry data quality features of the sample to construct a sample quality index; integrate the outputs of each base classifier using a meta-classifier containing a gating network, wherein the gating network takes the sample quality index as input, dynamically outputs the integration weights of each base classifier for the current sample, and performs weighted fusion of the prediction results of each base classifier based on the integration weights to generate the heterogeneous integrated diagnostic model;
[0040] The model tuning and encapsulation module is configured to: perform hyperparameter tuning and verification on the heterogeneous integrated diagnostic model, and encapsulate the tuned heterogeneous integrated diagnostic model and the screening rules of the core metabolic fingerprint feature set into a lung cancer screening deployment module.
[0041] Compared with the prior art, the present invention has the following advantages:
[0042] The present invention provides a method for constructing an intelligent lung cancer screening model based on direct sputum mass spectrometry data. This method deeply integrates the physical characteristics of mass spectrometry with machine learning algorithms. Through a signal-to-noise ratio adaptive threshold adjustment mechanism, the quality assessment of mass spectrometry signals is embedded in the feature selection process, thereby achieving the organic coupling of physical parameters and statistical algorithms. The selected metabolic fingerprints have both statistical significance and physical reliability, and the reproducibility is significantly improved.
[0043] The gating network based on the sample quality index of this invention can perceive the data quality of input samples in real time and dynamically adjust the ensemble weights of heterogeneous models, so that the system can still maintain stable prediction ability when facing extremely low-quality samples, and solve the problem of insufficient clinical robustness of traditional models due to the lack of adaptive mechanisms.
[0044] This invention uses metabolite ratio feature engineering to transform the nonlinear changes of enzymatic reactions in metabolic pathways into model-learnable feature pairs, thereby improving the model's discriminative power. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0046] Figure 1 This is a schematic diagram of the overall process of constructing a lung cancer intelligent screening model based on direct mass spectrometry data of sputum according to the present invention;
[0047] Figure 2 This is a detailed flowchart of the two-stage collaborative feature selection algorithm in this invention;
[0048] Figure 3 This is a structural block diagram of the dynamic gating mechanism of the heterogeneous integrated diagnostic model in this invention;
[0049] Figure 4 This is a schematic diagram of the residual block structure of the one-dimensional convolutional neural network in this invention;
[0050] Figure 5 This is a modular architecture diagram of a lung cancer intelligent screening system based on direct sputum mass spectrometry data according to the present invention. Detailed Implementation
[0051] The technical solution of the present invention will be further described in detail below through specific embodiments and in conjunction with the accompanying drawings. It should be understood that the implementation of the present invention is not limited to the following embodiments, and any modifications and / or alterations made to the present invention will fall within the protection scope of the present invention.
[0052] In this invention, unless otherwise specified, all parts and percentages are by weight, and the equipment and raw materials used are commercially available or commonly used in the art. Unless otherwise specified, the methods in the following embodiments are conventional methods in the art. Unless otherwise specified, the components or equipment in the following embodiments are general standard parts or components known to those skilled in the art, and their structures and principles can be learned by those skilled in the art through technical manuals or conventional experimental methods.
[0053] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings. In this detailed description, numerous specific details are set forth to facilitate explanation and provide a thorough understanding of the embodiments of the present invention. However, one or more embodiments may be practiced by those skilled in the art without these specific details.
[0054] Please see Figure 1 The present invention discloses a method for constructing an intelligent lung cancer screening model based on direct sputum mass spectrometry data. This method is executed on a server or a high-performance computing workstation and specifically includes the following steps:
[0055] S1. Data Preprocessing and Initial Feature Matrix Construction
[0056] First, sputum samples were collected from clinical subjects, with each sample volume controlled at 2-5 mL, and immediately placed in an ultra-low temperature freezer to prevent metabolite degradation. The sample cohort should be strictly designed, including samples from patients with pathologically confirmed lung cancer (positive group) and samples from healthy controls or patients with benign lung disease matched for age, sex, and smoking history (negative group), with a sample size of no less than 100 cases in each group to ensure statistical power.
[0057] Thawed sputum samples were injected directly into a neutral desorption electrospray extraction ionization mass spectrometer (ND-EESI-MS) without any chromatographic separation. Each sample was collected for a total of 60 seconds to obtain a representative average mass spectrum.
[0058] After obtaining the raw mass spectrometry data, perform the following sub-steps:
[0059] S1.1 Mass Spectrometry Peak Detection: An adaptive wavelet transform peak detection algorithm is used to smooth and denoise the average mass spectrum. An initial signal-to-noise ratio threshold of 3 is set, and all local maxima are identified as candidate mass spectrometry peaks. For each candidate peak, its peak height, peak area, and full width at half maximum (FWHM) are calculated. Broad peaks with an FWHM greater than 0.5 Da are removed to avoid interference from solvent cluster ions.
[0060] S1.2 Peak Alignment: Due to slight drift in the instrument's mass axis, the m / z values of the same metabolite may shift between different samples. A recursive alignment algorithm based on Dynamic Time Warping (DTW) is employed. Using the mass spectrum peak of the reference sample as a template, the m / z coordinates of the mass spectrum peaks of other samples are corrected to ensure that the m / z deviation of the same metabolite in different samples is less than 0.01 Da. After alignment, the mass spectrum peaks of all samples are sorted according to their m / z values to construct a unified characteristic coordinate axis.
[0061] S1.3 Intensity Normalization: To eliminate fluctuations in overall ionization efficiency caused by differences in sputum viscosity, a total ion current (TIC) normalization algorithm is employed. Specifically, for each sample's mass spectrum, the sum of the intensities of all detected mass spectra is calculated as the total ion current. Then, the original intensity of each mass spectra peak is divided by the TIC value of that sample to obtain the relative intensity. This operation scales the total signal intensity of different samples to the same order of magnitude, effectively correcting for systematic biases caused by physical matrix effects. This step forms the initial feature matrix. ,in, For the sample size, For aligned mass spectrometry feature dimensions (i.e., the number of m / z values or m / z intervals), matrix elements Indicates the first The sample at the th Normalized intensity values at m / z.
[0062] S2, Two-stage collaborative feature screening
[0063] Please see Figure 2 Perform a two-stage collaborative feature selection, starting from the initial feature matrix. The core metabolic fingerprint feature set is extracted. This process aims to address the shortcomings of traditional methods in feature selection, such as poor reproducibility and susceptibility to noise interference.
[0064] S2.1, First Stage: Initial Stability Screening and Adaptive Signal-to-Noise Ratio Threshold Adjustment
[0065] First, the initial feature matrix With sample classification label vector (0 represents non-lung cancer, 1 represents lung cancer) Input is given to the Orthogonal Partial Least Squares Discriminant Analysis (OPLS-DA) submodule. The OPLS-DA submodule uses orthogonal signal correction techniques to separate classification-independent variations in the X matrix, such as batch effects and individual baseline differences, into orthogonal components, retaining the predicted components for discriminant analysis. After model training, the variable projection importance value (VIP) for each mass spectrometry feature is calculated using the following formula:
[0066]
[0067] in, For the first The feature in the first The weights in each predicted component The variation of the Y matrix explained by this component, To predict the number of components. Retain those that satisfy... The characteristics constitute the initial screening set. .
[0068] Subsequently, the threshold resampling submodule executes the Bootstrap resampling strategy to evaluate feature stability. Specifically, it randomly samples with replacement from the original sample set. Each sample forms a subset, and this process is repeated. Next, in this embodiment... For each resampled subset, an OPLS-DA sub-model is constructed independently and the VIP value is calculated. The system records whether each feature is retained in the sub-model (VIP>1.0).
[0069] The core innovation of this invention lies in breaking away from the rigid mode of traditional fixed frequency thresholds and introducing a retention frequency threshold adjustment mechanism based on mass spectrometry signal-to-noise ratio. For the first... Each feature is used to calculate its average signal-to-noise ratio across all original samples. (The ratio of peak height to baseline noise standard deviation is automatically calculated using mass spectrometry software.) Then, the retention frequency threshold for this feature is dynamically calculated using the following formula. :
[0070]
[0071] in, The base frequency threshold is set to 0.75. To adjust the amplitude, set it to 0.20; The decay rate is set to 0.05.
[0072] The physical meaning of this formula is: when the characteristic signal-to-noise ratio Lower (e.g.) )hour, Approaching 1, A value close to 0.95 requires that the feature must appear in more than 95% of the sub-models to be retained, thus eliminating noisy features with extremely strict criteria; when Higher (e.g.) )hour, Approaching 0, Approximately 0.75 allows for a more relaxed requirement for the stability of high-quality signals, avoiding excessive filtering that could lead to information loss.
[0073] Ultimately, all remain. The frequency of occurrence in each sub-model is greater than The features constitute a subset of candidate features. Its dimensions are ( ).
[0074] S2.2, Second Stage: Discriminative Screening
[0075] Subset of candidate features The input is fed into the embedded feature selection submodule. This embodiment employs a feature importance evaluation algorithm based on Gradient Boosting Decision Tree (GBDT). Specifically, a GBDT model containing 100 decision trees is constructed, with a maximum depth of 5 for each tree and a learning rate of 0.1. After training, the sum of the split gains of each feature across all trees is calculated as the importance score. Sort the features in descending order of importance, retaining the top-ranked ones. One feature (in this embodiment, the optimal feature is determined through cross-validation). This constitutes the core metabolic fingerprint feature set. These characteristics correspond to the metabolite ions that show the most significant differences between the lung cancer and non-lung cancer groups, such as m / z 104.107 (choline) and m / z 184.074 (phosphatidylcholine fragments).
[0076] S3, Construction of Heterogeneous Integrated Diagnostic Model
[0077] Please see Figure 3 Three base classifiers with distinct structures are trained in parallel, and adaptive ensemble is achieved through a dynamic gating mechanism.
[0078] S3.1 Parallel Training of Base Classifiers
[0079] Support Vector Machine Base Classifier: Employs Radial Basis Function (RBF) kernel SVM, with a penalty parameter... Through grid search Mid-optimization, kernel parameters exist The input is a 32-dimensional core feature vector, and the output is the probability that a sample belongs to the lung cancer category. .
[0080] Random Forest Base Classifier: Construct a forest containing 500 decision trees, with each tree randomly selected. The features are split, and the minimum number of samples in a leaf node is set to 5. Random forests are naturally robust to noise and outliers, and their output probabilities... The average of the votes cast for all trees.
[0081] One-dimensional convolutional neural network base classifier: This network is specifically designed for one-dimensional mass spectrometry sequence data; its structure can be found in [link to documentation]. Figure 4 .
[0082] The input layer receives a 32-dimensional feature vector and reshapes it into... The input is a tensor. It is then passed through two one-dimensional residual blocks. Each residual block contains: a first one-dimensional convolutional layer (kernel size 3, output channels 64, padding 1), a batch normalization layer, a ReLU activation function, and a Dropout layer (dropout rate 0.3); a second one-dimensional convolutional layer (kernel size 3, output channels 64, padding 1), and a batch normalization layer. A skip connection path directly adds the input to the output of the second convolutional layer before ReLU activation. The residual structure effectively alleviates the gradient vanishing problem in deep networks with small sample sizes. The second residual block is followed by a global average pooling layer, compressing the feature map into a 64-dimensional vector, which is finally passed through a fully connected layer (64→1) and a sigmoid function to output the probability. .
[0083] The network uses the Adam optimizer with an initial learning rate of 0.001, a batch size of 32, and is trained for 200 epochs.
[0084] S3.2 Construction of Sample Quality Index (SQI)
[0085] During the model inference phase, for each sample, the proportion of non-zero values (sparseness) on the 32-dimensional core features is first calculated. ,in, This is the indicator function. Simultaneously, the variance of the total ion current for this sample is calculated. To characterize signal volatility. After normalization, the two are fused to generate a sample quality index:
[0086]
[0087] in, For fusion weights (in this embodiment) ), and These are the mean and standard deviation of the sparsity of the training set and the logarithmic TIC variance, respectively. In practice, the SQI value range falls within the [-2, 2] interval; a larger value indicates higher sample quality.
[0088] S3.3, Dynamic Gating Integration
[0089] The gated network submodule is a lightweight fully connected network that takes SQI values as input and outputs normalized weight vectors from the three base classifiers. The network structure is as follows: input layer (1D), hidden layer (8 neurons, ReLU), and output layer (3 neurons, Softmax). The gated network is jointly optimized with the base classifier during the training phase, and its loss function is the weighted cross-entropy function.
[0090]
[0091] This design enables the gating network to learn the optimal weight allocation strategy for each base classifier under samples of different quality. For example, when When dealing with low-quality samples, the network tends to output... Random forests have the strongest noise resistance; when (High-quality samples) The weights are increased to 0.5 or higher to fully utilize the fine pattern recognition capabilities of deep networks.
[0092] Finally, the ensemble probability is calculated by the weighted fusion output layer:
[0093]
[0094] and with As a positive criterion for lung cancer.
[0095] S4, Model Packaging and Deployment
[0096] Five-fold cross-validation was performed on the trained heterogeneous ensemble diagnostic model to evaluate its sensitivity, specificity, AUC, and other metrics. Bayesian optimization was used to fine-tune the hyperparameters. Finally, the selection rules for the core metabolic fingerprint feature set (including a list of 32 m / z values, signal-to-noise ratio adaptive threshold formula parameters, and GBDT feature importance thresholds) and the parameters of the trained heterogeneous ensemble model (including model files for the three base classifiers and gating network weights) were encapsulated into a lung cancer screening deployment module.
[0097] This module provides a standardized API interface to receive raw mass spectrometry data files output by ND-EESI-MS, execute the S1-S3 process, and output lung cancer risk probability values and corresponding quality control labels.
[0098] To further optimize intensity normalization, in step S1.3, in addition to total ion current normalization, the Probability Quotient Normalization (PQN) algorithm can be used instead. The PQN algorithm selects a set of endogenous metabolites that are stably present in most samples as reference peaks, typically choosing m / z features with a coefficient of variation (CV) < 20% across all samples. It calculates the scaling factor for each sample relative to the reference sample, thereby correcting for differences in ionization efficiency. Specifically, it first calculates the median intensity of all samples at each m / z to construct a virtual reference spectrum. Then, for each sample, it calculates the median ratio of its intensity to the reference spectrum at the selected reference peak as the scaling factor for that sample. PQN is insensitive to extreme values, and its correction effect is superior to TIC normalization when dealing with sputum samples with extremely large viscosity differences, especially when there is interference from high-abundance metabolites in the sample.
[0099] The embedded feature selection algorithm can also be modified as follows: in step S2.2, the embedded feature selection algorithm can be replaced by the LASSO regression algorithm. Specifically, a linear model is constructed. ,in This represents the candidate feature subset matrix. The optimal regularization penalty coefficient is determined using k-fold cross-validation (k=5). This minimizes the mean squared error (MSE) of the model. LASSO's L1 regularization term... It compresses unimportant feature coefficients to zero, ultimately retaining the features corresponding to non-zero coefficients. Compared to GBDT, LASSO is more suitable for scenarios with strong linear separability, and the model is simpler and computationally efficient.
[0100] Between step S2 and step S3, a feature engineering extension step can be added. This involves calculating the ratio of the strengths of any two features among the 32 core features, and generating... A characteristic pair of metabolite ratios. For example, if Corresponding m / z 104.107 (choline). For m / z 184.074 (phosphatidylcholine fragments), the ratio is... It can reflect the relative activity of the choline metabolic pathway. In metabolomics, metabolite ratios directly correspond to biological significance such as enzyme-catalyzed reaction rate ratios and metabolic pathway flux ratios. Their stability is significantly better than the absolute concentration of a single substance, and they are insensitive to batch effects. Concatenating 496 ratio features with 32 original features to form a 528-dimensional enhanced feature vector input to the model can improve the AUC value and make the model's decisions more biologically interpretable.
[0101] When a new batch of samples enters the system, it first undergoes TIC normalization in step S1, which can be considered the first coarse-grained correction for physical differences between samples. Then, in step S2.1, the OPLS-DA model removes system noise such as batch effects, while the threshold... Then based on each feature Dynamically adjust stability standards. Low Features are strictly removed so as not to interfere with the model's decision-making.
[0102] Unlike traditional methods that use quality control as a post-hoc criterion, this invention uses signal-to-noise ratio in the feature selection stage (S2). Physical quality assessment is embedded, and sample-level quality assessment is embedded through SQI during the model integration stage in step S3. This dual quality awareness mechanism enables the system to identify and differentiate low-quality signals from the very beginning of data input.
[0103] In step S3, the three base classifiers form complementary decision niches. SVM constructs the optimal classification hyperplane in high-dimensional space, excelling at handling marginal classification problems with small sample sizes; Random Forest, by integrating a large number of weak classifiers, is naturally immune to missing values and noise; and 1D-CNN captures local patterns on the m / z sequence through convolutional kernels. The decision results of the three are... Instead of static weighting, the weights are modulated in real time via a gating network. The gating network is essentially a model selector; its input, SQI, is a quantitative representation of sample quality, and its output is weights. It is a dynamic policy function. When SQI indicates low sample quality, the system's decision logic switches from pursuing accuracy to pursuing robustness, automatically activating the RF mode with the strongest noise resistance; when SQI indicates excellent sample quality, the system switches to high-precision mode, fully activating the deep feature extraction capabilities of CNN. This dynamic switching mechanism enables the system to maintain optimal performance boundaries under different data quality scenarios, and its overall AUC variance is lower than that of static ensemble models, demonstrating strong environmental adaptability.
[0104] Please see Figure 5 The present invention also discloses an intelligent lung cancer screening system based on direct sputum mass spectrometry data, which includes the following modules:
[0105] The data acquisition and preprocessing module is configured to: acquire raw mass spectrometry data of sputum samples detected by neutral desorption electrospray extraction ionization mass spectrometry, wherein the raw mass spectrometry data includes lung cancer samples of known classification and non-lung cancer control samples; and perform preprocessing on the raw mass spectrometry data, including mass spectrometry peak detection, peak alignment and intensity normalization, to form an initial feature matrix, wherein the rows of the initial feature matrix represent samples and the columns of the initial feature matrix represent the m / z values or intensities of the m / z intervals of the mass spectrometry features.
[0106] The feature selection module is configured to extract a core metabolic fingerprint feature set from the initial feature matrix, including:
[0107] An orthogonal partial least squares discriminant analysis model is constructed, and mass spectrometry features with variable projection importance values greater than a first threshold are selected. Multiple resampling operations are then performed to construct sub-models. Based on the average signal-to-noise ratio (SNR) of the mass spectrometry features in the original mass spectrometry data, a retention frequency threshold is calculated for each mass spectrometry feature. Mass spectrometry features whose frequency in the sub-model is greater than the corresponding retention frequency threshold are retained, forming a subset of candidate features. The retention frequency threshold is negatively correlated with the average SNR.
[0108] The candidate feature subset is input into an embedded feature selection algorithm for dimensionality reduction, and M core differential metabolite ion features are selected to form a core metabolic fingerprint feature set.
[0109] The model building and training module is configured to build and train a heterogeneous ensemble diagnostic model, including:
[0110] At least three base classifiers with different structures are trained in parallel, including support vector machines, random forests, and one-dimensional convolutional neural networks containing residual structures; wherein, the one-dimensional convolutional neural network is used to directly process the one-dimensional intensity vector of the m / z value or m / z interval.
[0111] The mass spectrometry data quality features of the sample are extracted to construct a sample quality index. The outputs of each base classifier are integrated using a meta-classifier containing a gating network. The gating network takes the sample quality index as input and dynamically outputs the integration weights of each base classifier for the current sample. Based on the integration weights, the prediction results of each base classifier are weighted and fused to generate the heterogeneous integrated diagnostic model.
[0112] The model tuning and encapsulation module is configured to: perform hyperparameter tuning and verification on the heterogeneous integrated diagnostic model, and encapsulate the tuned heterogeneous integrated diagnostic model and the screening rules of the core metabolic fingerprint feature set into a lung cancer screening deployment module.
[0113] This article uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A method for constructing an intelligent lung cancer screening model based on direct sputum mass spectrometry data, characterized in that: The method includes the following steps: S1. Obtain raw mass spectrometry data of sputum samples detected by neutral desorption electrospray extraction ionization mass spectrometry, wherein the raw mass spectrometry data includes lung cancer samples of known classification and non-lung cancer control samples; perform preprocessing on the raw mass spectrometry data including mass spectrometry peak detection, peak alignment and intensity normalization to form an initial feature matrix, wherein the rows of the initial feature matrix represent samples and the columns of the initial feature matrix represent the m / z values or intensities of the m / z intervals of the mass spectrometry features. S2. Extract the core metabolic fingerprint feature set from the initial feature matrix, including: An orthogonal partial least squares discriminant analysis model is constructed, and mass spectrometry features with variable projection importance values greater than a first threshold are selected. Multiple resampling operations are then performed to construct sub-models. Based on the average signal-to-noise ratio (SNR) of the mass spectrometry features in the original mass spectrometry data, a retention frequency threshold is calculated for each mass spectrometry feature. Mass spectrometry features whose frequency in the sub-model is greater than the corresponding retention frequency threshold are retained, forming a subset of candidate features. The retention frequency threshold is negatively correlated with the average SNR. The candidate feature subset is input into an embedded feature selection algorithm for dimensionality reduction, and M core differential metabolite ion features are selected to form a core metabolic fingerprint feature set. S3. Construct and train a heterogeneous integrated diagnostic model, including: At least three base classifiers with different structures are trained in parallel, including support vector machines, random forests, and one-dimensional convolutional neural networks containing residual structures; wherein, the one-dimensional convolutional neural network is used to directly process the one-dimensional intensity vector of the m / z value or m / z interval. Extract the mass spectrometry data quality features of the sample to construct a sample quality index; integrate the outputs of each base classifier using a meta-classifier containing a gating network, wherein the gating network takes the sample quality index as input, dynamically outputs the integration weights of each base classifier for the current sample, and performs weighted fusion of the prediction results of each base classifier based on the integration weights to generate the heterogeneous integrated diagnostic model; S4. Perform hyperparameter tuning and verification on the heterogeneous integrated diagnostic model, and encapsulate the tuned heterogeneous integrated diagnostic model and the screening rules of the core metabolic fingerprint feature set into a lung cancer screening deployment module.
2. The method for constructing a lung cancer intelligent screening model based on direct sputum mass spectrometry data according to claim 1, characterized in that: In step S1, the intensity normalization specifically includes: The original mass spectrometry data are corrected using a probability quotient normalization algorithm or a total ion current normalization algorithm to eliminate fluctuations in overall ionization efficiency caused by differences in viscosity among different sputum samples.
3. The method for constructing an intelligent lung cancer screening model based on direct sputum mass spectrometry data according to claim 1, characterized in that: In step S2, the formula for calculating the retention frequency threshold is: in, For the first The retention frequency threshold of each mass spectrometry feature Based on the fundamental frequency threshold, For the first Average signal-to-noise ratio of each mass spectrometry feature and This is the preset adjustment coefficient.
4. The method for constructing a lung cancer intelligent screening model based on direct sputum mass spectrometry data according to claim 1, characterized in that: In step S2, the embedded feature selection algorithm is either the LASSO regression algorithm or a feature importance evaluation algorithm based on gradient boosting decision trees. When the LASSO regression algorithm is used, the regularization penalty coefficient that minimizes the mean square error of the model is determined by k-fold cross-validation, thereby compressing the feature dimension to the M.
5. The method for constructing a lung cancer intelligent screening model based on direct sputum mass spectrometry data according to claim 1, characterized in that: Between step S2 and step S3, the method further includes: Based on the selected M core differential metabolite ion features, the ratio of the intensities of any two features is calculated to generate metabolite ratio feature pairs. The M core differential metabolite ion features and the metabolite ratio features are concatenated and used as the input of the heterogeneous integrated diagnostic model.
6. The method for constructing an intelligent lung cancer screening model based on direct sputum mass spectrometry data according to claim 1, characterized in that: In step S3, the construction of the sample quality index includes: The proportion of non-zero values of the current sample on the M core differential metabolite ion features is calculated to characterize data sparsity, and the total ion current variance of the current sample is calculated to characterize signal variability. The sample quality index is obtained by normalizing and fusing the data sparsity with the total ion current variance.
7. The method for constructing an intelligent lung cancer screening model based on direct sputum mass spectrometry data according to claim 1, characterized in that: In step S3, the structure of the one-dimensional convolutional neural network includes an input layer, at least two one-dimensional residual blocks, a global average pooling layer, and a fully connected layer; wherein each one-dimensional residual block contains two one-dimensional convolutional layers and a skip connection path, which is used to alleviate gradient vanishing while extracting local dependencies between adjacent m / z intervals.
8. A lung cancer intelligent screening system based on sputum direct mass spectrometry data, used to implement the lung cancer intelligent screening model construction method based on sputum direct mass spectrometry data as described in any one of claims 1-7, characterized in that: The system includes: The data acquisition and preprocessing module is configured to: acquire raw mass spectrometry data of sputum samples detected by neutral desorption electrospray extraction ionization mass spectrometry, wherein the raw mass spectrometry data includes lung cancer samples of known classification and non-lung cancer control samples; and perform preprocessing on the raw mass spectrometry data, including mass spectrometry peak detection, peak alignment and intensity normalization, to form an initial feature matrix, wherein the rows of the initial feature matrix represent samples and the columns of the initial feature matrix represent the m / z values or intensities of the m / z intervals of the mass spectrometry features. The feature selection module is configured to extract a core metabolic fingerprint feature set from the initial feature matrix, including: An orthogonal partial least squares discriminant analysis model is constructed, and mass spectrometry features with variable projection importance values greater than a first threshold are selected. Multiple resampling operations are then performed to construct sub-models. Based on the average signal-to-noise ratio (SNR) of the mass spectrometry features in the original mass spectrometry data, a retention frequency threshold is calculated for each mass spectrometry feature. Mass spectrometry features whose frequency in the sub-model is greater than the corresponding retention frequency threshold are retained, forming a subset of candidate features. The retention frequency threshold is negatively correlated with the average SNR. The candidate feature subset is input into an embedded feature selection algorithm for dimensionality reduction, and M core differential metabolite ion features are selected to form a core metabolic fingerprint feature set. The model building and training module is configured to build and train a heterogeneous ensemble diagnostic model, including: At least three base classifiers with different structures are trained in parallel, including support vector machines, random forests, and one-dimensional convolutional neural networks containing residual structures; wherein, the one-dimensional convolutional neural network is used to directly process the one-dimensional intensity vector of the m / z value or m / z interval. Extract the mass spectrometry data quality features of the sample to construct a sample quality index; integrate the outputs of each base classifier using a meta-classifier containing a gating network, wherein the gating network takes the sample quality index as input, dynamically outputs the integration weights of each base classifier for the current sample, and performs weighted fusion of the prediction results of each base classifier based on the integration weights to generate the heterogeneous integrated diagnostic model; The model tuning and encapsulation module is configured to: perform hyperparameter tuning and verification on the heterogeneous integrated diagnostic model, and encapsulate the tuned heterogeneous integrated diagnostic model and the screening rules of the core metabolic fingerprint feature set into a lung cancer screening deployment module.