Predicting Cellular Responses to Novel Drug Perturbations at a Single-Cell Resolution
Abstract
Single-cell transcriptomics enabled the study of cellular heterogeneity in response to perturbations at the resolution of individual cells.
However, scaling highthroughput screens (HTSs) to measure cellular responses for many drugs remains a challenge due to technical limitations and, more importantly, the cost of such multiplexed experiments.
Thus, transferring information from routinely performed bulk RNA HTS is required to enrich single-cell data meaningfully.
We introduce chemCPA, a new encoder-decoder architecture to study the perturbational effects of unseen drugs.
We combine the model with an architecture surgery for transfer learning and demonstrate how training on existing bulk RNA HTS datasets can improve generalisation performance.
Better generalisation reduces the need for extensive and costly screens at single-cell resolution.
We envision that our proposed method will facilitate more efﬁcient experiment designs through its ability to generate in-silico hypotheses, ultimately accelerating drug discovery.
Introduction
Recent advances in single-cell methods allowed the simultaneous analysis of millions of cells, increasing depth and resolution to explore cellular heterogeneity (Sikkema et al., 2022; Han et al., 2020).
With single-cell RNA sequencing (scRNA-seq) and high-throughput screens (HTSs) one can now study the impact of different perturbations, i.e., drug-dosage combinations, on the transcriptome at cellular resolution (Yofe et al., 2020; Norman et al., 2019).
Unlike conventional HTSs, scRNAseq HTSs can identify subtle changes in gene expression and cellular heterogeneity, constituting a cornerstone for pharmaceutics and drug discovery (Srivatsan et al., 2020).
Nevertheless, these newly introduced sample multiplexing techniques (McGinnis et al., 2019; Stoeckius et al., 2018; Gehring et al., 2018) require expensive library preparation and do not scale to screen thousands of distinct molecules.
Even in its most cost-effective version, nuclear hashing, the acquired datasets contain no more than 200 different drugs (Srivatsan et al., 2020).
Consequently, computational methods are required to address the limited exploration power of existing experimental methods and discover promising therapeutic drug candidates.
Suitable methods should predict the response to unobserved (combinations of) perturbations.
Increasing in difﬁculty, such tasks may include inter- and extrapolation of dosage values, the generalisation to unobserved (combinations of) drug-covariates (e.g., cell-type), or predictions for unseen drugs.
In terms of medical impact, the prediction of unobserved perturbations may be the most desirable, for example for drug repurposing.
At the same time, it requires the model to properly capture complex chemical interactions within multiple distinct cellular contexts.
Such generalisation capabilities can not yet be learned from single-cell HTSs alone, as they supposedly do not cover the required breadth of chemical interactions.
In this work, we leverage information across datasets to alleviate this issue.
We propose a new model that generalises previous work on Fader Networks by Lample et al.
(2017) and the Compositional Perturbation Autoencoder (CPA) by Lotfollahi et al.
(2021) to the challenging scenario of generating counterfactual predictions for unseen compounds.
Our method is as ﬂexible and interpretable as CPA but further enables us to leverage lower resolution but higher throughput assays, such as bulk RNA HTSs, to improve the model’s generalisation performance on single-cell data (Amodio et al., 2021).
Our main contributions are:
We introduce chemCPA, a model that incorporates knowledge about the compounds’ structure, enabling the prediction of drug perturbations at a single-cell level from molecular representations.
We propose and evaluate a transfer learning scheme to leverage HTS bulk RNA-seq data in the setting of both identical and different gene sets between the source (bulk) and target (single-cell) datasets.
We show how chemCPA outperforms existing methods on the task of predicting unobserved drug-covariate combinations.
At the same time, we demonstrate chemCPA’s versatility and evaluate chemCPA on generalisation tasks that cannot be modeled using any previously existing method
Related Work
Over the past years, deep learning (DL) has become an essential tool for the analysis and interpretation of scRNA-seq data (Angerer et al., 2017; Rybakov et al., 2020; Lopez et al., 2020; Hetzel et al., 2021).
Representation learning in particular, has been useful not only for identifying cellular heterogeneity and integration (Gayoso et al., 2022), or mapping query to reference datasets (Lotfollahi et al., 2022), but also in the context of modelling single-cell perturbation responses (Rampá š ek et al., 2019; Seninge et al., 2021;
Lotfollahi et al., 2019; Ji et al., 2021).
Unlike linear models (Dixit et al., 2016; Kamimoto et al., 2020) or mechanistic approaches (Fröhlich et al., 2018; Yuan et al., 2021), DL is suited to capture non-linear cell-type-speciﬁc responses and easily scales to genome-wide measurements.
Recently, Lotfollahi et al.
(2021) introduced the
CPA method for modelling perturbations on scRNA-seq data.
CPA does not generalise to unseen compounds, hindering its application to virtual screening of drugs not yet measured via scRNA-seq data, which is required for effective drug discovery.
For bulk RNA data, on the other hand, several methods have been proposed to predict gene expression proﬁles for de novo chemicals (Pham et al., 2021; Zhu et al., 2021; Umarov et al., 2021).
Crucially, the L1000 dataset, introduced by the LINCS programme (Subramanian et al., 2017), greatly facilitated such advances on phenotype-based compound screening.
However, it remains unclear how to translate these approaches to single-cell datasets that include signiﬁcantly fewer compounds and, in many cases, rely on different gene sets.
Chemical Compositional Perturbation Autoencoder
We consider a dataset D
= { ( x i , y i ) } Ni =1 = { ( x i , ( d i , s i , c i ))
} Ni =1 , where x i 2 R n describes the n -dimensional gene expression and y i an attribute set.
For scRNA-seq perturbation data, we usually consider the drug and dosage attributes, d i 2 { drugs in D} and s i 2 R , respectively, and the cell-line c i of cell i .
Note that this set of attributes Y depends on the available data and could be extended to covariates such as patient, or species.
A possible approach to predicting counterfactual combinations is to encode a cell’s gene expression x i invariantly from its attributes y i as a latent vector z i , called the basal state.
Being provided such
To this end we divide our model the Chemical Compositional Perturbation Autoencoder (chemCPA), into three parts: (1) the gene expression encoder and decoder, (2) the attribute embedders and (3) the adversarial classiﬁers, see Figure 1 for an illustration.
3.1 Gene encoder and decoder
Following Lotfollahi et al.
(2021), our model is based on an encoder-decoder architecture combined with adversarial training.
The encoding network E ✓ : R n ! R l is a multi-layer perceptron (MLP) with parameters ✓ that maps a measured gene expression state x i 2 R n to its l -dimensional latent vector
z i =
E ✓ ( x i ) .
Through adversarial classiﬁers, z i is trained to not contain any information about its attributes y i .
This gives us control over the latent space in which we update z i with an additive attribute embedding of our choice and obtain z 0 i .
The decoder D : R l ! R 2 n is an MLP that takes z {+
+}
i as input and computes the component-wise parameters of the underlying distribution P of the gene expression data.
Dependent on whether x i is raw or pre-processed, P can follow a negative binomial or Gaussian distribution.
Assuming a mean and variance parametrisation, we get in both cases µ = D µ ( z 0 ) and  2 = D  2 ( z 0 ) for the description of the decoded gene expression state.
While chemCPA supports both settings, we observed better convergence with a Gaussian likelihood for which the reconstruction loss becomes:
[Equation]
Next, we provide intuition about how we can meaningfully interpret latent space arithmetics and how we encode drug and cell-line attributes.
3.2 Attribute embedding and additive latent space
We assume an additive structure of the perturbation response in the latent space:
[Equation]
where z c i and z d i correspond to the latent cell-line and drug attributes, and ˆ s i encodes the dosage.
This choice of linearity makes the model interpretable for users such as biologists since it permits to analyse and ablate components individually, e.g., allowing interpolation or extrapolation of the dose values.
Another advantage of the additive structure is its permutation invariance and that it allows for adding new covariates, e.g., during ﬁne-tuning.
While remaining interpretable, chemCPA is able to model complex relationships through the non-linear decoder.
Due to their different nature, we encode the drug and cell-line attributes separately in the latent space.
For the cell-lines, we use the same approach as Lotfollahi et al.
(2021), where a l -dimensional latent representation z c is optimised for each cell-line c .
For the drugs, we propose a new embedding network P ' .
Perturbation Network
The network P ' maps molecular representations—such as its graph or
SMILES representation—and the used dosage to its latent perturbation state.
This perturbation network P ' consists of the molecule and perturbation encoders, G and M , as well as the dosage scaler S , see Figure 1 (2).
The molecule encoder G : G ! R m encodes the molecule representation g i 2 G as a ﬁxed size embedding h d i 2 R m .
In a subsequent step, the perturbation encoder M : R m ! R l takes the molecular embedding h d i as input and generates the drug perturbation z d i 2 R l that is used in chemCPA’s latent space.
The dosage scaler S : R m [-+
-]+1 !
R also uses h d i and maps it together with the dosage s i to the scaled dosage value
ˆ s i .
We chose S to map back to a scalar value
ˆ s as this allows us to compute drug-response curves in an easy fashion.
In addition, this way of encoding matches the idea that z d i encodes the drug’s general effect, which is dosage independent.
Put together, we end up with ˆ s i ⇥ z
d i = P ' ( g i , s i ) =
S ( h d i , s i ) ⇥ M ( h d i ) with
[Equation]
The molecule encoder G can be any encoding network that maps molecular representations to ﬁxed-size embeddings.
Due to the limited number of drugs available in scRNA-seq HTSs, we propose to rely on a pretrained encoding model and freeze G during training.
We tested multiple different options for G and include a detailed benchmark in the Appendix A.1.
We found that RDKit features performed well in our setting and report all following results for chemCPA with RDKit as the molecule encoder G .
By design, we can choose a new set of attributes for the drug and cell line and compute the new latent state as z 0 i =
z i + z attribute at test time.
Due to the perturbation network, chemCPA makes it possible to predict drug perturbations for molecules that have not been experimentally observed ( d / 2 D ).
In contrast, CPA can only make predictions for molecules that were present during training ( d 2 D ).
In both cases, the latent representation is computed as:
[Equation]
We next describe how we “strip z i from its attribute information” to obtain a basal state representation.
3.3 Adversarial classiﬁers for invariant basal states
To generate invariant basal states and produce disentangled representations z i ,
z d i , and z c i , we use adversarial classiﬁers A drug  and A cov  .
Both adversary networks A j  : R l ! R N j take the latent basal state z i as input and aim to predict the drug that has been applied to example i as well as its cell-line c i .
While these classiﬁers are trained to improve classiﬁcation performance, we also add the classiﬁcation loss with a reversed sign to the training objective for the encoder E ✓ .
Hence, the encoder attempts to produce a latent representation
z i which contains no information about the attributes .
Note that this explicit separation of basal, drug, and covariate information, which we call disentanglement, is an approximation to make the problem tractable.
At the same time, such separation is useful for attributing perturbation effects to speciﬁc sources, e.g., drug or cell line, which is relevant for biological applications and downstream analyses.
We use the cross-entropy loss for both classiﬁers
[Equation]
Following the CPA implementation from Lotfollahi et al.
(2021), we add a zero-centered gradient penalty to the loss function of the adversarial classiﬁers, to minimise
[Equation]
This gradient penalty was shown to make the discriminator more robust to noise and enable local convergence, when applied to generative adversarial networks (Mescheder et al., 2018).
During training, we alternate update steps between the following competing objectives
[Equation]
where  dis balances the importance of good reconstruction against the encoder E ✓ ’s constraint to generate disentangled basal states z i .
The gradient penalty is weigthed with  pen .
Datasets and transfer learning
We use the sci-Plex3 (Srivatsan et al., 2020) and the L1000 (Subramanian et al., 2017) datasets for the main evaluation on single-cell data and pretraining on bulk experiments, respectively.
Datasets The L1000 data contains about 1 .
3 million bulk RNA observations for 978 different genes.
It includes measurements for almost 20 k different drugs, some of which are FDA-approved, while others are synthetic compounds with no proven effect on any disease.
Compared to scRNA-seq data, the L1000 data allows to explore a more diverse space of molecules which makes it ideal for pretraining.
The sci-Plex3 data is similar in size and contains measurements for 649 , 340 cells across 7561 drugsensitive genes.
On three human cancer cell lines—A549, MCF7, and K562—single-compound perturbations for 188 drugs at four different dosages— 10 nM, 100 nM, 1 µ M, and 10 µ M— are examined.
Note that all cell lines and about 150 compounds overlap with the L1000 data.
In addition, Srivatsan et al.
(2020) assigned to all compounds one of 19 different modes of action (MoA), also called pathways.
In contrast to the mechanism of action, which is related to the biochemical interaction between a molecule and a cell, the MoA describes the anatomical change that results from the exposure of cells to a drug-like molecule.
Transfer learning As we train chemCPA with a Gaussian likelihood loss, the dataset was ﬁrst normalised and then log( x + 1) -transformed.
Depending on the experiment, we further reduced the number of genes included in the single-cell data.
In Section 5.1, we ﬁrst subsetted both datasets to the same 977 genes which were identiﬁed via ensemble gene annotations.
For the ﬁnal experiment in
Section 5.2, the considered gene set is increased as we hypothesize that more than the 977 L genes are required to capture the variability within the single-cell data.
To assess whether pretraining on L1000 is still beneﬁcial in this scenario, we included 1023 highly variable genes (HVGs) from the sci-Plex3 data.
That is, we consider 2000 genes in total.
For the extended gene set, chemCPA’s input and output dimensions have to be adjusted to match the total number of 2000 genes.
This is realized by adding two non-linear layers h enc : R n ﬁne-tune ! R n pretrain and h dec : R 2 n pretrain ! R 2 n ﬁne-tune to the autoencoder.
The encoder becomes ˆ E ✓ =
E ✓  h enc ( x )  and the decoder becomes ˆ D = h dec  D ( z 0 )  .
In our example, we have n pretrain = 977 and n ﬁne-tune = 2000 .
We train all layers during ﬁne-tuning, including the newly added ones.
This architecture surgery differs from the procedure introduced in Lotfollahi et al.
(2022), where individual neurons are added (instead of whole layers) and the transfer is performed on dataset labels (instead of gene sets).
Experiments
Our evaluation strategy tests chemCPA’s ability to produce counterfactual predictions.
To this end, it is important to measure both the predictive performance of a trained model as well as the degree to which the latent space components are disentangled.
Counterfactual predictions To perform a counterfactual prediction, chemCPA ﬁrst encodes an unperturbed control observations, a cell treated with dimethyl sulfoxide.
The resulting basal state is then combined with the encoding of the desired drug and cell line, and chemCPA decodes the result.
As we are free to choose any drug encoding, we refer to this process as counterfactual prediction.
[Table] Evaluation strategy Throughout our experiments, we use the coefﬁcient of determination r 2 as the main performance metric.
This score is computed between the actual measurements and the counterfactual predictions on all genes and the 50 most differentially expressed genes (DEGs).
It is necessary to consider all genes to evaluate the background and general decoder performance.
However, the resulting r 2 -scores can get inﬂated since most genes stay similar to their controls under perturbation.
In contrast, the DEGs capture the differential signal which reﬂects a drug’s effect.
To further stress the importance to report both scores, note that the DEGs are unknown for unseen drugs as they depend on the drug and cell type.
Hence, the combination is essential to gauge the accuracy of the model’s predictions.
In order to classify the degree of disentanglement during evaluation [Table] we train separate MLPs with four layers over 400 epochs and compute the prediction accuracy for drugs and covariates given the basal state.
We consider the resulting accuracies as our disentanglement scores.
An optimally disentangled model achieves scores that match the ratios of the most abundant drug and cell line, respectively.
Since no model achieves perfect scores, we subset to models that are sufﬁciently disentangled.
Throughout our experiments on the sci-Plex3 data, we set the thresholds for perturbation and cell line disentanglement to < 10% and < 70% , respectively, while values of 3% and 51% are optimal.
Note that poor disentanglement will automatically lead to low scores due to computing the test scores on the counterfactual predictions.
5.1 Comparing chemCPA against existing methods on unseen drug-covariate combinations
Before evaluating how well chemCPA can generalise to unseen drugs, we have to establish its competitive performance in a less ambitious setting.
For this, we consider the scenario of generalisation to unobserved combinations of drugs and cell lines on the sci-Plex3 data and compare chemCPA against scGen (Lotfollahi et al., 2019) and CPA (Lotfollahi et al., 2021).
As scGen cannot distinguish between different dosage values, we perform two separate experiments for the second and highest dose values, 1 µ M and 10 µ M, respectively.
Moreover, as both CPA and scGen require each individual component (drug d , cell line c ) to be part of the training data D , we create three distinct splits with only two of the three different drug set and cell line combinations being present during training, the third one being left for testing.
We choose to test nine different compounds: Dacinostat, Givinostat, Belinostat, Hesperadin, Quisinostat, Alvespimycin, Tanespimycin, TAK-901, and Flavopiridol.
These drugs mostly belong to three MoA—epigenetic regulation, tyrosine kinase signalling, and cell cycle regulation—and were reported among the most effective drugs in the original publication (Srivatsan et al., 2020).
As discussed in the previous paragraph, we report mean and median r 2 values, which we averaged over the three splits and all drugs, for the sets of all genes and differentially expressed genes (DEGs).
We consider a model that discards all perturbation information as our baseline.
As a consequence, one can understand the improvement over the baseline as a result of the additional drug encoding.
Moreover, we use the L1000 data for the pretraining of chemCPA and subset to the same 977 genes [Table] for the ﬁne-tuning on sciPlex-3.
This way, we are able to evaluate chemCPA in its pretrained and non-pretrained version.
We report the results of this experiment in Table 1.
ChemCPA outperforms both scGen and CPA, demonstrating that the perturbation network together with pretraining leads to SOTA performance.
Note also that the base version of chemCPA performs better than both CPA and scGen, indicating that the additional regularisation that comes from the perturbation networks P ' has beneﬁcial effects on single-cell perturbation modelling.
To make a fair comparison, we optimised all CPA and chemCPA models identically and swept over the same set of hyperparameters (random, 10 samples).
scGen was optimised with default parameters and an adjusted KL annealing scheme to match the set number of epochs.
Note that both
CPA and chemCPA can take control cells x i from all cell lines as input ( { A549, K562, MCF7 } ! { A549, K562, MCF7 } ) , while the cell line input for scGen has to match the test set ( A549 !
A549 , K562 ! K562 , MCF7 ! MCF7 ) .
5.2 Using chemCPA to predict single-cell responses for unseen drugs
For the application of chemCPA to predict perturbation responses for unseen compounds, we use the same nine drugs from sci-Plex3 data as in Section 5.1.
In addition to the shared gene set, we also consider an extended gene set, cf.
Section 4.
We include HVGs to account for the technological difference between bulk and single-cell and to capture the variance of single-cell data.
To this end, the 977 genes present in both datasets are extended with 1023 HVGs of the sci-Plex3 data.
Note that through this larger genes set, the 50 DEGs become a subset of the HVGs which makes it considerably more difﬁcult for pretrained models to leverage learned bulk expressions directly.
Shared gene set
Table 2 shows the test performance of chemCPA, averaged over all drugs and the three cell lines, for the same gene set as used in Section 5.1.
The pretrained chemCPA model consistently outperform the baseline and its base version.
The high baseline scores in Figure 2 shows that the drugs have almost no effect at low dosages.
At high dosages, however, we see how chemCPA’s predictions improve over the baseline.
Looking at the prediction for all genes, the pretrained model has a signiﬁcant advantage over its non-pretrained version.
As expected, the performance is lower for the DEGs.
Nevertheless, also in this scenario, [Table] chemCPA, especially the pretrained version, can explain gene expression values that must result from the drugs’ inﬂuence.
In Figure 3, latent perturbations z d are visualised.
Note that the difference between the lowest and highest doseage values results only from the non-linear dosage scaler S .
Extended gene sets The extension to the larger gene set introduces a more difﬁcult task for chemCPA.
In Table 3, we show the same analysis as for the shared gene set.
Again, the advantage of the pretraied chemCPA model translates to this scenario, while the base version is only slightly better than the baseline.
A more comprehensive view for all dosages is shown in Figure 4, see also A.5 for results with different molecule encoders G .
This is a promising result, as it suggests that the transfer from abundant bulk RNA perturbation screens can be leveraged even in scenarios where the gene sets do not match.
Crucially, this enables users to beneﬁt from the proposed transfer learning and chemCPA’s modelling capacity while simultaneously accounting for the special requirements of scRNA-seq data.
In Figure 5 we show an explicit example for chemCPA’s performance for two histone deacetylation drugs, see also Figure 13 in the appendix for more details.
Yet, for real applications it is essential to make limitations concerning the data and method transparent.
To this end, we propose an uncertainty measure that addresses some of the limitations related to the generalisation to unseen compounds.
[Table]
5.3 Measure uncertainty on the drug embedding
Generalisation can only be achieved within the limits of the dataset a model is trained on.
For the sci-Plex3 data, less than 20% of the drug-dose combinations deviate from the controls’ phenotypes by more than 35% in its r 2 scores.
In additon, we know from the original sci-Plex3 publication that only drugs from a few pathways—tyrosine kinase signaling, DNA damage and repair, cell cycle regulation, and epigenetic regulation—show a clear effect.
We assume that this technological noise is the reason why the non-pretrained chemCPA version struggles to outperform the baseline on the extended gene set [Table] whereas the pretrained model is more robust.
These data challenges are also reﬂected in the left part of Figure 3 as we would expect chemCPA’s perturbation latent space to cluster according to the drugs’ MoA, similar to the cluster of histone deacetylation drugs.
We found that an imperfect clustering often correlates with high baseline scores and, as a result of that, chemCPA not being able to identify distinct perturbations, see Figure 15 in the appendix.
To make the generalisation ability more transparent, we employ a measure of uncertainty.
A good indicator for chemCPA’s ability to generalise is the MoA prediction from the KNN-graph of the perturbation embedding space.
We further combine this measure with the average distance to neighbouring drugs as we recognise that larger distances indicate a distinct perturbation:
[Equation]
where d is the Euclidean distance, H is the Shannon entropy, and X the normalised pathway prediction deduced from the neighbours
N i of drug
i .
This uncertainty measure combines two things:
First, chemCPA’s conﬁdence on the drug’s MoA, measured by H , and second, whether chemCPA expects the drug to have a distinct perturbation effect on the cell, measured by the inverse distance.
We report an analysis of the uncertainty for the chemCPA model in Figure 3 and Table 4.
A plot that shows chemCPA’s performance and uncertainty for all compounds is part of the appendix A.6.
The results show that the uncertainty score u for unseen drugs correlates well with the accurate prediction of perturbed cells.
This illustrates how chemCPA’s compositional latent space can be leveraged for additional insights in order to evaluate its generalisation ability.
Conclusion
In this paper, we introduced chemCPA, a model for predicting cellular gene expression responses for unseen drug perturbations by encoding the drugs’ molecular structures.
We showed how chemCPA outperforms CPA and scGen on shared tasks, while generalising over existing methods by being applicable to the novel task of generalising to unseen drugs.
Applied to single-cell data, we demonstrated how pretraining on bulk HTSs improves chemCPA’s generalisation performance.
This applies even when the gene set of the single-cell dataset differs from the genes of the pretraining bulk RNA HTS dataset.
We further provided an uncertainty measurement that correlates well with the chemCPA’s generalisation ability to unseen drugs.
Taken all results together, we are conﬁdent that chemCPA will beneﬁt from higher-quality scRNA-seq HTSs in the future and can become a powerful aid in the drug screening and drug discovery process.
Acknowledgments and Disclosure of Funding
LH is thankful for valuable feedback from Fabiola Curion and Carlo De Donno.
LH is supported by the Helmholtz Association under the joint research school “Munich School for Data Science - MUDS”.
ML is grateful for ﬁnancial support from the Joachim Herz Stiftung.
NK and FJT ackowledge support by Helmholtz Association’s Initiative and Networking Fund through Helmholtz
AI (ZT-I-PF-5-01).
FJT further acknowledges support by the BMBF (01IS18053A).
FJT consults for
Immunai Inc., Singularity Bio B.V., CytoReason Ltd, and Omniscope Ltd, and has ownership interest in Dermagnostix GmbH and Cellarity.
This work was supported by the German Federal Ministry of
Education and Research (BMBF) under Grant No. 01IS18036B.