Below is a “walk-through” of the original AlphaFold 2 (monomer) pipeline that you can more or less reproduce on an exam white-board.
I first give the high-level flow, then zoom in on the two things that usually cause confusion:
• what exactly is paired in the “pair representation / pairing step”, and
• what a template is and how it is used.
──────────────────────────────────
- Pipeline at a glance
──────────────────────────────────
Input ➜ Databases ➜ Neural network ➜ Output
amino-acid • sequence DBs • Evoformer blocks • 3-D backbone & side chains
sequence • PDB structures • Structure module • pLDDT, pTM, etc.
(1×L, L = residues) ↓ ↓ ↓
MSA construction Template & MSA features Energy minimisation
(HHblits / mmseqs) embedding (𝒁 & 𝑴) with Amber (optional)
──────────────────────────────────
2. Step-by-step with “what goes in, what comes out”
──────────────────────────────────
Step 0 Input
– Single FASTA sequence (monomer version).
Step 1 Multiple Sequence Alignment (MSA) search
– jackhmmer → Uniclust30, BFD, MGnify, etc.
– Output: up to 5 120 homologous sequences.
– These sequences are all co-linear with the query, i.e. they cover the same chain.
Step 2 Template search
– HHSearch against a HHblits profile library built from PDB (≈ 70% seq-id clustered).
– Returns ~20 hits; the 4 best (by e-value & coverage) are kept.
– For each hit we store:
alignment mapping i ↔ j,
template residue coordinates (N, Cα, C, O, side-chain),
template confidence, mask for gaps.
Step 3 Feature construction ➔ two big tensors
MSA representation 𝑴 : (Nseq × L × C_m ≈ 5120 × L × 256)
Pair representation 𝒁 : (L × L × C_z ≈ L × L × 128)
– 𝑴 initialised with one-hot AAs + positional encodings.
– 𝒁 initialised by combining
• Template geometry (distance/orientation binned),
• “Outer-Product-Mean” of MSA rows (this is the so-called pairing step, see §4).
Step 4 Evoformer trunk (48 identical blocks, shared weights across recycles)
Inside each block the following operations alternate information between 𝑴 and 𝒁:
(a) MSA Row Attention (information within each sequence)
(b) MSA Column Attention (information across homologous positions)
(c) Outer-Product-Mean → update 𝒁 (residue-pair tensor)
(d) Triangle Multiplicative Update (𝒁 → 𝒁, captures transitivity)
(e) Triangle Attention (𝒁 → 𝒁)
(f) Pair-to-MSA gating (injects pair info back into MSA).
Step 5 Structure module
– Consumes 𝒁 (pair geometry) + single “query row” of 𝑴.
– Uses Invariant Point Attention (IPA) to place each residue in 3-D.
– Predicts backbone frame + side-chain χ angles.
– Outputs pLDDT (per-residue) and pTM (global).
Step 6 Recycling (default 3 passes)
– The predicted coordinates are fed back; distances are re-encoded and used to re-seed 𝒁 for another Evoformer/Structure round.
– Greatly improves hydrogen-bond networks, domain packing, etc.
Step 7 (Optional) Amber relaxation
– Short gradient-based energy minimisation to remove steric clashes.
──────────────────────────────────
3. What is a “template”?
──────────────────────────────────
Definition: A template is an experimentally solved 3-D structure (X-ray/NMR/EM) that shares detectable sequence similarity to some part of the query sequence.
How AlphaFold 2 uses it
- HHSearch builds a profile HMM of the query and scans against HMMs of every PDB chain.
- For a hit, an alignment query-residue i ↔ template-residue j is produced.
- For every aligned pair (i, j) we take the template’s inter-residue geometry (distances and orientations to every other aligned residue k, l) and discretise it into 64 bins.
- These binned values are written into 𝒁[i,k] and 𝒁[j,l] channels, providing seed pairwise information that otherwise would have to be inferred solely from co-evolution.
Key points to remember for an exam
• Templates are optional (AlphaFold works even when none are found).
• Only the geometry, not the raw coordinates, is injected.
• Multiple templates are combined by per-channel softmax attention (“template embedding module”) before joining 𝒁.
──────────────────────────────────
4. The “pairing step” — what is being paired?
──────────────────────────────────
Students often imagine “pairing different sequences together”.
In AlphaFold 2 (monomer) that is NOT what happens.
What is paired: residues of the query sequence.
For every ordered residue pair (i, j) we maintain a feature vector 𝒁[i,j,:].
How do we create 𝒁 before the network has seen any 3-D?
a) Start with zeros + template geometry (if any).
b) Add evolutionary couplings extracted from the MSA via the Outer-Product-Mean (OPM):
Let 𝑴 be the MSA embedding (Nseq × L × C_m).
For a fixed pair of positions (i,j) we look at column i and column j across all sequences.
For every sequence s we have embedding vectors m_s,i and m_s,j.
Compute outer product m_s,i ⊗ m_s,j , then average over sequences.
A linear layer projects this averaged outer product into C_z channels.
Because statistical couplings in an MSA correlate mutations at positions i and j, the OPM provides the network with an approximate contact map seed. This is what the original CASP papers called “pair representation initialisation” or informally “pairing”.
So, in short:
• the pair representation ≡ a learned, L×L array describing relationships between residues i and j;
• “pairing step” ≡ populating that array from MSA correlations (and template geometry).
──────────────────────────────────
5. Typical exam questions & how to phrase the answer
──────────────────────────────────
Q1 “Describe how AlphaFold 2 leverages evolutionary information.”
A It builds an MSA, embeds it, then uses OPM to convert column-wise co-variation into a pairwise tensor 𝒁 that the Evoformer refines.
Q2 “What role do templates play, and what happens if none are available?”
A Templates inject explicit geometric priors into 𝒁. If none are available 𝒁 starts from zeros + MSA-based OPM; performance drops slightly for novel folds but remains competitive.
Q3 “Name and briefly explain the three most important operations inside an Evoformer block.”
A MSA Row/Column Attention (intra- and inter-sequence coupling), Outer-Product-Mean (MSA→pair conversion), Triangle Updates (transitive reasoning in pair space).
──────────────────────────────────
6. Cheat-sheet (“one-slide” mnemonic)
──────────────────────────────────
Sequence → MSA (co-evolution) + Templates (geometry)
→ Embeddings (𝑴, 𝒁)
→ Evoformer (attention + OPM + triangles, 48×)
→ Structure module (IPA)
→ Recycle (~3×)
→ Final coordinates + confidence.
That is the entire AlphaFold 2 monomer pipeline and the meaning of both templates and the “pairing / pair representation” step. Good luck with your exam!