Single-cell drug reaction prediction method based on two-channel comparative learning
By employing a dual-channel contrastive learning method, combined with a Performer encoder and a graph attention network, the problem of low accuracy in single-cell drug response prediction was solved, achieving high-precision prediction of single-cell drug sensitivity status and analysis of drug resistance mechanisms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HARBIN INST OF TECH
- Filing Date
- 2026-01-16
- Publication Date
- 2026-05-01
AI Technical Summary
Existing single-cell drug response prediction methods have low accuracy in characterizing transcriptional heterogeneity and drug resistance status among cells, making it difficult to analyze transcriptional differences among different cell subpopulations within tumors. Furthermore, existing technologies are prone to information loss or expression distortion, resulting in limited prediction accuracy and mechanistic explanatory power.
A dual-channel contrastive learning approach is adopted, which uses a dual-channel data processing module, a gene semantic encoding module, and a gene structure encoding module to obtain gene identity embedding vectors and expression intensity embedding vectors, respectively. Combined with a Performer encoder and a graph attention network, efficient sequence modeling and graph structure modeling are performed. Finally, cross-modal contrastive learning is used to optimize drug sensitivity prediction.
It significantly improves the accuracy and stability of single-cell drug response prediction, better characterizes intercellular heterogeneity and nonlinear gene interactions, enhances the model's generalization performance under low-label or complex data, and strengthens the ability to predict drug resistance status.
Smart Images

