Abstract
Self-supervised training of language models (LMs) has seen great success for protein sequences in learning meaningful representations and for generative drug design. Most protein LMs are based on the Transformer architecture trained on individual proteins with short context lengths. Such protein LMs cannot extrapolate to longer proteins and protein complexes well. They also fail to account for the underlying biological mechanisms carried out by biomolecular interactions and dynamics i.e., proteins often interact with other proteins, molecules, and pathways in complex biological systems. In this work, we propose LC-PLM based on an alternative protein LM architecture, BiMamba-S, built upon selective structured state-space models, to learn high-quality universal protein representations at the amino acid token level using masked language modeling. We also introduce its graph-contextual variant, LC-PLM, which contextualizes protein-protein interaction (PPI) graphs for a second stage of training. LC-PLM demonstrates favorable neural scaling laws, better length extrapolation capability, and up to 30% and 16% improvements on protein downstream tasks compared to Transformer-based ESM-2 when trained with 100B and 1T tokens, respectively. LC-PLM-G further trained within the context of PPI graphs shows promising results on protein structure and function prediction tasks. Our study demonstrates the benefit of increasing the context size with computationally efficient LM architecture (e.g., structured state space models) in learning universal protein representations and incorporating molecular interaction contexts contained in biological graphs.
Introduction
For years, the Transformer architecture—exemplified by the ESM-2 series—has been the standard for protein language models (pLMs). However, Transformers suffer from quadratic computational complexity relative to sequence length. While most individual proteins fit within standard 1,024-token context windows, critical biological tasks require reasoning over much longer distances. Predicting the 3D structures of protein complexes, understanding genomic interactions, and modeling massive proteins like Titin (34,000 amino acids) necessitate a shift toward long-context modeling. Furthermore, standard pLMs treat proteins as isolated strings, ignoring the rich protein-protein interaction (PPI) networks that define biological function.
Methods
LC-PLM (Long-Context Protein Language Model) addresses these limitations by replacing the Transformer with BiMamba-S, a bidirectional variant of the Mamba architecture.
BiMamba-S with Shared Projections
Standard Mamba is unidirectional. To capture the bidirectional nature of protein sequences, LC-PLM utilizes both forward and backward scans. A key innovation is the "Shared Projection Layer," where forward and reverse modules share linear weights. This design allows the model to be twice as deep as a standard Mamba model with the same parameter count, significantly improving sample efficiency.
Two-Stage Training Strategy
- Stage 1 (LC-PLM): The model undergoes standard Masked Language Modeling (MLM) on individual protein sequences from UniRef50 and UniRef90 to learn universal amino acid representations.
- Stage 2 (LC-PLM-G): This "graph-contextual" stage trains the model on random walks through PPI graphs. Using special tokens like
[BON](Beginning of Node) and[EDGE], the model learns to reason across multiple interacting proteins within a single long-context window, effectively treating a biological graph walk as a long "sentence."
Results and Discussion
Neural Scaling and Efficiency
LC-PLM exhibits a "sharper" neural scaling law than Transformers for protein data. As parameter counts and token counts increase, LC-PLM’s performance improves at a faster rate than ESM-2. When scaled to 1T tokens, LC-PLM showed a 16% improvement over the public ESM-2 model across various tasks.
Length Extrapolation and Inference
As a State Space Model (SSM), LC-PLM handles sequences longer than those seen during training far more gracefully than Transformers using Rotary Positional Embeddings (RoPE). While slightly slower on very short sequences, LC-PLM is significantly more memory-efficient for sequences longer than 2,048 tokens, avoiding the memory bottlenecks common in attention-based models.
Downstream Performance
On structure prediction tasks, LC-PLM-740M outperformed ESM-2-650M by up to 30% on CASP15-multimer benchmarks. For functional accuracy, the graph-contextual LC-PLM-G achieved a state-of-the-art accuracy of 0.8925 on the ogbn-proteins dataset, outperforming specialized graph neural networks.
Conclusion
LC-PLM demonstrates that moving beyond the Transformer architecture to efficient SSMs like BiMamba-S enables superior scaling and long-context reasoning for proteomics. Future work will explore incorporating explicit 3D structure-aware signals directly into the sequence modeling process and investigating hybrid architectures that combine local attention with long-range SSM efficiency.
Summary updated