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
Most state-of-the-art protein language models (pLMs), such as the industry-standard ESM-2, are built on the Transformer architecture. While powerful, Transformers suffer from two major bottlenecks in biological modeling: quadratic computational complexity and contextual isolation. The quadratic cost of self-attention effectively caps the context window (typically at 1024 amino acids), ignoring long proteins like Titin and multi-protein complexes. Furthermore, standard pLMs treat proteins as isolated strings, failing to account for the functional "neighborhoods" found in protein-protein interaction (PPI) graphs.
To address these limitations, we introduce LC-PLM, a model based on Bidirectional Mamba (SSM). By leveraging linear-scaling state-space models and a novel graph-contextualized training stage, LC-PLM achieves superior length extrapolation and scaling efficiency compared to traditional Transformer-based models.
Methodology
LC-PLM replaces the Transformer's attention mechanism with a Selective Structured State-Space Model (SSM), specifically a modified version of Mamba.
BiMamba-S Architecture
To handle the non-directional nature of protein sequences, we utilize a bidirectional Mamba architecture. A key innovation is BiMamba-S (Shared Projection Layers), where linear projection layers are shared between the forward and backward paths. This effectively doubles the model depth without increasing the parameter count, resulting in a 4.5% improvement in evaluation loss.
Two-Stage Training
- Stage 1 (LC-PLM): Standard Masked Language Modeling (MLM) on individual protein sequences from UniRef50 to learn universal representations.
- Stage 2 (LC-PLM-G): A "graph-contextual" stage where the model is trained on random walks sampled from PPI graphs. By concatenating multiple protein sequences separated by special tokens (e.g.,
[BON],[EON],[EDGE]), the model learns to represent proteins within their functional biological context.
Scaling and Performance
LC-PLM demonstrates significantly more favorable neural scaling laws than ESM-2. For any given computational budget or parameter count, LC-PLM achieves lower cross-entropy loss. On average, LC-PLM shows a 13.5% improvement in evaluation loss over ESM-2 models of comparable size.
In downstream benchmarks, LC-PLM-740M (trained on 1T tokens) outperformed ESM-2 650M by 30% on CASP15-multimers and 16% on CASP14 (measured by TM-score). The graph-contextualized variant (LC-PLM-G) further improved remote homology prediction by over 35%, proving that PPI information helps identify distantly related protein folds.
Length Extrapolation
One of the most critical advantages of the SSM-based architecture is its ability to extrapolate to sequences much longer than those seen during training. While Transformers often see performance degradation when exceeding their training window, LC-PLM maintains consistent performance on sequences up to 8,192 amino acids.
Conclusion
Our results suggest that Mamba-based architectures are uniquely suited for protein modeling, likely because the small vocabulary of amino acids (~20 tokens) allows SSMs to learn highly effective compressed state representations. Future work will explore hybrid architectures combining SSM efficiency with Multi-Head Attention for local pattern matching, as well as more sophisticated negative sampling techniques for graph-based training.
Summary updated