AAI, Built

Act IV · Generation and Perception

Part 25 of 31

Symmetry and Science

Master'sstarts at this level60 min of film19 chaptersprerequisites: Part 10, Part 13, Part 21, Part 24

What does a network gain by knowing the symmetries of its problem, and what did that do for science?

The part opens with five charged particles turned through a full circle while three trained networks predict their energy: a plain MLP's answer swings, the MLP trained on turned copies swings less, and a network built on distances does not move. Invariance and equivariance are defined, group averaging is derived with its price, and the recipe is stated: find what does not matter and build it in. Sets come first, with the Deep Sets theorem, then graphs, where message passing is permutation equivariant, can see no more than Weisfeiler and Leman's colour refinement, and over-smooths with depth at a rate set by the second eigenvalue of the averaging matrix. Networks that turn with the molecule follow: the gradient of an invariant energy is an equivariant force, and EGNN's equivariance is proved line by line. The part then turns from method to science. Protein folding runs from Anfinsen, Levinthal and CASP to AlphaFold 2's Evoformer, frames and FAPE, AlphaFold 3's diffusion over atoms without built-in equivariance, and protein design. Weather on a mesh, neural operators and materials by the million follow. It ends with mathematics: AlphaGeometry, proofs checked in Lean, and discovery by search with an exact evaluator.

What you need. Linear algebra (orthogonal matrices, eigenvalues of a symmetric matrix) and the idea of a group; convolution's equivariance from Part 10 and diffusion from Part 21.

Mathematics and history
groups and equivariance, GNNs and the WL test, AlphaFold 2/3, weather models, AI for mathematics
Models, data
AlphaFold, GraphCast, AlphaProof

What you will be able to do

Undergraduate

  • Tell an invariant function from an equivariant one, and name the symmetry of a set, a graph and a molecule.
  • Explain why protein folding was hard, what CASP measured, and what changed in 2020.

Master's

  • Write a Deep Sets network and one round of message passing, and check their permutation symmetry.
  • Run colour refinement on two small graphs and decide whether message passing can tell them apart.
  • Derive over-smoothing from the spectrum of the normalized adjacency matrix, and show that an invariant energy has an equivariant force.

Research

  • Prove that a message-passing network is at most as discriminating as 1-WL, and that an EGNN layer is E(n)-equivariant, reflections included.
  • Weigh built-in equivariance against augmentation in the light of AlphaFold 3's diffusion module, and state what remains open.

Engineering

  • Check a trained model's symmetry numerically by turning, shifting and reordering its inputs, and report the error against its test error.
  • Read the published claims of a scientific system (hit rates, blind tests, experimental confirmation) and say which rest on an exact checker.

Contents

Each chapter has a home level. Choose a track to see what to read and watch: Undergraduate 13 min · Master's 46 min · Research 60 min · Engineering 23 min.

  1. 0Turn the moleculeUndergraduate2 min
  2. 1How we got hereUndergraduate2 min
  3. 2Invariance and equivarianceUndergraduate3 min
  4. 3Functions of setsMaster's4 min
  5. 4Message passingMaster's3 min
  6. 5What message passing can't seeResearch4 min
  7. 6Deep graph networksMaster's3 min
  8. 7Networks that turn with the moleculeResearch4 min
  9. 8The protein-folding problemUndergraduate4 min
  10. 9AlphaFold 2: the EvoformerMaster's4 min
  11. 10AlphaFold 2: frames, FAPE and recyclingMaster's3 min
  12. 11AlphaFold 3: diffusion over atomsMaster's3 min
  13. 12Designing proteinsEngineering3 min
  14. 13Weather on a meshEngineering4 min
  15. 14Neural operatorsMaster's3 min
  16. 15Materials by the millionEngineering3 min
  17. 16Geometry and proofsResearch3 min
  18. 17Discovery by searchResearch3 min
  19. Recap, problems, and what comes nextAll tracks2 min

Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · 中文 · Build the film.

Lecture

The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.

Turn the moleculeUndergraduate2 min

Stockholm, October 2024. The Nobel Prize in Chemistry goes half to David Baker, for designing proteins, and half to Demis Hassabis and John Jumper of Google DeepMind, for AlphaFold, a network that predicts the shape a protein folds into. The day before, the physics prize went to John Hopfield and Geoffrey Hinton, for the networks of Part 20. Measuring one protein's shape could take a laboratory years; AlphaFold predicts one in minutes.

Here is the idea this part is built on. Five charged particles, a toy molecule: turn it, and its energy can't change. We trained networks on three thousand such molecules to predict the energy, then turned this one a full circle. A plain network doesn't know that turning is harmless: its answer swings over units. Shown turned copies in training, over . A network built on the distances between particles can't see the turn: its answer changes by , and sits from the true energy.

That is the question of this part: what does a network gain by knowing the symmetries of its problem, and what has that done for science, in proteins, weather, materials and mathematics? Every experiment is computed here; every number about the big systems is quoted from their papers.

This is Part 25 of AI, Built, the last of its fourth act. In it: symmetry, and what it means for a function to respect it; graphs, message passing, and its limits; networks that turn with the molecule; proteins, from the folding problem to AlphaFold and design; fields: weather, neural operators, and materials; and mathematics, from olympiad geometry to checked proofs and discovery by search.

1How we got hereUndergraduate2 min

This part's story has three threads, starting far apart. The first computer weather forecast, 1950. The first protein seen in three dimensions, 1958, and in 1961 Christian Anfinsen's discovery that the sequence decides the shape. In 1968, a test of whether two graphs are the same, which turns out to measure what graph networks can see. The Protein Data Bank, 1971; the first forecast of Europe's weather centre, 1979; convolutions, with the symmetry of images built in, 1989; CASP's blind contests, 1994; the first neural networks on graphs, 2005.

Then, within a decade, the threads met. 2017: message passing, and networks for sets and molecules. 2018: the first AlphaFold wins CASP; in 2020 AlphaFold 2 comes close to experiment. 2021: networks that turn with a molecule, and networks that learn solutions of equations. 2022: predicted structures for over two hundred million proteins. 2023: a graph network out-forecasts the best weather model on most measures, and another proposes millions of new crystals. 2024: the Nobel Prize, AlphaFold 3, machines solving olympiad problems; 2025: AI forecasts in daily operation, new mathematics from evolutionary search; 2026: open Erdős problems resolved by AI.

What ties these together is one recipe. Ask what about your data doesn't matter. For an image, where the object sits: so convolutions. For a set of points, their order. For a graph, how its nodes are numbered. For a molecule, how it is turned or moved. For proteins, turns and shifts are harmless, but a reflection changes chirality. A weather field lives on a sphere, whatever the grid. Language has little symmetry, so the transformer learns its structure from data. Bronstein, Bruna, Cohen and Veličković called this geometric deep learning. A symmetry enters a model three ways: transformed copies, a standard pose, or layers that respect it; this part is mostly about the third.

2Invariance and equivarianceUndergraduate3 min

A symmetry is a transformation that leaves what matters unchanged. Turn a square by ninety degrees: the same square. Turn it four times and you are back. A problem's transformations form a group: you can compose them, one does nothing, and each can be undone. The square has four turns; the orderings of sixteen points, sixteen factorial, about 21 trillion. Turns of space form a continuous group, SO(3); an image has its shifts.

Now a function of the data, f: here, where each of our five particles will be one time unit later. Turn the input, then apply f, or apply f, then turn the output. If the two paths always agree, f is equivariant. If the output doesn't change at all, f is invariant, like an energy or an image's label. Inner layers need equivariance, so that the input's orientation isn't thrown away; a final answer often needs invariance.

For a finite group with a linear action on the output, any function can be made equivariant by averaging: for each g, transform the input, apply f, undo g. Feed the average a turned input, h of x. Rename g times h as g prime: it runs through the group as g does, so the sum is the same. The inverse of a product reverses its order, and h comes out of the sum: the average is equivariant, whatever f was. The price: one evaluation per group element, sixteen factorial for sixteen points. For compact continuous groups like rotations, the normalized sum becomes a Haar integral; there is no normalized uniform average over all translations. Augmentation is the cheap version: one random transformation per example, hoping the network learns the rest.

Here is the check on our five-particle system: four networks, the same data, the same number of steps. Pause and predict: which turns its answer exactly when the input is turned? The equivariant network, EGNN, built in chapter seven: its turned and shifted answers are off by about a ten-millionth of a unit, rounding error. A message-passing network on raw coordinates handles a reordering exactly, not a turn. The plain MLP gets neither; trained on turned copies, its turning error is 0.06, smaller than its own error, but not zero. Symmetry built into the layers holds exactly, on every input; learned from examples, only approximately, near the data.

3Functions of setsMaster's4 min

Sixteen points in the plane, from one of four shapes: a ring, a disc, a segment, or two blobs. Say which. A plain network needs a list, so we number the points and feed it thirty-two coordinates. But the numbering is arbitrary: renumber, and the picture is the same while the list is not. A plain network trained on eight thousand sets sees a new input: . Deep Sets, built for sets, gives exactly the same answer, as it must.

The theorem behind Deep Sets, from Manzil Zaheer and colleagues in 2017: for finite subsets of a countable universe, a function ignores order exactly when it is a sum of one function phi over the elements, followed by a function rho. One direction is easy: a sum ignores order. For the other, number every possible element, and let phi of x be four to the minus its number. In base four, the sum has a one in place k exactly when element k is in the set: no carries, so different sets give different sums. So any function of the set is a function of the sum. For sets of real numbers, power sums play this role, by Newton's identities. For continuous universal encoders, the latent dimension must be at least the maximum set size.

As a network, this is simple. The same small network phi reads every point, the results are summed, and a second network rho reads the sum. phi's weights are shared by every point, as a convolution shares its weights across positions. PointNet, the same year, used a maximum instead of the sum. And a transformer without positions treats its tokens as a set: reorder the inputs, and the outputs reorder with them.

Before the full comparison, watch one training run of each, on training sets, the held-out accuracy checked every two hundred steps. . The plain MLP . The MLP shown reordered copies .

Now train them on up to sets, three seeds each, the same number of steps. With only sets, Deep Sets is right percent of the time. The plain MLP is at percent, . Reordered copies help a lot: percent at sets. . : Deep Sets percent, the copies . But copies teach the symmetry only approximately: reorder the same test sets, and the plain MLP changes its answer on percent of them, the one trained on copies on percent, Deep Sets on none.

So building the symmetry in did two things: it saved data, and it made the answer exactly order-free, on every input. Graphs are next: sets with connections.

4Message passingMaster's3 min

A graph is a set with connections: nodes, and edges between some pairs. Here is decalin, ten carbons and eleven bonds. A computer stores it as an adjacency matrix, with a one wherever two nodes are joined. Number the nodes differently and its rows and columns shuffle, though the molecule is the same. So a network on graphs must be equivariant to renumbering: permute the nodes, and its answers permute the same way. Graphs are everywhere: molecules, road maps, social networks, weather meshes, and proteins, residues joined when close in space.

In 2017 Justin Gilmer and colleagues at Google put these networks into one form, message passing. Every node keeps a state, a vector h. In each layer every node sums messages from its neighbours, a learned function M of the two states and the edge, then updates its state from the old one and the sum. A readout sums the final states into an answer about the whole graph. Every step is a sum over neighbours, so the numbering can't matter. The graph convolutional network of Thomas Kipf and Max Welling is the simplest case: average the neighbours' states, normalized by degree, and apply one weight matrix.

The idea is older than its name. In 1997 Alessandro Sperduti and Antonina Starita trained networks on labelled graphs. In 2005 Marco Gori and colleagues proposed the graph neural network, its node states updated from their neighbours until they settled. In 2014 Joan Bruna and colleagues defined convolutions through the graph's spectrum. In 2015 David Duvenaud and colleagues learned fingerprints of molecules. Gilmer's network then predicted thirteen quantum properties of small molecules, eleven within chemical accuracy. And Peter Battaglia and colleagues argued that graphs are the general way to give a network relational structure.

Let's train one. Three hundred people in three communities, friendships mostly within: percent of the edges, about per person. Each carries only a weak, noisy hint of their community, and only are labelled. A two-layer graph convolutional network learns from those labels and the graph: watch its guesses for everyone else. Two layers see two hops. An MLP that sees only each person's hint gets percent right; the graph network percent, over three seeds. .

That is message passing: a learned sum over neighbours, repeated, so that after L layers each node has heard from everything within L hops. What can such a network tell apart?

5What message passing can't seeResearch4 min

In 1968 Boris Weisfeiler and Andrei Leman described colour refinement, the standard first test of whether two graphs are the same up to numbering. Every node starts with one colour. Each round, a node's new colour names its old colour and its neighbours' colours: here the carbons with three neighbours split off. Then their neighbours, until nothing changes. Different colour counts mean different graphs. Decalin and bicyclopentyl, rounds: . Yet one is two six-rings sharing an edge, the other two five-rings joined by a bond.

