A systematic evaluation of the language-of-viral-escape model using multiple machine learning frameworks

Brent E. Allman, Luiz Ângelo Vieira, Daniel J. Diaz, Claus O. WilkeJournal of The Royal Society Interface 2025

TL;DR

This paper systematically evaluates a proposed "language-of-viral-escape" model, which uses protein language models to predict viral mutations' viability and immune escape potential. While grammaticality shows some promise for predicting viability, semantic change proves to be a poor predictor of immune escape, suggesting that more specialized machine learning approaches are needed.

What Problem Does This Paper Address?

Identifying viral variants with significant implications for public health, such as those exhibiting immune escape or increased disease burden, is crucial for effective pandemic response. Traditional methods like experimental testing are labor-intensive and slow. In 2021, a novel approach was proposed using protein language models (pLMs) to predict two quantities: "grammaticality" (analogous to protein viability) and "semantic change" (analogous to immune escape potential). This paper aims to rigorously test the effectiveness of this language-of-viral-escape model, particularly in the context of SARS-CoV-2, by leveraging more recent and extensive high-throughput datasets and comparing it against other state-of-the-art machine learning models.

Methods

The study employs a range of machine learning models to assess grammaticality and semantic change. For grammaticality, they evaluate:

  • Language Models: The original BiLSTM model proposed by Hie et al. [10], and the more general ESM2 model (both in "unmasked" and "masked" inference modes).
  • Structure-Based Models: MutComputeX, MutRank, and Stability Oracle, which leverage protein structural information.
  • EVE: A model trained on evolutionary data to predict protein fitness.

For semantic change, they primarily use the language models (Hie et al.'s BiLSTM and ESM2) and a specialized model called EVEscape, which integrates multiple predictive components. The researchers standardize model outputs by ranking and normalizing them to allow for direct comparison across different models.

Datasets

The study utilizes several key datasets for evaluation:

  • SARS-CoV-2 Spike Protein DMS Data: A large deep mutational scanning (DMS) dataset [7] providing measurements for both viability and immune escape for a substantial number of mutations. This dataset significantly expands upon the data available to the original language-of-viral-escape model.
  • Influenza HA and HIV Env Data: Datasets from previous studies [4, 19-21] were used to assess the generalization of the models across different viral systems.
  • SARS-CoV-2 Omicron BA.1 and Delta Variants Data: Datasets from specific variants [18] were used for further validation.
  • Antibody Binding Data: A comprehensive dataset of 32,768 SARS-CoV-2 spike protein variants with measured binding affinities to four antibodies and the ACE2 receptor [5, 6]. This dataset allows for a more nuanced assessment of semantic change's correlation with antibody binding.

Key Insights and Ideas

  • Grammaticality as a Proxy for Viability: The study confirms that grammaticality, particularly when derived from masked language models or structure-based approaches, can indeed serve as a reasonable indicator of whether a viral mutation is likely to be viable.
  • Semantic Change Falls Short for Immune Escape: The core hypothesis that semantic change from pLMs can predict immune escape is largely unsupported by the data. This suggests that the "meaning" captured by pLMs in terms of sequence embeddings is not sufficiently nuanced to distinguish escape mutations.
  • Structure and Biophysics Outperform pLMs for Viability: For predicting protein viability, structure-based models (like Stability Oracle) and biophysically informed models (like EVE) generally outperform pLMs, especially when fine-tuned on experimental data like ΔΔG (change in free energy).
  • Masked vs. Unmasked pLM Inference: The study highlights a critical difference in how pLMs are used for grammaticality prediction. Masked inference (where the model predicts a masked amino acid based on context) is found to be more reliable than unmasked inference, which can produce misleading results.
  • Interdependence of Grammaticality and Semantic Change: A weak negative correlation was observed between grammaticality and semantic change, suggesting these concepts are not entirely independent and might be confounded.

Key Results

  • Viability Prediction: Most models, except for the unmasked ESM2, showed significantly higher grammaticality scores for viable mutations compared to non-viable ones. Stability Oracle and EVE demonstrated the strongest separation.
  • Immune Escape Prediction: For SARS-CoV-2 spike, no significant difference in semantic change was found between escape and non-escape mutations across language models. EVEscape showed some promise but was not consistently effective across all viral systems.
  • Antibody Binding Correlation: Semantic change showed a weak to moderate negative correlation with antibody binding affinity. While it could distinguish between binding and non-binding variants for some antibodies, the effect size was small, and it failed to correlate with ACE2 receptor binding.
  • Model Performance: Structure-based models and EVE generally outperformed pLMs for predicting viability. EVEscape showed better performance for immune escape prediction than raw semantic change scores but still had limitations.

Limitations and Future Work

  • Limitations of Semantic Change: The paper concludes that semantic change, as defined by embedding distances, is not a reliable predictor of immune escape. Its correlation with antibody binding is weak and it doesn't consistently capture the complex interplay of factors required for immune evasion.
  • Grammaticality vs. Biophysical Measures: While grammaticality is informative for viability, biophysically grounded measures like protein stability (ΔΔG) appear to be more robust predictors.
  • Future Directions: The authors advocate for moving beyond zero-shot predictions from pLMs. Instead, they suggest fine-tuning representations from pretrained models in a supervised framework to predict specific phenotypes like immune escape. They also highlight the potential of integrating biophysical models and experimental data for more accurate predictions. The development of more sophisticated models like EVEscape, which combine multiple predictive components, is also seen as a promising avenue.

Summary updated

Abstract

Predicting the evolutionary patterns of emerging and endemic viruses is key for mitigating their spread. In particular, it is critical to rapidly identify mutations with the potential for immune escape or increased disease burden. Knowing which circulating mutations pose a concern can inform treatment or mitigation strategies such as alternative vaccines or targeted social distancing. In 2021, Hie B, Zhong ED, Berger B, Bryson B. 2021 Learning the language of viral evolution and escape. <i>Science</i> <b>371</b>, 284-288. (doi:10.1126/science.abd7331) proposed that variants of concern can be identified using two quantities extracted from protein language models, grammaticality and semantic change. These quantities are defined by analogy to concepts from natural language processing. Grammaticality is intended to be a measure of whether a variant viral protein is viable, and semantic change is intended to be a measure of potential for immune escape. Here, we systematically test this hypothesis, taking advantage of several high-throughput datasets that have become available, and also comparing this model with several more recently published machine learning models. We find that grammaticality can be a measure of protein viability, though methods that are trained explicitly to predict mutational effects appear to be more effective. By contrast, we do not find compelling evidence that semantic change is a useful tool for identifying immune escape mutations.
BibTeX
@article{allman2025systematic,
  author = {Brent E. Allman and Luiz Ângelo Vieira and Daniel J. Diaz and Claus O. Wilke},
  title = {{A systematic evaluation of the language-of-viral-escape model using multiple machine learning frameworks}},
  journal = {Journal of The Royal Society Interface},
  year = {2025},
  doi = {10.1098/rsif.2024.0598},
}

Loading related content...

Figure