Endowing protein language models with structural knowledge

Philip Hartout, Dexiong Chen, Paolo Pellizzoni, Carlos G. Oliver, Karsten M. Borgwardt

TL;DR

This paper introduces the Protein Structure Transformer (PST), a novel framework that integrates protein structural information into existing transformer-based protein language models (PLMs). PST achieves state-of-the-art performance on various protein function and structure prediction tasks, outperforming the powerful ESM-2 model while being more parameter-efficient.

What Problem Does This Paper Address?

Proteins are the workhorses of biology, and understanding their function is crucial for everything from drug design to deciphering evolutionary processes. While protein language models (PLMs) have revolutionized this field by learning from vast sequence databases, they often struggle with flexibility and practicality due to their sheer size and reliance on massive datasets. Meanwhile, the explosion of computationally predicted protein structures (thanks to tools like AlphaFold) offers a rich source of information that has been largely underutilized by PLMs. Existing attempts to combine structure with PLMs have often been suboptimal, either by simply "overlaying" structural information or by being computationally burdensome. This paper aims to bridge this gap by seamlessly integrating structural data into PLMs to create more effective and efficient models.

Methods

The core innovation of PST lies in its integration of structural information directly into the self-attention mechanism of transformer-based PLMs, specifically building upon the ESM-2 architecture. Instead of just processing sequences, PST uses "structure extractor" modules (implemented as shallow Graph Neural Networks, GNNs) within each self-attention layer. These extractors take both residue embeddings and the protein's structural graph representation as input to capture local structural contexts. This refined self-attention mechanism then updates the query, key, and value matrices used in the standard transformer architecture.

Crucially, PST is initialized with pretrained ESM-2 weights and then further pretrained on a protein structure database (AlphaFold's SwissProt subset) using the same masked language modeling objective as traditional PLMs. This allows PST to leverage existing sequence knowledge while learning to incorporate structural cues. The authors also explore different pretraining strategies, finding that updating only the structure extractors ("Struct Only") can yield performance comparable to updating the entire model ("Full"), offering significant parameter efficiency.

Datasets

The paper utilizes several datasets for training and evaluation:

  • Pretraining: AlphaFold's SwissProt subset (542,378 predicted structures).
  • Function Prediction:
    • Experimentally resolved protein structures for Gene Ontology (GO) terms and Enzyme Commission (EC) numbers.
  • ProteinShake benchmark datasets, including enzyme commission and gene ontology class predictions, protein family (Pfam) labels, and SCOPe labels.
  • Structure Prediction:
    • ProteinShake benchmark datasets for structural classification.
  • Variant Effect Prediction (VEP): Computationally predicted AlphaFold structures of wild-type sequences, with mutations introduced to assess their effect.
  • Deep Mutational Scanning (DMS) datasets: Curated datasets for evaluating protein function prediction under mutation.

The paper emphasizes that it primarily uses existing, well-established datasets and benchmarks, focusing on demonstrating the efficacy of its novel model architecture and pretraining strategy.

Key Insights and Ideas

  • Structure is Key for Smaller Models: While large PLMs like ESM-2 can implicitly learn some structural information from sequences, this is only discernible at scale. PST demonstrates that even minimal structural input is sufficient to make smaller models structure-aware and significantly boost their performance.
  • Parameter Efficiency Matters: PST achieves superior performance with a more manageable parameter count compared to large PLMs, making it more practical for real-world applications.
  • Targeted Pretraining is Viable: Pretraining only the structure extractors ("Struct Only") is nearly as effective as full model pretraining, offering a significant advantage in terms of computational resources and parameter efficiency.
  • Edge Attributes Can Hinder: Surprisingly, incorporating detailed distance information as edge attributes in the protein graph representation decreased performance on downstream tasks. This suggests that the masked language modeling objective might not be complex enough to fully leverage such granular structural features, or that simpler structural encodings are more effective.

Key Results

  • State-of-the-Art Performance: PST consistently outperforms the state-of-the-art sequence-based model, ESM-2, across a wide range of function and structure prediction tasks.
  • Superior Parameter Efficiency: PST models achieve better performance than ESM-2 at comparable model sizes, and even smaller PST models can surpass larger ESM-2 counterparts. For example, PST models with fixed representations show competitive or superior performance to end-to-end models while requiring substantially less computation.
  • Benchmark Achievements: PST sets new benchmarks in Enzyme and Gene Ontology predictions, and performs significantly better than ESM-2 on fold classification.
  • VEP and Binding Site Improvement: PST also shows better performance in tasks like binding site detection and variant effect prediction, indicating improved residue-level representations.
  • "Struct Only" Pretraining: Pretraining only the structure extractors ("Struct Only") yields performance comparable to full model pretraining, with the added benefit of being able to recover ESM-2's sequence representations at inference time by bypassing the structure extractors.

Limitations and Future Work

  • Pretraining Dataset Size: The current pretraining is limited to a dataset of 542K protein structures. The authors note the potential to leverage the much larger AlphaFold Protein Structure Database (over 200 million structures) for even more advanced models, though this will require addressing scalability challenges.
  • Pretraining Objective: The masked language modeling objective might be too simple to fully exploit advanced structural features, suggesting a need for more intricate objectives in future work.
  • Broader Applications: The current evaluations are focused on function and structure prediction. Future work could explore PST's applicability to other tasks like protein-protein interaction modeling or ligand design.
  • Algorithmic Innovations: The authors envision that using more structural data and advanced pretraining objectives will unlock the full potential of the PST paradigm.

Summary updated

BibTeX
@article{hartout2025endowing,
  author = {Philip Hartout and Dexiong Chen and Paolo Pellizzoni and Carlos G. Oliver and Karsten M. Borgwardt},
  title = {{Endowing protein language models with structural knowledge}},
  journal = {Bioinformatics},
  year = {2025},
  doi = {10.1093/bioinformatics/btaf582},
}
Figure