henhaobio
Sign in

bioRxivSynthetic BiologyPreprint

Transformer protein language models are unsupervised structure learners

Roshan RaoiD, Joshua MeieriD, Tom SercuiD, Sergey OvchinnikoviD, Alexander W. RivesiD

PDFDOI

Abstract

AO_SCPLOWBSTRACTC_SCPLOWUnsupervised contact prediction is central to uncovering physical, structural, and functional constraints for protein structure determination and design. For decades, the predominant approach has been to infer evolutionary constraints from a set of related sequences. In the past year, protein language models have emerged as a potential alternative, but performance has fallen short of state-of-the-art approaches in bioinformatics. In this paper we demonstrate that Transformer attention maps learn contacts from the unsupervised language modeling objective. We find the highest capacity models that have been trained to date already outperform a state-of-the-art unsupervised contact prediction pipeline, suggesting these pipelines can be replaced with a single forward pass of an end-to-end model.1

In-depth summary

Claude Opus 5.5 · xhigh effort · 17 Oct 2026 · from the full text of version 1 (15 Dec 2020) · CC BY-NC-ND 4.0

Attention maps of the 650M-parameter protein language model ESM-1b, read out by a logistic regression fitted on 20 proteins, predict contacts better on average than Gremlin's alignment-based Potts models.

Unsupervised contact prediction has long relied on multi-stage pipelines that search sequence databases, build multiple sequence alignments (MSAs) and fit a Potts model per protein family, and earlier protein language models had not matched them. Here contacts are read directly from a pre-trained Transformer's self-attention in one forward pass, which the paper reports as the first time a language model beats these decades-optimised methods in the unsupervised setting.

Key results

  1. ShownWith a sparse logistic regression on attention maps trained on 20 proteins, ESM-1b predicts short-, medium- and long-range contacts more precisely than Gremlin, both with matched sequence data and, on average, when Gremlin gets optimised trRosetta MSAs that include metagenomic sequences.

    Test set of 14842 trRosetta proteins (20 used for training, 20 for validation); confidence intervals within 0.5 percentage points. Gremlin ran on Jackhmmer MSAs built from the ESM training set (a UniRef50 subset) or on trRosetta MSAs from UniRef100 plus metagenomics. The per-range precision table is not in this text; on 15 CASP13 free-modelling domains ESM-1b also beats Gremlin. · 5 Results; 1 Introduction; 4.2 Gremlin; A.6 Results on CASP13

  2. ShownContacts are learned in unsupervised pre-training, not by the supervised read-out: a single training protein, a few top heads with the regression weights discarded, or Gremlin-derived pseudo-labels instead of structures already roughly match or beat Gremlin.

    One training protein: long-range top-L precision 39.2, not distinguishable from Gremlin (p > 0.05); 10 beat it on all metrics. Over 100 bootstrapped fits, mean 35.6 (SD 8.9) with 1 protein, 40.1 (SD 0.3) with 20. Top-5 heads averaged beat Gremlin on matched data; MSA-derived labels give long-range P@L 39.9. A bilinear model on 700x more structures: 20.1 vs 18.6 for the regression. · Low-N; Top Heads; MSA Only; 5 Results

  3. ShownThe advantage is largest for short- and medium-range contacts and for proteins with shallow alignments; at long range, against Gremlin with metagenome-augmented MSAs, ESM-1b is only slightly better and wins on just over half of proteins.

    ESM-1b has higher long-range P@L than Gremlin (trRosetta MSAs) on 55% of test proteins and is better at short and medium range at every MSA depth. At long range it wins for MSA depth < 1000 and also > 16000, where Gremlin is known to plateau. With matched sequence data it beats Gremlin at all ranges regardless of depth. · 5.3 Performance Distribution; A.7 Performance Distribution

  4. SuggestedLong-range contact precision is linearly related to masked-language-model validation perplexity within each model family, so perplexity can serve as a proxy for how much structure a model has learned, and both scale and hyperparameters matter.

    At equal perplexity the 12-layer ESM-1 matches the long-range P@L of the 34-layer ESM-1. ESM-1 and ESM-1b (similar parameter counts, different hyperparameters and architecture) each show a linear trend but are not directly comparable because they use different masking. The plotted values are not in this text. · 5.5 Perplexity vs. Contact Precision

  5. ShownThe regression's contact probabilities are well calibrated, most false positives sit next to true contacts, and ESM-1b tolerates long alanine insertions, consistent with an implicit alignment of the sequence.

    Calibration mean-squared error 0.014 for ESM-1b vs 0.074, 0.028 and 0.020 for 6-, 12- and 34-layer ESM-1. False positives are mostly within Manhattan distance 1-4 of a true contact; in one homodimer example, distant ones matched inter-chain contacts. On 1000 sequences, precision holds up to 256 alanines inserted at either end and 64 in the middle; TAPE lost 12 points after 8 alanines on 1a27. · 5.6 Calibration, False Positives, and Robustness; A.11 Model Calibration and False Positives; A.12 Alignment

