Training method and device for single-cell drug response prediction model
The single-cell drug response prediction model constructed through the unsupervised field adaptation and graph converter, the problems of poor cross-field adaptability, large batch effect interference and poor prediction accuracy in single-cell drug response prediction are solved, and higher prediction accuracy and cross-field adaptability are achieved.
Patent Information
- Application Number
- CN202411981307.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-31
AI Technical Summary
The prior art has problems such as poor cross-domain adaptability, large batch effect interference, and poor prediction accuracy in single-cell drug response prediction.
Unsupervised domain adaptive and graph converter are used to construct a training model for single-cell drug response prediction model. The source domain data set and target domain data set are pre-processed through preset data preprocessing strategies to obtain the source adjacency matrix and target adjacency matrix, and the training model is trained until the target loss function converges.
Reduce interference from batch effect, improve prediction accuracy after cross-batch data integration, enhance the cross-domain adaptability of the model, and ensure stability and generalization under different experimental conditions.
Smart Images

Figure CN119889457A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the cross-technical field of biomedicine and data processing, and in particular relates to a training method and device for a single-cell drug response prediction model. Background Art
[0002] In current cancer research, total RNA sequencing (bulk RNA-seq) and single-cell RNA sequencing (scRNA-seq) are widely used to understand tumor biology. scRNA-seq can quantify the gene expression of individual cells, while bulk RNA-seq provides mixed transcriptome data of cell populations. The inference of single-cell drug sensitivity helps to deeply understand the heterogeneity of anticancer response and drug resistance mechanism. The current research methods for single-cell drug response prediction mainly include the following:
[0003] (1) Biomarker-or signature-based methods usually identify genes or gene signatures related to drug response from bulk RNA-seq data and apply them to scRNA-seq data for prediction. However, such methods rely on bulk RNA-seq data for marker discovery, which makes them unable to capture the complexity of single-cell level and heterogeneity between cells, limiting the accuracy and scope of prediction. At the same time, due to the low gene expression level and random dropout in single cells, the prediction ability based on predefined gene sets is often limited, resulting in unreliable prediction results. In addition, most biomarker-based prediction methods can only redefine and verify markers for specific drugs or diseases, which makes them less generalizable under different drug or disease conditions.
[0004] (2) Traditional machine learning methods have a rich history in the field of drug discovery. They are often used to integrate various genomic spaces, including drug-gene interactions, disease-gene interactions, and gene-gene interactions. However, most traditional machine learning methods are inefficient in processing and learning large-scale scRNA-seq data and have limited processing capabilities for large-scale data. At the same time, traditional machine learning methods are not good at capturing complex and nonlinear relationships in the data. In addition, traditional machine learning methods may require more manual feature selection and model structure optimization, which is more convenient to automatically complete through end-to-end training, but traditional machine learning methods cannot do so.
[0005] (3) Neural network / DL methods use deep learning technology to process large amounts of scRNA-seq data, learn complex data relationships, discover potential features, and provide fine-grained cell drug sensitivity labels. However, many methods in this field have the following disadvantages:
[0006] a. Insufficient generalization ability when faced with different data distributions: Traditional deep learning methods may perform well on the source domain (e.g., bulk RNA-Seq data), but when directly applied to the target domain (e.g., scRNA-Seq data), the performance may degrade due to differences in data distribution;
[0007] b. Many deep learning methods fail to fully utilize the information in bulk RNA-Seq data to improve the prediction ability of single-cell data;
[0008] c. Some deep learning methods usually require a large amount of labeled data to train the model, but in the field of single-cell drug response, such data is often scarce;
[0009] d. Some deep learning methods may not be able to effectively handle the heterogeneity in single-cell data, especially when the data come from different technical platforms or biological conditions.
[0010] In summary, the existing technologies for single-cell drug response prediction have batch effect problems: data from different experimental batches or platforms often have batch effects, which lead to distortion of cell-to-cell relationships, thus affecting the accuracy of drug response prediction; ignoring the problem of cell-to-cell relationships: traditional methods usually ignore the relationship between cells, often relying only on gene expression data for analysis, and fail to effectively capture the interaction between cells, resulting in inaccurate prediction of drug response; poor cross-domain adaptability: existing methods are mostly based on specific data sets (such as scRNA-seq or bulkRNA-seq), and cannot effectively deal with data from different data sources or fields, especially the performance degradation under cross-platform or cross-experimental conditions. Therefore, a new single-cell drug response prediction method is urgently needed to solve the above problems. Summary of the invention
[0011] The purpose of the present invention is to provide a training method, device, equipment and storage medium for a single-cell drug response prediction model, aiming to solve the problems of poor cross-domain adaptability, large batch effect interference and poor prediction accuracy in single-cell drug response prediction caused by the existing technology.
[0012] In one aspect, the present invention provides a method for training a single-cell drug response prediction model, the method comprising the following steps:
[0013] Building a training model for single-cell drug response prediction model based on unsupervised domain adaptation and graph transformer;
[0014] The source domain data set and the target domain data set are preprocessed respectively using a preset data preprocessing strategy to obtain a source adjacency matrix and a target adjacency matrix;
[0015] Based on the source adjacency matrix and the target adjacency matrix, the training model is trained until the target loss function of the training model converges, and the single-cell drug response prediction model is obtained according to the training model after the training is completed.
[0016] Preferably, the step of preprocessing the source domain dataset and the target domain dataset respectively using a preset data preprocessing strategy to obtain a source adjacency matrix and a target adjacency matrix includes:
[0017] Preprocessing the source domain data set using a preset source data preprocessing strategy to obtain a source feature matrix;
[0018] Preprocessing the target domain data set using a preset target data preprocessing strategy to obtain a target feature matrix;
[0019] The K-nearest neighbor algorithm is used to calculate the similarity between the features of the source feature matrix and the target feature matrix, and the corresponding source adjacency matrix and the target adjacency matrix are obtained based on the similarity.
[0020] Preferably, the model structure of the training model includes a first module, a second module, a shared encoder, a domain discriminator and a node classifier, wherein the first module and the second module are both graph variational autoencoder architectures, the first module is used to encode and decode the source adjacency matrix, the second module is used to encode and decode the target adjacency matrix, the shared encoder is used to extract shared features between the source domain dataset and the target domain dataset, the domain discriminator is used to guide the shared encoder to learn domain-invariant features, and the node classifier is used to use the label information of the source domain dataset to guide the node classification of the target domain dataset.
[0021] Preferably, the step of constructing a training model for a single-cell drug response prediction model based on unsupervised domain adaptation and graph converter comprises:
[0022] Based on the model structure, the target loss function is constructed for the training model, wherein the target loss function includes a classification loss function, a domain classification loss function, a reconstruction loss function, a difference loss function and an entropy loss function, so as to ensure that the model can correctly predict the category of the node on the source domain data set through the classification loss function, realize the adversarial training of the source domain and the target domain through the domain classification loss function, measure the difference between the graph structure generated by the model and the original graph structure through the reconstruction loss function, measure the difference between the source domain and the target domain in the latent space representation through the difference loss function, and measure the uncertainty of the node classifier prediction on the target domain through the entropy loss function.
[0023] Preferably, the step of training the training model based on the source adjacency matrix and the target adjacency matrix comprises:
[0024] Determining a difference loss value of the difference loss function based on a first latent representation generated by an encoder in the first module, a second latent representation generated by an encoder in the second module, and a shared feature generated by the shared encoder;
[0025] Determining a reconstruction loss value of the reconstruction loss function based on a source reconstruction adjacency matrix generated by a decoder in the first module and a target reconstruction adjacency matrix generated by a decoder in the second module;
[0026] Determining a classification loss value of the classification loss function and an entropy loss value of the entropy loss function based on the node prediction category generated by the node classifier;
[0027] Determining a domain classification loss value of the domain classification loss function based on the domain prediction result generated by the domain discriminator;
[0028] Based on the difference loss value, the reconstruction loss value, the classification loss value, the entropy loss value and the domain classification loss value, a target loss of the target loss function is determined to update the model parameters of the training model according to the target loss.
[0029] Preferably, the step of determining the difference loss value of the difference loss function based on the first latent representation generated by the encoder in the first module, the second latent representation generated by the encoder in the second module, and the shared features generated by the shared encoder comprises:
[0030] encoding the source adjacency matrix by an encoder in the first module to obtain the first latent representation;
[0031] encoding the target adjacency matrix through an encoder in the second module to obtain the second latent representation;
[0032] Extracting the shared features between the source domain dataset and the target domain dataset through the shared encoder according to the source adjacency matrix and the target adjacency matrix;
[0033] The difference loss value is determined based on the first latent representation, the second latent representation, and the shared feature.
[0034] On the other hand, the present invention provides a single-cell drug response prediction method based on a single-cell drug response prediction model obtained by any of the above training methods, the method comprising the following steps:
[0035] Acquire source domain data and target domain data related to the drug to be detected, and preprocess the target domain data;
[0036] Extracting features from the preprocessed target domain data through a shared encoder of the single-cell drug response prediction model to obtain target domain single-cell features;
[0037] According to the single-cell characteristics of the target domain and the label information of the source domain data, drug response prediction is performed on each single cell in the target domain data through the node classifier of the single-cell drug response prediction model to obtain the drug sensitivity prediction result of each single cell in the target domain data to the drug to be detected.
[0038] In another aspect, the present invention provides a training device for a single-cell drug response prediction model, the device comprising:
[0039] A model building unit, used to build a training model for a single-cell drug response prediction model based on unsupervised domain adaptation and graph converter;
[0040] A data preprocessing unit, used to preprocess the source domain data set and the target domain data set respectively using a preset data preprocessing strategy to obtain a source adjacency matrix and a target adjacency matrix;
[0041] A model training unit is used to train the training model based on the source adjacency matrix and the target adjacency matrix until the target loss function of the training model converges, and obtain the single-cell drug response prediction model according to the training model after the training is completed.
[0042] On the other hand, the present invention also provides a computing device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps described in the above-mentioned method for training a single-cell drug response prediction model are implemented.
[0043] On the other hand, the present invention also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the steps described in the above-mentioned training method for a single-cell drug response prediction model.
[0044] The present invention is based on unsupervised domain adaptation and graph converters to construct a training model for a single-cell drug response prediction model, and adopts a preset data preprocessing strategy to preprocess a source domain data set and a target domain data set respectively to obtain a source adjacency matrix and a target adjacency matrix, and trains the training model based on the source adjacency matrix and the target adjacency matrix until the target loss function of the training model converges, and obtains a single-cell drug response prediction model according to the training model after the training is completed, so that the model can not only reduce the interference of batch effects and effectively improve the prediction accuracy after cross-batch data integration, but also enhance the cross-domain adaptability of the model, can flexibly cope with the differences in data from different fields, and ensure stability and generalization ability under different experimental conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a flowchart for implementing a training method for a single-cell drug response prediction model provided in Example 1 of the present invention;
[0046] Figure 2 is a schematic diagram of the structure of the image converter layer provided in the first embodiment of the present invention;
[0047] Figure 3 is a schematic diagram of the structure of the training model provided in the first embodiment of the present invention;
[0048] Figure 4 is a flow chart for implementing a single-cell drug response prediction method based on a single-cell drug response prediction model provided in Embodiment 2 of the present invention;
[0049] Figure 5 is a schematic diagram of the structure of a training device for a single-cell drug response prediction model provided in Example 3 of the present invention;
[0050] Figure 6 It is a structural diagram of a computing device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0052] It should be understood that, unless otherwise specified, the term "plurality" in the present invention refers to two or more than two, and other quantifiers are similar.
[0053] The terms "first", "second", "third", etc. in the present invention are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, for example, they can be implemented in an order other than those given in the diagrams or descriptions of the embodiments of the present disclosure.
[0054] The specific implementation of the present invention is described in detail below in conjunction with specific embodiments:
[0055] Embodiment 1:
[0056] Figure 1 The implementation process of the training method of the single-cell drug response prediction model provided in the first embodiment of the present invention is shown. For the convenience of explanation, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0057] In step S101, a training model for a single-cell drug response prediction model is constructed based on unsupervised domain adaptation and graph converter.
[0058] The embodiments of the present invention are applicable to computing devices, such as personal computers, servers, etc. The single-cell drug response prediction model is used to predict drug response at the single-cell level. In order to obtain the single-cell drug response prediction model, a training model of the single-cell drug response prediction model is designed and constructed based on unsupervised domain adaptation, graph converter, and graph adaptation mechanism. The training model includes a model structure and an objective loss function to improve the prediction ability and generalization performance of the model. The training model is intended to learn and predict drug response from single-cell data. The single-cell drug response prediction model is obtained based on the trained training model, which is a specific embodiment and extension of the training model in practical applications, that is, the trained model is applied to a new data set or actual scenario to predict the drug response of a specified drug at the single-cell level. Unsupervised Domain Adaptation (UDA) technology aims to transfer the knowledge of the source domain (a dataset with known drug responses) to the target domain (a single-cell dataset for drug responses to be predicted) so that the model can achieve good prediction performance in the target domain by reducing the distribution difference between the source and target domains. Graph Transformer aims to capture the complex relationship between drug molecules and cellular pathways so that the model can predict drug responses more accurately.
[0059] In step S102, a preset data preprocessing strategy is used to preprocess the source domain dataset and the target domain dataset respectively to obtain a source adjacency matrix and a target adjacency matrix.
[0060] In an embodiment of the present invention, the source domain dataset is bulk RNA-seq data, and the target domain dataset is scRNA-seq data. Here, a preset data preprocessing strategy is used to preprocess the source domain dataset (bulk RNA-seq data) and the target domain dataset (scRNA-seq data), respectively. The preprocessing process includes steps such as standardization, quality control, and consistent gene screening, aiming to ensure the consistency and reliability of the source domain and target domain data in quality and features, thereby providing high-quality data input for model training. After preprocessing, a source adjacency matrix related to the source domain dataset and a target adjacency matrix related to the target domain dataset are obtained, respectively. The two matrices represent the interaction relationship between cells in the source domain and the target domain, respectively. Specifically, the source adjacency matrix reflects the overall interaction pattern of the cell population in the bulk RNA-seq data, while the target adjacency matrix reveals the fine interaction network between individual cells in the scRNA-seq data.
[0061] In a feasible embodiment, the preprocessing of the source domain dataset and the target domain dataset is achieved through the following steps:
[0062] ① Use the preset source data preprocessing strategy to preprocess the source domain data set to obtain the source feature matrix;
[0063] In the embodiment of the present invention, the preprocessing process of the source domain data set is described in detail as follows:
[0064] First, the bulk RNA-seq data in the source domain dataset were normalized using the Robust Multi-array Average (RMA) to eliminate batch effects and noise between different samples, improve data consistency, and ensure direct comparison between different samples in subsequent analysis.
[0065] Next, the StandardScaler function in the scikit-learn library was used to perform z-score standardization on each gene. This process adjusted the expression value of each gene in different samples to a distribution with a mean of 0 and a standard deviation of 1, thereby eliminating the differences in the expression value ranges between different genes, which helps to compare the feature values on the same scale during subsequent model training;
[0066] Then, the cell lines were screened and the cell lines with both RMA-normalized bulk RNA-seq expression profiles and LOBICO binary drug response half maximal inhibitory concentration (IC50) values were retained. This ensured that the data of each cell line contained the known drug response value (IC50), thereby unifying the cell line features in the training set, enabling the model to more accurately associate the relationship between gene expression and drug response, and facilitating the model's drug response prediction training.
[0067] Finally, the filtered data is processed with synthetic minority oversampling technique (SMOTE) and down-sampling to obtain the feature matrix of the source domain data set (i.e., source feature matrix). This increases the number of minority class samples through SMOTE while retaining the main information of majority class samples in combination with down-sampling, avoiding the risks of overfitting and underfitting, making the category distribution of the data set more balanced, and helping the model avoid bias towards the majority class during training.
[0068] ② Use the preset target data preprocessing strategy to preprocess the target domain data set to obtain the target feature matrix;
[0069] In the embodiment of the present invention, the preprocessing process of the target domain data set is described in detail as follows:
[0070] First, quality control is performed on the scRNA-seq data in the target domain dataset to ensure that the model input data has a higher signal-to-noise ratio and can better reflect biological characteristics. Quality control includes cell quality control and gene quality control. Specifically, when performing cell quality control, the sequencing quality of each cell is evaluated to remove low-quality cells that do not meet a certain threshold. This includes removing cells with too high or too low total counts to avoid introducing noise data due to technical deviations. When performing gene quality control, genes are screened according to their expression among cells, and genes expressed in very few cells or genes with extreme count values are removed to reduce the impact of irrelevant noise.
[0071] Next, the Scanpy package was used to implement specific quality control parameters (including min_genes (the minimum number of genes required for each cell), min_counts (the minimum total counts for each cell), and max_counts (the upper limit of the counts, used to remove outliers that are too high)). Cells whose mitochondrial gene counts accounted for more than 20% of the total molecular counts were removed, because high mitochondrial content often reflects that the cells are in a state of stress or death. Removing these cells can avoid the interference of low-viability cells on model performance;
[0072] Then, the total molecular counts of each cell are normalized. After normalization, the total molecular counts are logarithmically transformed to reduce the impact of skewed distribution and make the data more suitable for subsequent statistical analysis. Finally, the transformed counts are standardized to z-score to obtain the feature matrix of the target domain dataset (i.e., the target feature matrix). Compared with traditional methods, this step-by-step normalization and transformation process improves the stability and consistency of the data and is conducive to cross-domain prediction.
[0073] ③ The K-nearest neighbor algorithm is used to calculate the similarity between the features of both the source feature matrix and the target feature matrix, and the corresponding source adjacency matrix and target adjacency matrix are obtained based on the similarity.
[0074] In an embodiment of the present invention, since the relationship between cells has significant biological significance for drug response, in order to effectively capture the interaction between cells, the K-Nearest Neighbors (KNN) algorithm is used for the source feature matrix and the target feature matrix, respectively. Specifically, the KNN algorithm is used to calculate the similarity between the features of each cell in the source feature matrix and the target feature matrix, and based on these similarities, respective adjacency matrices, namely the source adjacency matrix and the target adjacency matrix, are constructed. During the construction process, the k nearest cells are determined for each cell, and each cell is regarded as a node in the graph. The similarity between cells (such as the similarity in gene expression) is used as the weight of the connecting edge, and the graph structure between cells is formed by connecting these cells in the adjacency matrix, so that the model can capture the relationship between cells in drug response in a more detailed manner, enhance the understanding of complex drug response patterns, and thus make up for the neglect of complex relationships between cells in the prior art.
[0075] Through the preprocessing and matrix construction in steps ① to ③ above, a solid foundation is laid for subsequent model training and analysis, enabling the model to more accurately capture and predict the differences in drug responses between different data sets.
[0076] In another feasible embodiment, in order to ensure the compatibility of the source domain and the target domain, during the preprocessing of the source domain dataset and the target domain dataset respectively, only genes that exist in both datasets are retained, thereby ensuring that the model can utilize the gene features of the source domain and the target domain at the same time, thereby improving the prediction accuracy of the model.
[0077] In step S103, the training model is trained based on the source adjacency matrix and the target adjacency matrix until the target loss function of the training model converges, and a single-cell drug response prediction model is obtained according to the trained training model.
[0078] In an embodiment of the present invention, a training model is trained based on a source adjacency matrix and a target adjacency matrix. During the training process, the training model learns the shared feature space between the source domain and the target domain, and attempts to transfer the knowledge of the source domain to the target domain. During the training process, the parameters of the model are continuously iterated and updated until the target loss function converges. The target loss function is usually used to measure the prediction performance of the model in the target domain, such as accuracy, recall rate, etc. After the training is completed, a single-cell drug response prediction model is obtained according to the training model after the training. The single-cell drug response prediction model is used to predict drug responses at the single-cell level, providing strong support for drug development and personalized treatment.
[0079] In a feasible embodiment, the model structure of the training model includes a first module, a second module, a shared encoder, a domain discriminator and a node classifier, wherein the first module and the second module are both graph variational auto-encoder (GraphVariationalAuto-encoder, GVAE) architectures, the first module is used to encode and decode the source adjacency matrix, the second module is used to encode and decode the target adjacency matrix, the shared encoder (Shared Encoder) is used to extract shared features between the source domain dataset and the target domain dataset, the domain discriminator (Domain Discriminator) is used to guide the shared encoder to learn domain-invariant features, and the node classifier (Node Classifier) is used to use the label information of the source domain dataset to guide the node classification of the target domain dataset. Specifically, the encoder and decoder in the first module are called source encoder (Source Encoder) and source decoder (Source Decoder), and the encoder and decoder in the second module are called target encoder (Target Encoder) and target decoder (Target Decoder). The source encoder and the target encoder are used to capture specific features of the source domain and the target domain, respectively, and the source decoder and the target decoder are both used to maintain graph structure information by reconstructing the adjacency matrix.
[0080] In another feasible embodiment, the encoders of both the first module and the second module encode the graph structure information through the GraphTransformer layer and generate the mean (mu) and variance (logvar) to perform probability modeling on the latent space, wherein the architecture of the GraphTransformer layer (abbreviated as GTLayer) is as follows: Figure 2 As shown, it includes the following sub-modules:
[0081] (a) Sparse Multi-Head Self-Attention (SparseMHA) submodule: It is used to calculate multi-head attention on graph data, so as to effectively model the complex relationship between nodes. Specifically, first, the SparseMHA submodule projects the input feature vector into the query (Query, Q), key (Key, K) and value (Value, V) space. To achieve this conversion, the model maps the input features into different vector representations through multiple linear transformations. These representations will be used to calculate the relationship between nodes. Then, the multi-head attention mechanism divides the input dimension into multiple heads, and each head independently calculates its attention weight matrix. This mechanism enables the model to capture a variety of different feature expressions, thereby improving the diversity and information content of the features. The attention calculation of each head is independent, and then the outputs of each head are merged through the splicing operation to form a richer node representation. When calculating the attention score, the SparseMHA submodule uses matrix multiplication to calculate the similarity between the query and the key to generate the attention weight. In order to adapt to the sparsity characteristics of graph data, this submodule combines the adjacency matrix of the graph when generating the attention score;
[0082] (b) Residual connection and batch normalization submodule: The output of SparseMHA is added to the original input (residual connection), and a batch normalization layer (BatchNorm) is used to stabilize the training. This operation ensures that the node features can effectively avoid gradient vanishing or exploding when multiple layers are superimposed, and ensures that the node features are robustly updated in complex structures.
[0083] (c) Two-layer feedforward neural network (FFN) submodule: After the SparseMHA submodule, GTLayer further uses two layers of feedforward neural network to perform nonlinear transformation on node features. The first layer of feedforward neural network uses linear transformation and ReLU activation function to introduce nonlinearity and expand the representation ability of features. The second layer of feedforward neural network performs linear transformation to generate the final node feature output. The output of FFN is also processed by residual connection and batch normalization to ensure the smooth transmission of features. This design enables GTLayer to capture nonlinear features in each layer, thereby improving the expression ability of node representation.
[0084] Therefore, in GTLayer, the SparseMHA submodule is used to efficiently process sparse graph structures, reducing computational complexity while retaining important relationships in the graph, especially the interactions between cells. In the prediction of cellular drug responses, GTLayer can help model the upstream and downstream dependencies between cells and provide more accurate predictions for drug responses. The model adaptively adjusts the dimensions to ensure that the hidden layer dimensions are divisible by the number of attention heads, thereby enhancing the flexibility and stability of the model. Residual connections and batch normalization are used to further improve the stability of gradient flow and training. In addition, GTLayer also uses two layers of FFN to enhance the nonlinear representation capabilities of node features. GTLayer combines local and global attention mechanisms to fully capture the relationship between nodes in the graph. Local information can effectively capture the contextual information of each node by focusing on adjacent nodes, while global information helps the model understand the structural relationship of the entire graph. GTLayer aggregates the information of neighbor nodes and extracts the private features of the source adjacency matrix and the target adjacency matrix corresponding to the network. Compared with traditional graph convolution, GTLayer can effectively capture the dependencies between nodes at both fine-grained and macro levels by combining local and global information, thereby improving the performance in node classification tasks.
[0085] In another feasible embodiment, when constructing a training model for a single-cell drug response prediction model, a target loss function for guiding model optimization is constructed for the training model based on the model structure, wherein the target loss function includes five loss terms, namely, classification loss function, domain classification loss function, reconstruction loss function, difference loss function and entropy loss function, so as to ensure that the model can correctly predict the category of nodes on the source domain data set through the classification loss function, realize adversarial training of the source domain and the target domain through the domain classification loss function, measure the difference between the graph structure generated by the model and the original graph structure through the reconstruction loss function, measure the difference between the source domain and the target domain in the latent space representation through the difference loss function, and measure the uncertainty of the node classifier prediction on the target domain through the entropy loss function.
[0086] In another possible embodiment, Figure 3 The model structure and training process diagram of the training model are shown. Here, the training of the training model is achieved through the following steps:
[0087] (1) determining a difference loss value of a difference loss function based on a first latent representation generated by an encoder in the first module, a second latent representation generated by an encoder in the second module, and a shared feature generated by a shared encoder;
[0088] In the embodiment of the present invention, the difference loss function ensures the separation of private features (i.e., the first potential representation and the second potential representation) and shared features through subspace orthogonal constraints, thereby enhancing the model's ability to distinguish between the source domain and the target domain. Preferably, the difference loss value is determined by the following steps:
[0089] (1.1) Encoding the source adjacency matrix through the encoder in the first module to obtain a first latent representation;
[0090] In an embodiment of the present invention, the source adjacency matrix (i.e., the feature data of the source domain) is input into the source encoder, and the source encoder encodes the feature data of the source domain into a latent space to capture the specific features of the source domain, and obtains a latent layer representation of the source domain feature data. For the convenience of description and distinction, the latent layer representation is referred to as the first potential representation.
[0091] (1.2) encoding the target adjacency matrix through the encoder in the second module to obtain a second latent representation;
[0092] In an embodiment of the present invention, the target adjacency matrix (i.e., the feature data of the target domain) is input into the target encoder, and the target encoder encodes the feature data of the target domain into a latent space to capture the specific features of the target domain, and obtains a latent layer representation of the feature data of the target domain. For the convenience of description and distinction, the latent layer representation is called the second potential representation.
[0093] (1.3) Extracting shared features between the source domain dataset and the target domain dataset through a shared encoder based on the source adjacency matrix and the target adjacency matrix;
[0094] In the embodiment of the present invention, Figure 3 As shown in the figure, both the source adjacency matrix and the target adjacency matrix are input into the shared encoder, which performs shared encoding on the data of the two domains and extracts domain-invariant features from the source and target domains (i.e., shared features between the source and target domain datasets) so that the model can learn a common graph feature representation, thereby achieving cross-domain versatility. The domain-invariant features of the shared encoder are subsequently used for adversarial training with the domain discriminator to further improve the domain alignment effect. Compared with encoders in a single domain, the shared encoder helps eliminate domain bias and makes the model more generalizable in new domains.
[0095] (1.4) Determine a difference loss value based on the first latent representation, the second latent representation, and the shared feature.
[0096] In the embodiment of the present invention, the difference loss function is used to measure the difference between the source domain (S) and the target domain (T) in the latent space representation. The model promotes domain adaptation by maximizing the similarity of the source domain and the target domain features. This loss measures the difference between the source domain and the target domain by calculating the cosine similarity between their latent layer representations (mu_s, mu_t). The smaller the difference loss value, the more similar the latent layer representations of the source domain and the target domain are. The difference loss function is an important component in domain adaptation, which helps the model align the latent layer representations between the source domain and the target domain, and ensures that the shared representations of the source domain and the target domain are consistent.
[0097] In the annotation of single-cell drug response, there are significant differences between bulk RNA-seq data of the source domain and scRNA-seq data of the target domain. Specifically, bulk RNA-seq data is generated by mixing the expression information of multiple cell types and cannot capture the heterogeneity of individual cells, while scRNA-seq data can provide detailed expression information of each single cell and reveal the differences between different cell types in drug response. Since there are significant differences between these two types of data in feature dimensions and expression levels, the above steps (1.1) to (1.4) introduce a shared encoder to extract the shared features of the source and target domains, and use two private encoders (i.e., source encoder and target encoder) to capture the unique features of the source and target domains respectively. This structure ensures the effective separation of domain shared information and domain private information, thereby avoiding domain bias, enabling the model to better transfer knowledge of drug response from bulk RNA-seq data, improving the ability of cross-domain knowledge transfer, and enhancing the prediction accuracy and generalization ability on scRNA-seq data.
[0098] (2) determining a reconstruction loss value of a reconstruction loss function based on a source reconstruction adjacency matrix generated by a decoder in the first module and a target reconstruction adjacency matrix generated by a decoder in the second module;
[0099] In an embodiment of the present invention, the reconstruction loss function is used to measure the difference between the graph structure (adjacency matrix) generated by the model and the original graph structure. This loss term requires that the node features learned by the model in the latent space can reconstruct the connection relationship of the graph as much as possible. In the task of processing graph data, the reconstruction loss can not only help the model learn effective node representations, but also retain important information of the graph structure, ensure the structural consistency from the source domain to the target domain, thereby enhancing the model's understanding and expression capabilities of the graph structure. Here, specifically, the source decoder reconstructs the source adjacency matrix based on the first latent representation and outputs the source reconstructed adjacency matrix. The target decoder reconstructs the target adjacency matrix based on the second latent representation and outputs the target reconstructed adjacency matrix. Compared with the traditional decoder, the inner product decoder is used in combination with the graph transformer, so that the model can capture more complex graph structure information and improve the authenticity and representation ability of the generated graph data. Afterwards, by minimizing the difference between the source reconstructed adjacency matrix and the source adjacency matrix and minimizing the difference between the target reconstructed adjacency matrix and the target adjacency matrix, it is ensured that the features extracted by the source encoder and the target encoder can retain the topological structure information of the graph.
[0100] (3) determining a classification loss value of a classification loss function and an entropy loss value of an entropy loss function based on the node prediction category generated by the node classifier;
[0101] In an embodiment of the present invention, a node classifier receives domain-invariant features output by a shared encoder as input, and combines the domain-invariant features with label information of a source domain to predict the category of a node, thereby obtaining a predicted category of the node. Compared with a traditional classifier that relies on domain-specific features, the node classifier relies on the domain-invariant features output by a shared encoder, thereby having stronger generalization capabilities in cross-domain classification. In order to evaluate and optimize model performance, two loss functions are defined herein: classification loss and entropy loss. The classification loss is mainly used to ensure that the model can accurately predict the category of the node on the source domain data. This loss term is obtained by calculating the difference between the category predicted by the model and the true label, and then Guide the optimization of model parameters. Through supervised learning, classification loss helps the model identify the features of different nodes in the graph and continuously improves its classification ability during training. Entropy loss focuses on the output of the node classifier in the target domain. For the output of the node classifier in the target domain, the softmax function is used to calculate the prediction probability of each category, and then the entropy of each prediction probability is calculated. The larger the entropy, the more uncertain the model's prediction. Entropy loss aims to enhance the robustness of the model by maximizing the prediction uncertainty of target domain samples. This loss term encourages the model to make more informative and cautious predictions in the target domain, thereby avoiding overfitting of target domain samples and improving the overall performance of the model.
[0102] (4) determining a domain classification loss value of a domain classification loss function based on the domain prediction result generated by the domain discriminator;
[0103] In an embodiment of the present invention, the domain classification loss function is an adversarial training loss function, which aims to make the shared features generated by the shared encoder as difficult to distinguish as possible for the domain discriminator through the adversarial training process. The domain discriminator promotes the shared encoder to extract features that are invariant to the two domains by distinguishing the feature differences between the source domain and the target domain. This mechanism can effectively align features between the source domain and the target domain, solve the batch effect caused by different experimental batches or technical platforms, and thus improve the accuracy and stability of cross-domain prediction. Specifically, the domain classification loss value is first obtained by calculating the cross entropy loss between the domain prediction result output by the domain discriminator and the actual domain label (for example, the source domain label is set to 0 and the target domain label is set to 1). Then, the domain discriminator uses the gradient reversal layer (GRL) to backpropagate the gradient generated by the domain classification loss value to the shared encoder, thereby making the shared encoder more robust in extracting domain-invariant features, and realizing adversarial optimization on the feature distribution of the source domain and the target domain, so that the model gradually removes domain-specific features and focuses on common features, thereby enhancing cross-domain adaptability. Finally, by minimizing the domain classification loss function, the model learns to perform effective domain adaptation in the shared representation space. This ability not only helps the model learn more domain-general features, but also effectively avoids overfitting of the model to a specific domain, thereby significantly improving the generalization ability of the model.
[0104] (5) Based on the difference loss value, the reconstruction loss value, the classification loss value, the entropy loss value and the domain classification loss value, a target loss of the target loss function is determined to update the model parameters of the training model according to the target loss.
[0105] In the embodiment of the present invention, the target loss function is a comprehensive optimization objective composed of the weighted sum of each loss term, which aims to minimize the target loss so that the model can achieve effective feature alignment between the source domain and the target domain while maintaining high classification performance. The target loss function L total Expressed as: L total =λ c L class +λ d L domain +λ r L recon +λ f L difference +λ e L entropy , where L class is the classification loss function, L domain is the domain classification loss function, L recon To reconstruct the loss function, L difference is the difference loss function, L entropy is the entropy loss function, λc , d , r , f , e is the hyperparameter of the corresponding loss term, which is used to adjust the importance of each loss component, so that the model can balance the importance of different tasks in multi-task learning through different loss terms, and achieve the best results on each task by properly adjusting the hyperparameters. Here, the hyperparameters of each loss term and the corresponding loss value are weighted and summed to obtain the target loss of the target loss function, so as to update the model parameters of the training model according to the target loss, thereby helping the model to achieve better generalization ability in the target domain, especially when the target domain data is limited or the labels are scarce.
[0106] In the above steps (1) to (5), multiple encoders and decoders work together to adapt the features of the source domain (bulk RNA-seq data) and the target domain (scRNA-seq data), thereby completing the training of the training model and realizing the migration of the source domain label information to the target domain.
[0107] In a feasible embodiment, the single-cell drug response prediction model is the actual application form of the training model after training. After the training model is trained, the two decoders, Source Decoder and Target Decoder, are usually no longer directly involved in the testing or application process. Therefore, a single-cell drug response prediction model that mainly focuses on the shared encoder and node classifier is obtained for predicting drug response during testing or application.
[0108] In an embodiment of the present invention, a training model of a single-cell drug response prediction model is constructed based on unsupervised domain adaptation and a graph converter, and a preset data preprocessing strategy is used to preprocess the source domain data set and the target domain data set, respectively, to obtain a source adjacency matrix and a target adjacency matrix, and the training model is trained based on the source adjacency matrix and the target adjacency matrix until the target loss function of the training model converges, and a single-cell drug response prediction model is obtained according to the training model after the training is completed, so that the model can not only reduce the interference of batch effects and effectively improve the prediction accuracy after cross-batch data integration, but also enhance the cross-domain adaptability of the model, and can flexibly respond to the differences in data from different fields, thereby ensuring stability and generalization ability under different experimental conditions.
[0109] Embodiment 2:
[0110] Figure 4The implementation process of the single-cell drug response prediction method based on the single-cell drug response prediction model obtained in Example 1 provided in Example 2 of the present invention is shown. For the sake of convenience, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0111] In step S401, source domain data and target domain data related to the drug to be detected are obtained, and the target domain data is preprocessed.
[0112] In an embodiment of the present invention, source domain data and target domain data related to the drug to be detected are obtained, and the target domain data is preprocessed, the preprocessing process includes but is not limited to standardization, normalization and removal of low-quality cells and genes to ensure the consistency and reliability of the data, and the source domain data and the preprocessed target domain data are input into the single-cell drug response prediction model. As an example, gefitinib is used as a drug to be detected, and the total RNA sequencing platform (bulk RNA-seq) is used to extract RNA sequencing data of cell lines related to gefitinib from the GDSC (Genomics of Drug Sensitivity in Cancer) data set, and these data are used as source domain data. At the same time, the single-cell sequencing technology platform (10x Genomics) is used to extract single-cell sequencing data related to gefitinib from the CCLE (Cancer Cell Line Encyclopedia) data set, and these data are used as target domain data.
[0113] In step S402, the preprocessed target domain data is subjected to feature extraction by a shared encoder of the single-cell drug response prediction model to obtain target domain single-cell features.
[0114] In an embodiment of the present invention, the shared encoder of the single-cell drug response prediction model is used to extract domain-invariant features (i.e., target domain single-cell features) from the single-cell data of the target domain. Specifically, the shared encoder maps the target domain data to a latent space, which is a feature space shared by the source domain and the target domain, thereby capturing domain-invariant features that adapt to different cell types and data distributions.
[0115] In step S403, based on the single-cell features of the target domain and the label information of the source domain data, the node classifier of the single-cell drug response prediction model is used to predict the drug response of each single cell in the target domain data, and the drug sensitivity prediction result of each single cell in the target domain data to the drug to be detected is obtained.
[0116] In an embodiment of the present invention, a node classifier of a single-cell drug response prediction model is applied to predict drug response of cells in the target domain. Specifically, the node classifier uses the domain-invariant features extracted by the shared encoder and combines the label information of the source domain data (drug sensitivity data of gefitinib, usually expressed in the form of binary labels, such as sensitive / resistant) to complete the classification task. In drug response prediction, the node classifier predicts the response value of each cell to gefitinib, and obtains the drug sensitivity prediction result of each single cell in the target domain data to the drug to be detected according to the response value. By evaluating the performance of the model, the evaluation index of the prediction result is obtained, including accuracy (ACC), area under the curve (Area Under the Curve, AUC) and area under the precision-recall curve (Area Under the Precision-Recall Curve, AUPR), all of which reach 1.0, indicating that the model has extremely high accuracy in predicting the drug response of gefitinib in the target domain. These prediction results can provide important support for clinical applications, such as helping to evaluate the response of gefitinib to different cells and providing a reliable basis for personalized decision-making in cancer treatment.
[0117] Embodiment three:
[0118] Figure 5 The structure of the training device for the single-cell drug response prediction model provided by the third embodiment of the present invention is shown. For the sake of convenience, only the part related to the embodiment of the present invention is shown, including:
[0119] A model building unit 51, used for building a training model for a single cell drug response prediction model based on unsupervised domain adaptation and graph converter;
[0120] A data preprocessing unit 52 is used to preprocess the source domain data set and the target domain data set respectively using a preset data preprocessing strategy to obtain a source adjacency matrix and a target adjacency matrix;
[0121] The model training unit 53 is used to train the training model based on the source adjacency matrix and the target adjacency matrix until the target loss function of the training model converges, and obtain the single-cell drug response prediction model according to the training model after the training is completed.
[0122] In the embodiment of the present invention, each unit of the training device for the single-cell drug response prediction model can be implemented by a corresponding hardware or software unit, and each unit can be an independent software or hardware unit, or can be integrated into a software or hardware unit, which is not intended to limit the present invention. Specifically, the implementation of each unit can refer to the description of the aforementioned embodiment 1, which will not be repeated here.
[0123] Embodiment 4:
[0124] Figure 6 The structure of a computing device provided by a fourth embodiment of the present invention is shown. For ease of description, only the parts related to the embodiment of the present invention are shown.
[0125] The computing device 6 of the embodiment of the present invention includes a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60. When the processor 60 executes the computer program 62, the steps in the training method of the single-cell drug response prediction model described above are implemented, for example: Figure 1 Alternatively, when the processor 60 executes the computer program 62, the functions of each unit in the above-mentioned device embodiments are realized, for example Figure 5 Function of the unit shown.
[0126] In an embodiment of the present invention, a training model of a single-cell drug response prediction model is constructed based on unsupervised domain adaptation and a graph converter, and a preset data preprocessing strategy is used to preprocess the source domain data set and the target domain data set, respectively, to obtain a source adjacency matrix and a target adjacency matrix, and the training model is trained based on the source adjacency matrix and the target adjacency matrix until the target loss function of the training model converges, and a single-cell drug response prediction model is obtained according to the training model after the training is completed, so that the model can not only reduce the interference of batch effects and effectively improve the prediction accuracy after cross-batch data integration, but also enhance the cross-domain adaptability of the model, and can flexibly respond to the differences in data from different fields, thereby ensuring stability and generalization ability under different experimental conditions.
[0127] The computing device of the embodiment of the present invention may be a personal computer or a server. The steps implemented when the processor 60 in the computing device 6 executes the computer program 62 to implement a training method for a single cell drug response prediction model can refer to the description of the aforementioned method embodiment, which will not be repeated here.
[0128] Embodiment five:
[0129] In an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned training method embodiment of a single-cell drug response prediction model are implemented, for example, Figure 1 Alternatively, when the computer program is executed by a processor, the functions of each unit in the above-mentioned device embodiments are realized, for example Figure 5 Function of the unit shown.
[0130] In an embodiment of the present invention, a training model of a single-cell drug response prediction model is constructed based on unsupervised domain adaptation and a graph converter, and a preset data preprocessing strategy is used to preprocess the source domain data set and the target domain data set, respectively, to obtain a source adjacency matrix and a target adjacency matrix, and the training model is trained based on the source adjacency matrix and the target adjacency matrix until the target loss function of the training model converges, and a single-cell drug response prediction model is obtained according to the training model after the training is completed, so that the model can not only reduce the interference of batch effects and effectively improve the prediction accuracy after cross-batch data integration, but also enhance the cross-domain adaptability of the model, and can flexibly respond to the differences in data from different fields, thereby ensuring stability and generalization ability under different experimental conditions.
[0131] The computer-readable storage medium of the embodiment of the present invention may include any entity or device or recording medium capable of carrying computer program code, for example, ROM / RAM, magnetic disk, optical disk, flash memory and other memories.
[0132] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A training method for a single-cell drug response prediction model, characterized in that: The method comprises the following steps: Building a training model for single-cell drug response prediction model based on unsupervised domain adaptation and graph transformer; The source domain data set and the target domain data set are preprocessed respectively using a preset data preprocessing strategy to obtain a source adjacency matrix and a target adjacency matrix; Based on the source adjacency matrix and the target adjacency matrix, the training model is trained until the target loss function of the training model converges, and the single-cell drug response prediction model is obtained according to the training model after the training is completed.
2. The method according to claim 1, characterized in that The steps of preprocessing the source domain data set and the target domain data set respectively by using a preset data preprocessing strategy to obtain a source adjacency matrix and a target adjacency matrix include: Preprocessing the source domain data set using a preset source data preprocessing strategy to obtain a source feature matrix; Preprocessing the target domain data set using a preset target data preprocessing strategy to obtain a target feature matrix; The K-nearest neighbor algorithm is used to calculate the similarity between the features of the source feature matrix and the target feature matrix, and the corresponding source adjacency matrix and the target adjacency matrix are obtained based on the similarity.
3. The method according to claim 1, characterized in that The model structure of the training model includes a first module, a second module, a shared encoder, a domain discriminator and a node classifier, wherein the first module and the second module are both graph variational autoencoder architectures, the first module is used to encode and decode the source adjacency matrix, the second module is used to encode and decode the target adjacency matrix, the shared encoder is used to extract shared features between the source domain dataset and the target domain dataset, the domain discriminator is used to guide the shared encoder to learn domain-invariant features, and the node classifier is used to use the label information of the source domain dataset to guide the node classification of the target domain dataset.
4. The method according to claim 3, characterized in that The steps of constructing a training model for a single-cell drug response prediction model based on unsupervised domain adaptation and graph transformer include: Based on the model structure, the target loss function is constructed for the training model, wherein the target loss function includes a classification loss function, a domain classification loss function, a reconstruction loss function, a difference loss function and an entropy loss function, so as to ensure that the model can correctly predict the category of the node on the source domain data set through the classification loss function, realize the adversarial training of the source domain and the target domain through the domain classification loss function, measure the difference between the graph structure generated by the model and the original graph structure through the reconstruction loss function, measure the difference between the source domain and the target domain in the latent space representation through the difference loss function, and measure the uncertainty of the node classifier prediction on the target domain through the entropy loss function.
5. The method according to claim 4, characterized in that The step of training the training model based on the source adjacency matrix and the target adjacency matrix comprises: Determining a difference loss value of the difference loss function based on a first latent representation generated by an encoder in the first module, a second latent representation generated by an encoder in the second module, and a shared feature generated by the shared encoder; Determining a reconstruction loss value of the reconstruction loss function based on a source reconstruction adjacency matrix generated by a decoder in the first module and a target reconstruction adjacency matrix generated by a decoder in the second module; Determining a classification loss value of the classification loss function and an entropy loss value of the entropy loss function based on the node prediction category generated by the node classifier; Determining a domain classification loss value of the domain classification loss function based on the domain prediction result generated by the domain discriminator; Based on the difference loss value, the reconstruction loss value, the classification loss value, the entropy loss value and the domain classification loss value, a target loss of the target loss function is determined to update the model parameters of the training model according to the target loss.
6. The method according to claim 5, characterized in that The step of determining a difference loss value of the difference loss function based on a first latent representation generated by an encoder in the first module, a second latent representation generated by an encoder in the second module, and a shared feature generated by the shared encoder comprises: encoding the source adjacency matrix by an encoder in the first module to obtain the first latent representation; encoding the target adjacency matrix through an encoder in the second module to obtain the second latent representation; Extracting the shared features between the source domain dataset and the target domain dataset through the shared encoder according to the source adjacency matrix and the target adjacency matrix; The difference loss value is determined based on the first latent representation, the second latent representation, and the shared feature.
7. A single cell drug response prediction method based on a single cell drug response prediction model obtained by the method according to any one of claims 1 to 6, characterized in that: The method comprises: Acquire source domain data and target domain data related to the drug to be detected, and preprocess the target domain data; Extracting features from the preprocessed target domain data through a shared encoder of the single-cell drug response prediction model to obtain target domain single-cell features; According to the single-cell characteristics of the target domain and the label information of the source domain data, drug response prediction is performed on each single cell in the target domain data through the node classifier of the single-cell drug response prediction model to obtain the drug sensitivity prediction result of each single cell in the target domain data to the drug to be detected.
8. A training device for a single-cell drug response prediction model, characterized in that: The device comprises: A model building unit, used to build a training model for a single-cell drug response prediction model based on unsupervised domain adaptation and graph converter; A data preprocessing unit, used to preprocess the source domain data set and the target domain data set respectively using a preset data preprocessing strategy to obtain a source adjacency matrix and a target adjacency matrix; A model training unit is used to train the training model based on the source adjacency matrix and the target adjacency matrix until the target loss function of the training model converges, and obtain the single-cell drug response prediction model according to the training model after the training is completed.
9. A computing device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Single-cell drug sensitivity prediction method fusing cross attention and domain adaptation
CN117612746A
Cancer intervention response prediction model training method and device
CN118412043A
Self-adaptive feature weighted multi-source domain adaptive single-cell drug sensitivity prediction algorithm
CN118553328A
Twinborn clustering method and system for explaining single-cell RNA sequencing data
CN119068996A
Model training method, apparatus and device, and readable storage medium
WO2023000574A1