Figure CN121964191A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence-assisted drug development, and in particular to a single-cell drug response prediction method based on dual-channel contrastive learning. Background Technology
[0002] Tumor drug resistance is a key technical challenge that limits the efficacy and durability of cancer treatment. Its essence stems from the dynamic reprogramming of cellular states and gene regulatory networks under treatment stress. Even in tumors with well-defined genomic characteristics, cancer cells can develop drug resistance through various mechanisms, including secondary mutations, signaling pathway reactivation, and the expansion of drug-resistant and tolerant subpopulations, exhibiting significant heterogeneity and plasticity.
[0003] Existing drug response prediction methods based on bulk RNA sequencing data, while revealing drug-gene relationships to some extent, cannot resolve transcriptional differences among different cell subpopulations within tumors, nor can they characterize the remodeling of gene regulatory relationships during drug resistance. Therefore, their predictive accuracy and mechanistic explanatory power are limited in the complex tumor microenvironment. With the development of single-cell RNA sequencing technology, researchers have begun to attempt drug response prediction at single-cell resolution to characterize fine transcriptional heterogeneity and potential drug resistance states among cells. However, existing single-cell drug response prediction methods often focus on modeling gene expression values or ordination, simplifying each gene to a single marker. This makes it difficult to simultaneously encode gene expression intensity information and inter-gene dependencies, resulting in low accuracy in single-cell drug response prediction and difficulty in inferring drug resistance mechanisms. Furthermore, different modeling strategies in existing technologies are prone to information loss or expression distortion during expression discretization, or ordination, leading to poor modeling ability to characterize highly heterogeneous cell states, thus resulting in low accuracy in single-cell drug response prediction. Summary of the Invention
[0004] This invention addresses the problem of low accuracy in existing single-cell drug response prediction methods by proposing a single-cell drug response prediction method based on dual-channel contrastive learning.
[0005] A single-cell drug response prediction method based on dual-channel contrastive learning is as follows:
[0006] Obtain the original single-cell transcriptome counting matrix corresponding to the single cell to be tested, and extract the set of genes to be tested with expression count values greater than 0 from the original single-cell transcriptome counting matrix. Input the set of genes to be tested into the trained gene co-expression network to obtain the drug response prediction results and corresponding probabilities.
[0007] The drug response prediction results include: sensitivity and tolerance;
[0008] The gene co-expression network includes: a dual-channel data processing module, a gene semantic encoding module, a gene structure encoding module, and a drug sensitivity prediction module;
[0009] The dual-channel data processing module uses the gene set to obtain ordered gene expression sequences, and uses the gene expression sequences to obtain gene identity embedding vectors and expression intensity embedding vectors.
[0010] The gene semantic encoding module uses expression intensity embedding vectors to obtain cell-level semantic feature vectors. ;
[0011] The gene structure encoding module uses gene identity embedding vectors to obtain structural feature representation vectors at the single-cell level. ;
[0012] The drug sensitivity prediction module utilizes cell-level semantic feature vectors. and structural feature representation vectors at the single-cell level Obtain drug response results and corresponding probabilities.
[0013] Furthermore, the trained gene co-expression network is obtained through the following method:
[0014] Step 1: Obtain the original single-cell transcriptome counting matrix corresponding to the single-cell sample, extract genes with expression count values greater than 0 from the original single-cell transcriptome counting matrix, form gene sets with expression count values greater than 0, and assign drug response tags to gene sets;
[0015] The drug response labels include: sensitive and tolerable;
[0016] Step 2: Combine the gene set and the corresponding drug response tags into a training set, and use the training set to train the gene co-expression network to obtain the trained gene co-expression network.
[0017] Furthermore, the dual-channel data processing module includes: an ordered gene expression sequence construction unit, a gene identity embedding unit, and an expression intensity embedding unit;
[0018] The ordered gene expression sequence construction unit is used to sort the corresponding genes in the gene set in descending order according to their gene expression counts to obtain ordered gene expression sequences. ;
[0019] in, It is the first Gene identifiers corresponding to each gene It is the first Expression count of each gene in a single-cell sample It represents the total number of genes in the gene set corresponding to the current single-cell sample. It is a gene identifier. ;
[0020] The gene identity embedding unit is used to identify each gene in the ordered gene expression sequence. Randomly assign a vector to represent As a gene identity embedding vector, the gene identity embedding vector is input into the gene structure encoding module;
[0021] The expression intensity embedding unit is used to discretize the gene expression count values into d intervals, and then uses one-hot encoding to... Mapping to vector form yields the expression strength embedding vector. And embed the expression intensity into the vector. Input into the gene semantic encoding module.
[0022] Furthermore, the gene semantic encoding module includes: a numerical feature matrix construction unit, an encoding unit, and a cell-level semantic feature vector acquisition unit;
[0023] The numerical feature matrix construction unit constructs a numerical feature matrix using an expression intensity embedding vector. ;
[0024] in, It is the first The expression intensity embedding vectors corresponding to each gene;
[0025] The encoding unit uses the Performer encoder to process the numerical feature matrix. Encode to obtain contextual feature representations of ordered gene expression sequences. Specifically:
[0026]
[0027] in, It is a Performer encoder;
[0028] The Performer encoder includes Each coding block is a Performer network;
[0029] in, It is an integer set based on experience;
[0030] The cell-level semantic feature vector acquisition unit utilizes the contextual features of ordered gene expression sequences to represent... Generate cell-level semantic feature vectors .
[0031] Furthermore, the cell-level semantic feature vector acquisition unit utilizes the contextual features of ordered gene expression sequences to represent... Generate cell-level semantic feature vectors Specifically:
[0032]
[0033] in, It is a pooling operation.
[0034] Furthermore, the gene structure encoding module includes: a gene association graph construction unit, a node feature update unit, and a single-cell level structural feature acquisition unit;
[0035] The gene association graph construction unit uses gene sets and gene identity embedding vectors to construct gene association graphs corresponding to single-cell samples. And obtain the adjacency matrix based on the gene association graph. and identity embedding matrix Adjacency matrix and identity embedding matrix Input to the node update unit;
[0036] in, It is a set of nodes in a gene association graph, where each node represents a gene in the gene set. It is an adjacency matrix, an identity embedding matrix. It is composed of identity embedding vectors The matrix formed;
[0037] The node update unit utilizes a multi-layer graph attention network and an adjacency matrix. and identity embedding matrix Update the node features in the gene association graph to obtain the updated node features;
[0038] The single-cell level structural feature acquisition unit is used to perform pooling operations on the updated node features to obtain a single-cell level structural feature representation vector. Specifically:
[0039]
[0040] in, It is a node feature matrix composed of updated node features. It is a pooling operation. It is a structural feature representation vector at the single-cell level.
[0041] Furthermore, the aforementioned It is an adjacency matrix, obtained in the following way:
[0042]
[0043]
[0044] in, It is an adjacency matrix The Middle Line number Column elements, It is a threshold parameter. yes The Middle Line number Column elements, It's a gene. and Similarity in the embedding space It is a gene similarity matrix in the embedding space. It is an identity embedding matrix. yes The transpose of .
[0045] Furthermore, the node update unit utilizes a multi-layer graph attention network and an adjacency matrix. and identity embedding matrix Update the node features in the gene association graph to obtain the updated node features, specifically:
[0046] First, initialize node features. ;
[0047] Then, input the node features into In a layered graph attention network, updated node features are obtained;
[0048] Among them, the The output of the layer graph attention network is Layer input, , is a positive integer;
[0049] Each layer of the graph attention network updates node features in the following way:
[0050]
[0051]
[0052] in, It is a non-linear activation function. It is a node The set of neighboring nodes, It is a node Features It is a linear transformation matrix. It is a node label. It represents the relative importance of node j to node i. It is the attention parameter vector. It's a vector concatenation operation. Therefore An exponential function with base 0.
[0053] Furthermore, the drug sensitivity prediction module includes: a feature fusion unit and a state output module;
[0054] The feature fusion unit is used to concatenate cell-level semantic feature vectors. and structural feature representation vectors at the single-cell level Obtain cell representation vector Specifically:
[0055]
[0056] in, It is a cell representation vector;
[0057] The state output module is used to output the cell representation vector. The input is fed into a multilayer perceptron, which outputs the drug response result.
[0058] Furthermore, in step two, the gene co-expression network is trained using the training set, employing the following loss function:
[0059]
[0060]
[0061] in, It is the cross-entropy loss function calculated based on the predicted results and the true labels. These are weighting coefficients. It is a cross-modal contrast loss. This is the number of single-cell samples in a training batch. yes and cosine similarity, yes and cosine similarity, , It is a single-cell sample label in a training batch. For temperature parameters, It is a single-cell sample Cell-level semantic feature vectors It is a single-cell sample Structural features at the single-cell level are represented. It is a single-cell sample The structural features are represented at the single-cell level.
[0062] The beneficial effects of this invention are as follows:
[0063] This invention's dual-channel modeling method improves the prediction accuracy of single-cell drug responses by jointly modeling gene expression semantic information and cell-specific gene regulatory structure information, without relying on external prior networks, achieving high-precision prediction of single-cell drug sensitivity states. By introducing efficient sequence modeling and graph attention structure modeling mechanisms, this invention significantly enhances the model's ability to characterize intercellular heterogeneity, nonlinear gene interactions, and the evolution of drug resistance states. Simultaneously, the joint optimization strategy based on cross-modal contrastive learning effectively enhances the consistency and stability of different feature channel representations, enabling the model to maintain good generalization performance under low-labeling or complex data distribution conditions, thereby improving the prediction accuracy of single-cell drug responses. Attached Figure Description
[0064] Figure 1 This is a flowchart of the present invention;
[0065] Figure 2 Construct a graph for the loss function. Detailed Implementation
[0066] This invention constructs a dual embedding representation for each gene, including gene identity markers and expression value embeddings. It models the complete gene expression sequence based on an efficient Performer encoder to learn long-range dependencies between genes. Secondly, it adaptively constructs a single-cell-level gene association graph based on the similarity between gene embeddings and introduces a graph attention network to model nonlinear gene interactions and local regulatory subnetworks. Finally, it fuses features extracted from sequence channels and graph channels at the cell level, aligns cross-modal representations using unsupervised InfoNC contrastive learning, and optimizes the drug sensitivity prediction task using a cross-entropy loss function. Through joint optimization, the cell embeddings learned by the gene co-expression network not only possess high predictive performance but also good biological interpretability, improving the accuracy of single-cell drug response prediction. The invention will now be described in detail with reference to specific implementation methods.
[0067] Specific implementation method one: as follows Figure 1 As shown, the specific process of a single-cell drug response prediction method based on dual-channel contrastive learning in this embodiment is as follows: obtain the original single-cell transcriptome counting matrix corresponding to the single cell to be tested, extract the set of genes to be tested with expression count values greater than 0 from the original single-cell transcriptome counting matrix, input the set of genes to be tested into the trained gene co-expression network, and obtain the drug response prediction results and corresponding probabilities.
[0068] The drug response prediction results include: sensitivity and tolerance;
[0069] The trained gene co-expression network was obtained through the following method:
[0070] Step 1: Obtain the original single-cell transcriptome counting matrix corresponding to the single-cell sample, extract genes with expression count values greater than 0 from the original single-cell transcriptome counting matrix, form gene sets with expression count values greater than 0, and assign drug response tags to gene sets;
[0071] The drug response labels include: sensitive and tolerable;
[0072] In this step, for any single-cell sample, the set of genes with expression values greater than zero is first extracted from the corresponding original single-cell transcriptome counting matrix to avoid the interference of zero expression noise on the subsequent modeling process.
[0073] Step 2: Combine the gene set and the corresponding drug response tags into a training set, use the training set to train the gene co-expression network, and obtain the trained gene co-expression network.
[0074] The gene co-expression network includes: a dual-channel data processing module, a gene semantic encoding module, a gene structure encoding module, and a drug sensitivity prediction module;
[0075] The dual-channel data processing module uses the gene set to obtain ordered gene expression sequences, and uses the gene expression sequences to obtain gene identity embedding vectors and expression intensity embedding vectors.
[0076] The dual-channel data processing module includes: an ordered gene expression sequence construction unit, a gene identity embedding unit, and an expression intensity embedding unit;
[0077] The gene expression sequence construction unit is used to sort the corresponding genes in the gene set in descending order according to their gene expression counts to obtain ordered gene expression sequences. ;
[0078] in, It is the first Gene identifiers corresponding to each gene It is the first Expression count of each gene in a single-cell sample It represents the total number of genes in the gene set corresponding to the current single-cell sample. It is a gene identifier. ;
[0079] The gene identity embedding unit is used to identify each gene in the ordered gene expression sequence. Randomly assign a trainable vector representation As a gene identity embedding vector, it is used to characterize the semantic features and potential functional properties of genes in the global transcriptome space, and the gene identity embedding vector is input into the gene structure encoding module.
[0080] in, It is the vector dimension;
[0081] The expression intensity embedding unit is used to discretize the gene expression count values into d intervals, and then uses one-hot encoding to... Mapping to vector form yields the expression strength embedding vector. This is used to encode semantic information corresponding to different expression intensity levels, and to embed the expression intensity into a vector. Input into the gene semantic encoding module;
[0082] The gene semantic encoding module uses expression intensity embedding vectors to obtain cell-level semantic feature vectors. ;
[0083] The gene structure encoding module uses gene identity embedding vectors to obtain structural feature representation vectors at the single-cell level. ;
[0084] The drug sensitivity prediction module utilizes cell-level semantic feature vectors. and structural feature representation vectors at the single-cell level Obtain the drug response and corresponding probability of a single cell under given drug conditions.
[0085] In this embodiment, addressing the problem that existing sequence-based single-cell analysis methods generally simplify gene expression data into a single discrete marker sequence, failing to effectively distinguish between gene identity information and expression intensity information, thus limiting the model's ability to characterize cell state differences, this invention proposes a dual-channel data processing method to simultaneously encode gene identity features and gene expression amplitude features at the single-cell level. In the feature representation stage, this invention constructs two independent and jointly optimizable embedding representations for each gene pair: an identity embedding vector and an expression intensity embedding vector. Gene identity embeddings and expression intensity embeddings are processed through independent channels in the model structure, avoiding mutual interference in the early fusion stage, thereby preserving the independent representation ability of gene identity differences and expression amplitude changes. In the subsequent feature fusion and downstream task modeling stages, a multi-channel feature fusion mechanism is used to jointly model the two types of embeddings, enabling the model to simultaneously perceive gene composition structure and expression intensity distribution features at the global level. Through this dual-channel data processing method, this invention significantly enhances the ability to characterize highly expressed genes, rare expression patterns, and subtle differences in cell state while ensuring modeling stability, providing high-quality input representations for subsequent joint modeling based on sequence and graph structures.
[0086] Specific Implementation Method Two: This implementation method differs from Specific Implementation Method One in that the gene semantic encoding module includes: a numerical feature matrix construction unit, an encoding unit, and a cell-level semantic feature vector acquisition unit;
[0087] The numerical feature matrix construction unit constructs a numerical feature matrix using an expression intensity embedding vector. ;
[0088] in, It is the first The expression intensity embedding vectors corresponding to each gene;
[0089] The encoding unit uses the Performer encoder to process the numerical feature matrix. Encode to obtain contextual feature representations of ordered gene expression sequences. Specifically:
[0090]
[0091] in, It is a Performer encoder;
[0092] The Performer encoder includes two encoding blocks;
[0093] Each encoding block is a Performer network, and each encoding block includes: a multi-head attention layer, a feedforward neural network layer, a residual connection layer, and a normalization layer; the output of the first encoding block is the input of the second encoding block.
[0094] The cell-level semantic feature vector acquisition unit utilizes the contextual features of ordered gene expression sequences to represent... Generate cell-level semantic feature vectors Specifically:
[0095]
[0096] in, It performs pooling aggregation along the sequence dimension.
[0097] In this embodiment, to fully model the global dependencies in gene expression profiles at the single-cell level, a gene semantic encoding module based on an efficient attention mechanism is designed to model the long-range correlations between different gene expression intensities within a single cell. Unlike traditional sequence modeling methods that only use gene identifiers as input, this module uses gene expression value embedding sequences as input, thereby focusing the sequence modeling process on the expression level changes themselves and avoiding interference from gene identity information on expression pattern modeling. By using only expression value embeddings as input, the semantic channel can specifically characterize the collaborative change features of different genes at the expression intensity level, thereby improving the ability to perceive differences in cell states. Considering that the traditional Transformer self-attention mechanism has limitations when the sequence length is L... The computational complexity of single-cell transcriptome data is prohibitively high, especially considering that it typically contains tens of thousands of genes. Directly applying standard self-attention mechanisms would incur unacceptable computational overhead. This invention introduces the Performer architecture as a sequence encoder, which approximates the attention kernel function through random feature mapping (FAVOR+ mechanism), reducing the computational complexity of attention from quadratic to linear. This significantly improves computational efficiency while still effectively capturing global dependencies. In the specific computation process, the input feature matrix is first processed... Perform linear mapping to generate query matrices respectively. Key matrix and value matrix Subsequently, through a random feature mapping function An approximation of attention calculations is used to aggregate global contextual information. This encoding module employs a multi-layered stacked structure. In a preferred embodiment, the Performer encoder comprises two sub-modules, each including a multi-head attention mechanism, a feedforward neural network, residual connections, and normalization operations to enhance the model's expressive power and training stability. Through the gene semantic encoding module, this invention can fully utilize the information of all non-zero expressed genes within a single cell without arbitrarily truncating or limiting the length of gene sequences, effectively capturing long-range dependencies between different gene expression patterns. Compared to existing methods using fixed-length or truncation strategies, this module significantly reduces the loss of key information, improves the model's sensitivity and robustness to complex expression patterns and cell state changes, and provides high-quality semantic representations for subsequent multimodal feature fusion and drug response prediction.
[0098] The other steps and parameters are the same as in Specific Implementation Method 1.
[0099] Specific Implementation Method Three: This implementation method differs from Specific Implementation Method One or Two in that the gene structure encoding module includes: a gene association graph construction unit, a node feature update unit, and a single-cell level structural feature acquisition unit;
[0100] The gene association graph construction unit uses gene sets and gene identity embedding vectors to construct gene association graphs corresponding to single-cell samples. and the adjacency matrix and identity embedding matrix Input to the node update unit;
[0101] in, It is a set of nodes in a gene association graph, where each node represents a gene in the gene set; It is an adjacency matrix, representing the set of edges in the gene association graph, used to describe the association relationships between gene pairs;
[0102] The initial feature of the nodes in the gene association graph is a gene identity embedding vector;
[0103] Considering that directly using a fully connected similarity matrix can easily introduce noisy edges and increase computational burden, this invention further introduces a learnable threshold parameter. The similarity matrix is sparsified to generate the adjacency matrix. , The Middle Line number Column elements It can be obtained through the following methods:
[0104]
[0105]
[0106] in, It is a node and nodes Similarity, It is a threshold parameter. During model training, it is optimized together with other parameters so that the gene association graph structure can be adaptively adjusted according to different data distributions and task objectives; It's a gene. and Similarity in the embedding space; It is a gene similarity matrix in the embedding space, and the similarity is... The computational method can adaptively mine potential gene association patterns from data without relying on external prior networks; yes The Middle Line number Column elements, It is an identity embedding matrix, which is a matrix composed of gene identity embedding vectors; yes The transpose of .
[0107] The node update unit utilizes a multi-layer graph attention network (GAT) and an adjacency matrix. and identity embedding matrix Update the node features in the gene association graph to obtain the updated node features, specifically:
[0108] First, initialize node features. ;
[0109] Then, the node features are input into a multi-layer graph attention network to obtain updated node features;
[0110] The multi-layer graph attention network includes two layers of graph attention networks; the output of the first layer of graph attention network is the input of the second layer of graph attention network.
[0111] The specific processing method of the graph attention network for each layer is as follows:
[0112]
[0113]
[0114] in, It is a non-linear activation function. It is a node The set of neighboring nodes, It is a node Features It is a trainable linear transformation matrix. It is a node label. It represents the relative importance of node j to node i. It is a trainable attention parameter vector. It's a vector concatenation operation. Therefore An exponential function with base 0.
[0115] By introducing an attention mechanism, genes from different neighborhoods are assigned different weights during information aggregation, thereby enhancing the model's ability to identify key regulatory relationships. This invention, while suppressing weakly correlated noise, highlights gene pairs with highly correlated expression patterns, thus improving the discriminative power and stability of the graph structure. In this step, the nodes... The neighboring nodes in the adjacency matrix It has been determined.
[0116] The single-cell level structural feature acquisition unit is used to perform pooling operations along the gene dimension on the updated node features to obtain a single-cell level structural feature representation vector. Specifically:
[0117]
[0118] in, It is a node feature matrix composed of updated node features. It performs pooling operations along the gene dimension. It is a structural feature representation vector at the single-cell level.
[0119] In this embodiment, to explicitly characterize the interactions and potential regulatory structures between genes at the single-cell scale, this invention further constructs a gene structure encoding module based on a graph neural network to extract structured feature representations from cell-specific gene association networks. This module, serving as the structural channel in a dual-channel modeling system, complements the gene semantic encoding module, focusing on modeling local interaction patterns between genes within a single cell and the overall network topology, thus overcoming the limitations of relying solely on sequence modeling to express explicit gene-gene relationships. By independently constructing gene association graphs at the single-cell level, the information ambiguity introduced by cross-cell averaging can be avoided, thereby more precisely reflecting the dynamic changes in gene regulatory structures under different cellular states. In the graph node feature construction stage, this invention uses gene identity embedding as the initial node feature. Unlike the expression intensity embedding used in the semantic channel, gene identity embedding primarily characterizes the inherent attributes and functional features of genes in the global transcriptome space, enabling the structural channel to simultaneously consider gene identity information and topological structure information when modeling gene relationships. The gene structure encoding module employs a multi-head attention mechanism to enhance the model's expressive power and robustness. It gradually abstracts local regulatory substructures and higher-order interaction patterns in the gene association network through a multi-layered GAT structure. After completing node-level feature updates, pooling operations are performed on all node features along the gene dimension to obtain a structural feature representation at the single-cell level. Through this gene structure encoding module, the present invention can simultaneously capture local interaction patterns between genes and overall network topology features at the single-cell level, providing explicit structural information to supplement cell state characterization. This structural channel and the gene semantic encoding channel complement each other in the feature space, enabling the model to not only rely on changes in expression values during drug response prediction but also comprehensively consider potential gene regulatory structures, thereby significantly improving the accuracy and biological interpretability of the prediction results.
[0120] The other steps and parameters are the same as in specific implementation method one or two.
[0121] Specific Implementation Method Four: This implementation method differs from one of Specific Implementation Methods One to Three in that the drug sensitivity prediction module includes: a feature fusion unit and a state output module;
[0122] The feature fusion unit is used to concatenate cell-level semantic feature vectors. and structural features at the single-cell level Obtain cell representation vector Specifically:
[0123]
[0124] in, It is a cell representation vector;
[0125] Unlike fusion methods based on manual weighting or attention redistribution, vector concatenation strategy can fully preserve the original semantic information of both modalities without introducing additional hyperparameters. This avoids feature compression or information bias caused by improper weight selection, and improves the stability and transferability of the model under different data distributions.
[0126] The state output module is used to output the cell representation vector. The input is fed into a multi-layer perceptron (MLP) to perform a nonlinear mapping on the cell representation vector and output the drug response result;
[0127] The prediction task is formalized as a binary classification problem to determine whether a single cell exhibits a sensitive or tolerant state under a given drug condition. The model output is the predicted probability value of the corresponding category.
[0128] After completing the feature extraction of the gene semantic encoding module and the gene structure encoding module, this invention further designs a dual-channel feature fusion and drug sensitivity prediction method to comprehensively utilize expression semantic information and gene regulatory structural information at the single-cell level to accurately determine the cellular drug response state. Since the sequence semantic channel and the structural diagram channel model the same cell state from different perspectives, their output features are complementary in terms of information source and expression form. Therefore, a reasonable fusion mechanism is needed to maintain information integrity while avoiding semantic shifts between modalities. Specifically, the cell-level expression feature vector output by the gene semantic encoding module is denoted as... The cell-level structural feature vector output by the gene structure coding module is denoted as... .
[0129] The other steps and parameters are the same as in any of the specific implementation methods one to three.
[0130] Specific implementation method five: such as Figure 2As shown, this embodiment differs from one of the specific embodiments one to four in that the loss function used to train the gene co-expression network is obtained in the following way:
[0131] Although dual-channel features differ in their construction methods and modeling focuses, they are essentially used to characterize the intrinsic biological state of the same cell. Without constraint mechanisms, direct fusion may lead to semantic misalignment of features from different modalities in the latent space, thus affecting prediction performance and representation stability. Therefore, this invention further introduces a cross-modal contrastive learning constraint to explicitly align cell representations from different channels. This invention constructs a cross-modal contrastive learning loss function based on the InfoNCE principle to measure the consistency between sequential semantic representations and structural representations in the latent space.
[0132] A1. Construct a cross-modal contrastive loss, specifically as follows:
[0133]
[0134] in, This is the number of single-cell samples in a training batch. yes and cosine similarity, yes and cosine similarity, , It is a single-cell sample label in a training batch. This is a temperature parameter used to adjust the smoothness of the similarity distribution. It is a single-cell sample Cell-level semantic feature vectors It is a single-cell sample Structural features at the single-cell level are represented. It is a single-cell sample The structural features are represented at the single-cell level.
[0135] For any cell sample, semantic channel representation With structural channel representation Positive sample pairs are formed from cross-channel representations from different cells, while negative sample pairs are formed from cross-channel representations from different cells.
[0136] By introducing the aforementioned cross-modal contrast constraints, this invention can explicitly narrow the representation distance of the same cell in different modalities during training, while simultaneously widening the cross-modal representations between different cells. This enables the model to learn modality-independent and semantically consistent cell representations in the latent space. This mechanism not only improves the stability of the dual-channel feature fusion but also enhances the model's robustness to noise perturbations and distribution shifts.
[0137] A2. Jointly optimize the drug sensitivity prediction loss and the cross-modal contrastive learning loss to construct the total loss function, as follows:
[0138]
[0139] in, It is the cross-entropy loss function calculated based on the predicted results and the true labels. These are weighting coefficients used to balance the contributions of the two types of losses. It is a cross-modal contrastive loss. This can be achieved by appropriately setting the weight parameters. This ensures that the prediction supervision signal and the representation alignment constraint work together during training, avoiding a single objective dominating model optimization.
[0140] Through the aforementioned dual-channel fusion and joint optimization mechanism, this invention not only achieves high-precision prediction of single-cell drug sensitivity, but also ensures the consistency and interpretability of information from different modalities at the feature representation level. This enables the cell representation output by the model to simultaneously reflect gene expression patterns and potential regulatory structures, providing a reliable foundation for subsequent drug resistance mechanism analysis and key regulatory pathway identification.
[0141] The other steps and parameters are the same as in any of the specific implementation methods one to four.
[0142] This invention can identify key genes, cell subpopulations and regulatory networks related to drug resistance while predicting drug response, providing a reliable technical means for elucidating drug resistance mechanisms and screening potential intervention targets, and has clear engineering practical value and clinical translation potential.
Claims
1. A single-cell drug response prediction method based on dual-channel contrastive learning, characterized in that... The specific process of the method is as follows: obtain the original single-cell transcriptome counting matrix corresponding to the single cell to be tested, extract the set of genes to be tested with expression count values greater than 0 from the original single-cell transcriptome counting matrix, input the set of genes to be tested into the trained gene co-expression network, and obtain the drug response prediction results and corresponding probabilities. The drug response prediction results include: sensitivity and tolerance; The gene co-expression network includes: a dual-channel data processing module, a gene semantic encoding module, a gene structure encoding module, and a drug sensitivity prediction module; The dual-channel data processing module uses the gene set to obtain ordered gene expression sequences, and uses the gene expression sequences to obtain gene identity embedding vectors and expression intensity embedding vectors. The gene semantic encoding module uses expression intensity embedding vectors to obtain cell-level semantic feature vectors. ; The gene structure encoding module uses gene identity embedding vectors to obtain structural feature representation vectors at the single-cell level. ; The drug sensitivity prediction module utilizes cell-level semantic feature vectors. and structural feature representation vectors at the single-cell level Obtain drug response results and corresponding probabilities.
2. The single-cell drug response prediction method based on dual-channel contrastive learning according to claim 1, characterized in that: The trained gene co-expression network was obtained through the following method: Step 1: Obtain the original single-cell transcriptome counting matrix corresponding to the single-cell sample, extract genes with expression count values greater than 0 from the original single-cell transcriptome counting matrix, form gene sets with expression count values greater than 0, and assign drug response tags to gene sets; The drug response labels include: sensitive and tolerable; Step 2: Combine the gene set and the corresponding drug response tags into a training set, and use the training set to train the gene co-expression network to obtain the trained gene co-expression network.
3. The single-cell drug response prediction method based on dual-channel contrastive learning according to claim 2, characterized in that: The dual-channel data processing module includes: an ordered gene expression sequence construction unit, a gene identity embedding unit, and an expression intensity embedding unit; The ordered gene expression sequence construction unit is used to sort the corresponding genes in the gene set in descending order according to their gene expression counts to obtain ordered gene expression sequences. ; in, It is the first Gene identifiers corresponding to each gene It is the first Expression count of each gene in a single-cell sample It represents the total number of genes in the gene set corresponding to the current single-cell sample. It is a gene identifier. ; The gene identity embedding unit is used to identify each gene in the ordered gene expression sequence. Randomly assign a vector to represent As a gene identity embedding vector, the gene identity embedding vector is input into the gene structure encoding module; The expression intensity embedding unit is used to discretize the gene expression count values into d intervals, and then use one-hot encoding to... Mapping to vector form yields the expression strength embedding vector. And embed the expression intensity into the vector. Input into the gene semantic encoding module.
4. The single-cell drug response prediction method based on dual-channel contrastive learning according to claim 3, characterized in that: The gene semantic encoding module includes: a numerical feature matrix construction unit, an encoding unit, and a cell-level semantic feature vector acquisition unit; The numerical feature matrix construction unit constructs a numerical feature matrix using an expression intensity embedding vector. ; in, It is the first The expression intensity embedding vectors corresponding to each gene; The encoding unit uses the Performer encoder to process the numerical feature matrix. Encode to obtain contextual feature representations of ordered gene expression sequences. Specifically: in, It is a Performer encoder; The Performer encoder includes Each coding block is a Performer network; in, It is an integer set based on experience; The cell-level semantic feature vector acquisition unit utilizes the contextual features of ordered gene expression sequences to represent... Generate cell-level semantic feature vectors .
5. The single-cell drug response prediction method based on dual-channel contrastive learning according to claim 4, characterized in that: The cell-level semantic feature vector acquisition unit utilizes the contextual features of ordered gene expression sequences to represent... Generate cell-level semantic feature vectors Specifically: in, It is a pooling operation.
6. The single-cell drug response prediction method based on dual-channel contrastive learning according to claim 5, characterized in that: The gene structure encoding module includes: a gene association graph construction unit, a node feature update unit, and a single-cell level structural feature acquisition unit; The gene association graph construction unit uses gene sets and gene identity embedding vectors to construct gene association graphs corresponding to single-cell samples. And obtain the adjacency matrix based on the gene association graph. and identity embedding matrix Adjacency matrix and identity embedding matrix Input to the node update unit; in, It is a set of nodes in a gene association graph, where each node represents a gene in the gene set. It is an adjacency matrix, an identity embedding matrix. It is composed of identity embedding vectors The matrix formed; The node update unit utilizes a multi-layer graph attention network and an adjacency matrix. and identity embedding matrix Update the node features in the gene association graph to obtain the updated node features; The single-cell level structural feature acquisition unit is used to perform pooling operations on the updated node features to obtain a single-cell level structural feature representation vector. Specifically: in, It is a node feature matrix composed of updated node features. It is a pooling operation. It is a structural feature representation vector at the single-cell level.
7. The single-cell drug response prediction method based on dual-channel contrastive learning according to claim 6, characterized in that: The It is an adjacency matrix, obtained in the following way: in, It is an adjacency matrix The Middle Line number Column elements, It is a threshold parameter. yes The Middle Line number Column elements, It's a gene. and Similarity in the embedding space It is a gene similarity matrix in the embedding space. It is an identity embedding matrix. yes The transpose of .
8. The single-cell drug response prediction method based on dual-channel contrastive learning according to claim 7, characterized in that: The node update unit utilizes a multi-layer graph attention network and an adjacency matrix. and identity embedding matrix Update the node features in the gene association graph to obtain the updated node features, specifically: First, initialize node features. ; Then, input the node features into In a layered graph attention network, updated node features are obtained; Among them, the The output of the layer graph attention network is Layer input, , is a positive integer; Each layer of the graph attention network updates node features in the following way: in, It is a non-linear activation function. It is a node The set of neighboring nodes, It is a node Features It is a linear transformation matrix. It is a node label. It represents the relative importance of node j to node i. It is the attention parameter vector. It's a vector concatenation operation. Therefore An exponential function with base 0.
9. The single-cell drug response prediction method based on dual-channel contrastive learning according to claim 8, characterized in that: The drug sensitivity prediction module includes: a feature fusion unit and a state output module; The feature fusion unit is used to concatenate cell-level semantic feature vectors. and structural feature representation vectors at the single-cell level Obtain cell representation vector Specifically: in, It is a cell representation vector; The state output module is used to output the cell representation vector. The input is fed into a multilayer perceptron, which outputs the drug response result.
10. A single-cell drug response prediction method based on dual-channel contrastive learning according to claim 9, characterized in that: In step two, the gene co-expression network is trained using the training set, employing the following loss function: in, It is the cross-entropy loss function calculated based on the predicted results and the true labels. These are weighting coefficients. It is a cross-modal contrast loss. This is the number of single-cell samples in a training batch. yes and cosine similarity, yes and cosine similarity, , It is a single-cell sample label in a training batch. For temperature parameters, It is a single-cell sample Cell-level semantic feature vectors It is a single-cell sample Structural features at the single-cell level are represented. It is a single-cell sample The structural features are represented at the single-cell level.