NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

MSA Transformer

Roshan Rao, Jason Liu, Robert Verkuil, Joshua Meier, John F. Canny, Pieter Abbeel, Tom Sercu, Alexander RivesICML 2021

The MSA Transformer bridges the gap between traditional evolutionary biology and modern deep learning by taking Multiple Sequence Alignments (MSAs) as direct inputs. By using a novel "tied" axial attention mechanism, it outperforms much larger single-sequence models in protein structure prediction while using a fraction of the parameters.

The Challenge: Single Sequences vs. Evolutionary Families

In computational biology, there have historically been two primary ways to understand protein structure from sequences:

  1. Potts Models: These look at a single family of evolutionarily related sequences (an MSA) and find correlations between positions. They are excellent at finding "co-evolving" residues that likely touch in 3D space. However, they require a massive number of sequences to work effectively and cannot "transfer" knowledge from one protein family to another.
  2. Protein Language Models (PLMs): Models like ESM-1b are trained on millions of individual sequences. They learn "the language of life" and generalize well across different families. Yet, because they only look at one sequence at a time, they miss the rich, direct evolutionary context provided by a full MSA.

The authors tackle the challenge of creating a model that does both: a transformer that can process an entire MSA to extract evolutionary signals, while simultaneously leveraging global biological patterns learned during massive pre-training.

Architecture: Axial Attention and Tied Weights

The core innovation is the MSA Transformer architecture, which treats an MSA as a 2D grid where sequences are rows and aligned positions are columns.

  • Axial Attention: Standard self-attention across an entire MSA would be computationally impossible due to the massive number of tokens. Instead, the model interleaves Row Attention (looking across a single sequence) and Column Attention (looking down a single aligned position).
  • Tied Row Attention: This is the model's "secret sauce." The architecture constrains all sequences in the MSA to share the exact same row-wise attention map. This forces the model to identify a single, consistent contact structure for the entire protein family, effectively mimicking the behavior of a Potts model within a neural network.
Tied Row Attention Architecture

The model was trained using a variant of Masked Language Modeling (MLM). It learns to predict missing amino acids by looking at both the surrounding sequence (horizontal context) and the related sequences in the alignment (vertical context).

Datasets and Pre-training

The model underwent pre-training on a massive dataset of 26 million MSAs derived from UniRef50, totaling 4.3 TB of data.

For evaluation, the authors used several rigorous benchmarks:

  • Unsupervised Contact Prediction: Tested on 14,842 structures from the trRosetta dataset.
  • Supervised Benchmarks: Evaluated on CASP13 and CAMEO test sets.
  • Secondary Structure: Assessed using the CB513 benchmark.

Key Insights: Efficiency and Depth

  • Parameter Efficiency: The MSA Transformer achieves state-of-the-art results with only 100M parameters, outperforming single-sequence models like ESM-1b which boasts 650M parameters. By looking directly at an MSA, the model doesn't have to "memorize" as much biology; it can "read" the evolutionary evidence on the fly.
  • The "Aha" Moment on MSA Depth: Traditional Potts models fail when an MSA is "shallow" (contains very few sequences). The MSA Transformer remains highly accurate even with as few as 8–16 sequences because it uses its pre-trained knowledge to fill in the evolutionary gaps.
  • Dual-Mode Inference: Through ablation studies, the authors found the model uses two distinct signals: covariance (how residues change together) and sequence patterns (learned motifs). If the MSA is shuffled to destroy one signal, the model can often still make a reasonable guess using the other.

Performance Highlights

The empirical results demonstrate a significant leap forward in structural prediction capabilities:

  • Contact Prediction: On the unsupervised contact prediction task, the MSA Transformer achieved a Top-L long-range precision of 57.4%. This is a massive 15-point jump over the previous state-of-the-art single-sequence model (ESM-1b at 41.1%).
  • Potts Model Comparison: The model matched or exceeded the performance of traditional Potts models on 98.5% of tested protein families, showing particular dominance when MSA depth is limited.
MSA Transformer vs Potts Model
  • Secondary Structure: It set a new state-of-the-art on the CB513 benchmark with 73.4% accuracy, outperforming HMM profiles and other PLMs.

Limitations and Future Work

Despite its efficiency, the model faces memory constraints. Even with axial attention, processing large MSAs is memory-intensive. During inference, the authors had to subsample MSAs to a maximum of 256 sequences and 1024 residues.

Furthermore, performance is sensitive to which sequences are selected during this subsampling. "Diversity Maximizing" subsampling works best, but it adds an extra preprocessing step. Future directions include scaling the model further and applying its powerful representations to downstream tasks like protein design and fitness landscape prediction.

Summary updated

BibTeX
@inproceedings{rao2021msa,
  author = {Roshan Rao and Jason Liu and Robert Verkuil and Joshua Meier and John F. Canny and Pieter Abbeel and Tom Sercu and Alexander Rives},
  title = {{MSA Transformer}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
}
Figure