And no message-passing network can do better. Keyulu Xu and colleagues, and Christopher Morris and colleagues, proved in 2019: starting from matching node features, if colour refinement can't separate two nodes after t rounds, no message-passing network separates them after t layers. By induction: at the start, everything is equal. Two nodes with the same colour next round had the same colour and the same multiset of neighbours' colours; by hypothesis, then, the same state and the same multiset of neighbours' states, from which a layer computes identical new states. And the bound is reached in principle: with injective updates and readout, the graph isomorphism network can match colour refinement. A trained finite network need not attain that bound.

Why a sum? Aggregation must not lose information about the multiset of neighbours. Neighbours a, a, b, b and neighbours a, b have the same mean and the same maximum; only the sum differs. Computed: give every node of a random graph the same features, and ask a one-layer network for each node's degree. A sum gets within 0.00. A mean or a maximum, 1.46 and 1.46, hardly better than the spread of the degrees, 1.53: to them every node with a neighbour looks alike.

Now make a network fail on purpose. Graphs of nodes that are unions of cycles: is there a triangle? To colour refinement they are all identical: every node has two neighbours, whose neighbours have two neighbours, forever. So every message-passing network must answer the same for all of them. A network whose features live on pairs of nodes, updating each pair through every third node, . Remember that construction: it is the heart of AlphaFold.

How bad is it in practice? On random graphs, hardly at all: colour refinement separated 300 of 300 different pairs. On graphs where every node has three neighbours, 0 of 100. The fixes add what a neighbour sum can't build: colouring tuples of nodes, at a cost growing as n to the k; counting triangles and other patterns; positions; or attention over every pair. Graph isomorphism itself is not known to be easy or hard; László Babai showed in 2016 that quasi-polynomial time suffices.

6Deep graph networksMaster's3 min

Graph networks are usually shallow, two to four layers; image networks run past a hundred. One reason: strip a graph convolution of its weights on a connected, undirected graph with self-loops: it is normalized averaging over neighbours, applied again and again. The averaging matrix is symmetric, with orthonormal eigenvectors and eigenvalues at most one. Applying it k times raises each eigenvalue to the k. Every term but the first dies away; the first is one pattern on every node, scaled by the square root of its degree. The rate is the second eigenvalue to the k. Every node ends with a degree-scaled copy of the same feature vector: over-smoothing, named by Qimai Li and colleagues in 2018.

Here it is on our three-community graph: the Dirichlet energy, how much neighbours differ, after each round of averaging. It falls by powers of ten in sixteen rounds; its later decay approaches the rate the second eigenvalue, , predicts. In pictures: the features start as noise; a few rounds separate the communities, which is why two layers help; many rounds approach the degree-scaled stationary pattern.

Now with weights and training: the same task at depths from two to sixty-four, three seeds each. ; . : the skip connection keeps each node's own information from being averaged away, the fix that made image networks deep in Part 9. Part of the collapse is also an optimization problem: gradients must pass back through all those averages.

A second problem appears when the answer depends on distant nodes. The nodes within L hops can grow exponentially, yet all their information must squeeze into one fixed-size vector. Uri Alon and Eran Yahav called this over-squashing, in 2021; Jake Topping and colleagues traced it to bottlenecks. Remedies: rewire the graph, add nodes that see everything, or attend to every node directly.

Attention is the third idea. Instead of summing its neighbours equally, a node weighs them: in Petar Veličković's graph attention network of 2018, by a softmax of learned scores. GATv2, from Shaked Brody and colleagues, fixed a flaw: the original scores ranked neighbours the same way for every node. A transformer, from Part 13, is this on the complete graph; graph transformers add the graph back as encodings of where each node sits. And AlphaFold's core is attention over pairs of residues, biased by triangles: last chapter's pair network, grown up.

So deep graph networks fight two forces: repeated averaging washes out the differences between nodes, and bottlenecks squash distant information. Skip connections and attention push back. Next: the symmetry of space itself.

7Networks that turn with the moleculeResearch4 min

For molecules the symmetry is the group of rigid motions of space, E of three: rotations, reflections, translations. A molecule's energy is invariant under all of them. Differentiate both sides in the positions: the chain rule brings out the transpose of R. Left multiply by R, whose product with its transpose is the identity, and since forces are minus the gradient, they turn with the molecule: equivariant. So an invariant model of the energy gives equivariant forces for free.

How do you build that into a network? The simplest answer is the E(n)-equivariant graph network of Victor Garcia Satorras, Emiel Hoogeboom and Max Welling, 2021. Each atom has features h and a position x. A message between two atoms sees their features and squared distance, nothing else. Each atom moves along the differences of positions, weighted by learned scalars; its features update from the summed messages, and stay invariant. Turn and shift the input: the messages are unchanged, the differences turn by R, the shift cancels, so the new positions are the old ones turned and shifted. SchNet, in 2017, had used distances alone.

EGNN carries scalars, which don't turn, and positions, which turn like vectors. Richer models carry more. A square-integrable function on the sphere has a mean-square expansion in spherical harmonics of degree zero, one, two and up. Here, computed, is what one rotation does to the nine harmonics up to degree two: it mixes them only within each degree, in blocks of one, three and five; off the blocks, at most ten to the minus . So a network can keep features of each degree, turn each with its own block, and combine them by the Clebsch–Gordan rules of quantum angular momentum: the design of tensor field networks, NequIP and MACE, among today's most accurate learned force fields.

Does it pay? Our five-body system again: predict where the particles are at time one. Four networks, the same three thousand steps, from a hundred training systems up to , three seeds each. The dashed line is the simplest guess: every particle keeps going straight. ; : . Message passing on raw coordinates: . EGNN: , . .

Here is training itself, for the runs on systems: one test system the networks never saw, its five particles, and where they really go by time one, the blue paths. The crosses are each network's predicted end points, at checkpoints through training. EGNN's crosses settle onto the circles; by the end its root mean square position error is . The MLP's is .

That is the case for equivariance: no data is spent teaching the network that a turned molecule is the same molecule. Proteins are molecules too; the rest of this part takes these ideas into science, starting with the hardest molecule of all.

8The protein-folding problemUndergraduate4 min

A protein is a chain of amino acids, of twenty kinds, written by a gene. In water it folds into a precise shape, and the shape decides what it does: cut a molecule, grip a virus, open a channel. In 1958 John Kendrew saw the first, myoglobin, by X-ray crystallography. The Protein Data Bank opened in 1971 with seven structures; today it holds more than a quarter of a million. But we know billions of sequences, and a structure can take years to measure. Hence the problem: read the shape from the sequence.

Two facts frame the problem. In 1961 Christian Anfinsen unfolded the enzyme ribonuclease with urea; washed out, it refolded by itself and worked again: the sequence holds the shape. But in 1969 Cyrus Levinthal pointed out that a chain can't find its shape by trying them all. Give each joint of a 100-residue chain three choices: about ten to the 47 shapes. At ten trillion a second, that is ten to the 26 years; the universe is ten to the ten years old. Yet proteins fold in microseconds to seconds. Nature doesn't search blindly, and neither should a computer.

In 1994 John Moult and Krzysztof Fidelis turned the problem into a contest, CASP: every two years, predict structures measured but not yet published. Predictions are scored by GDT, roughly the percentage of residues within a few ångströms of their true place. Progress was slow for two decades; then evolution offered a clue. Line up the same protein from many species: when two positions touch, a mutation at one is often compensated at the other, so their columns change together; from around 2011, statistics could read contacts from them. At CASP13, in 2018, DeepMind's first AlphaFold predicted a histogram of distances for every residue pair, then folded a chain by gradient descent to match: high accuracy on 24 of the 43 hardest domains, against 14 for the next best.

Why distances? Because a full table of distances fixes a shape. Here are all the distances between our bundle's fifty-two atoms. Square them and centre them, and you get the dot products of the atoms' positions, since a squared distance is two squared lengths minus twice a dot product. Its eigenvectors give the coordinates back: classical multidimensional scaling, 1952. Three eigenvalues are nonzero, one per dimension, and the rebuilt chain matches to rounding error. But only up to a mirror image, which has the same distances; and proteins are not mirror-symmetric: their helices are right-handed.

AlphaFold 1 predicted only distances, noisy, and only for pairs it was sure were close. So do the same with ours: keep the pairs under ångströms, percent of them, add ångström of noise, and from a random tangle, move the atoms by gradient descent until their distances match. From random starts, . Nothing a reflection leaves unchanged, distances included, can tell which. AlphaFold 2 needed a representation that knows left from right.

Distances pin down a shape, but only up to its mirror image. Keep that in mind; AlphaFold 2's answer to it is one of its cleverest parts.

9AlphaFold 2: the EvoformerMaster's4 min

AlphaFold 2, which John Jumper and colleagues at DeepMind entered in CASP14 in 2020, works in two stages. It searches genetic databases for related sequences, lined up in a multiple sequence alignment, and for similar known structures. The Evoformer, forty-eight blocks deep, reasons about these; the structure module turns the result into atoms, with a confidence per residue. Then it all runs again on its own output. The Evoformer keeps a vector per residue of every aligned sequence, and one per pair of residues, heir to AlphaFold 1's distance histograms.

Each Evoformer block passes information both ways between them. Along each sequence, the residues attend to one another, with the pair representation biasing the attention. Down each column, the same position attends across species. And back the other way, an outer product of two columns of the alignment, averaged over the sequences, updates the pair of those positions: co-evolution, learned.

The new idea is in how the pairs update each other. Think of the pair representation as a guess at every distance. The guesses can't be independent: for any third residue k, the distance from i to j is at most i to k plus k to j. So each pair i j is updated from the other two edges of every triangle it sits in: a gated sum over k of products of the pairs i k and j k, the 'outgoing' update; the same with the edges pointing in. In the matrix, entry i j collects rows i and j. Triangle attention does the same with attention weights. Chapter five's lesson: pairs updated through a third node see what single nodes cannot.

Does it work? A small test, computed here. Random protein-like chains of residues; the model sees a quarter of the distances, with noise, and must fill in the rest, a stand-in for what an alignment tells AlphaFold. Two models of the same size and training: one updates each pair on its own, the other with triangle updates. Guessing each missing distance from the separation along the chain gives an error of ångströms. Updating each pair on its own gets , . , .

Here is the training itself, replayed: both models' guesses for one held-out chain. At step zero both guess nothing in particular. Within a few hundred steps both learn the easy part, that neighbours along the chain are close in space: the dark band on the diagonal. The rest, which distant residues come back together, needs the other pairs; on the curve below, .

And at CASP14, in 2020, it worked. AlphaFold 2's median score was 92.4 GDT over all targets, 87.0 on the hardest; around ninety is informally reckoned competitive with experiment. Its median backbone error was 0.96 ångström, against 2.8 for the next best; a carbon atom is about one and a half across. "We have been stuck on this one problem, how do proteins fold up, for nearly fifty years," said John Moult; CASP called it a solution, for single chains.

So the Evoformer's two ideas: let the alignment and the pairs inform each other, and keep the pairs consistent through triangles. Next: turn pairs into a structure without losing left from right.

10AlphaFold 2: frames, FAPE and recyclingMaster's3 min

The structure module treats each residue as a rigid body: a triangle of three backbone atoms with its own frame, a rotation and a position. It starts with every frame at the origin, a residue gas, and moves them. Its invariant point attention places learned points in each residue's frame and scores pairs of residues by how close those points come. A rigid motion of the protein moves every point alike, so the attention can't change. Each layer nudges every frame by an update in that frame's own coordinates, so the updates turn with the protein: equivariance, built in.

What should the network be trained to minimize? AlphaFold 2's answer is the frame-aligned point error, FAPE. Stand in residue i's frame and look at atom j. Do this for every atom from every frame, in prediction and truth, and average the differences, each capped at ten ångströms so outliers can't dominate. A rigid motion of the whole structure cancels: FAPE ignores where the protein sits and how it is turned. But frames are built from three atoms by a right-hand rule. Rotations and translations preserve handedness; a reflection reverses it, so FAPE sees it.

Here is the difference, measured on our bundle and its reflection. Every distance is the same, so the distance error is . Yet FAPE is ; with independent Gaussian noise of standard deviation one ångström per coordinate it is . And chapter eight's folds, which distances couldn't sort, separate cleanly: those on the true fold score , mirror images .

The last trick is recycling: run the network again on its own previous output, so that a rough first structure can sharpen the reading of the alignment. In training the number of passes is random and the gradient flows only through the last, avoiding storage of training activations for every pass. We added it to chapter nine's triangle model. , .

In July 2021 DeepMind published AlphaFold 2 with its code; the same month David Baker's group published RoseTTAFold, built on the same insights. With EMBL's European Bioinformatics Institute, DeepMind then released predicted structures for over two hundred million proteins, each with the network's own residue-by-residue confidence, pLDDT. Two years later came the Nobel Prize. But AlphaFold 2 predicts one static shape per chain, and says little about how proteins bind DNA or hold a drug: the next step.

So: residues as rigid frames, moved by attention that can't see how the protein is turned; a loss that ignores rotations and translations but not reflections; and a network that reads its own answer and tries again.

11AlphaFold 3: diffusion over atomsMaster's3 min

