ProSST: Protein Language Modeling with Quantized Structure and Disentangled Attention

Mingchen Li, Yang Tan, Xinzhu Ma, Bozitao Zhong, Huiqun Yu, Ziyi Zhou, Wanli Ouyang, Bingxin Zhou, Pan Tan, Liang Hong

Abstract

Protein language models (PLMs) have shown remarkable capabilities in various protein function prediction tasks. However, while protein function is intricately tied to structure, most existing PLMs do not incorporate protein structure information. To address this issue, we introduce ProSST (also referred to as DeProt), a Transformer-based protein language model that seamlessly integrates both protein sequences and structures. ProSST incorporates a structure quantization module and a Transformer architecture with disentangled attention. The structure quantization module translates a 3D protein structure into a sequence of discrete tokens by first serializing the protein structure into residue-level local structures and then embeds them into dense vector space. These vectors are then quantized into discrete structure tokens by a pre-trained clustering model. These tokens serve as an effective protein structure representation. Furthermore, ProSST explicitly learns the relationship between protein residue token sequences and structure token sequences through the sequence-structure disentangled attention. We pre-train ProSST on millions of protein structures using a masked language model objective, enabling it to learn comprehensive contextual representations of proteins. To evaluate the proposed ProSST, we conduct extensive experiments on the zero-shot mutation effect prediction and several supervised downstream tasks, where ProSST achieves the state-of-the-art performance among all baselines.

Introduction

While Protein Language Models (PLMs) have revolutionized bioinformatics by treating protein sequences like natural language, they traditionally suffer from a "blind spot": the absence of explicit 3D structural information. Since a protein’s function is dictated by its shape, ignoring structure limits a model's ability to understand complex biological properties like catalytic sites or binding pockets.

Previous attempts to integrate structure have struggled with two main issues:

  1. Overfitting: Using raw 3D coordinates often leads models to "memorize" specific structures rather than learning generalizable patterns.
  2. Granularity: Existing quantization methods often focus on global protein shapes, potentially overlooking the local nuances of individual residues that are critical for function.

Methods

The DeProt architecture introduces two primary innovations to solve these challenges: a structure quantization module and a disentangled attention mechanism.

1. Structure Quantization Module

Instead of feeding raw coordinates into the Transformer, DeProt converts local 3D structures into discrete "tokens."

Overview of the structure quantization pipeline, including training the structure encoder, clustering local structures, and final serialization.
  • Serialization: For every residue, the model looks at its 40 nearest neighbors and uses a Graph Neural Network (GNN) based auto-encoder to create a vector representation of that local neighborhood.
  • Quantization: These vectors are then clustered using k-means (with a vocabulary size $K=2048$). Each local structure is assigned a discrete token from this "codebook." This discretization acts as a regularizer, preventing the model from overfitting to the noise inherent in predicted structures.

2. Disentangled Attention

Standard Transformers use self-attention where a single vector represents a token. DeProt adopts a disentangled attention mechanism (inspired by the DeBERTa architecture). It calculates attention scores by explicitly modeling the interactions between three distinct components:

  • Residue (R): The amino acid type.
  • Structure (S): The quantized local structure token.
  • Position (P): The relative distance between residues.
The disentangled attention mechanism models interactions between residue, structure, and position components.

The final attention weight is a sum of five specific interactions: $R \to R$, $R \to S$, $R \to P$, $S \to R$, and $P \to R$. This allows the model to understand how a specific amino acid's meaning changes based on its local 3D environment.

Datasets and Evaluation

  • Pre-training: The model was trained on 18.8 million protein structures curated from the AlphaFoldDB, filtered for high-confidence (pLDDT) structures.
  • Zero-shot Evaluation: ProteinGYM, a massive benchmark containing over 3.5 million mutated sequences across 217 assays.
  • Supervised Downstream Tasks: The model was evaluated on benchmarks including FLIP (thermostability), DeepLoc (sub-cellular localization), TAPE (metal ion binding), and DeepFRI (Gene Ontology annotation).

Key Results and Insights

DeProt demonstrates that the "grammar" of proteins is written in local folds. Despite having only 110 million parameters, DeProt outperformed "heavyweight" models like ESM-2 (650M) and SaProt (650M).

  • Zero-shot Mutant Effect Prediction: On the ProteinGYM benchmark, DeProt achieved a Spearman correlation ($\rho_s$) of 0.502, significantly higher than SaProt (0.426) and ESM-2 (0.414).
  • Stability Prediction: DeProt was particularly dominant in predicting protein stability, achieving a $\rho_s$ of 0.663 on the ProteinGYM-Stability subset, outperforming ESM-IF1 (0.624).
  • Supervised Tasks: In downstream fine-tuning, DeProt set new state-of-the-art benchmarks for DeepLoc (94.68% accuracy) and Metal Ion Binding (76.67% accuracy).

Ablation studies confirmed that a vocabulary size of $K=2048$ for structure tokens provided the optimal balance between detail and generalization. Furthermore, removing the Structure-to-Residue ($S \to R$) attention component caused a significant performance drop, proving the model's reliance on structural context.

Conclusion

DeProt bridges the gap between sequence and structure in protein language modeling. By quantizing local structural motifs and employing disentangled attention, it achieves superior performance with a fraction of the parameters of larger models. Future work will explore scaling the model and improving the efficiency of local structure encoding.

Summary updated

BibTeX
@inproceedings{li2024prosst,
  author = {Mingchen Li and Yang Tan and Xinzhu Ma and Bozitao Zhong and Huiqun Yu and Ziyi Zhou and Wanli Ouyang and Bingxin Zhou and Pan Tan and Liang Hong},
  title = {{ProSST: Protein Language Modeling with Quantized Structure and Disentangled Attention}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=4Z7RZixpJQ},
}
Figure