MODEL EXPLORER / ALTERNATIVE ARCHITECTURES
Exchange alignment and residue-pair information
How do sequence and pair representations interact before structure is produced?
RECORDED NUMERICAL EXAMPLE
Exchange sequence and pair information.
Recorded Evoformer coupling on synthetic MSA and pair tensors. Pair features are learned representation channels, not a distance map or predicted structure.
Three aligned sequences describe four residue positions. MSA features and pair features are synthetic continuous vectors, not amino-acid identities or distances. Pair features bias attention along each aligned sequence; the pair tensor has not yet been updated.
Min -2.89 · Max 1.583
Recorded cell values
| Row / col | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|---|
| 0 | -0.3455 | -1.851 | -2.89 | -0.6139 | -1.268 | -0.6506 | -0.1537 | -0.5827 |
| 1 | -1.145 | 1.388 | 0.4276 | 0.5972 | 0.5327 | 0.9971 | -0.7913 | -0.7946 |
| 2 | 0.09346 | 1.583 | 1.098 | -1.51 | -0.03585 | -1.992 | -2.259 | 0.3028 |
| 3 | -1.22 | 0.9929 | 0.4987 | 0.1089 | -0.6408 | 0.6902 | -1.194 | 0.2559 |
Min -1.165 · Max 1.866
Recorded cell values
| Row / col | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| 0 | 1.521 | 0.8252 | 1.578 | 0.8861 |
| 1 | 1.866 | 1.354 | 1.277 | 1.668 |
| 2 | -1.165 | 0.12 | -0.3544 | 1.325 |
| 3 | -1.087 | 0.01947 | -0.5327 | 1.679 |
Min 0 · Max 0
Recorded cell values
| Row / col | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 |
| 2 | 0 | 0 | 0 | 0 |
| 3 | 0 | 0 | 0 | 0 |
Each heatmap uses its own scale. Mint is positive, rust is negative, and the lightest color is zero. Table values are rounded to four significant digits.
Bars share one scale within this example. Values are rounded to four significant digits.
- Aligned sequences
- 3
- Residue positions
- 4
- Pair change · L2 norm
- 0
Verified by the local recipe
- Reordering aligned sequences preserves pair outputs; relabeling residues permutes both pair axes consistently
- Outer-product mean matches an explicit per-sequence, per-residue-pair calculation
- Outgoing triangle multiplication matches an explicit sum over shared third residues k
- An MSA edit changes pair features; gradients flow through both streams and the pair-to-attention bias
Download the source and run.py to reproduce these checks. Choosing an example here replays recorded values.
THE SAME MODEL, ON YOUR MACHINE
Pick up where
the graph leaves off.
Inspect pair-biased MSA attention, outer-product mean and outgoing triangle multiplication in a reduced Evoformer coupling subsystem.
Use in VS Code ↗1. Save these files in one folder
2. Reproduce the example
Use Python 3.13 in a dedicated environment, matching the tested recipe. These commands are for macOS / Linux shells.
python3.13 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
python run.pyExpected output: [4,4,4]
Input 1: [3,4,8] · float32 randn
Input 2: [4,4,4] · float32 randn · CPU / eval · seed 0
3. Open the source in TensorViz
Install the preview, open this folder in local VS Code, and choose Open as Graph above EvoformerCoupling in model.py. Select your Python environment. Save before choosing Validate.
Installation and supported setup ↗
The recipe was run with Python 3.13.13 and Torch 2.7.1. This is an untrained example; a successful shape check does not measure accuracy.
ABOUT THIS EXAMPLE
Inspect pair-biased MSA attention, outer-product mean and outgoing triangle multiplication in a reduced Evoformer coupling subsystem.
Component · 2021
AlphaFold2 · Evoformer coupling
Three aligned sequences, four residue positions, eight MSA channels and four pair channels. Implements reduced supplementary Algorithms 7, 10 and 11 plus a pair transition; MSA row attention uses two heads.
Source, capture & limitations +
Untrained coupling subsystem, not a complete Evoformer block or AlphaFold2. Omits MSA column attention/transition, incoming triangle multiplication, triangle attention, masks, dropout, templates, extra-MSA stack, recycling and the structure module. Synthetic continuous inputs are already-embedded features. Pair channels are not distances and no protein coordinates, confidence or biological accuracy are predicted.
Original TensorViz teaching example. PyTorch provides the underlying operators.
No separate redistribution license has been declared for these project examples.
- Content revision
1617b1444e226b18- Source SHA-256
2cfb9e09e73cf7dd16addfcdb74d37bb3d28cc84a74d4aec51ef8cfc623bd70d- Captured
- 2026-09-17 · Python 3.13.13 / Torch 2.7.1
Evoformer coupling subsystem on synthetic MSA and pair tensors. Sequence/residue permutation, explicit outer-product and triangle sums, and cross-stream gradient checks.
Read the model manifest ↗