In May 2024 Google DeepMind and Isomorphic Labs published AlphaFold 3. It takes almost anything in a cell's structures, protein chains, DNA and RNA, drug-like molecules, ions, modified residues, and predicts how they sit together. The alignment gets just four blocks; the trunk is the Pairformer, the Evoformer's pair stack, forty-eight blocks, triangle updates intact. The big change is the end: the structure module, frames and all, is replaced by a diffusion model that writes every atom's coordinates directly.

Diffusion is Part 21's idea, applied to atoms. Add noise to a structure's coordinates, at every level from a whisper to pure noise, and train a network to remove it; then start from noise and remove it step by step. Here is a small model of ours, from noise to a chain. And here is the surprise, after four chapters of building symmetry in: the AlphaFold 3 paper says its architecture needs no invariance or equivariance to rotations or translations. Every training structure is simply centred and turned at random: augmentation, chapter two's cheap route. Diffusion can also invent structure in floppy regions; training on AlphaFold-Multimer's predictions taught AlphaFold 3 to leave them loose.

So is equivariance worth it, for a generator? A toy test: four thousand compact chains of twelve atoms in the plane, bonds of length one. Two denoisers, trained for the same number of steps: one equivariant to rotations, like EGNN; a plain MLP shown every chain turned at random, as AlphaFold 3 is. Their samples. Bonds: the equivariant model's are off by on average, the plain one's by . Clashes, two atoms on top of each other: percent of chains against . , . At AlphaFold 3's scale, with the whole Protein Data Bank, DeepMind chose turned copies: data and compute standing in for built-in symmetry.

On drug-like molecules bound to proteins, DeepMind reported AlphaFold 3 fifty percent more accurate than the best traditional methods. It came as a free server, and in November 2024 as code and weights for academics; open reproductions followed: Chai-1, Boltz-1, Protenix. In 2025 Boltz-2 added a prediction of binding strength. And in February 2026 Isomorphic Labs reported a proprietary successor that, on its own benchmark of new antibody–antigen pairs, makes high-accuracy predictions 2.3 times as often as AlphaFold 3.

AlphaFold 3 kept the pair stack, handed the geometry to diffusion, and learned the symmetry from turned copies. Prediction also runs backwards: from a shape you want, to a protein that folds into it.

12Designing proteinsEngineering3 min

Structure prediction goes from a sequence to a shape. Design goes the other way: from a shape you want, a binder for a virus or a scaffold for a catalyst, to a sequence that folds into it. This was David Baker's life's work, the other half of the 2024 Nobel. In 2003 his group designed Top7, a fold unseen in nature, with the Rosetta energy function, and it folded as designed. For two decades, though, most designs failed.

Deep learning changed both halves of design, starting with the sequence. In 2022 Justus Dauparas and colleagues in Baker's lab built ProteinMPNN: it reads a backbone as a graph, each residue joined to its nearest neighbours in space, passes messages built from distances, so the backbone's orientation can't matter, and writes the amino acids one at a time, in random order, each conditioned on those already written. On natural backbones it recovers 52.4 percent of the native amino acids, against 32.9 for Rosetta.

Then the backbone. In 2023 Joseph Watson and colleagues published RFdiffusion. They fine-tuned the structure predictor RoseTTAFold to remove noise from residue frames, on positions and orientations, two hundred steps from noise to a backbone, optionally holding a motif, binding a target or obeying a symmetry. The pipeline: diffuse a backbone; let ProteinMPNN write eight sequences for it; keep those AlphaFold 2 folds back onto the design, within two ångströms and confidently; only then go to the lab. For binders, nineteen percent worked, about a hundred times the earlier rate; one influenza binder's measured structure sat 0.63 ångströms from its design.

Our toy denoiser from the last chapter shows the idea in miniature. Here is its training: the loss, and samples drawn from the same eight noise seeds at each checkpoint. At first, tangles; then chains with nearly the right bond lengths; . Are they new? The median sample sits from its nearest training chain, against for real chains it never saw: .

Since then the field has moved fast. In 2024 Google DeepMind's AlphaProteo designed binders for medical targets, BindCraft designed them by gradient descent through AlphaFold 2 itself, and EvolutionaryScale's ESM3, a language model over sequence, structure and function, wrote a fluorescent protein far from any natural one. In 2025 RFdiffusion3 designed atom by atom, and BoltzGen appeared as an open alternative. Tools this capable could be misused; in 2024 many researchers signed commitments on responsible biodesign, including screening DNA synthesis.

Design, in one line: diffuse a backbone, write a sequence for it, check that the sequence folds back, and only then make it. Now from molecules to the whole planet.

13Weather on a meshEngineering4 min

Weather forecasting became physics in 1904, when Vilhelm Bjerknes framed it as an initial-value problem: measure the atmosphere now, then step the equations of fluid flow forward. Lewis Fry Richardson tried it by hand in the First World War: six weeks of work for a six-hour forecast at two points, wrong by a hundred and forty-five hectopascals. In 1950 the first computer forecasts ran on ENIAC, about as fast as the weather itself. ECMWF, the European Centre for Medium-Range Weather Forecasts, first forecast in 1979; since then forecasts have gained about a day of skill per decade.

Machine learning came to this in the 2020s, trained on ERA5, ECMWF's reconstruction of global weather since 1940. In 2023 Remi Lam and colleagues at Google DeepMind published GraphCast. The atmosphere is stored on a latitude–longitude grid, a million points of two hundred and twenty-seven numbers each, crowded near the poles; GraphCast works on a mesh instead: an icosahedron refined six times, keeping every level's edges, so that a message crosses the planet in a few steps. Here is our small version, on a square. Encode onto the mesh, pass messages sixteen times, decode: the state six hours on, from the last two. It makes a ten-day forecast in under a minute, and beat ECMWF's flagship deterministic forecast on ninety percent of 1,380 targets.

Ours is a toy atmosphere: a two-dimensional fluid on a square that wraps around, stirred by a fixed pattern and damped by friction, so that eddies form, drift, merge and die: chaotic, like the weather. A small encode–process–decode network on our mesh learns one step at a time from thirty-two simulated runs, then rolls forward on its own predictions. Top, the truth; bottom, our network, from the same start. They agree for a while, then drift apart.

Scored over eight new runs: the error, step by step. . , . GraphCast was trained on rollouts of up to twelve steps for exactly this reason, to learn from its own drifting predictions; ours rolled out two steps at the end of training. , in one training run of each.

There is a deeper problem. Trained on squared error, a network predicts the average of what might happen, and far ahead the average of many weathers is a blur. Forecasters answer with ensembles, many runs from slightly different starts. In 2024 Google DeepMind's GenCast learned to sample the next state with diffusion; its ensembles beat ECMWF's on 97.2 percent of 1,320 targets. Then learned models went into daily service: ECMWF's AI Forecasting System in February 2025, its ensemble version that July, Google's WeatherNext 2 in November, and in December the first AI global models of America's NOAA.

So the weather became a graph problem: a mesh that wraps the planet, messages that cross it in a few steps, and diffusion for the part of the future that can't be known. Next: networks that learn whole equations.

14Neural operatorsMaster's3 min

Fields evolve by equations. Here is Burgers' equation, a one-dimensional cartoon of fluid flow: a wave that steepens where it is fast and is smoothed by viscosity. From this start, one time unit later, the solution looks like this. A solver needs thousands of small steps, every time. A network could learn the map from start to finish, but an ordinary one works on a fixed list of numbers: trained on sixty-four points, it knows only those. We want the operator itself, a map from functions to functions, readable at any resolution. Tianping and Hong Chen proved in 1995 that networks can approximate operators; DeepONet and the Fourier neural operator made it practical in 2021.

The Fourier neural operator, from Zongyi Li, Anima Anandkumar, Andrew Stuart and colleagues, starts from a layer that is an integral: each point's new value mixes the whole field through a kernel kappa. If the kernel depends only on the offset, the integral is a convolution, which the convolution theorem makes a product of Fourier transforms. So learn the kernel's transform directly: one complex weight for each of the lowest frequencies, sixteen here, dropping the rest. The weights belong to frequencies, not grid points, so the layer reads any grid fine enough to hold them. The Fourier layer commutes with periodic shifts; our full model also receives absolute coordinates, so exact shift equivariance is not guaranteed for the whole network. A layer costs about one fast Fourier transform.

We trained one on a thousand solutions of Burgers' equation, sampled at 64 points, against a pseudo-spectral solver's answers. Here is its prediction for a start it never saw, at checkpoints through training, beside the learning curve. It ends with a relative error of 0.4 percent on held-out starts.

Now the test that matters. Both networks were trained only at sixty-four points. Read them at up to . . . . FourCastNet, one of the first learned weather models, in 2022, was built on a variant of this Fourier layer.

Learn the operator, not the grid. Weights that belong to frequencies carry over to any resolution, which is what a model of the physical world should do. From fields to crystals.

15Materials by the millionEngineering3 min

A crystal is a pattern of atoms repeated in space; its symmetries are one of 230 space groups, classified in 1891. Which crystals exist? Take two elements, A and B, and their possible compounds, each with a formation energy from density functional theory, hours of computer time apiece. A compound is stable if no mixture of the others has lower energy: if it lies on the lower convex hull. One above the hull would rather decompose into its neighbours; its height says how unstable it is. Here nine compounds are on the hull.

In 2023 Amil Merchant, Ekin Dogus Cubuk and colleagues at Google DeepMind published GNoME, graph networks for materials exploration. It generates candidates by swapping elements in known crystals and by random search; graph networks built on interatomic distances, and so invariant to rotation, predict their energies; density functional theory checks the most promising; and every check becomes training data for the next round. Computation had found about forty-eight thousand stable crystals; GNoME reported 2.2 million, 381,000 on the new convex hull, and the share of its picks confirmed by DFT rose above eighty percent, from about one percent before.

We can run the flywheel on a made-up chemistry: twenty invented elements, every pair, nine compositions and four crystal types, candidates, whose 'DFT' energy is a hidden formula revealed sixty at a time. Start knowing three percent. Each round, train a small ensemble on what is known, and check the sixty predicted to fall furthest below the hull of everything else. A hit is a pick that is truly stable. Random picks hit percent of the time, about the share of stable candidates, percent. The surrogate's picks hit percent in the first round, . Its error falls from to , and after rounds it has found of the truly stable compounds, against for random picks.

The claims drew pushback from chemists. In 2024 Anthony Cheetham and Ram Seshadri examined a random sample of GNoME's predictions and found scant evidence of compounds at once new, credible and useful; many placed atoms in neat orders that real crystals mix at random. Critics also disputed the X-ray analysis behind a robot laboratory's report of forty-one new compounds; in January 2026 the paper was corrected to thirty-six from fifty-seven targets. The tools kept improving, universal potentials and crystal generators, but the lesson stuck: a predicted crystal is a hypothesis, and making it is the test.

In materials, then, the network is a cheap first opinion that makes expensive checks count. In mathematics, the check can be perfect.

16Geometry and proofsResearch3 min

Mathematics has proof assistants with small trusted kernels. In a proof assistant such as Lean, a theorem and its proof are code, and a small kernel checks every inference; this one says the product of two consecutive natural numbers is even. Computers entered proofs in 1976 with Appel and Haken's four-colour theorem, which Georges Gonthier checked formally in 2005. Thomas Hales's proof of the Kepler conjecture was formally verified in 2014, and in 2022 Lean's community formalized a hard new theorem of Dustin Clausen and Peter Scholze. Lean's library, Mathlib, now holds about two hundred and ninety thousand theorems; Part 28 shows what reinforcement learning does with such a checker.

Olympiad geometry fell first. In January 2024 Trieu Trinh, Thang Luong and colleagues at Google DeepMind published AlphaGeometry. With no human proofs to learn from, they made their own: random premises, a symbolic engine deducing all that follows, and a traceback from each new fact to what it needed: a hundred million theorems with proofs. Nine percent need a point the statement never mentions, an auxiliary construction, the creative step; a language model learned to propose them, and the engine does the rest. On thirty olympiad problems it solved twenty-five, against ten for the best earlier method, fourteen for its engine alone and none for GPT-4; the average gold medallist solves 25.9. A year later AlphaGeometry 2 solved eighty-four percent of the olympiad's geometry problems since 2000.

Then the olympiad itself, which Part 28 follows in detail. In 2024 AlphaProof, AlphaZero's method working in Lean, with AlphaGeometry 2 for the geometry, scored twenty-eight of forty-two, one point short of gold. In 2025 Google's Gemini Deep Think and an experimental OpenAI model each scored thirty-five, exactly gold, writing proofs in plain language. And in July 2026, in Shanghai, Huawei and Xiaohongshu reported perfect scores, forty-two of forty-two, with solutions submitted to the organizers for grading, as AFP reported; seven of the six hundred and sixty-six students also scored forty-two. As a test for machines, the olympiad is nearly saturated.

