Using deep learning to estimate the shifting mutational fitness landscape of SARS-CoV-2 spike along a phylogeny
A longstanding challenge in evolutionary biology is to determine the fitness effects of mutations, and how they change during evolution. For SARS-CoV-2, millions of naturally evolved viral sequences are available. Bloom and Neher devised a method to estimate the effects of mutations from these sequences. The method counts how many times each mutation occurs on the branches of a phylogenetic tree and compares that count to the count expected under neutral mutation. However, the method assumes that the effect of a mutation at a site does not depend on the sequence at other sites. To estimate shifts in effects, it must divide the tree into clades chosen in advance and make a separate estimate for each clade. Here we train a deep-learning model on the entire SARS-CoV-2 tree. Because the model estimates the effects of mutations as a function of the entire sequence, it has the potential to learn a fitness landscape in which the effect of a mutation at each site depends on the sequence at all other sites. Indeed, the model learns numerous large shifts in fitness effects supported by the underlying mutation counts and in some cases independent experimental data. Further, the model's estimated effects correlate with deep mutational scanning measurements better than those of clade-specific counts models, most notably for recent clades. Against the same measurements, our model also outperforms a recent deep-learning model that does not separate the neutral mutation rate from selection. This result suggests that separating the two helps isolate the fitness effects of mutations. We also demonstrate that, under suitable conditions, the ratio of observed to expected counts in the method of Bloom and Neher is the maximum-likelihood estimate of the selection factor in a context-free version of our model. Overall, we show how deep learning can be used to estimate a shifting fitness landscape from millions of viral sequences.