Paper Breakdowns  /  AlphaFold 2
Paper 73~11 min readNature 2021worked math + runnable code
Paper Breakdown

AlphaFold 2,
explained.

A protein is a chain of amino acids that folds, in a fraction of a second, into a precise 3D shape that determines everything it does. Predicting that shape from the sequence alone had defeated biology for fifty years. AlphaFold 2 cracked it — and its key trick isn't chemistry, it's reading evolution. When two spots on the chain touch in the folded protein, they tend to mutate together across related species, because a change in one must be compensated by the other. Find those correlated positions in a family of sequences and you've found the protein's contacts — the scaffold of its shape. Here's how AlphaFold turns that signal into structure.

Video breakdown
The animated walkthrough is in production.
Read the full breakdown below in the meantime ↓
01

A 50-year problem

The protein-folding problem — predict a protein's 3D structure from its amino-acid sequence — was one of biology's great open challenges. Structure determines function: how an enzyme catalyzes, how a receptor binds a drug, how a mutation causes disease. But determining structure experimentally (X-ray crystallography, cryo-EM) is slow and expensive, taking months to years per protein, while sequences pile up by the millions. The dream was to skip the lab and compute the shape.

It resisted because the search space is astronomical and the physics is subtle — a chain can fold countless ways, and predicting the one it actually adopts from first principles is intractable. AlphaFold 2's breakthrough was to sidestep brute-force physics and instead learn from two rich sources of information: the evolutionary record of related proteins, and the accumulated experimental structures. Deep learning tied them together; evolution supplied the crucial constraints.

The one-sentence version

Residues that touch in a folded protein mutate together across evolution; extract those correlations from a family of sequences, refine them with attention, and predict the 3D structure.

02

Evolution encodes structure

Here's the central biological insight AlphaFold exploits. Gather a multiple-sequence alignment (MSA): the same protein from many species, lined up position by position. Now look at two columns of that alignment — two residue positions. If those two residues are physically in contact in the folded structure, they're under a joint constraint: a mutation at one that would disrupt the fold tends to be accompanied by a compensating mutation at the other. So over evolutionary time, contacting positions coevolve — they mutate together.

That turns a structural question into a statistical one you can read off the alignment: columns that covary flag residues that touch. Measure the correlation between two columns across the family; high correlation predicts a contact.

contact(i, j)  ⟸  columns i and j covary across the MSA  ·  needs many sequences (one gives no signal)

A single sequence tells you nothing — covariation only appears across a family, which is why deep MSAs (thousands of related sequences) matter so much. This coevolution-to-contact idea predates AlphaFold, but AlphaFold learned to use it far more powerfully than hand-crafted statistics could. The runnable version below detects a covarying (contacting) pair of columns and shows a single sequence yields no signal.

03

The Evoformer

AlphaFold 2's engine is the Evoformer, a deep stack of attention blocks — the same attention mechanism behind transformers, adapted to biology. It maintains and refines two coupled representations:

Two representations, refined together
MSA repThe alignment itself — attention across sequences and across positions extracts coevolution.
Pair repA matrix of residue-pair relationships — encodes which pairs are close, and their geometry.
Cross-talkThe two representations update each other repeatedly, reconciling evolution with geometry.
ConsistencyTriangle updates enforce geometric consistency (if A–B and B–C, then A–C is constrained).

The clever part is the two-way flow: coevolution signals from the MSA sharpen the pair representation, and geometric constraints in the pair representation feed back to interpret the MSA. Iterated many times, this produces a pair representation that encodes, for every pair of residues, a rich prediction of their spatial relationship — the distilled structural knowledge that the next stage turns into actual coordinates.

04

Structure and confidence

The structure module takes the Evoformer's refined representations and predicts the 3D coordinates of every atom directly — not a contact map to be folded afterward, but the structure itself. It represents each residue as a frame (position + orientation) and uses invariant point attention, an attention variant that respects 3D geometry (the prediction is the same however you rotate or translate the whole protein). The whole pipeline is then recycled — its output fed back as input several times — to iteratively refine the structure.

Crucially, AlphaFold reports pLDDT, a calibrated per-residue confidence from 0 to 100. High pLDDT means the model is sure of that residue's position; low pLDDT flags uncertain regions, often genuinely flexible or disordered parts of the protein. That confidence is a practical gift: it tells a biologist exactly which parts of a predicted structure to trust, turning a prediction into a usable scientific tool rather than a black-box guess.

RUN IT YOURSELF

Read contacts out of evolution

The coevolution insight is a correlation you can compute. This takes a tiny multiple-sequence alignment where two positions mutate together and one mutates on its own, and shows that the covarying columns correlate strongly (predicting a 3D contact) while the independent pair does not. It also shows the catch — a single-sequence alignment carries no covariation signal, so deep families matter — and computes mean pLDDT, AlphaFold's per-residue confidence. Edit the alignment and watch which pairs light up as contacts.

CPython · WebAssembly
05

Solving CASP

At CASP14 in 2020 — the field's biennial blind assessment — AlphaFold 2's results were so far ahead that organizers declared the protein-folding problem essentially solved for many proteins:

ResultSignificance
Near-experimental accuracyMedian accuracy comparable to experimental structures for many targets — a leap past all prior methods.
Calibrated confidencepLDDT told users which regions to trust, making predictions scientifically usable.
A public databaseDeepMind released predicted structures for hundreds of millions of proteins — nearly every known one.
50-year problemA grand challenge of biology, effectively resolved for a huge fraction of proteins.

The database mattered as much as the model: overnight, researchers had trustworthy structures for essentially the entire protein universe, free to use. Work that once required months of lab effort became a lookup. It was among the clearest cases of AI accelerating fundamental science — and its authors were later awarded a Nobel Prize.

06

What it changed

AlphaFold 2 transformed structural biology and drug discovery, and it opened a wave of AI-for-science built on the same ingredients: AlphaFold-Multimer for complexes, AlphaFold 3 extending to proteins with DNA, RNA, and small molecules, and a broad "structure prediction" toolkit now standard in labs. It showed that deep learning could deliver not just useful predictions but scientific discovery.

Its deeper lesson is about where information hides. The structure a protein folds into isn't written explicitly anywhere you can read — but it's implicit in the evolutionary record, encoded in which mutations co-occur across millions of years and species. AlphaFold's genius was recognizing that a physics problem could be solved by learning to read that record, and building an architecture that could. Whenever a hard problem has left statistical fingerprints in abundant data, "learn to read the fingerprints" is a strategy AlphaFold made canonical.

Worth knowing

AlphaFold works best when a protein has many evolutionary relatives to build a deep MSA; for proteins with few known homologs (orphans) the coevolution signal is weak, which is a known limitation of the approach.

Frequently asked

Quick answers

What does AlphaFold 2 do?

Predicts a protein's 3D structure from its amino-acid sequence with near-experimental accuracy, using evolutionary coevolution, the Evoformer, and a structure module.

How does evolution help?

Residues in contact in the fold mutate together across related sequences; columns of a multiple-sequence alignment that covary flag those contacts — the scaffold of the structure.

What is pLDDT?

AlphaFold's per-residue confidence (0–100). High values mark residues it's sure about; low values flag uncertain, often flexible regions.

What's the catch?

It needs many evolutionary relatives to build a deep alignment; proteins with few known homologs have a weak coevolution signal and lower accuracy.

Highly Accurate Protein Structure Prediction with AlphaFold · Jumper, Evans, Pritzel, et al. · DeepMind · Nature 2021 · read the original paper → · Vibe Engines · 2026
Finished this one? 0 / 101 Paper Breakdowns done

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More Paper Breakdowns