Beyond contests, the frontier is research mathematics. Autoformalization, translating informal mathematics into Lean, sped up sharply: in September 2025 the start-up Math Inc. reported that its agent Gauss had formalized the strong prime number theorem, about twenty-five thousand lines of Lean, in roughly three weeks. In January 2026 OpenAI's GPT-5.2 Pro and Harmonic's prover Aristotle resolved Erdős problem 728, with a proof that ends in Lean. A Google DeepMind team ran Gemini over seven hundred Erdős problems marked open: two full and three partial solutions appeared new; eight more were already solved in the literature. Two cautions: a formal proof proves exactly its statement, so a mistranslated statement proves the wrong thing; and the problems falling first are the easier ones.

With a perfect checker, search can be trusted: generate freely, keep only what checks. The last chapter is about exactly that.

17Discovery by searchResearch3 min

When the checker is exact, discovery becomes a loop. Propose a candidate, a program or a construction; score it exactly; keep the best and vary them. AlphaTensor, in 2022, used an AlphaZero network as the proposer. In December 2023 FunSearch, from Bernardino Romera-Paredes and colleagues at Google DeepMind, made the proposer a language model writing Python, with programs kept on separate islands like populations in evolution. It found a cap set in eight dimensions, five hundred and twelve points with no three in a line, beating the four hundred and ninety-six known.

Let's run that loop ourselves, on one of FunSearch's problems: online bin packing. Items arrive one at a time, and each must go into a bin at once. A rule decides: score every bin the item fits in, and pick the highest. The classic is best fit: the bin with the least room left. We evolve such scores as formulas, with random mutations and crossings standing in for the language model, judged by how many bins they use on eight training sequences. . . .

Matrix multiplication is the purest case. The schoolbook way to multiply two n by n matrices uses n cubed multiplications. Write the product as a three-way tensor; then every way of writing that tensor as a sum of R simple products is an algorithm with R multiplications. In 1969 Volker Strassen found seven for two by two matrices, not eight, and Shmuel Winograd proved two years later that seven is the minimum. We searched for these decompositions numerically, from thirty random starts at each rank. . . .

In May 2025 Google DeepMind combined both lines in AlphaEvolve. Gemini models propose changes to whole programs, evaluators score them, and evolution keeps the best. Among its results: four by four complex matrices multiplied with forty-eight multiplications, beating the forty-nine of applying Strassen's trick twice, the record since 1969, found by evolving a decomposition search like ours. Within weeks, three researchers in France found a forty-eight with rational coefficients. It also raised to 593 the number of spheres that can touch a central one in eleven dimensions, and on over fifty open problems matched the best known answer in three quarters and improved it in a fifth. Inside Google, a scheduling rule it found recovers 0.7 percent of the company's computing. In November 2025 Terence Tao and colleagues tried it on sixty-seven problems, and published its failures too.

Discovery by search, then: propose freely, check exactly, keep what survives. It works wherever the checking is exact, which is why mathematics and algorithms went first.

Recap, problems, and what comes nextAll tracks2 min

Let's take stock. A symmetry is a transformation that shouldn't change the answer; a network can respect it exactly, by construction, or approximately, from examples. Sums make functions of sets; sums over neighbours make graph networks, which see what colour refinement sees and blur when stacked deep. Built-in rotations made our molecule model far better on the same data. AlphaFold reads a protein through pairs kept consistent by triangles, builds it from frames, and scores it with a loss that knows left from right; its successor hands the atoms to diffusion. Weather runs on a mesh, equations are learned as operators, crystals are screened by the million, and where the checker is perfect, search discovers.

All of this comes back. Search guided by a network and judged by an exact checker is AlphaZero, next time, and Part 28's reasoning models. A learned simulator that rolls the world forward, like our mesh network, is Part 29's world model. What a network's layers represent, and whether they respect the symmetries we expect, is Part 30's subject. And CASP's blind tests and a nearly saturated olympiad lead to Part 31's question: how to evaluate at all.

Here are six problems to try, from equivariant compositions to the Fourier layer. Pause here and work through them; full solutions are in this part's notes.

Next time, the fifth act: agency. The search loop of this chapter, propose, check, keep the best, becomes learning from reward: an agent acts, the world answers, and the agent improves, all the way to AlphaZero, which we will train ourselves. Part 26: reinforcement learning, from Bellman to AlphaZero.

To go deeper, Bronstein, Bruna, Cohen and Veličković's book on geometric deep learning is the map of this whole part, and William Hamilton's short book covers graph networks clearly. Thanks for watching, and see you in Part 26.

Where it goes next. Search guided by a network and judged by an exact checker is AlphaZero in Part 26 and the reasoning models of Part 28. A learned simulator that rolls the world forward, like the mesh network, is Part 29's world model; whether a network's layers respect the symmetries expected of them is Part 30's subject; CASP's blind tests and a nearly saturated olympiad lead to Part 31.

Key results

The part's results in one place, for revision.

Invariance and equivariance\(\displaystyle f(g\cdot x)=f(x),\qquad\allowbreak f(g\cdot x)=g\cdot f(x)\)
Group averaging\(\displaystyle \bar f(x)=\frac{1}{|G|}\sum_{g\in G}g^{-1}f(g\cdot x)\)
Deep Sets\(\displaystyle f(X)=\rho\Bigl(\sum_{x\in X}\phi(x)\Bigr)\)
Graphs\(\displaystyle f(PX,\,PAP^\top)=P\,f(X,A),\qquad\allowbreak \text{MPNN}\le\text{1-WL}\)
Over-smoothing\(\displaystyle \bigl\|\hat A^kH-u_1u_1^\top H\bigr\|\le|\lambda_2|^k\,\|H\|,\qquad\allowbreak u_1\propto\sqrt{\deg}\)
An equivariant force\(\displaystyle E(Rx+t)=E(x)\ \Longrightarrow\ F(Rx+t)=R\,F(x)\)

Try it

Lab 25 · Symmetry, checked three ways

Differentiate an energy built on distances with the series' autodiff and check that its force turns with the molecule while a network on raw coordinates does not; run colour refinement and a sum-aggregating network on the triangular prism and K3,3; and measure how fast repeated averaging erases node features.

Figure produced by Lab 25: Symmetry, checked three ways
Produced by the lab below, seed 0, in 0.3 s.
python -m videos.ai.labs 25 needs numpy, scipy, matplotlib · download lab25.py · source on GitHub
energy on distances: |E(Rx + t) - E(x)|                        4.4e-16   force error |F(Rx + t) - R F(x)| 3.3e-16
energy on raw coordinates: |E(Rx + t) - E(x)|                  9.7e-01   force error |F(Rx + t) - R F(x)| 4.4e-01
triangles in the prism and in K3,3                             2 and 0
1-WL colour histograms equal; sum network's outputs differ by  True; 0.0e+00
random 10-node pairs that 1-WL separates                       200 of 200
averaging matrix: top eigenvalues                              1.0000, 0.9035, 0.8896
Dirichlet energy: factor per layer, layers 40 to 60            0.8114   (lambda_2 squared = 0.8163)
after 64 layers: what is left off sqrt(degree), over |H|       6.7e-04   (bound lambda_2^64 = 1.5e-03)

A symmetry that is built in holds to rounding error for any weights, trained or not; the same structure sets the limits: message passing sees what colour refinement sees, and averaging forgets at the rate of the second eigenvalue.
The code (146 lines; it asserts its own result)
"""Lab 25: turn a molecule under an invariant energy, fool message passing with two graphs, and over-smooth a third."""

import numpy as np

from videos.coursekit import labs
from explainer.ai.autodiff import Tensor

TITLE = "Symmetry, checked three ways"
GOAL = ("Differentiate an energy built on distances with the series' autodiff and check that its force turns with the "
        "molecule while a network on raw coordinates does not; run colour refinement and a sum-aggregating network on "
        "the triangular prism and K3,3; and measure how fast repeated averaging erases node features.")
TASKS = [
    "Replace the rotation by a reflection (flip one axis). Does the distance energy change? What would it take to tell a molecule from its mirror image?",
    "Give the nodes of the prism and of K3,3 random features instead of constant ones and rerun the sum network. What have you traded away?",
    "Raise the number of edges between the communities (p_out = 0.1) and watch lambda_2 and the number of layers before the features are gone.",
]


def rotation(rng):
    q, r = np.linalg.qr(rng.standard_normal((3, 3)))
    q = q * np.sign(np.diag(r))
    return q if np.linalg.det(q) > 0 else q[:, ::-1]


def energy_and_force(x, w, pairs_only=True):
    """E and F = -dE/dx for a small tanh network, on squared distances (invariant) or on raw coordinates."""
    xt = Tensor(x, requires_grad=True)
    if pairs_only:
        i, j = np.triu_indices(len(x), 1)
        d = xt[i] - xt[j]
        feat = (d * d).sum(axis=1, keepdims=True)  # |x_i - x_j|^2, one row per pair
    else:
        feat = xt
    e = (((feat @ w[0] + w[1]).tanh() @ w[2]).tanh()).sum()
    e.backward()
    return float(e.data), -xt.grad


def refine(A, rounds=6):
    """1-WL colour refinement: the sorted histogram of colours after each round, hashable across graphs."""
    colours = [0] * len(A)
    for _ in range(rounds):
        sig = [(colours[v], tuple(sorted(colours[u] for u in np.flatnonzero(A[v])))) for v in range(len(A))]
        colours = [hash(s) for s in sig]
    return sorted(colours)


def sum_network(A, weights):
    """A message-passing network with sum aggregation and a sum read-out, from the same feature on every node."""
    h = np.ones((len(A), 1))
    for W in weights:
        h = np.tanh((h + A @ h) @ W)
    return h.sum(0)


