A training method and device of a single-cell drug response prediction model
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN UNIV
- Filing Date
- 2024-12-31
- Publication Date
- 2026-06-12
Smart Images

Figure CN119889457B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of biomedicine and data processing, and particularly relates to a training method and apparatus for a single-cell drug response prediction model. Background Technology
[0002] In current cancer research, bulk RNA sequencing (bulk RNA-seq) and single-cell RNA sequencing (scRNA-seq) are widely used to understand tumor biology. scRNA-seq can quantify gene expression in individual cells, while bulk RNA-seq provides mixed transcriptome data of cell populations. Inferring single-cell drug sensitivity helps to deepen our understanding of the heterogeneity of anticancer responses and drug resistance mechanisms. Current research methods for predicting single-cell drug responses mainly include the following:
[0003] (1) Biomarker- or signature-based methods typically identify genes or gene signatures related to drug response from bulk RNA-seq data and apply them to scRNA-seq data for prediction. However, these methods rely on bulk RNA-seq data for marker discovery, which makes them unable to capture the complexity and heterogeneity at the single-cell level, limiting the accuracy and applicability of predictions. At the same time, due to the low gene expression level in single cells and the existence of random dropout, the predictive ability based on a predefined gene set is often limited, leading to unreliable prediction results. In addition, most biomarker-based prediction methods can only redefine and validate markers for specific drugs or diseases, which makes their generalization ability under different drug or disease conditions weak.
[0004] (2) Traditional machine learning methods have a long 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 ability to process 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, while it is more convenient to complete these tasks automatically through end-to-end training, but traditional machine learning methods cannot do so.
[0005] (3) Neural network / deep learning methods utilize 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 tags. However, many methods in this field have the following drawbacks:
[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 the differences in data distribution;
[0007] b. Many deep learning methods have failed to fully utilize the information in bulk RNA-Seq data to improve the predictive power of single-cell data;
[0008] c. Some deep learning methods typically require large amounts of labeled data to train the model, but such data is often scarce in the field of single-cell drug response;
[0009] d. Some deep learning methods may not be able to effectively handle the heterogeneity in single-cell data, especially when the data comes from different technology platforms or biological conditions.
[0010] In summary, existing techniques for predicting single-cell drug responses suffer from several problems: batch effect (data from different experimental batches or platforms often exhibits batch effects, leading to distortion of intercellular relationships and affecting the accuracy of drug response prediction); neglect of intercellular relationships (traditional methods often ignore intercellular relationships, relying solely on gene expression data for analysis, failing to effectively capture cell-cell interactions, resulting in inaccurate drug response predictions); and poor cross-domain adaptability (existing methods are mostly based on specific datasets (such as scRNA-seq or bulkRNA-seq), unable to effectively handle data from different data sources or domains, especially with performance degradation across platforms or experimental conditions). Therefore, a new single-cell drug response prediction method is urgently needed to address these issues. Summary of the Invention
[0011] The purpose of this invention is to provide a training method, apparatus, device, 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 existing technologies.
[0012] On the one hand, the present invention provides a training method for a single-cell drug response prediction model, the method comprising the following steps:
[0013] A training model for a single-cell drug response prediction model is constructed based on an unsupervised domain adaptive graph converter.
[0014] The source domain dataset and the target domain dataset are preprocessed using a preset data preprocessing strategy to obtain the source adjacency matrix and the target adjacency matrix respectively;
[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. Based on the training model after training, the single-cell drug response prediction model is obtained.
[0016] Preferably, the step of preprocessing the source domain dataset and the target domain dataset using a preset data preprocessing strategy to obtain the source adjacency matrix and the target adjacency matrix includes:
[0017] The source domain dataset is preprocessed using a preset source data preprocessing strategy to obtain the source feature matrix;
[0018] The target domain dataset is preprocessed using a preset target data preprocessing strategy to obtain the target feature matrix;
[0019] The K-nearest neighbor algorithm is used to calculate the similarity between features in 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.
[0020] Preferably, the model structure of the training model includes a first module, a second module, a shared encoder, a neighborhood discriminator, and a node classifier. 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, and 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 neighborhood discriminator is used to guide the shared encoder to learn neighborhood-invariant features, and the node classifier is used to use the label information of the source domain dataset to guide node classification in the target domain dataset.
[0021] Preferably, the step of constructing a training model for a single-cell drug response prediction model based on an unsupervised domain adaptive graph converter includes:
[0022] Based on the model structure, a target loss function is constructed for the training model. This 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. The classification loss function ensures the model can correctly predict node categories on the source domain dataset; the domain classification loss function enables adversarial training between the source and target domains; the reconstruction loss function measures the difference between the graph structure generated by the model and the original graph structure; the difference loss function measures the difference in latent space representation between the source and target domains; and the entropy loss function measures the uncertainty of node classifier predictions on the target domain.
[0023] Preferably, the step of training the training model based on the source adjacency matrix and the target adjacency matrix includes:
[0024] 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, the difference loss value of the difference loss function is determined;
[0025] Based on the source reconstruction adjacency matrix generated by the decoder in the first module and the target reconstruction adjacency matrix generated by the decoder in the second module, the reconstruction loss value of the reconstruction loss function is determined;
[0026] Based on the node prediction categories generated by the node classifier, determine the classification loss value of the classification loss function and the entropy loss value of the entropy loss function;
[0027] Based on the domain prediction results generated by the domain discriminator, the domain classification loss value of the domain classification loss function is determined;
[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, the target loss of the target loss function is determined, so as 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 includes:
[0030] The source adjacency matrix is encoded by the encoder in the first module to obtain the first latent representation;
[0031] The target adjacency matrix is encoded by the encoder in the second module to obtain the second latent representation;
[0032] Based on the source adjacency matrix and the target adjacency matrix, the shared features between the source domain dataset and the target domain dataset are extracted by the shared encoder;
[0033] The difference loss value is determined based on the first latent representation, the second latent representation, and the shared features.
[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] The target domain single-cell features are obtained by extracting features from the preprocessed target domain data using the shared encoder of the single-cell drug response prediction model.
[0037] Based on the single-cell features of the target domain and the label information of the source domain data, the drug response prediction is performed on each single cell in the target domain data by the node classifier of the single-cell drug response prediction model, so as to obtain the drug sensitivity prediction result of each single cell in the target domain data to the drug to be detected.
[0038] On the other hand, the present invention provides a training device for a single-cell drug response prediction model, the device comprising:
[0039] The model building unit is used to train a single-cell drug response prediction model based on unsupervised domain adaptive and graph converters.
[0040] The data preprocessing unit is used to preprocess the source domain dataset and the target domain dataset respectively using a preset data preprocessing strategy to obtain the source adjacency matrix and the target adjacency matrix;
[0041] The 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 based on the training model after training.
[0042] On the other hand, the present invention also provides a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the steps described in the training method for a single-cell drug response prediction model described above.
[0043] On the other hand, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps described in the training method for a single-cell drug response prediction model.
[0044] This invention constructs a training model for a single-cell drug response prediction model based on unsupervised domain adaptive and graph converters. A pre-defined data preprocessing strategy is used to preprocess the source and target domain datasets respectively, obtaining source and target adjacency matrices. Based on these matrices, the training model is trained until its target loss function converges. The resulting single-cell drug response prediction model is then obtained. This not only mitigates batch effects and effectively improves prediction accuracy after cross-batch data integration, but also enhances the model's cross-domain adaptability, enabling it to flexibly handle differences in data from different domains and ensuring stability and generalization ability under various experimental conditions. Attached Figure Description
[0045] Figure 1 This is a flowchart illustrating the implementation of the training method for the single-cell drug response prediction model provided in Embodiment 1 of the present invention.
[0046] Figure 2 This is a schematic diagram of the structure of the graph converter layer provided in Embodiment 1 of the present invention;
[0047] Figure 3 This is a schematic diagram of the structure of the training model provided in Embodiment 1 of the present invention;
[0048] Figure 4 This is a flowchart illustrating the implementation of the 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 This is a schematic diagram of the structure of the training device for the single-cell drug response prediction model provided in Embodiment 3 of the present invention;
[0050] Figure 6 This is a schematic diagram of the structure of the computing device provided in Embodiment 4 of the present invention. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0052] It should be understood that, unless otherwise stated, the term "multiple" in this invention refers to two or more, and other quantifiers are similar.
[0053] The terms "first," "second," "third," etc., used in this invention are used to distinguish similar or related objects or entities and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms can be used interchangeably where appropriate, for example, in situations where implementation can proceed in an order other than those given in the illustrations or descriptions of embodiments of this disclosure.
[0054] The specific implementation of the present invention will be described in detail below with reference to specific embodiments:
[0055] Example 1:
[0056] Figure 1 The implementation flow of the training method for the single-cell drug response prediction model provided in Embodiment 1 of the present invention is shown. For ease of explanation, only the parts related to the embodiments of the present invention are shown, and are described in detail below:
[0057] In step S101, a training model for the single-cell drug response prediction model is constructed based on an unsupervised domain adaptive graph converter.
[0058] This invention is applicable to computing devices, such as personal computers and servers. The single-cell drug response prediction model is used to predict drug responses at the single-cell level. To obtain the single-cell drug response prediction model, a training model is designed and constructed based on unsupervised domain adaptation, graph converters, and graph adaptation mechanisms. This training model includes a model structure and an objective loss function to improve the model's predictive ability and generalization performance. The training model aims to learn and predict drug responses from single-cell data. The single-cell drug response prediction model is obtained based on the trained training model and is a concrete manifestation and extension of the training model in practical applications. That is, the trained model is applied to new datasets or real-world scenarios to predict the drug response of a specified drug at the single-cell level. Unsupervised Domain Adaptation (UDA) technology aims to transfer knowledge from the source domain (a dataset of known drug responses) to the target domain (a single-cell dataset of drug responses to be predicted). By reducing the distributional differences between the source and target domains, the model can achieve good predictive performance in the target domain. Graph Transformers aim to capture the complex relationships 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 the source adjacency matrix and the target adjacency matrix.
[0060] In this embodiment of the 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 adopted 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, which aims to ensure the consistency and reliability of the source domain and target domain data in terms of quality and features, thereby providing high-quality data input for model training. After preprocessing, the source adjacency matrix related to the source domain dataset and the target adjacency matrix related to the target domain dataset are obtained respectively. These two matrices represent the interaction relationships 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 performed through the following steps:
[0062] ① The source domain dataset is preprocessed using a preset source data preprocessing strategy to obtain the source feature matrix;
[0063] In this embodiment of the invention, the preprocessing process for the source domain dataset is described in detail below:
[0064] First, robust multi-array average (RMA) normalization was performed on the bulkRNA-seq data in the source domain dataset to eliminate batch effects and noise between different samples, improve data consistency, and ensure direct comparison between different samples in subsequent analyses.
[0065] Next, the StandardScaler function in the scikit-learn library is used to perform z-score standardization on each gene. This process adjusts 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 difference in the range of expression values between different genes and helping to compare feature values on the same scale during subsequent model training.
[0066] Then, cell lines were screened to retain those that simultaneously possessed RMA-normalized bulk RNA-seq expression profiles and LOBICO binarized half maximal inhibitory concentration (IC50) values for drug responses. This ensures that the data for each cell line includes known drug response values (IC50), thereby unifying the cell line characteristics in the training set. This allows the model to more accurately correlate gene expression with drug response, facilitating the training of the model for drug response prediction.
[0067] Finally, the filtered data is processed by Synthetic Minority Over-sampling Technique (SMOTE) and down-sampling to obtain the feature matrix of the source domain dataset (i.e., the source feature matrix). This increases the number of minority class samples through SMOTE while retaining the main information of the majority class samples through down-sampling, avoiding the risks of overfitting and underfitting. This makes the class distribution of the dataset more balanced, which helps the model avoid bias towards the majority class during training.
[0068] ② The target domain dataset is preprocessed using a pre-defined target data preprocessing strategy to obtain the target feature matrix;
[0069] In this embodiment of the invention, the preprocessing procedure for the target domain dataset is described in detail below:
[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 better reflects biological characteristics. Quality control includes cell quality control and gene quality control. Specifically, in cell quality control, the sequencing quality of each cell is evaluated, and low-quality cells that do not meet certain thresholds are removed. This includes removing cells with excessively high or low total counts to avoid introducing noisy data due to technical bias. In gene quality control, genes are screened based on their expression in cells to remove genes expressed in very few cells or genes with extreme count values, thereby reducing the influence of irrelevant noise.
[0071] Next, the Scanpy package is used to implement specific quality control parameters (including min_genes (minimum number of genes required per cell), min_counts (minimum total count per cell), and max_counts (upper limit of count, used to remove excessively high outliers)). Cells with mitochondrial gene counts exceeding 20% of the total molecular count are 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 the model performance.
[0072] Then, the total molecular count for each cell is normalized. After normalization, the total molecular count is log-transformed to reduce the influence of skewed distribution and make the data more suitable for subsequent statistical analysis. Finally, the transformed count is standardized to z-score to obtain the feature matrix (i.e., target feature matrix) of the target domain dataset. Compared with traditional methods, this step-by-step normalization and transformation process improves the stability and consistency of the data and is beneficial for cross-domain prediction.
[0073] ③ The K-nearest neighbor algorithm is used to calculate the similarity between features in 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 this embodiment of the invention, since the relationships between cells have significant biological implications for drug response, in order to effectively capture the interactions between cells, the K-Nearest Neighbors (KNN) algorithm is used for both the source feature matrix and the target feature matrix. Specifically, the KNN algorithm is used to calculate the similarity between the cell features in the source feature matrix and the target feature matrix, and adjacency matrices—the source adjacency matrix and the target adjacency matrix—are constructed based on these similarities. During the construction process, the k nearest neighbors of each cell are determined, and each cell is regarded as a node in the graph. The similarity between cells (e.g., similarity in gene expression) is used as the weight of the connecting edges. By connecting these cells in the adjacency matrix, a graph structure between cells is formed, thereby enabling the model to capture the interrelationships between cells in drug response more meticulously, enhancing the understanding of complex drug response patterns, and thus making up for the neglect of complex intercellular relationships in the prior art.
[0075] Through the preprocessing and matrix construction described in steps ① to ③ above, a solid foundation is laid for subsequent model training and analysis, enabling the model to more accurately capture and predict differences in drug responses among different datasets.
[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 both the source domain and the target domain at the same time, thus 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. Based on the training model after training, a single-cell drug response prediction model is obtained.
[0078] In this embodiment of the invention, a training model is trained based on the source adjacency matrix and the target adjacency matrix. During training, the training model learns the shared feature space between the source and target domains and attempts to transfer knowledge from the source domain to the target domain. The model parameters are continuously updated iteratively during training until the target loss function converges. This target loss function is typically used to measure the model's predictive performance in the target domain, such as accuracy and recall. After training, a single-cell drug response prediction model is obtained based on the trained training model. This 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 for training includes a first module, a second module, a shared encoder, a domain discriminator, and a node classifier. Both the first and second modules are Graph Variational Auto-encoder (GVAE) architectures. The first module encodes and decodes the source adjacency matrix, and the second module encodes and decodes the target adjacency matrix. The shared encoder extracts shared features between the source and target domain datasets. The domain discriminator guides the shared encoder to learn domain-invariant features. The node classifier uses the label information from the source domain dataset to guide node classification in the target domain dataset. Specifically, the encoder and decoder in the first module are referred to as the source encoder and source decoder, and the encoder and decoder in the second module are referred to as the target encoder and target decoder. The source encoder and target encoder capture specific features of the source and target domains, respectively, and both the source decoder and target decoder preserve graph structure information by reconstructing the adjacency matrix.
[0080] In another feasible embodiment, the encoders of both the first and second modules encode graph structure information through a GraphTransformer layer and generate the mean (mu) and variance (logvar) to probabilistically model the latent space. The architecture of the Graph Transformer layer (GTLayer) is as follows: Figure 2 As shown, it includes the following sub-modules:
[0081] (a) Sparse Multi-Head Self-Attention (SparseMHA) submodule: This module computes multi-head attention on graph data to effectively model complex relationships between nodes. Specifically, the SparseMHA submodule first projects the input feature vectors onto the query (Q), key (K), and value (V) spaces. To achieve this transformation, the model maps the input features to different vector representations through multiple linear transformations. These representations are used to compute relationships between nodes. Next, the multi-head attention mechanism divides the input dimension into multiple heads, each of which independently computes its attention weight matrix. This mechanism enables the model to capture a variety of different feature representations, thereby improving feature diversity and information content. The attention computation for each head is independent. Then, the outputs of each head are merged through a concatenation operation to form a richer node representation. When computing attention scores, the SparseMHA submodule uses matrix multiplication to compute the similarity between the query and the key to generate attention weights. To adapt to the sparsity of graph data, this submodule incorporates the graph's adjacency matrix when generating attention scores.
[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 in the case of multiple layers, and ensures that the node features are robustly updated in complex structures.
[0083] (c) Two-layer Feedforward Neural Network (FFN) Submodule: Following the SparseMHA submodule, GTLayer further utilizes two layers of feedforward neural networks to perform nonlinear transformations on node features. The first layer of the feedforward neural network uses linear transformations and the ReLU activation function to introduce nonlinearity and expand the representational power of features. The second layer of the feedforward neural network performs linear transformations to generate the final node feature output. The output of FFN is also processed by residual connections and batch normalization to ensure the smooth transmission of features. This design enables GTLayer to capture nonlinear features in each layer, thereby improving the expressive power of node representation.
[0084] Thus, GTLayer efficiently processes sparse graph structures through the SparseMHA submodule, reducing computational complexity while preserving important relationships in the graph, especially the interactions between cells. In cellular drug response prediction, GTLayer can help model upstream and downstream dependencies between cells, providing more accurate predictions of drug response. The model adaptively adjusts its dimensions to ensure that the hidden layer dimensions are divisible by the number of attention heads, enhancing the model's flexibility and stability. Residual connections and batch normalization further improve gradient flow and training stability. In addition, GTLayer employs two FFN layers to enhance the nonlinear representation capability of node features. GTLayer combines local and global attention mechanisms to comprehensively capture the relationships between nodes in the graph. Local information, by focusing on neighboring nodes, can effectively capture the contextual information of each node, while global information helps the model understand the structural relationships of the entire graph. GTLayer aggregates information from neighboring nodes and extracts the private features of the network corresponding to the source and target adjacency matrices. Compared to traditional graph convolution, GTLayer, by combining local and global information, can effectively capture the dependencies between nodes at both fine-grained and macroscopic levels, thereby improving performance in node classification tasks.
[0085] In another feasible embodiment, when constructing the training model for the single-cell drug response prediction model, a target loss function is constructed to guide model optimization based on the model structure. The target loss function includes five loss terms: classification loss, domain loss, reconstruction loss, difference loss, and entropy loss. The classification loss function ensures that the model can correctly predict the node category on the source domain dataset; the domain loss function enables adversarial training between the source and target domains; the reconstruction loss function measures the difference between the graph structure generated by the model and the original graph structure; the difference loss function measures the difference in latent space representation between the source and target domains; and the entropy loss function measures the uncertainty of the node classifier's prediction on the target domain.
[0086] In another feasible embodiment, Figure 3 The diagram illustrates the model structure and training process of the training model. The training of the training model is achieved through the following steps:
[0087] (1) 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, determine the difference loss value of the difference loss function;
[0088] In this embodiment of the invention, the difference loss function ensures the separation of private features (i.e., the first latent representation and the second latent representation) and shared features through subspace orthogonality constraints, thereby enhancing the model's ability to distinguish between the source domain and the target domain. Preferably, the difference loss value is determined through the following steps:
[0089] (1.1) The source adjacency matrix is encoded by the encoder in the first module to obtain the first latent representation;
[0090] In this embodiment of the invention, the source adjacency matrix (i.e., the feature data of the source domain) is input into the source encoder. The source encoder encodes the feature data of the source domain into the latent space to capture the specific features of the source domain and obtain the latent layer representation of the feature data of the source domain. For ease of description and distinction, this latent layer representation is called the first latent representation.
[0091] (1.2) The target adjacency matrix is encoded by the encoder in the second module to obtain the second latent representation;
[0092] In this embodiment of the invention, the target adjacency matrix (i.e., the feature data of the target domain) is input into the target encoder. The target encoder encodes the feature data of the target domain into the latent space to capture the specific features of the target domain and obtain the latent layer representation of the target domain feature data. For ease of description and differentiation, this latent layer representation is called the second latent representation.
[0093] (1.3) Based on the source adjacency matrix and the target adjacency matrix, the shared features between the source domain dataset and the target domain dataset are extracted by a shared encoder;
[0094] In embodiments of the present invention, such as Figure 3 As shown, both the source and target adjacency matrices are input into the shared encoder. The shared encoder encodes data from both domains and extracts domain-invariant features (i.e., shared features between the source and target datasets) from both domains, enabling the model to learn common graph feature representations and achieve cross-domain generality. The domain-invariant features of the shared encoder are subsequently used for adversarial training against the domain discriminator, further improving domain alignment. Compared to a single-domain encoder, the shared encoder helps eliminate domain bias, making the model more generalizable in new domains.
[0095] (1.4) Determine the difference loss value based on the first latent representation, the second latent representation, and the shared features.
[0096] In this embodiment of the invention, the difference loss function is used to measure the difference in latent space representations between the source domain (S) and the target domain (T). The model promotes domain adaptation by maximizing the similarity of features between the source and target domains. This loss measures the difference between the latent representations (mu_s, mu_t) of the source and target domains by calculating their cosine similarity. The smaller the difference loss value, the more similar the latent representations of the source and target domains are. The difference loss function is an important component of domain adaptation, helping the model align the latent representations between the source and target domains and ensuring the consistency of the shared representations between the source and target domains.
[0097] In single-cell drug response annotation, 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 expression information of multiple cell types and cannot capture the heterogeneity of individual cells, while scRNA-seq data can provide detailed expression information for each single cell, revealing the differences in drug response among different cell types. Since these two types of data differ significantly in feature dimensions and expression levels, steps (1.1) to (1.4) above introduce a shared encoder to extract shared features of the source and target domains and use two private encoders (i.e., the source encoder and the 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. This allows the model to better transfer knowledge of drug response from bulk RNA-seq data, improves the ability to transfer knowledge across domains, and enhances the prediction accuracy and generalization ability on scRNA-seq data.
[0098] (2) Based on the source reconstruction adjacency matrix generated by the decoder in the first module and the target reconstruction adjacency matrix generated by the decoder in the second module, determine the reconstruction loss value of the reconstruction loss function;
[0099] In this embodiment of the 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 relationships of the graph as much as possible. In graph data processing tasks, the reconstruction loss can not only help the model learn effective node representations, but also retain important information of the graph structure, ensuring structural consistency from the source domain to the target domain, thereby enhancing the model's understanding and representation ability of the graph structure. Specifically, the source decoder reconstructs the source adjacency matrix based on the first latent representation and outputs the source reconstructed adjacency matrix, and the target decoder reconstructs the target adjacency matrix based on the second latent representation and outputs the target reconstructed adjacency matrix. Compared with traditional decoders, the use of the inner product decoder combined with the graph transformer enables the model to capture more complex graph structure information, improving the authenticity and representation ability of the generated graph data. Then, by minimizing the difference between the source reconstructed adjacency matrix and the source adjacency matrix and 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) Based on the node prediction categories generated by the node classifier, determine the classification loss value of the classification loss function and the entropy loss value of the entropy loss function;
[0101] In this embodiment of the invention, the node classifier receives the domain-invariant features output by the shared encoder as input, and combines the domain-invariant features with the label information of the source domain to predict the node's category, thus obtaining the predicted node category. Compared to traditional classifiers that rely on domain-specific features, this node classifier relies on the domain-invariant features output by the shared encoder, thereby exhibiting stronger generalization ability in cross-domain classification. To evaluate and optimize model performance, two loss functions are defined: classification loss and entropy loss. The classification loss is mainly used to ensure that the model can accurately predict the node category on the source domain data. This loss term is derived by calculating the difference between the predicted category and the true label. Supervised learning guides the optimization of model parameters. Classification loss helps the model identify the features of different nodes in the graph and continuously improves its classification ability during training. Entropy loss, on the other hand, 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 predicted probability of each class, and then the entropy of each predicted probability is calculated. The larger the entropy, the more uncertain the model's prediction is. Entropy loss aims to enhance the robustness of the model by maximizing the prediction uncertainty of the target domain samples. This loss term encourages the model to make more informative and cautious predictions in the target domain, thereby avoiding overfitting to the target domain samples and improving the overall performance of the model.
[0102] (4) Based on the domain prediction results generated by the domain discriminator, determine the domain classification loss value of the domain classification loss function;
[0103] In this embodiment of the 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 as possible to distinguish for the domain discriminator through the adversarial training process. The domain discriminator, by distinguishing the feature differences between the source domain and the target domain, drives the shared encoder to extract features that are invariant to both domains. 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 is first obtained by calculating the cross-entropy loss between the domain prediction result output by the domain discriminator and the actual domain label (e.g., the source domain label is set to 0 and the target domain label is set to 1). Then, the domain discriminator uses a gradient reversal layer (GRL) to backpropagate the gradient generated by the domain classification loss to the shared encoder, thereby making the shared encoder more robust when extracting domain-invariant features and enabling adversarial optimization on the feature distributions of the source and target domains. This allows the model to gradually remove domain-specific features and focus on common features, enhancing cross-domain adaptability. Finally, by minimizing the domain classification loss function, the model learns to effectively adapt to the shared representation space. This ability not only helps the model learn more domain-general features but also effectively avoids the model overfitting to a specific domain, thus significantly improving the model's generalization ability.
[0104] (5) Based on the difference loss value, reconstruction loss value, classification loss value, entropy loss value and domain classification loss value, determine the target loss of the target loss function so as to update the model parameters of the training model according to the target loss.
[0105] In this embodiment of the invention, the target loss function is a comprehensive optimization objective composed of the weighted sum of all loss terms. Its aim is to minimize the target loss so that the model can achieve effective feature alignment between the source and target domains while maintaining high classification performance. The target loss function L... total Represented as: L total =λ c L class +λ d L domain +λ r L recon +λ f L difference +λ e L entropy , where L class For the classification loss function, L domain For the domain classification loss function, L recon To reconstruct the loss function, L difference For the difference loss function, L entropy Let λ be the entropy loss function.c , λ d , λ r , λ f , λ e These are the hyperparameters corresponding to the loss terms, used to adjust the importance of each loss component. By using different loss terms, the model can balance the importance of different tasks in multi-task learning, and through appropriate hyperparameter adjustment, the model can achieve optimal performance on each task. Here, the hyperparameters of each loss term and their corresponding loss values are weighted and summed to obtain the target loss function. The model parameters of the training model are then updated based on the target loss, which helps the model achieve better generalization ability in the target domain, especially when the target domain data is limited or labels are scarce.
[0106] The above steps (1) to (5) work together with multiple encoders and decoders to adapt the features of the source domain (bulk RNA-seq data) and the target domain (scRNA-seq data) to the target domain, thereby completing the training of the training model and realizing the transfer of source domain label information to the target domain.
[0107] In one feasible embodiment, the single-cell drug response prediction model is the practical application of the training model after training is completed. After the training model is completed, the two decoders, Source Decoder and Target Decoder, are usually no longer directly involved in the testing or application process. Therefore, the 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 this embodiment of the invention, a training model for a single-cell drug response prediction model is constructed based on an unsupervised domain adaptive graph converter. A preset data preprocessing strategy is used to preprocess the source domain dataset and the target domain dataset respectively, obtaining the source adjacency matrix and the 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. Based on the trained model, a single-cell drug response prediction model is obtained. This not only reduces the interference of batch effects and effectively improves the prediction accuracy after cross-batch data integration, but also enhances the model's cross-domain adaptability, enabling it to flexibly cope with differences in data from different domains and ensuring stability and generalization ability under different experimental conditions.
[0109] Example 2:
[0110] Figure 4The implementation flow of the single-cell drug response prediction method based on the single-cell drug response prediction model obtained in Embodiment 1, as provided in Embodiment 2 of the present invention, is illustrated. For ease of explanation, only the parts related to the embodiments of the present invention are shown, and are detailed below:
[0111] In step S401, source domain data and target domain data related to the drug to be detected are acquired, and the target domain data is preprocessed.
[0112] In this embodiment of the invention, source domain data and target domain data related to the drug to be detected are acquired, 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 data consistency and reliability. The source domain data and the preprocessed target domain data are then input into a single-cell drug response prediction model. As an example, gefitinib is used as the drug to be detected. Using a bulk RNA sequencing platform (bulk RNA-seq), RNA sequencing data of cell lines related to gefitinib are extracted from the GDSC (Genomics of Drug Sensitivity in Cancer) dataset, and these data are used as source domain data. Simultaneously, using a single-cell sequencing technology platform (10x Genomics), single-cell sequencing data related to gefitinib are extracted from the CCLE (Cancer Cell Line Encyclopedia) dataset, and these data are used as target domain data.
[0113] In step S402, the preprocessed target domain data is feature extracted by the shared encoder of the single-cell drug response prediction model to obtain the single-cell features of the target domain.
[0114] In this embodiment of the 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 single-cell data in 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 are adapted 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 drug response prediction is performed on each single cell in the target domain data by the node classifier of the single-cell drug response prediction model, and the drug sensitivity prediction result of each single cell in the target domain data is obtained.
[0116] In this embodiment of the invention, a node classifier of a single-cell drug response prediction model is applied to predict drug responses in cells within the target domain. Specifically, the node classifier utilizes domain-invariant features extracted by a shared encoder and combines them with label information from the source domain data (gefitinib susceptibility data, typically represented by 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. Based on the response value, the drug sensitivity prediction result for each single cell in the target domain data is obtained. By evaluating the model performance, evaluation metrics for the prediction results are obtained, including accuracy (ACC), area under the curve (AUC), and area under the precision-recall curve (AUPR). All three metrics 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 assess the response of gefitinib to different cells and providing a reliable basis for personalized decision-making in cancer treatment.
[0117] Example 3:
[0118] Figure 5 The structure of the training device for the single-cell drug response prediction model provided in Embodiment 3 of the present invention is shown. For ease of explanation, only the parts related to the embodiments of the present invention are shown, including:
[0119] Model building unit 51 is used as a training model for building a single-cell drug response prediction model based on unsupervised domain adaptive and graph converter.
[0120] The data preprocessing unit 52 is used to preprocess the source domain dataset and the target domain dataset respectively using a preset data preprocessing strategy to obtain the source adjacency matrix and the 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. Based on the training model after training, a single-cell drug response prediction model is obtained.
[0122] In this embodiment of the 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. Each unit can be an independent hardware or software unit, or it can be integrated into a single hardware or software unit, which is not intended to limit the invention. Specifically, the implementation methods of each unit can be referred to the description of the foregoing Embodiment 1, and will not be repeated here.
[0123] Example 4:
[0124] Figure 6 The structure of the computing device provided in Embodiment 4 of the present invention is shown. For ease of explanation, only the parts related to the embodiments of the present invention are shown.
[0125] The computing device 6 of this embodiment 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, it implements the steps in the above-described embodiment of a training method for a single-cell drug response prediction model, for example... Figure 1 Steps S101 to S103 are shown. Alternatively, when the processor 60 executes the computer program 62, it implements the functions of each unit in the above-described device embodiments, for example... Figure 5 The function of the unit shown.
[0126] In this embodiment of the invention, a training model for a single-cell drug response prediction model is constructed based on an unsupervised domain adaptive graph converter. A preset data preprocessing strategy is used to preprocess the source domain dataset and the target domain dataset respectively, obtaining the source adjacency matrix and the 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. Based on the trained model, a single-cell drug response prediction model is obtained. This not only reduces the interference of batch effects and effectively improves the prediction accuracy after cross-batch data integration, but also enhances the model's cross-domain adaptability, enabling it to flexibly cope with differences in data from different domains and ensuring stability and generalization ability under different experimental conditions.
[0127] The computing device in this embodiment of the invention can be a personal computer or a server. The steps implemented by the processor 60 in the computing device 6 when executing the computer program 62 to implement a training method for a single-cell drug response prediction model can be referred to the description of the foregoing method embodiments, and will not be repeated here.
[0128] Example 5:
[0129] In this embodiment of the invention, a computer-readable storage medium is provided, which stores a computer program. When executed by a processor, the computer program implements the steps in the above-described embodiment of the training method for a single-cell drug response prediction model. For example... Figure 1 The steps S101 to S103 are shown. Alternatively, when the computer program is executed by the processor, it implements the functions of each unit in the above-described device embodiments, for example... Figure 5 The function of the unit shown.
[0130] In this embodiment of the invention, a training model for a single-cell drug response prediction model is constructed based on an unsupervised domain adaptive graph converter. A preset data preprocessing strategy is used to preprocess the source domain dataset and the target domain dataset respectively, obtaining the source adjacency matrix and the 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. Based on the trained model, a single-cell drug response prediction model is obtained. This not only reduces the interference of batch effects and effectively improves the prediction accuracy after cross-batch data integration, but also enhances the model's cross-domain adaptability, enabling it to flexibly cope with differences in data from different domains and ensuring stability and generalization ability under different experimental conditions.
[0131] The computer-readable storage medium in embodiments of the present invention may include any entity or device capable of carrying computer program code, a recording medium, such as ROM / RAM, disk, optical disk, flash memory, etc.
[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 within 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 includes the following steps: A training model for a single-cell drug response prediction model is constructed based on an unsupervised domain adaptive and graph converter. The source domain dataset and the target domain dataset are preprocessed using a preset data preprocessing strategy to obtain the source adjacency matrix and the target adjacency matrix respectively; 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. Based on the training model after training, the single-cell drug response prediction model is obtained. The steps for constructing a training model for a single-cell drug response prediction model based on an unsupervised domain adaptive graph converter include: Based on the aforementioned model structure, the target loss function is constructed for the training model. The model structure of the training model includes a first module, a second module, a shared encoder, a domain discriminator, and a node classifier. Both the first and second modules are graph variational autoencoder architectures. The first module is used to encode and decode the source adjacency matrix, and 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 and target domain datasets. The domain discriminator guides the shared encoder to learn domain-invariant features. The node classifier is used to enable... The label information of the source domain dataset is used to guide the node classification of the target domain dataset. 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. The classification loss function ensures that the model can correctly predict the node category on the source domain dataset. The domain classification loss function enables adversarial training between the source and target domains. The reconstruction loss function measures the difference between the graph structure generated by the model and the original graph structure. The difference loss function measures the difference between the latent space representation of the source and target domains. The entropy loss function measures the uncertainty of the node classifier's prediction on the target domain.
2. The method as described in claim 1, characterized in that, The steps of preprocessing the source domain dataset and the target domain dataset using a preset data preprocessing strategy to obtain the source adjacency matrix and the target adjacency matrix include: The source domain dataset is preprocessed using a preset source data preprocessing strategy to obtain the source feature matrix; The target domain dataset is preprocessed using a preset target data preprocessing strategy to obtain the target feature matrix; The K-nearest neighbor algorithm is used to calculate the similarity between features in 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.
3. The method as described in claim 1, characterized in that, The steps for training the training model based on the source adjacency matrix and the target adjacency matrix include: 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, the difference loss value of the difference loss function is determined; Based on the source reconstruction adjacency matrix generated by the decoder in the first module and the target reconstruction adjacency matrix generated by the decoder in the second module, the reconstruction loss value of the reconstruction loss function is determined; Based on the node prediction categories generated by the node classifier, determine the classification loss value of the classification loss function and the entropy loss value of the entropy loss function; Based on the domain prediction results generated by the domain discriminator, the domain classification loss value of the domain classification loss function is determined; Based on the difference loss value, the reconstruction loss value, the classification loss value, the entropy loss value, and the domain classification loss value, the target loss of the target loss function is determined, so as to update the model parameters of the training model according to the target loss.
4. The method as described in claim 3, characterized in that, 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 includes: The source adjacency matrix is encoded by the encoder in the first module to obtain the first latent representation; The target adjacency matrix is encoded by the encoder in the second module to obtain the second latent representation; Based on the source adjacency matrix and the target adjacency matrix, the shared features between the source domain dataset and the target domain dataset are extracted by the shared encoder; The difference loss value is determined based on the first latent representation, the second latent representation, and the shared features.
5. A method for predicting single-cell drug response based on a single-cell drug response prediction model obtained by the method according to any one of claims 1 to 4, characterized in that, The method includes: Acquire source domain data and target domain data related to the drug to be detected, and preprocess the target domain data; The target domain single-cell features are obtained by extracting features from the preprocessed target domain data using the shared encoder of the single-cell drug response prediction model. Based on the single-cell features of the target domain and the label information of the source domain data, the drug response prediction is performed on each single cell in the target domain data by the node classifier of the single-cell drug response prediction model, so as to obtain the drug sensitivity prediction result of each single cell in the target domain data to the drug to be detected.
6. A training device for a single-cell drug response prediction model, characterized in that, The device includes: The model building unit is used to train a single-cell drug response prediction model based on unsupervised domain adaptive and graph converters. The data preprocessing unit is used to preprocess the source domain dataset and the target domain dataset respectively using a preset data preprocessing strategy to obtain the source adjacency matrix and the target adjacency matrix; The 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 based on the training model after training. The model building unit, when constructing a training model for a single-cell drug response prediction model based on an unsupervised domain adaptive graph converter, includes: Based on the aforementioned model structure, the target loss function is constructed for the training model. The model structure of the training model includes a first module, a second module, a shared encoder, a domain discriminator, and a node classifier. Both the first and second modules are graph variational autoencoder architectures. The first module is used to encode and decode the source adjacency matrix, and 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 and target domain datasets. The domain discriminator guides the shared encoder to learn domain-invariant features. The node classifier is used to enable... The label information of the source domain dataset is used to guide the node classification of the target domain dataset. 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. The classification loss function ensures that the model can correctly predict the node category on the source domain dataset. The domain classification loss function enables adversarial training between the source and target domains. The reconstruction loss function measures the difference between the graph structure generated by the model and the original graph structure. The difference loss function measures the difference between the latent space representation of the source and target domains. The entropy loss function measures the uncertainty of the node classifier's prediction on the target domain.
7. The training device as described in claim 6, characterized in that, The data preprocessing unit, when preprocessing the source domain dataset and the target domain dataset respectively using a preset data preprocessing strategy to obtain the source adjacency matrix and the target adjacency matrix, includes: The source domain dataset is preprocessed using a preset source data preprocessing strategy to obtain the source feature matrix; The target domain dataset is preprocessed using a preset target data preprocessing strategy to obtain the target feature matrix; The K-nearest neighbor algorithm is used to calculate the similarity between features in 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.
8. The training device as described in claim 6, characterized in that, When the model training unit trains the training model based on the source adjacency matrix and the target adjacency matrix, it includes: 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, the difference loss value of the difference loss function is determined; Based on the source reconstruction adjacency matrix generated by the decoder in the first module and the target reconstruction adjacency matrix generated by the decoder in the second module, the reconstruction loss value of the reconstruction loss function is determined; Based on the node prediction categories generated by the node classifier, determine the classification loss value of the classification loss function and the entropy loss value of the entropy loss function; Based on the domain prediction results generated by the domain discriminator, the domain classification loss value of the domain classification loss function is determined; Based on the difference loss value, the reconstruction loss value, the classification loss value, the entropy loss value, and the domain classification loss value, the target loss of the target loss function is determined, so as to update the model parameters of the training model according to the target loss.
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, it implements the steps of the method as described in any one of claims 1 to 5.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 5.