Understanding the evolution of tumours using hybrid deep generative models
Abstract
Understanding both the evolutionary dynamics and subpopulation or subclonal structure that impacts tumour progression has important clinical implications for patients.
However, deconvoluting subclonal structure and performing evolutionary parameter inference have largely been treated as two independent or step-wise tasks.
Here, we show that combining stochastic simulations with hybrid deep generative models enables joint inference of subclonal structure and evolutionary parameters.
Ultimately, by jointly learning these two problems, we show that our proposed approach leads to improved performance across a multitude of cancer evolution tasks including, but not limited to, detecting subclones, quantifying subclone frequency, and estimating mutation rate.
As an additional benefit, we also show that hybrid deep generative models also provide substantial reductions in inference time relative to existing methods.
1. Introduction 1.1. Cancer evolution inference
The observation that evolutionary processes such as mutation, genetic drift, and selection can shape the heterogeneity, adaptability and growth trajectory of tumour cell populations has made understanding the evolutionary or subclonal dynamics in patient tumours one of the major goals of cancer genomics (Black & McGranahan, 2021).
Notably, quantifying and classifying evolutionary dynamics in biopsied and bulk DNA sequenced tumours has been shown to help stratify patient risk, identify critical subpopulations of cells, predict future clinical progression, and uncover important in- formation on the underlying genetic determinants of tumour development (Fittall & Van Loo, 2019).
And while much attention has focused on new single cell genomic applications, clinically, the majority of tumor biopsies will continue to be sequenced in “bulk” (Berger & Mardis, 2018).
Thus, emphasizing the necessity for continued development of evolutionary inference methods that support this data type and, by proxy, future personalized genomics protocols.
1.2. Detecting subclones and quantifying selection In
general , cancer evolutionary inference from noisy bulk
DNA sequenced tumours has been split across two fundamental tasks.
The first task defined as subclonal clustering is focused on deconvoluting subpopulations of cells with similar characteristics such as mutational haplotypes (Dentro et al., 2017).
The second task has been to use population genetic models of tumour evolution to infer parameters, such as mutation rate or subclone fitness, that are consistent with the observed data (Bozic & Wu, 2020).
Together, subclonal clustering provides insight into the underlying cellular composition and genetic architecture of the tumour while evolutionary parameter inference helps inform on quantitative or qualitative properties related to the historical development and future growth of the tumour.
In the first task of subclonal clustering, the guiding principle is that each subpopulation of cells harbor a unique set of mutations that are ‘sampled’, or DNA sequenced, in proportion to their cellular fraction within the tumour.
Practically, in the context of single nucleotide or insertion-deletion mutations, this means that the sequencing read count or variant allele (mutation) frequency (VAF) distributions should be a mixture representing different subpopulations of cells.
Evidently, subclonal clustering has largely been framed as a mixture model problem which has inspired the development of a variety of nonparametric or parametric methods using beta, binomial, or beta-binomial mixtures to describe the observed VAF or read count distributions in sequenced tumour biopsies (Nik-Zainal et al., 2012; Miller et al., 2014; Gillis & Roth, 2020).
However, recent seminal work has shown that early subclonal clustering methods systematically overestimate the number of true subclonal populations unless the underlying evolutionary process is taken into account (Caravagna et al., 2020); namely that low VAF mutations do not represent a single subclonal population but rather a polyphyletic cluster or neutral power law ‘tail’ that is attributed to new mutations accruing in all dividing cells in the growing tumour (Caravagna et al., 2020).
In the second task of evolutionary parameter inference, the goal has been to use the theoretical connection between observed mutation frequencies (VAFs) and underlying models of tumour growth to differentiate between competing models of evolution and to assign quantitative parameters based on these models to the observed data.
Existing approaches to estimate evolutionary parameters, such as mutation rate, subclone fitness, and subclone emergence time, have primarily utilized classic likelihood-free methods such as approximate
Bayesian computation (ABC) (Williams et al., 2018), parametric bootstrap methods that connect re-sampled mutation counts from mixture model fits to analytical evolutionary theory (Caravagna et al., 2020), or synthetic supervised learning which combines simulations and discriminative neural networks (Ouellette & Awadalla, 2022)
1.3. New strategies for understanding tumour evolution
A downside of existing approaches is that both of the above tasks are treated and inferred independently and/or estimated in a stepwise manner, i.e. detecting mixtures before parameters or vice versa.
However, theoretical work across evolutionary systems has shown that understanding subpopulation structure can inform on evolutionary parameters, making simultaneous estimation of both tasks important.
Here, we present preliminary work that takes advantage of recent advances in neural simulation-based inference and deep generative modeling to jointly infer subclonal clusters and evolutionary parameters using stochastic simulations of tumour evolution and end-to-end differentiable hybrid variational autoencoders (HVAE).
We provide early experiments showing improved accuracy and performance across multiple cancer evolution tasks, relative to existing methods, and provide a brief commentary on future improvements.
[Figure]
2. Methods 2.1. Setup
The frequency of observed mutations in bulk sequenced tumour biopsies encode information about the underlying evolutionary dynamics (Figure 1).
Therefore, to perform neural simulation-based inference, we require a simulator f
( x | θ, M ) that generates synthetic tumour sequencing data, and a prior that specifies our assumptions about the set of plausible parameters and models that define the evolutionary process p ( θ, M ) .
An important nuance in notation is that we allow for θ to also specify latent information generated and collected during simulation, in addition to user-specified simulation parameters.
By generating millions of realizations from the joint distribution f ( x | θ, M ) p ( θ, M ) and building a synthetic dataset
D = { ( x i , θ i , M i ) } 1: D , we can then train a HVAE to:
Decompose the observed VAF distribution 1 ∈ R 1 × b into a matrix of component VAF distributions ∈
R k × b where b represents the number of bins used to generate a VAF distribution and k indicates the number of mixtures representing neutral, subclonal, and clonal components.
Perform model selection p ( M| x ) and provide approximate posterior estimates for evolutionary parameters of interest p ( θ | x ) .
Notably, the HVAE is trained to perform amortized , rather than sequential, likelihood-free inference.
The reason for this is that standard Gillespie algorithms used to simulate tumour growth and evolution are generally slow and computationally expensive.
By performing amortized inference, we can build a large synthetic dataset in advance using highly parallel processes that aren’t feasible for sequential inference schemes.
2.2. Simulator — x i ∼ f ( x | θ i , M i )
Previous computational and experimental work has shown that individual tumours generally follow an exponential growth trajectory.
Therefore, we implemented a simulation framework based on a stochastic branching process model of exponential tumour growth and evolution, similar to previous work (Waclaw et al., 2015; Williams et al., 2018;
Ouellette & Awadalla, 2022).
A complete description of the simulator is provided in the Appendix A.1.1.
Overall, a single simulation returns a tuple that includes a deep generative models
Tumour growth and evolution simulator
Implictly defines likelihood
FIGURES BoG t.ouellette
May
Introduction
[Equation]
FIGURES t.ouellette
May1 Introduction ✓ i ,
[Equation]
Sample prior parameters Synthetic data simulation
FIGURES BoG t.ouellette
May
Introduction
[Equation]
[Equation]
FIGURES BoG t.ouellette May
Introduction
✓ i , M i ⇠ p ( ✓, M )(1) x i ⇠ f ( x | ✓ i , M i ) (2) ( x i ,✓ i , M i ) 1: D (3)
Model training and inference with deep generative models
FIGURES BoG t.ouellette May
Introduction ✓ i , M i ⇠ p ( ✓✓ ✓ ✓, M )(1) x i ⇠ f ( x | ✓ i , M i ) (2) ( x i ,✓ i , M i ) 1: D (3)
L ( , , ⇡ ; x ) =
E q ( z | x i ) [ log p
x i | z )] | {z } reconstruction error   · KL ( q ( z | x i )
||
[-[Table] FIGURES BoG t.ouellette May 
 Introduction ✓ i , M i ⇠-] p ( z )) | {z }