def run(seed=0):
    rng = np.random.default_rng(seed)
    lab = labs.Lab()

    # 1. five particles, turned and shifted
    x = rng.standard_normal((5, 3))
    R, t = rotation(rng), rng.standard_normal(3)
    w_inv = [0.2 * rng.standard_normal((1, 8)), rng.standard_normal(8), 0.4 * rng.standard_normal((8, 1))]
    w_raw = [0.5 * rng.standard_normal((3, 8)), rng.standard_normal(8), 0.4 * rng.standard_normal((8, 1))]
    out = {}
    for name, w, pairs in (("distances", w_inv, True), ("raw coordinates", w_raw, False)):
        e0, f0 = energy_and_force(x, w, pairs)
        e1, f1 = energy_and_force(x @ R.T + t, w, pairs)
        out[name] = (abs(e1 - e0), np.abs(f1 - f0 @ R.T).max(), np.abs(f0.sum(0)).max(), np.abs(f0).max())
        lab.row(f"energy on {name}: |E(Rx + t) - E(x)|", f"{out[name][0]:.1e}   force error |F(Rx + t) - R F(x)| {out[name][1]:.1e}")
    assert out["distances"][0] < 1e-10 and out["distances"][1] < 1e-10, "invariant energy, equivariant force"
    assert out["distances"][2] < 1e-10 < 1e-3 < out["distances"][3], "and the (non-zero) forces sum to zero"
    assert out["raw coordinates"][0] > 1e-3 and out["raw coordinates"][1] > 1e-3, "a network on coordinates has neither"
    angles = np.linspace(0, 2 * np.pi, 121)
    turn = lambda a: np.array([[np.cos(a), -np.sin(a), 0], [np.sin(a), np.cos(a), 0], [0, 0, 1]])
    sweep = {name: [energy_and_force(x @ turn(a).T, w, pairs)[0] for a in angles]
             for name, w, pairs in (("distances", w_inv, True), ("raw coordinates", w_raw, False))}

    # 2. the triangular prism and K3,3: both 3-regular on six nodes
    prism = np.zeros((6, 6), int)
    for a, b in [(0, 1), (1, 2), (2, 0), (3, 4), (4, 5), (5, 3), (0, 3), (1, 4), (2, 5)]:
        prism[a, b] = prism[b, a] = 1
    k33 = np.zeros((6, 6), int)
    k33[:3, 3:] = k33[3:, :3] = 1
    tri = [int(np.trace(np.linalg.matrix_power(A, 3)) // 6) for A in (prism, k33)]
    weights = [rng.standard_normal((1, 6)), rng.standard_normal((6, 6)), rng.standard_normal((6, 6)), rng.standard_normal((6, 4))]
    gap = np.abs(sum_network(prism, weights) - sum_network(k33, weights)).max()
    separated = 0
    for _ in range(200):  # random graphs are another matter
        g1, g2 = (np.triu(rng.random((10, 10)) < 0.5, 1) for _ in range(2))
        separated += refine(g1 + g1.T) != refine(g2 + g2.T)
    lab.row("triangles in the prism and in K3,3", f"{tri[0]} and {tri[1]}")
    lab.row("1-WL colour histograms equal; sum network's outputs differ by", f"{refine(prism) == refine(k33)}; {gap:.1e}")
    lab.row("random 10-node pairs that 1-WL separates", f"{separated} of 200")
    assert tri == [2, 0] and refine(prism) == refine(k33), "1-WL cannot see the triangles"
    assert gap < 1e-12, "so no message-passing network can"
    assert separated >= 195, "though it separates almost all random graphs"

    # 3. over-smoothing on three communities
    n, sizes = 60, 20
    y = np.repeat(np.arange(3), sizes)
    P = np.where(y[:, None] == y[None, :], 0.3, 0.02)
    A = np.triu(rng.random((n, n)) < P, 1)
    A = (A + A.T).astype(float)
    ring = np.arange(n)
    A[ring, (ring + 1) % n] = A[(ring + 1) % n, ring] = 1  # a ring through every node keeps the graph connected
    M = A + np.eye(n)
    d = M.sum(1)
    Ahat = M / np.sqrt(np.outer(d, d))
    lam = np.sort(np.linalg.eigvalsh(Ahat))[::-1]
    lam2 = max(abs(lam[1]), abs(lam[-1]))
    H = np.eye(3)[y] + 0.5 * rng.standard_normal((n, 3))
    H0 = H.copy()
    dirichlet = lambda h: float(np.trace(h.T @ (np.eye(n) - Ahat) @ h))  # zero only when h is proportional to sqrt(deg)
    energies = [dirichlet(H)]
    for _ in range(64):
        H = Ahat @ H
        energies.append(dirichlet(H))
    energies = np.array(energies)
    rate = (energies[60] / energies[40]) ** (1 / 20)
    u1 = np.sqrt(d) / np.linalg.norm(np.sqrt(d))
    left = np.linalg.norm(H - np.outer(u1, u1 @ H)) / np.linalg.norm(H0)
    lab.row("averaging matrix: top eigenvalues", f"{lam[0]:.4f}, {lam[1]:.4f}, {lam[2]:.4f}")
    lab.row("Dirichlet energy: factor per layer, layers 40 to 60", f"{rate:.4f}   (lambda_2 squared = {lam2 ** 2:.4f})")
    lab.row("after 64 layers: what is left off sqrt(degree), over |H|", f"{left:.1e}   (bound lambda_2^64 = {lam2 ** 64:.1e})")
    lab.note = ("A symmetry that is built in holds to rounding error for any weights, trained or not; the same structure "
                "sets the limits: message passing sees what colour refinement sees, and averaging forgets at the rate "
                "of the second eigenvalue.")
    assert abs(lam[0] - 1) < 1e-10 and lam2 < 1, "a connected graph: one eigenvalue at 1"
    assert lam2 ** 2 - 0.03 < rate <= lam2 ** 2 + 1e-9, "the energy decays like lambda_2^(2k)"
    assert left <= lam2 ** 64 * (1 + 1e-9), "and the features collapse onto sqrt(degree)"

    fig, ax = labs.figure(2, size=(11, 4.2))
    deg = np.degrees(angles)
    ax[0].plot(deg, sweep["raw coordinates"], color=labs.RED, label="network on raw coordinates")
    ax[0].plot(deg, sweep["distances"], color=labs.GREEN, label="network on distances")
    ax[0].set(title="Turn the molecule: the predicted energy", xlabel="angle of the turn (degrees)", ylabel="energy")
    ax[0].set_xticks([0, 90, 180, 270, 360])
    ax[0].legend()
    k = np.arange(65)
    ax[1].semilogy(k, energies / energies[0], color=labs.BLUE, label="Dirichlet energy of the features")
    ax[1].semilogy(k, energies[40] / energies[0] * lam2 ** (2.0 * (k - 40)), color=labs.GOLD, ls="--", label="slope of lambda_2^(2k)")
    ax[1].set(title="Over-smoothing: energy against depth", xlabel="rounds of averaging k", ylabel="share of the starting energy")
    ax[1].legend()
    lab.fig = fig
    return lab

Now change it

  1. Replace the rotation by a reflection (flip one axis). Does the distance energy change? What would it take to tell a molecule from its mirror image?
  2. Give the nodes of the prism and of K3,3 random features instead of constant ones and rerun the sum network. What have you traded away?
  3. Raise the number of edges between the communities (p_out = 0.1) and watch lambda_2 and the number of layers before the features are gone.

Problems, with solutions

Try each problem before opening its solution.

1. Compositions. Show that a composition of G-equivariant maps is G-equivariant, and that an invariant map applied after equivariant layers makes the whole network invariant.

Solution

If f(g·x) = g·f(x) and h(g·y) = g·h(y), then h(f(g·x)) = h(g·f(x)) = g·h(f(x)): the composition is equivariant (the actions on the intermediate spaces may differ; only consistency between consecutive layers matters). If the last map r is invariant, r(g·y) = r(y), then r(h(f(g·x))) = r(g·h(f(x))) = r(h(f(x))). This is why equivariant networks keep their layers equivariant and only make the read-out invariant (a sum over particles, a norm): an invariant layer in the middle would throw away the information about orientation that later layers might need.

2. Deep Sets. Number a countable universe by c(x) ∈ {1, 2, …}. Show that X ↦ Σ_{x∈X} 4^{−c(x)} is one-to-one on finite sets. What goes wrong for multisets, and how does a larger base fix it?

Solution

Write S(X) = Σ 4^{−c(x)} in base 4: its k-th digit after the point is 1 if the element numbered k is in X and 0 otherwise. A finite sum of distinct powers of 4^{−1} with coefficients 0 or 1 never carries (each digit is at most 1 < 3), and a terminating base-4 expansion is unique, so S(X) = S(Y) forces the same digits, X = Y. For a multiset, the coefficient of 4^{−k} is the multiplicity m_k; as long as every m_k ≤ 3 the digits are still read off uniquely, but a multiplicity of 4 carries into the next place (4·4^{−k} = 4^{−(k−1)}), and then {x_k, x_k, x_k, x_k} and {x_{k−1}} collide. In base b, multiplicities below b are safe; for bounded multisets choose b larger than the largest multiplicity (GIN's injectivity lemma uses the same idea).

3. Regular graphs. Show that colour refinement gives every node of a d-regular graph the same colour at every round, and conclude that no message-passing network can tell a 6-cycle from two triangles.

Solution

By induction: at round 0 all colours are equal. If all nodes share one colour c at round t, every node's signature at round t + 1 is (c, the multiset {c, …, c} of size d), the same for every node, so all nodes again share a colour. Two d-regular graphs with the same number of nodes therefore have identical colour histograms at every round. C₆ and 2C₃ are both 2-regular on 6 nodes, so 1-WL cannot separate them; by the theorem of chapter 5 (an MPNN's states are functions of the WL colours) every message-passing network gives every node of both graphs the same state, hence the same sum read-out. Yet one has triangles and the other doesn't.

4. Over-smoothing. For a connected graph, show that  = D^{−1/2}(A + I)D^{−1/2} has top eigenvalue 1 with eigenvector ∝ D^{1/2}𝟏, and that Â^k X converges to the projection of X onto it.

Solution

Here D is the degree matrix of A + I. ·D^{1/2}𝟏 = D^{−1/2}(A + I)𝟏 = D^{−1/2}D𝟏 = D^{1/2}𝟏, so D^{1/2}𝟏 is an eigenvector with eigenvalue 1.  is similar to the random-walk matrix P = D^{−1}(A + I) ( = D^{1/2} P D^{−1/2}), which is stochastic, so every eigenvalue has |λ| ≤ 1. For a connected graph, P is irreducible, and the self-loops make it aperiodic, so by Perron–Frobenius λ = 1 is simple and every other eigenvalue has |λ| < 1. With  = Σ λ_i u_i u_iᵀ (orthonormal,  symmetric), Â^k X = u₁u₁ᵀX + Σ_{i≥2} λ_i^k u_i u_iᵀ X, and the second term is at most |λ₂|^k ‖X‖. Each column of the limit is a multiple of D^{1/2}𝟏: every node's feature is fixed by its degree, and the information that told the nodes apart is gone.

5. EGNN. Show that x_i′ = x_i + C Σ_j (x_i − x_j) φ(‖x_i − x_j‖²) satisfies x′(Rx + t) = R x′(x) + t for every orthogonal R. Is it then blind to reflections?

Solution

Put y_i = Rx_i + t. Then y_i − y_j = R(x_i − x_j) and ‖y_i − y_j‖ = ‖x_i − x_j‖ because R is orthogonal, so every φ is unchanged and y_i′ = Rx_i + t + C Σ_j R(x_i − x_j) φ(·) = R x_i′ + t. Nothing used det R = +1, so the layer is equivariant to reflections too (E(n), not just SE(n)), and any invariant read-out gives a molecule and its mirror image the same value: such a network can't tell enantiomers apart from positions alone. When chirality matters, as in proteins, one adds a pseudoscalar (a triple product (x_j − x_i)·((x_k − x_i) × (x_l − x_i)), which changes sign under reflection) or, as AlphaFold 2 does, works with right-handed frames and a loss such as FAPE.

6. The Fourier layer. Show that v ↦ F^{−1}[R_k v̂_k] commutes with shifts of the periodic grid, and that the same R_k define the layer on any grid with more than 2k_max points.

Solution

Shift by s grid points: (τ_s v)n = v{n−s}. Its discrete Fourier coefficients are (τ_s v)^_k = e^{−2πiks/N} v̂_k. Multiplying by R_k and inverting gives F^{−1}[R_k e^{−2πiks/N} v̂_k] = τ_s F^{−1}[R_k v̂_k]: the phase factor is exactly a shift. (A shift of the continuous variable by any amount acts the same way on the Fourier series, so the operator commutes with all shifts of the circle.) The weights R_k are indexed by frequency k = 0, …, k_max − 1, not by grid point. A grid of N points represents the frequencies |k| < N/2, so for N > 2k_max every learned frequency exists on it and the layer is defined by the same numbers: sample the input on the new grid, transform, multiply the same modes, transform back. What does change with N is aliasing in the pointwise nonlinearities between Fourier layers, which is why the error is not exactly constant across resolutions.

Notes and sources

Glossary

English 中文
symmetry, transformation 对称,变换
group, group action, identity, inverse 群,群作用,单位元,逆元
permutation, permutation group 置换(排列),置换群
rotation group SO(3), E(3), E(n), SE(3) 转动群SO(3),E(3),E(n),SE(3)
rigid motion, reflection, translation 刚体运动,反射,平移
invariant, invariance 不变的,不变性
equivariant, equivariance 等变的,等变性
group averaging (Reynolds operator) 群平均(雷诺算子)
data augmentation 数据增强
canonicalization (standard pose) 规范化(标准姿态)
geometric deep learning 几何深度学习
set function, multiset 集合函数,多重集
Deep Sets, PointNet Deep Sets,PointNet
power sums, Newton's identities 幂和,牛顿恒等式
graph, node, edge, adjacency matrix 图,节点,边,邻接矩阵
graph neural network (GNN) 图神经网络(GNN)
message passing (MPNN), message, readout 消息传递(MPNN),消息,读出
graph convolutional network (GCN) 图卷积网络(GCN)
hop, receptive field 跳,感受野
stochastic block model, community 随机块模型,社群
Weisfeiler–Leman test (1-WL), colour refinement 魏斯费勒–莱曼检验(1-WL),颜色细化
graph isomorphism 图同构
graph isomorphism network (GIN) 图同构网络(GIN)
sum / mean / max aggregation 求和 / 平均 / 最大值聚合
regular graph, union of cycles 正则图,若干环的并
random node features (RNI) 随机节点特征(RNI)
pair network (provably powerful graph network) 节点对网络(可证明强大的图网络)
k-WL, subgraph counts, positional encoding k-WL,子图计数,位置编码
over-smoothing, Dirichlet energy 过平滑,狄利克雷能量
over-squashing, bottleneck, curvature 过挤压,瓶颈,曲率
residual (skip) connection 残差(跳跃)连接
graph attention (GAT, GATv2), graph transformer 图注意力(GAT,GATv2),图Transformer
decalin, bicyclopentyl 十氢萘,联环戊烷
E(n)-equivariant graph network (EGNN) E(n)等变图网络(EGNN)
SchNet, radial basis functions SchNet,径向基函数
spherical harmonics, degree ℓ 球谐函数,阶ℓ
Wigner D-matrix (rotation block) 维格纳D矩阵(转动块)
Clebsch–Gordan coefficients, tensor product 克莱布什–戈尔丹系数,张量积
tensor field network, NequIP, MACE, e3nn 张量场网络,NequIP,MACE,e3nn
interatomic potential, force field 原子间势,力场
n-body system, charged particles 多体系统,带电粒子
protein, amino acid, residue 蛋白质,氨基酸,残基
fold, backbone, C-alpha (Cα) 折叠(构象),主链,Cα原子
helix, strand, loop, three-helix bundle 螺旋,链,环,三螺旋束
X-ray crystallography, cryo-EM X射线晶体学,冷冻电镜
Protein Data Bank (PDB) 蛋白质数据库(PDB)
Levinthal's paradox 列文索尔悖论
CASP, GDT_TS, free modelling CASP,GDT_TS,自由建模(无模板)
multiple sequence alignment (MSA), co-evolution, contact 多序列比对(MSA),共进化,接触
distogram 距离直方图
classical multidimensional scaling (MDS), Gram matrix 经典多维尺度分析(MDS),格拉姆矩阵
mirror image, chirality, right-handed 镜像,手性,右手的
RMSD, distance RMSD (dRMSD), Kabsch alignment 均方根偏差(RMSD),距离均方根偏差(dRMSD),Kabsch对齐
Evoformer, pair representation, MSA representation Evoformer,残基对表示,MSA表示
row / column attention, outer product mean 行 / 列注意力,外积均值
triangle inequality, triangle multiplicative update, triangle attention 三角不等式,三角乘法更新,三角注意力
structure module, rigid frame, residue gas 结构模块,刚性坐标系,残基气体
invariant point attention (IPA) 不变点注意力(IPA)
frame-aligned point error (FAPE), clamp 坐标系对齐点误差(FAPE),截断
recycling 循环(回收)
pLDDT (confidence) pLDDT(置信度)
AlphaFold Protein Structure Database AlphaFold蛋白质结构数据库
Pairformer, diffusion module Pairformer,扩散模块
cross-distillation, hallucination 交叉蒸馏,幻觉
ligand, docking, PoseBusters 配体,分子对接,PoseBusters
protein design, inverse folding, binder 蛋白质设计,逆折叠,结合子
sequence recovery 序列还原率
motif scaffolding 基序支架
denoiser, denoising diffusion 去噪器,去噪扩散
numerical weather prediction (NWP) 数值天气预报(NWP)
reanalysis (ERA5) 再分析(ERA5)
icosahedral mesh, multimesh 二十面体网格,多尺度网格(multimesh)
encoder–processor–decoder 编码器–处理器–解码器
rollout, lead time 推演(展开),预报时效
persistence, climatology 持续性预报,气候平均
ensemble forecast 集合预报
vorticity 涡度
neural operator, Fourier neural operator (FNO), DeepONet 神经算子,傅里叶神经算子(FNO),DeepONet
Burgers' equation, pseudo-spectral solver 伯格斯方程,伪谱求解器
convolution theorem, Fourier mode 卷积定理,傅里叶模式
resolution invariance, zero-shot super-resolution 分辨率不变性,零样本超分辨率
crystal, space group, formation energy 晶体,空间群,形成能
density functional theory (DFT) 密度泛函理论(DFT)
convex hull, energy above hull, stable 凸包,凸包上方能量,稳定
active learning, surrogate model, hit rate 主动学习,代理模型,命中率
autonomous laboratory 自主实验室
proof assistant, kernel, Lean, Mathlib 证明助手,内核,Lean,Mathlib
formal proof, formalization, autoformalization 形式化证明,形式化,自动形式化
four-colour theorem, Kepler conjecture 四色定理,开普勒猜想
symbolic deduction engine, auxiliary construction 符号演绎引擎,辅助构造
synthetic theorems, traceback 合成定理,回溯
Erdős problems 埃尔德什问题
cap set 帽集
online bin packing, first fit, best fit, priority function 在线装箱,首次适配,最佳适配,优先级函数
genetic programming, mutation, crossover 遗传规划,变异,交叉
tensor rank, tensor decomposition 张量秩,张量分解
alternating least squares 交替最小二乘
Strassen's algorithm 施特拉森算法
kissing number 接吻数
evolutionary coding agent 进化编程智能体

Names stay in Latin script: AlphaFold, AlphaFold-Multimer, AlphaFold Server, RoseTTAFold, ESMFold, ESM3, ProteinMPNN, RFdiffusion, RFdiffusion3, BindCraft, AlphaProteo, BoltzGen, Boltz-1, Boltz-2, Chai-1, Protenix, OpenFold3, IsoDDE, Rosetta, Top7, GraphCast, GenCast, AIFS, FourCastNet, Pangu-Weather, WeatherNext, GNoME, MatterGen, MACE-MP-0, A-Lab, EGNN, SchNet, NequIP, MACE, e3nn, GIN, GCN, GAT, PointNet, Deep Sets, FNO, DeepONet, Lean, Mathlib, AlphaGeometry, AlphaProof, Gemini Deep Think, Aristotle, Gauss, FunSearch, AlphaEvolve, AlphaTensor.

Sources

Books: M. M. Bronstein, J. Bruna, T. Cohen & P. Veličković, Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges (2021); W. L. Hamilton, Graph Representation Learning (2020); S. J. D. Prince, Understanding Deep Learning (2023), ch. 13; P. Lynch, The Emergence of Numerical Weather Prediction: Richardson's Dream (2006).

Symmetry, sets and graphs: B. Weisfeiler & A. Leman, A reduction of a graph to a canonical form and an algebra arising during this reduction (1968); L. Babai, Graph isomorphism in quasipolynomial time (2016); M. Zaheer et al., Deep Sets (NeurIPS 2017); C. R. Qi et al., PointNet (CVPR 2017); E. Wagstaff et al., On the limitations of representing functions on sets (ICML 2019); A. Sperduti & A. Starita, Supervised neural networks for the classification of structures (1997); M. Gori, G. Monfardini & F. Scarselli, A new model for learning in graph domains (2005); F. Scarselli et al., The graph neural network model (2009); J. Bruna et al., Spectral networks and locally connected networks on graphs (2014); M. Defferrard et al. (2016); D. Duvenaud et al., Convolutional networks on graphs for learning molecular fingerprints (2015); T. Kipf & M. Welling, Semi-supervised classification with graph convolutional networks (ICLR 2017); J. Gilmer et al., Neural message passing for quantum chemistry (ICML 2017); P. Battaglia et al., Relational inductive biases, deep learning, and graph networks (2018); K. Xu, W. Hu, J. Leskovec & S. Jegelka, How powerful are graph neural networks? (ICLR 2019); C. Morris et al., Weisfeiler and Leman go neural (AAAI 2019); H. Maron et al., Provably powerful graph networks (NeurIPS 2019); R. Sato, M. Yamada & H. Kashima, Random features strengthen graph neural networks (2021); R. Abboud et al. (IJCAI 2021); Q. Li, Z. Han & X.-M. Wu (AAAI 2018); K. Oono & T. Suzuki, Graph neural networks exponentially lose expressive power for node classification (ICLR 2020); U. Alon & E. Yahav, On the bottleneck of graph neural networks (ICLR 2021); J. Topping et al., Understanding over-squashing and bottlenecks on graphs via curvature (ICLR 2022); P. Veličković et al., Graph attention networks (ICLR 2018); S. Brody, U. Alon & E. Yahav, How attentive are graph attention networks? (ICLR 2022).

Geometry: K. T. Schütt et al., SchNet (2017); N. Thomas et al., Tensor field networks (2018); V. G. Satorras, E. Hoogeboom & M. Welling, E(n) equivariant graph neural networks (ICML 2021); S. Batzner et al., E(3)-equivariant graph neural networks for data-efficient and accurate interatomic potentials (Nat. Commun. 2022); I. Batatia et al., MACE (NeurIPS 2022); T. Kipf et al., Neural relational inference (ICML 2018).

Proteins: J. C. Kendrew et al. (Nature 1958); C. B. Anfinsen et al. (PNAS 1961), C. B. Anfinsen, Principles that govern the folding of protein chains (Science 1973); C. Levinthal, How to fold graciously (1969); W. S. Torgerson (1952); J. Moult et al., A large-scale experiment to assess protein structure prediction methods (1995); D. S. Marks et al. (PLoS One 2011); F. Morcos et al. (PNAS 2011); A. W. Senior et al., Improved protein structure prediction using potentials from deep learning (Nature 2020); J. Jumper et al., Highly accurate protein structure prediction with AlphaFold (Nature 2021) and its supplementary information; M. Baek et al., RoseTTAFold (Science 2021); M. Varadi et al., AlphaFold Protein Structure Database (2022); J. Abramson et al., Accurate structure prediction of biomolecular interactions with AlphaFold 3 (Nature 2024); Google DeepMind & Isomorphic Labs, AlphaFold 3 announcement (8 May 2024); Isomorphic Labs, IsoDDE technical report (10 February 2026); B. Kuhlman et al., Design of a novel globular protein fold with atomic-level accuracy (Science 2003); J. Dauparas et al., Robust deep learning–based protein sequence design using ProteinMPNN (Science 2022); J. L. Watson et al., De novo design of protein structure and function with RFdiffusion (Nature 2023); R. Krishna et al., RFdiffusion3 (bioRxiv 2025); The Royal Swedish Academy of Sciences, the Nobel Prize in Chemistry 2024.

Weather and operators: L. F. Richardson, Weather Prediction by Numerical Process (1922); J. G. Charney, R. Fjørtoft & J. von Neumann, Numerical integration of the barotropic vorticity equation (1950); P. Bauer, A. Thorpe & G. Brunet, The quiet revolution of numerical weather prediction (Nature 2015); R. Lam et al., Learning skillful medium-range global weather forecasting (Science 2023); I. Price et al., Probabilistic weather forecasting with machine learning (Nature 2024/25); S. Lang et al., AIFS — ECMWF's data-driven forecasting system (2024); ECMWF, AIFS operational notes (2025, 2026); NOAA, AI-driven global models (17 December 2025); T. Chen & H. Chen (1995); L. Lu et al., DeepONet (Nat. Mach. Intell. 2021); Z. Li et al., Fourier neural operator for parametric partial differential equations (ICLR 2021); J. Pathak et al., FourCastNet (2022).

Materials: W. Kohn & L. J. Sham (1965); A. Jain et al., The Materials Project (2013); A. Merchant et al., Scaling deep learning for materials discovery (Nature 2023); A. K. Cheetham & R. Seshadri, Artificial intelligence driving materials discovery? Perspective on the article: Scaling deep learning for materials discovery (Chem. Mater. 2024); N. J. Szymanski et al., An autonomous laboratory for the accelerated synthesis of novel materials (Nature 2023; corrected 2026); J. Leeman et al., Challenges in high-throughput inorganic material prediction and autonomous synthesis (PRX Energy 2024); I. Batatia et al., A foundation model for atomistic materials chemistry (2023); C. Zeni et al., MatterGen (Nature 2025).

Mathematics: K. Appel & W. Haken (1976); G. Gonthier (2005/2008); T. Hales et al., A formal proof of the Kepler conjecture (2017); the Liquid Tensor Experiment (2022); Mathlib statistics (leanprover-community.github.io, accessed 2 November 2026); T. H. Trinh et al., Solving olympiad geometry without human demonstrations (Nature 2024); Y. Chervonyi et al., Gold-medalist performance in solving olympiad geometry with AlphaGeometry2 (2025); T. Hubert et al., AlphaProof (Nature 2025); AFP, AI catches up with humans to score 100% at top maths contest (23 July 2026); Math Inc., Gauss (2025); N. Sothanaphan, Resolution of Erdős problem #728 (2026); T. Feng et al., Semi-autonomous mathematics discovery with Gemini: a case study on the Erdős problems (2026); B. Romera-Paredes et al., Mathematical discoveries from program search with large language models (Nature 2024); K. Sim, Q. Renau & E. Hart, Beyond the hype: benchmarking LLM-evolved heuristics for bin packing (2025); V. Strassen (1969); S. Winograd (1971); A. Fawzi et al., AlphaTensor (Nature 2022); A. Novikov et al., AlphaEvolve (2025); J.-G. Dumas, C. Pernet & A. Sedoglavic, A non-commutative algorithm for multiplying 4 × 4 matrices using 48 non-complex multiplications (2025); B. Georgiev, J. Gómez-Serrano, T. Tao & A. Z. Wagner, Mathematical exploration and discovery at scale (2025).

About this partfrom its README

Part 25 of a thirty-one-part series on how modern AI works and how it came to be (see the series plan and the syllabus), and the last part of Act IV, Generation and Perception. What a network gains by knowing the symmetries of its problem, and what that did for science: groups, invariance and equivariance; functions of sets; graph networks, the Weisfeiler–Leman limit of message passing, over-smoothing and attention; networks that turn with the molecule; the protein-folding problem from Anfinsen and CASP to AlphaFold 2 and 3 and protein design; weather on a mesh (GraphCast, GenCast, ECMWF's AIFS); neural operators; materials by the million (GNoME); and mathematics, from AlphaGeometry and proofs in Lean to discovery by search (FunSearch, AlphaEvolve) and the 2025–26 frontier. Every experiment runs on the computer that renders the video (compute.py), on synthetic data; numbers about the large systems are the published ones, cited on screen.

  • Hook: turn the molecule. The 2024 Nobel Prize in Chemistry (Baker; Hassabis and Jumper) and in Physics (Hopfield, Hinton); five charged particles turned through a full circle while three trained networks predict their energy: a plain MLP's answer swings, the MLP trained on turned copies swings less, a network built on distances does not move; the question; four domains; the plan.
  • 1. How we got here. The long prelude: ENIAC's forecast (1950), Kendrew's myoglobin (1958), Anfinsen (1961), Weisfeiler–Leman (1968), the Protein Data Bank (1971, seven structures), ECMWF's first forecast (1979), convolutions (1989, Part 10), CASP (1994), the graph neural network (Gori, Monfardini & Scarselli 2005); the decade: message passing, Deep Sets and SchNet (2017), AlphaFold at CASP13 (2018) and CASP14 (2020), EGNN and neural operators (2021), 200 million predicted structures (2022), GraphCast, GNoME, RFdiffusion and FunSearch (2023), the Nobel, AlphaFold 3, AlphaGeometry and AlphaProof (2024), operational AI forecasts, AlphaEvolve and olympiad gold (2025), Erdős problems resolved by AI (2026); the recipe (find what doesn't matter, build it in) as a table from images to fields, and geometric deep learning (Bronstein, Bruna, Cohen & Veličković 2021); three ways to get a symmetry.
  • 2. Invariance and equivariance. Groups (the square's four turns, 16! orderings, SO(3), shifts); invariance f(g·x) = f(x) and equivariance f(g·x) = g·f(x) as a commutative diagram on our five particles; group averaging (the Reynolds operator) derived step by step, and its price; augmentation as its cheap version; the check, computed: four trained networks (EGNN, a message-passing network on raw coordinates, an MLP, the MLP on turned copies) given turned, shifted and reordered inputs, with the error of each against its own test error.
  • 3. Functions of sets. Sixteen points from four shapes; what an MLP sees, and how a renumbering changes it; the Deep Sets theorem (Zaheer et al. 2017) with the base-4 proof, power sums and Newton's identities, Wagstaff et al. (2019); φ shared across elements, a sum, ρ; PointNet (Qi et al. 2017); attention without positions as an equivariant set function; Deep Sets against an MLP and an MLP shown reordered copies, 32 to 8,192 training sets, three seeds, the same steps: accuracy and how often a reordering changes the answer.
  • 4. Message passing. Graphs and adjacency matrices; permutation equivariance f(PX, PAPᵀ) = P f(X, A); the MPNN framework (Gilmer et al. 2017: QM9, 134,000 molecules, chemical accuracy on 11 of 13 properties) and the GCN (Kipf & Welling 2017); the history (Sperduti & Starita 1997; Gori et al. 2005; Scarselli et al. 2009; Bruna et al. 2014; Defferrard et al. 2016; Duvenaud et al. 2015; Battaglia et al. 2018); a two-layer GCN on a three-community graph with 60 labelled nodes, replayed (its guesses for every node at eight checkpoints), against an MLP on the nodes' own hints, three seeds.
  • 5. What message passing can't see. Colour refinement (1-WL; Weisfeiler & Leman 1968) run on decalin and bicyclopentyl, which it cannot tell apart; the theorem MPNN ≤ 1-WL (Xu, Hu, Leskovec & Jegelka 2019; Morris et al. 2019) proved by induction, and GIN; sum against mean and max aggregation (node degrees from identical features, three seeds); unions of cycles and "is there a triangle?": GIN's outputs identical for every graph (the base rate), GIN with random node features (Sato et al. 2021; Abboud et al. 2021), a network on pairs of nodes (Maron et al. 2019); 1-WL on random graphs and on random 3-regular graphs (the triangular prism and K₃,₃: both 3-regular, one with triangles, the other without, one colour for every node); k-WL, subgraph counts, positional encodings, graph transformers; Babai (2016).
  • 6. Deep graph networks. Over-smoothing (Li, Han & Wu 2018; Oono & Suzuki 2020) derived from the spectrum of D^{-1/2}(A + I)D^{-1/2}; the Dirichlet energy under repeated averaging against λ₂^{2k}, and the nodes' features collapsing (computed); plain and residual GCNs from 2 to 64 layers, three seeds; over-squashing (Alon & Yahav 2021; Topping et al. 2022); graph attention (Veličković et al. 2018) and GATv2 (Brody, Alon & Yahav 2022); a transformer as attention on the complete graph; graph transformers; the Evoformer as attention on pairs.
  • 7. Networks that turn with the molecule. E(3); the gradient of an invariant energy is an equivariant force, derived; SchNet (Schütt et al. 2017); EGNN (Satorras, Hoogeboom & Welling 2021) with its equivariance proved line by line; spherical harmonics and the block-diagonal action of a rotation on degrees 0, 1, 2 (computed), Clebsch–Gordan products, tensor field networks (Thomas et al. 2018), NequIP (Batzner et al. 2022), MACE (Batatia et al. 2022); the charged five-body system (after Kipf et al. 2018 and Satorras et al. 2021): EGNN, a plain GNN, an MLP and the MLP on turned copies, 100 to 3,000 training systems, three seeds, 3,000 steps each; the training of EGNN and the MLP replayed on one test system.
  • 8. The protein-folding problem. Amino acids and folds; Kendrew and Perutz; the PDB (seven structures in 1971, more than 250,000 in 2026); Anfinsen's ribonuclease (1961); Levinthal's argument (1969) as arithmetic; CASP (Moult & Fidelis, 1994) and GDT_TS; co-evolution (Marks et al. 2011; Morcos et al. 2011); AlphaFold at CASP13 (Senior et al. 2020: 24 of 43 hard domains at TM ≥ 0.7, against 14); classical MDS (Torgerson 1952) recovering a three-helix bundle from its distances, up to a mirror image; gradient descent on noisy partial distances from twelve random starts, replayed: some land on the fold, the rest on its mirror image.
  • 9. AlphaFold 2: the Evoformer. The architecture (Jumper et al. 2021): MSA and templates, 48 Evoformer blocks, the structure module, recycling; row attention with pair bias, column attention, the outer-product mean; the triangle inequality and the triangle multiplicative updates (outgoing, incoming) and triangle attention; the link to chapter 5's pair network; completing a distance matrix from a quarter of the pairs, per-pair updates against triangle updates of the same size and training, three seeds (with a separation-only baseline and the rate of triangle-inequality violations); CASP14 (median GDT 92.4 overall, 87.0 on the hardest; 0.96 Å backbone r.m.s.d.₉₅ against 2.8 Å; Moult's words).
  • 10. AlphaFold 2: frames, FAPE and recycling. Residues as rigid frames, the residue gas, invariant point attention and why it is invariant; FAPE derived (clamp and length scale 10 Å), invariant to rotations and translations but not to reflections; FAPE against distance RMSD on our bundle's mirror image, on a structure with independent Gaussian noise of standard deviation 1 Å per coordinate, and on chapter 8's twelve folds; recycling (a random number of passes in training, gradients through the last) added to chapter 9's model; July 2021 (code; RoseTTAFold, Baek et al.), the AlphaFold Protein Structure Database (214,684,311 entries in 2022), pLDDT, the limits.
  • 11. AlphaFold 3: diffusion over atoms. Abramson et al. (2024): proteins, nucleic acids, ligands, ions; a 4-block MSA module and the 48-block Pairformer; a diffusion module on raw atom coordinates with "no invariance or equivariance … required", random rotations and translations instead, and cross-distillation against hallucination; the question tested on a toy: an E(2)-equivariant denoiser against a plain MLP on randomly turned chains, the same steps, two seeds (bond lengths, clashes, novelty against the training set); PoseBusters ("50% more accurate than the best traditional methods"), the AlphaFold Server, code for academics (November 2024), Chai-1, Boltz-1, Protenix, Boltz-2, OpenFold3, Isomorphic Labs' IsoDDE (February 2026).
  • 12. Designing proteins. The inverse problem; Top7 (Kuhlman et al. 2003) and Rosetta; ProteinMPNN (Dauparas et al. 2022: 52.4% native sequence recovery against 32.9% for Rosetta); RFdiffusion (Watson et al. 2023: RoseTTAFold fine-tuned to denoise frames, 200 steps; binders 19% experimental success, about two orders of magnitude over the Rosetta-based rate; a haemagglutinin binder 0.63 Å from its design) and the pipeline (eight ProteinMPNN sequences, the AlphaFold 2 filter, pAE < 5, RMSD < 2 Å); our toy denoiser's training replayed (samples from fixed noise at six checkpoints); AlphaProteo, BindCraft, ESM3 (2024), RFdiffusion3, BoltzGen (2025); the Responsible AI x Biodesign commitments (2024).
  • 13. Weather on a mesh. Bjerknes (1904), Richardson (1922), Charney, Fjørtoft & von Neumann (1950), ECMWF (1979), a day of skill per decade (Bauer, Thorpe & Brunet 2015); GraphCast (Lam et al. 2023): 0.25° grid, 227 variables, the multimesh (40,962 nodes, 327,660 edges), 16 processor layers, 36.7 million parameters, 39 years of ERA5, four weeks on 32 TPU v4, 90% of 1,380 targets against HRES, rollouts of up to 12 steps in training; our toy atmosphere (forced, damped vorticity on a 32 × 32 periodic square) and an encode–process–decode mesh network with a three-level multimesh, against the same network on the finest edges only, persistence and climatology, over 40 steps; GenCast (Price et al. 2024: 97.2% of 1,320 targets against ENS, 99.8% beyond 36 hours); AIFS Single operational on 25 February 2025 and AIFS ENS on 1 July 2025, both upgraded on 12 May 2026; WeatherNext 2 (November 2025); NOAA's AI global models (17 December 2025).
  • 14. Neural operators. Burgers' equation; operators against fixed grids; Chen & Chen (1995), DeepONet (Lu et al. 2021), the Fourier neural operator (Li et al. 2021) derived from a kernel integral and the convolution theorem; weights on frequencies, shift equivariance of the Fourier layer (the full toy model also sees absolute coordinates), O(n log n); an FNO trained here at 64 points, replayed, and tested from 32 to 1,024 points against a CNN of the same layout, three seeds; FourCastNet (Pathak et al. 2022).
  • 15. Materials by the million. Crystals, the 230 space groups, DFT (Kohn & Sham 1965), stability as the lower convex hull; GNoME (Merchant et al. 2023): about 48,000 stable crystals known computationally before, 2.2 million stable against previous work, 381,000 on the updated hull, hit rates above 80% (structure) and 33% (composition) against about 1%, 736 independently realized; the active-learning flywheel run on a made-up chemistry of 6,840 candidates, against random picks, three seeds; Cheetham & Seshadri (2024); the A-Lab (Szymanski et al. 2023), its critique (Leeman et al. 2024) and its 2026 correction (36 compounds of 57 targets); MACE-MP-0, MatterGen.
  • 16. Geometry and proofs. Lean and Mathlib (292,326 theorems, 140,100 definitions, 772 contributors, observed 2 November 2026); Appel & Haken (1976), Gonthier (2005), Flyspeck (2014), the Liquid Tensor Experiment (2022); AlphaGeometry (Trinh et al. 2024: 100 million synthetic theorems, 9% with auxiliary constructions, a 151-million-parameter language model; IMO-AG-30: 25 against Wu's method 10, DD+AR 14, GPT-4 0; average gold medallist 25.9) and AlphaGeometry 2 (Chervonyi et al. 2025: 84% of IMO geometry 2000–2024); IMO 2024 (AlphaProof and AlphaGeometry 2, 28 of 42), IMO 2025 (Gemini Deep Think and OpenAI's model, 35), IMO 2026 (Huawei's Celia and Xiaohongshu's dots-note-3.0 reported 42 of 42, solutions submitted to the organizers for grading; AFP, 23 July 2026), the details in Part 28; Gauss (Math Inc., September 2025: the strong prime number theorem in Lean); Erdős problem #728 (January 2026: GPT-5.2 Pro and Aristotle, a Lean proof); Feng et al. (2026: 700 open Erdős problems, 13 addressed, 5 by seemingly new arguments).
  • 17. Discovery by search. Propose, evaluate exactly, keep the best; AlphaTensor (Part 26); FunSearch (Romera-Paredes et al. 2024: a cap set of 512 in dimension 8, up from 496); online bin packing with an evolutionary search over priority functions (random mutations standing in for the language model), against first fit and best fit, two seeds, on held-out sequences; Sim, Renau & Hart (2025); matrix multiplication as a tensor and its rank; Strassen (1969) and Winograd (1971); our alternating-least-squares search for 2 × 2 decompositions at ranks 6, 7 and 8 from 30 random starts each; AlphaEvolve (Novikov et al. 2025): 4 × 4 complex matrices in 48 multiplications, the kissing number in 11 dimensions (593), more than 50 problems (75% matched, 20% improved), 0.7% of Google's compute, a 23% kernel speed-up and 1% of Gemini's training time; Dumas, Pernet & Sedoglavic (2025): 48 over the rationals; Georgiev, Gómez-Serrano, Tao & Wagner (2025): 67 problems.
  • Recap in twelve pictures from the part's own results, where it comes back (Parts 26, 28, 29, 30, 31), six problems, Part 26's teaser, references.
What is computed and built

What compute.py produced on the machine that rendered the video (Linux, four shared cores, one torch thread). The narration reads these numbers from the cache and branches on them, so a rerun that comes out differently changes what is said. Names: egnn, gnn, mlp, mlp_aug are EGNN, a message-passing network on raw coordinates, an MLP and the MLP trained on turned copies; inv is the distance-only energy network.

  • Equivariance check (500 test systems, random rotations): turning error of EGNN 3.4e-07, message-passing on raw coordinates 0.168, MLP 0.352, MLP on turned copies 0.057; reordering error of the message-passing network 2.3e-07. Energy over a full turn: MLP spread 1.73, MLP + copies 0.08, invariant network 6.0e-07.
  • Five-body dynamics (test MSE at t = 1, three seeds, 3,000 steps each; still-particles baseline 0.296, straight-line 0.0741): egnn: 100 → 0.0200, 300 → 0.0123, 1000 → 0.0072, 3000 → 0.0061; gnn: 100 → 0.0760, 300 → 0.0473, 1000 → 0.0166, 3000 → 0.0106; mlp: 100 → 0.1365, 300 → 0.0948, 1000 → 0.0865, 3000 → 0.0821; mlp_aug: 100 → 0.0825, 300 → 0.0788, 1000 → 0.0748, 3000 → 0.0740. Parameters {'egnn': 133828, 'gnn': 104451, 'mlp': 144655, 'mlp_aug': 144655}.
  • Energy (test MSE, variance of the energy 4.44): inv 0.00281 (range 0.00243–0.00341), mlp 1.81 (range 1.78–1.85), mlp_aug 1.35 (range 1.35–1.35).
  • Spherical harmonics: off-block entries of the rotation's matrix ≤ 1.1e-15, orthogonality error of each block ≤ 8.9e-15.
  • Deep Sets (test accuracy by training-set size 32, 128, 512, 2048, 8192): deepsets: 69.6%, 93.9%, 98.1%, 99.3%, 99.7%; mlp_aug: 60.3%, 84.7%, 95.4%, 96.3%, 96.1%; mlp: 26.8%, 32.5%, 48.5%, 69.6%, 78.7%; answers changed by a reordering at the largest size: mlp 61%, mlp_aug 11%, deepsets 0%.
  • 1-WL: random 10-node pairs separated 300 of 300; random 3-regular 0 of 100.
  • Triangles in unions of cycles (base rate 63.8%): gin 63.8%, 63.8%, 63.8%; gin_rni 63.8%, 63.8%, 63.8%; pair 100.0%, 100.0%, 100.0%; degree from constant features (RMSE): sum 0.002, mean 1.457, max 1.457.
  • Three communities (accuracy, three seeds): GCN 90.4%, 90.0%, 87.9%; MLP 44.6%, 47.1%, 47.5%.
  • Over-smoothing: λ₂ = 0.915; accuracy by depth 2, 4, 8, 16, 32, 64: plain 94%, 79%, 34%, 32%, 32%, 32%; residual 86%, 90%, 98%, 92%, 91%, 94%.
  • Folding from distances: classical MDS rebuilds the bundle to 8e-15 Å (up to a mirror); gradient descent on 50% of the distances with noise: 7 of 12 starts on the fold, 5 on its mirror image. Mirror: dRMSD 0.00, FAPE 0.79; Gaussian noise (σ = 1 Å per coordinate): dRMSD 1.39, FAPE 0.59.
  • Completing distance matrices (error on hidden pairs, Å, three seeds; chain-gap baseline 5.55): pairwise 6.18 (range 6.18–6.18); triangle 1.42 (range 1.38–1.48); recycle 1.86 (range 1.82–1.93); recycling by pass: 1.87, 1.83, 1.83, 1.86, 1.93, 2.04.
  • Set networks' training (seed 0, 512 sets, held-out accuracy at the end): deepsets 98.7%, mlp_aug 95.9%, mlp 47.3%.
  • Diffusion on 2D chains (500 samples, two seeds; training data: bond deviation 0.000, clashes 0.0%): EGNN-style denoiser: bond deviation 0.075, clashes 73.6%, median distance to the nearest training chain 0.493; plain MLP on turned copies: bond deviation 0.113, clashes 45.1%, median distance to the nearest training chain 0.413; held-out real chains 0.224.
  • Neural operator on Burgers' equation (relative L2 error, three seeds, trained at 64 points; tested at 32, 64, 128, 256, 512, 1024): fno: 0.6%, 0.3%, 0.3%, 0.3%, 0.3%, 0.3%; cnn: 73.1%, 1.2%, 58.5%, 73.4%, 74.5%, 74.0%.
  • Toy weather (RMSE at 1, 5, 10, 20, 40 steps; one training run each): multimesh 0.35, 1.22, 1.84, 2.71, 6.23; finest only 0.35, 1.22, 1.86, 3.66, 10.53; persistence 0.59, 1.77, 2.19, 2.45, 2.82; climatology 2.32.
  • Materials flywheel (6,840 candidates, 780 truly stable, 60 checks a round, three seeds): hit rate by round, surrogate 54%, 62%, 51%, 44%, 40%, 37%, 32%, 34%; random 12%, 11%, 13%, 14%, 11%, 10%, 8%, 13%; stable compounds found after 8 rounds: surrogate 234, random 78.
  • Matrix-multiplication tensors (alternating least squares): 2 × 2 at rank 6, 7, 8: 0 of 30, 29 of 30, 26 of 30 starts reach relative residual < 1e-6 (the rank-7 candidate has worst absolute entry error 6e-08 on 20 random matrix pairs; this is not an exact certificate); 3 × 3 at rank 23 and 26: 0 of 10 (best residual 1.2e-05), 0 of 10 (best residual 7.7e-06).
  • Evolved bin-packing rules (excess bins over the lower bound, %; 10 held-out sequences of 1,000 items): first fit 5.18, best fit 4.71; evolved, seed 0: 4.11 (r/(|log(|g|+1)*min(s, (g*min(g, g))^2)|+1)), seed 1: 4.29 (((1.5 + (max(s/(|g|+1), log(|(g + min(1/(|(g + 5.7)|+1), -4))|+1)))^2))^2).
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
  1. Groups; invariance vs equivariance; Deep Sets' theorem.
  2. GNNs: message passing, expressivity = the WL test, over-smoothing, graph attention.
  3. E(3)-equivariance (EGNN, spherical harmonics, sketched).
  4. AlphaFold 2: MSA, Evoformer triangle updates, IPA on frames, FAPE, recycling.
  5. AlphaFold 3: Pairformer plus atom diffusion.
  6. Design: RFdiffusion, ProteinMPNN.
  7. Weather: GraphCast's mesh GNN, GenCast ensembles.
  8. Materials (GNoME); neural operators (FNO).
  9. Mathematics: AlphaGeometry, AlphaProof in Lean, AlphaEvolve, olympiad-level LLM proofs.

Computed: the equivariance check, WL on graphs, a GNN on synthetic graphs. Systems' numbers are cited.

中文讲义

本讲的中文部分(与英文版对应)。

习题与解答

1. 复合。 证明G-等变映射的复合仍是G-等变的;并证明在等变层之后接一个不变映射,整个网络就是不变的。

解答

若f(g·x) = g·f(x)且h(g·y) = g·h(y),则h(f(g·x)) = h(g·f(x)) = g·h(f(x)):复合是等变的(中间空间上的作用可以不同,只要相邻 两层一致)。若最后一个映射r不变,r(g·y) = r(y),则r(h(f(g·x))) = r(g·h(f(x))) = r(h(f(x)))。所以等变网络让各层保持等变,只在读出时 变成不变的(对粒子求和、取范数):在中间插一个不变层,会扔掉后面的层可能需要的朝向信息。

2. Deep Sets。 给可数全集编号c(x) ∈ {1, 2, …}。证明X ↦ Σ_{x∈X} 4^{−c(x)}在有限集合上是一一对应的。对多重集会出什么问题?更大的 底数怎样修正它?

解答

把S(X) = Σ 4^{−c(x)}写成四进制:小数点后第k位,若编号为k的元素在X中就是1,否则是0。系数为0或1的有限个不同的4^{−k}之和 不会进位(每位至多1 < 3),而有限的四进制展开是唯一的,所以S(X) = S(Y)意味着各位相同,X = Y。对多重集,4^{−k}的系数是重数m_k; 只要每个m_k ≤ 3,各位仍能唯一读出;但重数为4就会进到前一位(4·4^{−k} = 4^{−(k−1)}),于是{x_k, x_k, x_k, x_k}和{x_{k−1}}撞在一起。 以b为底时,小于b的重数是安全的;对有界的多重集,取比最大重数更大的底数即可(GIN的单射引理用的是同一个想法)。

3. 正则图。 证明颜色细化在每一轮都给d-正则图的每个节点同一种颜色,并由此说明没有消息传递网络能分辨6元环和两个三角形。

解答

归纳:第0轮所有颜色相同。若第t轮所有节点都是颜色c,则第t + 1轮每个节点的签名都是(c,大小为d的多重集{c, …, c}),对每个 节点都一样,所以所有节点再次同色。因此节点数相同的两个d-正则图在每一轮的颜色直方图都相同。C₆和2C₃都是6个节点的2-正则图,所以 1-WL分不开它们;由第5章的定理(MPNN的状态是WL颜色的函数),任何消息传递网络都给两个图的每个节点同样的状态,于是求和读出也相同。 可一个有三角形,另一个没有。

4. 过平滑。 对连通图,证明Â = D^{−1/2}(A + I)D^{−1/2}的最大特征值是1,特征向量 ∝ D^{1/2}𝟏,并且Â^k X收敛到X在它上面的投影。

解答

这里D是A + I的度矩阵。·D^{1/2}𝟏 = D^{−1/2}(A + I)𝟏 = D^{−1/2}D𝟏 = D^{1/2}𝟏,所以D^{1/2}𝟏是特征值为1的特征向量。Â与随机 游走矩阵P = D^{−1}(A + I)相似( = D^{1/2} P D^{−1/2}),P是随机矩阵,所以所有特征值|λ| ≤ 1。图连通时P不可约,自环使它非周期, 由佩龙–弗罗贝尼乌斯定理,λ = 1是单根,其余特征值|λ| < 1。写 = Σ λ_i u_i u_iᵀ(正交归一,Â对称),则Â^k X = u₁u₁ᵀX + Σ_{i≥2} λ_i^k u_i u_iᵀ X,第二项至多|λ₂|^k ‖X‖。极限的每一列都是D^{1/2}𝟏的倍数:每个节点的特征只由它的度决定,区分节点的信息消失了。

5. EGNN。 证明x_i′ = x_i + C Σ_j (x_i − x_j) φ(‖x_i − x_j‖²)对每个正交矩阵R满足x′(Rx + t) = R x′(x) + t。它因此看不见反射吗?

解答

令y_i = Rx_i + t。则y_i − y_j = R(x_i − x_j),而且因为R正交,‖y_i − y_j‖ = ‖x_i − x_j‖,所以每个φ都不变, y_i′ = Rx_i + t + C Σ_j R(x_i − x_j) φ(·) = R x_i′ + t。证明里没用到det R = +1,所以这一层对反射也等变(是E(n),而不仅是SE(n)), 任何不变读出都给一个分子和它的镜像同样的值:这样的网络单凭位置分不清对映体。当手性要紧时,比如蛋白质,就加上一个赝标量(三重积 (x_j − x_i)·((x_k − x_i) × (x_l − x_i)),在反射下变号),或者像AlphaFold 2那样,用右手坐标系和FAPE这样的损失。

6. 傅里叶层。 证明v ↦ F^{−1}[R_k v̂_k]与周期网格的平移交换,并且同样的R_k在任何多于2k_max个点的网格上定义了这一层。

解答

平移s个格点:(τ_s v)n = v{n−s}。它的离散傅里叶系数是(τ_s v)^_k = e^{−2πiks/N} v̂_k。乘以R_k再反变换,得到 F^{−1}[R_k e^{−2πiks/N} v̂_k] = τ_s F^{−1}[R_k v̂_k]:相位因子恰好是一次平移。(连续变量平移任意量,对傅里叶级数的作用也是这样,所以这个 算子与圆周上的所有平移交换。)权重R_k按频率k = 0, …, k_max − 1编号,而不是按格点编号。N个点的网格能表示|k| < N/2的频率,所以只要 N > 2k_max,每个学到的频率在新网格上都存在,这一层由同样的数定义:在新网格上采样输入,变换,乘上同样的模式,再变换回来。随N变化的是 傅里叶层之间逐点非线性带来的混叠,这就是为什么误差在不同分辨率上并不完全不变。

Build the film

python -m videos.ai.ai25.compute        # the part's numbers, into .cache/ai25
python tools/build.py ai25                  # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py ai25 Hook   # one chapter, silent, with a contact sheet

Scenes: videos/ai/ai25. Setup: see the course page. Source of these notes: the README and the scenes' narration.

Build it

From the repo root:

python tools/make.py ai25                       # everything: the computations, then English and Chinese
python -m videos.ai.ai25.compute                # only the numbers (every experiment; resumable)
python -m videos.ai.ai25.compute nbody --force  # one item again
python tools/build.py ai25                      # English
python tools/build.py ai25 --lang zh            # Chinese

Everything is seeded (numpy default_rng and torch.manual_seed, one generator per run, including the initial weights) and runs on one torch thread (AI25_THREADS to change it); there is no multiprocessing. Every item made of several runs saves each run as it finishes (CACHE.partial), so an interrupted computation resumes; trained weights go to .cache/ai25/models/, and an item that needs them (equivariance, the examples in deepsets and pair) trains them again if they are missing. Nothing is downloaded: every dataset is synthetic. No other part's results are used. On a busy 4-core machine the whole part computes in about three and a half hours of wall time; the longest items are nbody (48 runs, EGNN about two minutes each), diffusion (two 24,000-step EGNN runs), pair, weather, energy and fno.