Search

Search papers and lessons

Highly accurate protein structure prediction with AlphaFold

John Jumper, Richard Evans, Alexander Pritzel et al. · 2021

AlphaFold 2 predicts a protein's 3D shape from its amino acid sequence and related sequences with near-experimental accuracy in most cases, and it reports its own confidence per residue.

On this page

  • Colour = topic mix
  • Calculus
  • Linear algebra
  • Discrete math
  • Classical mechanics
  • Quantum physics
  • Probability
  • ReadReady to readNot yet

TL;DR

Predicting the three-dimensional shape of a protein from its amino acid sequence was an open problem, and the best methods were far from experimental accuracy when no close relative of the protein had a known structure. AlphaFold 2 is a neural network that reads the sequence together with a family of related sequences and outputs the position of every heavy atom. In the blind CASP14 test it was competitive with experiment in most cases, and it attaches a per-residue confidence score to each prediction.

Builds on: Protein Structure, Multiple Sequence Alignment, Attention Mechanism, Rigid Body Transformation, Equivariance · Leads to: Protein Residue Distance Map, Knowledge Distillation

Why it mattered

The method became a standard tool in structural biology. A companion paper reports predictions for the whole human proteome, and the network's outputs have been used for molecular replacement in X-ray crystallography and for interpreting cryogenic electron microscopy maps. Because the network outputs coordinates directly, one model takes about one GPU minute for a 384-residue protein, which makes large-scale prediction practical.

The problem

A protein is a chain of amino acids. The chain folds into a specific three-dimensional shape, and that shape decides what the protein does. Experimental methods such as X-ray crystallography, NMR and cryogenic electron microscopy determine shapes, but each structure can take months to years. By the time of the paper, about 100,000 unique protein structures had been determined, while billions of protein sequences were known.

Computational methods came in two families. Physical methods simulate the forces between atoms. They are principled but too expensive for moderate-sized proteins, and their energy models are not accurate enough. Evolutionary methods use the fact that residues in contact in the folded shape tend to change together across related sequences. They work well when a close homologue has a known structure, but they fall well short of experimental accuracy otherwise. The gap the paper addresses is the case with no similar structure in the database.

How it works

Take one small instance: a protein of three residues, with two related sequences in its alignment. The numbers below are a toy, chosen only to show the shapes of the data.

  1. Input. The model receives the target sequence and an alignment of related sequences, called a multiple sequence alignment (MSA). Say the alignment has 2 sequences and the protein has 3 residues. The MSA is a 2 by 3 grid of amino acids.
  2. Embed both views. The model turns the MSA into a representation with one row per sequence and one column per residue, and it turns every pair of residues into a second representation, a 3 by 3 grid of pair features. Check: the MSA grid has 2 by 3 = 6 cells, and the pair grid has 3 by 3 = 9 cells.
  3. Trade information in the Evoformer. A block called the Evoformer passes information in both directions. The MSA updates the pairs through an outer product summed over the sequences, and the pairs bias the attention within the MSA. Check: after one block, each pair cell has seen evidence from both sequences.
  4. Repeat. The Evoformer is stacked 48 times in the paper's main network. Each block refines the pair grid further, so the representation becomes more consistent.
  5. Build the structure. The structure module gives each residue a rigid frame: a rotation and a translation, in the paper's terms the N, C-alpha and C atoms of that residue. All frames start at the identity and the origin. Each step updates them. Check: after the last update, each residue has one frame, so three residues give three frames.
  6. Read out the atoms and the confidence. From the frames and a few angles the model places every heavy atom. A separate head gives a per-residue confidence, called pLDDT.
  7. Recycle. The whole network can be run again on its own output, so the earlier answer becomes a starting point for the next pass.
flowchart LR
  A["Sequence and alignment"] --> B["Evoformer stack: MSA and pair representations"]
  B --> C["Structure module: one rigid frame per residue"]
  C --> D["All heavy atoms and per-residue confidence"]
  C -->|recycle| B

The math

The paper's notation uses N_seq for the number of sequences and N_res for the number of residues. The MSA representation is an N_seq by N_res array, and the pair representation is an N_res by N_res array.

Step 2 in symbols: the two arrays

Let m be the MSA representation with entries m_{s,i}, one per sequence s and residue i. Let z be the pair representation with entries z_{ij}, one per pair of residues. The outer-product update that moves information from the MSA into the pairs has the form

zij←zij+∑sf(ms,i,ms,j)z_{ij} \leftarrow z_{ij} + \sum_{s} f(m_{s,i}, m_{s,j})