KL-divergence + ↵ · log p ⇡ ( ✓ i | x i ) | {z } prediction error (4)
FIGURES BoG t.ouellette May
Introduction
✓ i , M i ⇠ p ( ✓, M )(1) x i ⇠ f ( x | ✓ i , M i ) (2) [Table]
FIGURES BoG t.ouellette May
Introduction ✓ i , M i ⇠ p ( ✓✓ ✓ ✓, M )(1) x i ⇠ f ( x | ✓ i , M i ) (2) ( x i ,✓ i , M i ) 1: D (3) [Equation] [Equation]
reconstruction error [Equation] KL-divergence [Equation]
{+FIGURES BoG t.ouellette May 
+}
Introduction ✓ i , M i ⇠ p ( ✓✓ ✓ ✓, M )(1) x i ⇠ f ( x | ✓ i , M i ) (2) ( x i
[Equation]
✓ i
[Equation]
M i ) 1: D (3)
L ( , ,⇡ ; x ) =
E q ( z | x i ) [ log p
[Equation] x [Equation] z )] | {z } reconstruction error   · KL
[Equation] z [Equation] x
[Equation] z )) | {z }
KL-divergence
[Equation]
↵
[Equation] log p ⇡ [Equation] ✓ i | x i ) | {z } prediction error (4)
FIGURES BoG t.ouellette May
Introduction ✓ i , M i ⇠ p ( ✓✓ ✓ ✓, M )(1) x i ⇠ f ( x | ✓ i , M i ) (2)
[Equation] L
[Equation] [Equation]
[Equation] ] | [Equation] z } reconstruction error
[Equation]
|
[Equation]
z [Equation] [Equation] z }
KL-divergence + ↵ · log p ⇡ ( ✓ i | x i ) | {z } prediction error (4)
✓ i , M i ⇠ p ( ✓✓ ✓ ✓, M )(1) x i ⇠ f ( x | ✓ i , M i ) (2) ( x i ,✓ i , M i ) 1: D (3)
L i ( , ,⇡ ; x i )=
E q ( z | x i ) [log p
k i | z )] | {z } reconstructionerror +  · KL ( q ( z | x i )
|| p ( z )) | {z } KL-divergence  ↵ · E q ( z | x i )
[log p ⇡ ( ✓ i | k i )] | {z } predictionerror (4) synthetic VAF distribution x i ∈ R 1 × b that represents the observable mutation data measurable from sequenced tumour biopsies, a set of synthetic VAF distributions representing the decomposed neutral, clonal, and potentially subclonal component distributions k i ∈ R k × b , a vector of evolutionary parameters θ i , and the corresponding model M i .
Consistent with previous studies, we consider models M i with i ∈ { 0, 1, 2 } where the value indicates the number of detectable subclones between 20 - 90% tumour cellular fraction (or- 45% VAF when normalizing by diploid copy number).
Prior — θ i , M i ∼ p ( θ, M )
We selected prior simulation parameter ranges consistent with previous experimental and computational estimates in tumour evolution analyses (Loeb et al., 2008; Williams et al., 2018; Werner et al., 2020; Ouellette & Awadalla, 2022).
All variable parameters were uniformly sampled.
A complete table of prior parameter ranges for simulating synthetic tumour VAF distributions is provided in Appendix
A.2.
2.4. Hybrid variational autoencoder (HVAE)
The architecture of an HVAE includes an encoder, decoder, and an additional prediction neural network used for parameter estimates.
Although multiple different factorizations of the VAE can be arranged when adding a prediction network, e.g. M2-VAE Kingma et al.
, we opted for a simple ’linear’ design for preliminary analyses (Figure 2).
Concretely, given a dataset D = { ( x i , k i , θ i , M i ) } 1: D , the
HVAE jointly trains an encoder with parameters ψ , a decoder with parameters ϕ , and a prediction network with parameters π to learn a latent mapping from an (i) input
VAF distribution x i ∈ R 1 × b → (ii) latent variable z i → (iii) k component VAF distributions representing neutral ’tail’, subclonal peaks, and/or clonal peak → (iv) evolutionary parameters θ i .
Considering a single datapoint, the HVAE is trained to minimize the following objective:
[Equation]
prediction error
Some important notes:
• The reconstruction error is on k i and not the input VAF distribution x i .
This is because the goal of decoding is to learn decompose the component distributions assigned to k i via the decoder.
• We also include both β and α coefficients to account for large discrepancies in numerical values across VAF distribution features x i and k i (values up to 60000) versus target variables θ i (normalized to 0 - 1).
This ensures that that gradients aren’t biased by any given term in the objective.
• Both the prior p ( z ) and variational distribution q ψ ( z | x ) were chosen to be Gaussian in this study.
Additional description of the training procedure and implementation is provided in Appendix A.2.
2.5. Datasets
To evaluate existing subclonal clustering methods, we curated or generated a total of 3 different datasets.
We note that, in this study, we focus on analyzing sequencing data consisting only of VAF information from diploid copy number regions as this facilitates easier evaluation against existing methods.
2.5.1. D ATASET I
Dataset I was collected from Caravagna et al.
The dataset is composed of synthetic tumour sequencing data from 150 samples grown to a final population size > 10 8 at a birth rate of 1 and death rate of 0.2, and then sequenced to a mean depth of 120x.
In terms of detectable subclones,samples have no detectable subclone whereas 110 have one detectable subclone (10 - 45% VAF).
2.5.2. D ATASET II
Dataset II consists of synthetic tumour sequencing data from 500 samples generated using the simulator described in Section 2.2 and Appendix A.1.1.
Half of the samples were simulated with 0 subclones and half were simulated with 1 subclone.
Each model had 10 replicates per sequencing depth (50 - 150x) and minimum alternate reads (4 - 12) combination.
2.5.3. D ATASET III
Dataset III was generated by directly sampling VAF information from mixture component distributions.
For each replicate, m /3 mutations were randomly sampled from a Pareto distribution (shape = 20), representing the low frequency neutral ’tail’, and 2 beta distributions ( α, β = 50, 50), representing the subclonal (centered at 25% VAF) and clonal peaks (centered at 50% VAF).
A total of 5 replicates across m = 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384 mutations were generated.
This dataset was used to evaluate how subclonal clustering time scales with increasing mutational burden.
2.6. Evaluated tasks
• D ATASET I was used to evaluate the ability for tumour evolution models to differentiate between samples with 0 or 1 detectable subclones (T ASK I.1).
• D ATASET II was used to (T ASK II.1) evaluate each models ability to differentiate between 0 or 1 subclones at variable sequencing depths and minimum alternate read combinations, (T ASK II.2) to accurately quantify the true subclone population fraction in the synthetic tumour, and (T ASK II.3) to estimate the mutation rate at increasing sequencing depths.
• D ATASET III was used to evaluate inference time per sample with increasing mutations (T ASK III.1).
2.7. Additional methods
In addition to our proposed HVAE, we also evaluated three additional subclonal clustering methods on each of the four tasks.
• SciClone (Miller et al., 2014) is a variational Bayesian mixture model with either beta, binomial, or gaussian component distributions.
We use the beta distribution variant.
• MOBSTER (Caravagna et al., 2020) is Dirichlet mixture model combining Pareto/power-law and beta distribution components.
MOBSTER uses the power-law component to model the low frequency neutral tail that arises due to expanding tumour populations - this helps to avoid overestimating the number of subclones.
• TumE (Ouellette & Awadalla, ) is a synthetic supervised learning model that also uses simulations and deep learning to perform subclonal clustering - however, parameter inference and clustering are performed independently and only discriminative neural networks are used.
Predicting the number of subclones
In T ASK I.1, we find that the proposed HVAE leads to substantial improvements in accurately classifying the presence or absence of subclonal populations using VAF information (defined by accuracy and Matthew’s correlation coefficient; Table 1).
[Table]
Furthermore, in T ASK II.2, we find that the HVAE maintains superior performance across all evaluated mean sequencing depth and minimum alternate read combinations considered here (Figure 3)
3.2. Quantifying the subclone cellular fraction
We next evaluated the ability for each method to quantify the cellular fraction of a single subclonal population, present
M CC
Alt.
reads
Alt.
reads
Alt.
reads
Alt.
reads
Alt.
reads0.
A cc u r a c y
[Figure]
p r e d - N t r u e
[Figure]
between 10 - 45% VAF (20 - 90% cellular fraction).
In this task, the HVAE outperformed both mixture models (SciClone and MOBSTER) but had lower performance than
TumE (Table 2).
However, compared to TumE which also uses a neural simulation-based inference approach, the proposed HVAE was only trained on approximately 12.5% of the training set size as TumE (5 vs 40 million samples).
Additional scaling of the dataset size and additional evaluation of alternative architectures will likely resolve any differences in performance on this task.
[Table]
Predicting mutation rate
The majority of available methods do not provide evolutionary parameter estimates.
However, MOBSTER provides an option to connect observed subclone frequencies and neutral ’tail’ fits to analytical theory of subclonal dynamics.
Although this work is preliminary, we performed a brief comparison of mutation rate estimates between MOBSTER and the HVAE (Figure 4).
Estimates from both MOBSTER and HVAE improve substantially with increasing sequencing depth.
This is expected as excessive sequencing noise due to lower sequencing depth confounds accurate assignment of mutations into each frequency distribution component (e.g. neutral tail, subclonal, or clonal mutations).
3.4. Inference time across methods
Existing methods used for subclonal clustering tend to scale poorly in terms of compute and time with increasing mutational burden.
As such, we evaluated the inference time for
[Figure]
each method with increasing mutational burden.
Compared to existing approaches, even non-mixture model approaches such as TumE, we observe substantial reductions in wall time with the HVAE (Figure 5).
[Figure]
3.5. Fitting the HVAE to real patient tumour sequencing data
In Figure 6, we provide an example fit to VAF distribution recovered from a real patient tumour biopsy.
Detectable subclone
Observed process
Variant allele frequencies (VAF)
Latent process
Tumour growth and evolution
[Figure]
Tumour tree 4. Conclusion
We provide preliminary experiments and analyses showing that combining stochastic simulations of tumour evolution with generative neural networks, such as HVAEs, enables joint subclonal clustering and parameter inference in tumour populations.
Evidently, it appears that jointly learning to decompose subclones and estimate evolutionary parameters improves accuracy over existing methods on the majority of tasks considered here. However, we note that we primarily focused on benchmarking subclonal clustering performance with minimal evaluation of evolutionary parameter estimates. This is largely because only a limited number of methods enable this type of inference. In future method comparisons, parameter estimates should undergo additional benchmarking, taking into account classical simulation-based inference methods such as ABC and likely more recent neural simulation-based inference methods that utilize conditional density estimators such as normalizing flows (Papamakarios & Murray, 2016; Greenberg et al., 2019; Durkan et al., 2020)
(although constraints on the input/output dimensionality of certain invertible neural networks may pose challenges when performing clustering inference as proposed in this study).
In addition, although we provide accurate estimates across a variety of tasks, it isn’t entirely clear if the approximate posterior derived from repeatedly sampling the HVAE accurately captures uncertainty in a potentially multi-modal ground truth posterior.
Additional experiments focused on sampling reference or ’proxy’ ground truth posteriors using sequential methods with theoretical guarantees (e.g. ABC) would help address this unresolved issue.
Lastly, the choice of architecture and structure of the objective function was kept simple for straightforward implementation and optimization.
In this regard, evaluating a variety of alternative VAE factorizations (Kingma et al., 2014) while providing a more formal description of the objective function under joint inference of data and parameters would likely be justified and, ultimately, aid in interpretability and model performance. 5. Acknowledgements This work was supported by the Ontario Ministry of Research and Innovation award to Philip Awadalla. Tom
W. Ouellette was supported by a Canadian Institutes of
Health Research (CIHR) Frederick Banting and Charles Best Canada Graduate Scholarship. A. Appendix A.1. Additional information on the synthetic data generation process A.1.1. S IMULATION ALGORITHM
The stochastic branch process of tumour growth and evolution follows a variant of the Gillespie algorithm (Williams et al., 2018).
Here, a tumour grows with each cell dividing or dying with probabilities proportional to the birth rate b or death rate d , respectively.
During each division, a cell will acquire a Poisson-distributed number of mutations based on the mutation rate µ .
If a cell acquires a driver mutation, its overall growth rate ( b − d ) is scaled by a factor of (1 + s ) where s indicates the selection coefficient for the driver mutation.
Once a tumour reaches a specified final population size N , the tumour is virtually sequenced under a binomial or beta-binomial sequencing noise model that is consistent with the empirical data generation process.
This can be more formally denoted within a pseudo-algorithm.
Algorithm 1 Pseudo-algorithm for tumour evolution data
Set the detectable subclone frequency range ( f min , f max ) for simulations with ≥ 0 subclones
Sample parameters from prior θ i , M i ∼ p ( θ, M ) while ( f min > subclone frequency > f max ) & (number of subclones
̸ = M i ) do
Set current population size n =
Set time t = 0 .
Initialize founder cell with n clonal clonal mutations while n < N do
Randomly sample a cell j from population
Sample r ∼ Unif ( a , b ) where
a = 0 and b = b max + d max if b j > r then
Cell divides and both daughter cells acquire k mutations where k is Poisson distributed with mean equal to the per genome division mutation rate µ n = n +else if b j + d j > r > =
b j then
Cell dies n = n −else
Nothing happens end
if τ ∼ Exp(1) or -log(Unif(0, 1)) t
= t + τn − 1 ( b max + d max ) −end while end while
Virtual biopsy synthetic tumour
The virtual biopsy procedure follows the expected variation seen in next-generation sequencing data.
Namely, given a tumour with population size N t and mean sequencing depth ¯ d , the total observed read depth d i covering each mutation i is distributed as d i ∼ BetaBin ( n = N t , p = ¯ d/N t , ρ ) .
Here, ρ indicates the overdispersion parameter for the Beta distribution.
When ρ is zero, d is is binomially distributed.
Then, given the total read depth d i , the true variant allele frequency V AF t i , and the tumour purity ϕ , the alternate read count r i for mutation i is distributed as r i ∼ Binomial ( n = d i , p = V AF t i ) .
Given r i , the observed noisy V AF o i for each mutation i is computed as r i /d i .
A.1.2. S IMULATION PARAMETERS
For simulation parameter selection, we follow similar specifications as previous work (Williams et al., 2018; Ouellette &
Awadalla, 2022).
Most notably, we take advantage of the fact that VAF distributions do not encode information on tumour population size (Williams et al., 2018).
This means we can simulate smaller population sizes to take advantage of the reduced computational burden and improved simulation speed.
In addition, we fix the death rate to 0 as it also improves computational efficiency.
We do note that previous work has shown that the ratio of birth and death rates may lead to potentially detectable deviations in the shape of the VAF distribution (Bozic et al., 2016).
However, we do not consider that problem here, as it has been previously shown that simulation-based cancer evolution inference methods are robust to changes in the underlying birth and death rate combinations (Ouellette & Awadalla, 2022).
Below we list the variable and fixed parameters used to generate synthetic tumour sequencing data
[Table]
[Table]
A.2. Details on HVAE training and implementation
We simulated 5 million samples under each model (0, [Table] or 2 subclones) described in the simulator above.
Input VAF distributions x i [Table] and each component distribution within k i , were histograms with b
= 100 bins generated by tabulating all mutations from 0 to 70% VAF.
Using this synthetic dataset [Table] we then trained four different HVAE models in total:
• HVAE ms was used to perform model selection across each evolutionary model (0, 1, or 2 subclones)
• HVAE 0 was used to perform VAF distribution clustering and parameter estimates under the 0 subclone evolutionary model ( M 0 )
• HVAE 1 was used to perform VAF distribution clustering and parameter estimates under the 1 subclone evolutionary model ( M 1 ) • HVAE 2 was used to perform VAF distribution clustering and parameter estimates under the 2 subclone evolutionary model ( M 2 )
For each HVAE, the encoder, decoder
[Table]
and prediction networks were fully-connected multi-layer perceptrons implemented in pytorch.
To select optimal configurations for each neural network
[Table]
we performed random hyperparameter searchtimes with the following hyperparameter ranges:
[Table]