Methods, data and reproducibility

Attention maps from pre-trained protein Transformers (chiefly ESM-1b; also ESM-1, ProtBert-BFD and TAPE) are symmetrised, corrected with average product correction (APC) and fed to an L1-regularised logistic regression trained on 20 proteins, which keeps 102 of 660 ESM-1b heads. Contact precision at L, L/2 and L/5 is compared with Gremlin Potts models fitted to Jackhmmer or trRosetta MSAs.

  • trRosetta training-set proteins (up to 1024 residues, Jackhmmer MSA built): 20 for regression training, 20 for validation, 14842 for testing · n = 14882
  • CASP13 free-modelling domains with publicly released structures · n = 15
  • UniRef50, the ESM-1/ESM-1b pre-training corpus; the ESM training subset was searched with Jackhmmer for the matched-data Gremlin baseline
  • Netsurf secondary-structure training proteins, evaluated on the CB513 test set (3-class) · n = 100 of 8678 training proteins
  • Protein families used for evolutionary fine-tuning of ESM-1b · n = 380
  • Randomly chosen sequences shorter than 512 residues for the alanine-insertion robustness test · n = 1000
Methods & tools
ESM-1b, ESM-1, ProtBert-BFD, TAPE Transformer, Gremlin, mfDCA, PSICOV, Jackhmmer 3.3.1, scikit-learn, bilinear contact predictor (baseline)
Reagents & environment
Jackhmmer 3.3.1 (bitscore threshold 27, 8 iterations) and scikit-learn for the logistic regression (lambda 0.15, minimum sequence separation 6); no other software versions, containers or requirement files are given.
Reproducibility gaps
The text says ESM-1 and ESM-1b weights can be downloaded, but the link target is missing from this extraction; no code or data URL is printed, and hardware and run times are not reported.
Limitations (6)
  • Per-protein results are mixed: against Gremlin with UniRef100 plus metagenomic MSAs, ESM-1b's long-range advantage is slight (higher long-range P@L on 55% of test proteins). · stated by the authors
  • The default read-out is a regression supervised with solved structures (20 proteins); with a single training protein, long-range top-L precision varies widely (SD 8.9). Gremlin-derived MSA labels can stand in for structures. · stated by the authors
  • Predictions change considerably depending on which family member is fed in, and the MSA query sequence is not necessarily the best input. · stated by the authors
  • Even at a 0.9 probability threshold, 52.5% of proteins have at least one predicted contact more than Manhattan distance 4 from the nearest true contact; one such case was a homodimer's inter-chain contacts, and the authors say these modes' frequency needs more analysis. · stated by the authors
  • No 3D structure prediction is attempted, and proteins longer than 1024 residues (43 removed) fall outside ESM-1b's context window. · stated by the authors
  • Main-benchmark proteins are not described as filtered against ESM-1b's UniRef50 pre-training data; only the 15 CASP13 domains are said to post-date it. · noted in this summary

Read this if you predict residue contacts or structure from sequence and want evidence on whether language-model attention can stand in for MSA-based coevolution analysis such as Gremlin.

Citations
341

Reproducibility ledger

Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.

Sign in to file a reproducibility report.

Similarity Map
SelectedSame fieldCross-field
THISBhattachary '21Rao '21Zhang '24Li '24Chen '23Shen '26
81% semantic matchBioinformatics
Nicholas Bhattacharya, Neil Thomas, Roshan Rao+5 more·Pacific Symposium on Biocomputing (PSB)·Nov 28, 2021· 20 citations