where f is a learned function and the sum runs over the sequences, which is why the step needs an MSA with several sequences.

Step 5 in symbols: frames

Each residue r has a rotation matrix R_r and a translation vector t_r. An atom at position x in the global frame sits at R_r^T (x - t_r) in the frame of residue r. Keeping positions in local frames is what lets the network treat each residue's side chain relative to its own backbone.

The frame-aligned point error

The training loss compares predicted and true atom positions under many alignments. For each frame k with predicted rotation R_k and translation t_k, and a true frame with rotation R_k' and translation t_k', define the distance of atom i in that frame as

dki=∥Rk⊤(xi−tk)−Rk′⊤(xi′−tk′)∥d_{ki} = \left\lVert R_k^{\top}(x_i - t_k) - R_k'^{\top}(x_i' - t_k') \right\rVert

where x_i is the predicted position and x_i' the true one. The loss averages a clamped version of this distance over all frames and atoms. The clamp stops one badly placed atom from dominating the gradient. Because every frame is used as a reference, the loss rewards atoms that are right relative to each residue's own backbone, which is where side-chain contacts are decided.

Confidence

The paper fits a linear relation between its confidence score and true accuracy on recent structures:

lDDT-Cα≈0.997×pLDDT−1.17\mathrm{lDDT}\text{-}\mathrm{C}_\alpha \approx 0.997 \times \mathrm{pLDDT} - 1.17

with a Pearson correlation of 0.76 on 10,795 chains. The slope of 0.997 is close to 1, so pLDDT tracks lDDT-Cα closely and can be read as an estimate of a residue's accuracy on the 0 to 100 scale.

Results

The main test was CASP14, a blind assessment in which the structures were not public when the predictions were made. Measured on 87 CASP14 protein domains:

  • The median backbone accuracy of AlphaFold was 0.96 Å r.m.s.d._95, with a 95% confidence interval of 0.85 to 1.16 Å. The next best method had a median of 2.8 Å, with a confidence interval of 2.7 to 4.0 Å.
  • The median all-atom accuracy of AlphaFold was 1.5 Å r.m.s.d._95, against 3.5 Å for the best alternative.
  • The network predicted a 2,180-residue protein with no structural homologues, with accurate domains and domain packing.

On a set of 3,144 recent PDB chains that were newer than the training data, the median backbone r.m.s.d. was 1.46 Å. The limits are stated plainly by the authors. Accuracy falls when the median alignment depth is below about 30 sequences. It is weaker for chains whose shape depends mostly on other chains in a complex. Ablations show that removing the metagenomic databases costs accuracy on the CASP14 set: removing BFD cost 0.4 GDT on average, removing MGnify cost 0.7, and removing both cost 6.1.

Reading guide

Check yourself

QuestionWhat does the MSA representation store, and what does the pair representation store?Show answer
The MSA representation has one row per sequence and one column per residue, so it holds the evolutionary evidence for each residue. The pair representation has one entry per pair of residues, so it holds the relation between residues that the structure has to satisfy.
QuestionThe paper reports a median backbone r.m.s.d._95 of 0.96 Å for AlphaFold and 2.8 Å for the next best method. How many times smaller is AlphaFold's error?Show answer
The ratio is 2.8 divided by 0.96, which is about 2.9. So AlphaFold's median backbone error is about a third of the next best method's.
QuestionWhy does the structure module use a frame for each residue instead of placing atoms directly in the global frame?Show answer
A frame per residue lets the loss and the attention describe each side chain relative to its own backbone. The side chain's position is then strongly constrained by the frame, and the same local reasoning works for every residue, which makes the update equivariant to global rotations and translations.
QuestionA new protein has only 20 sequences in its alignment. The paper says accuracy falls when the median depth is below about 30. Should you expect the prediction to be less reliable?Show answer
Yes. The paper reports that accuracy decreases substantially below a median alignment depth of around 30 sequences, so a 20-sequence alignment sits in the range where the authors observed weaker results. The pLDDT score should show lower confidence for such a case.
QuestionWhy did removing both metagenomic databases cost more accuracy than removing either one alone?Show answer
The two databases have mostly overlapping effects, but having at least one matters for target classes poorly represented in UniRef, and the paper finds both are needed for full CASP accuracy. Removing both costs 6.1 GDT on average, compared with 0.4 for removing BFD alone and 0.7 for removing MGnify alone.

Sources

Read the full paper

John Jumper, Richard Evans, Alexander Pritzel et al., 2021.