Pick up a water molecule, turn it upside down, and put it back. It's the same molecule, with the same energy, the same bond lengths and the same chemistry. You know that without a second thought, but a neural network that reads a molecule as a list of coordinates doesn't. Every rotated copy looks to it like a different input, and unless somebody shows it examples, it has no reason to give the same answer for both.
For a photo model or a language model that's a small problem, because the web supplies billions of examples for free. Science doesn't have that. A single energy from density functional theory (the standard quantum-chemistry calculation) costs CPU-hours, a crystal structure takes a lab, and a protein structure used to take months of crystallography. So scientific machine learning starts from the opposite situation, with very little data and a lot of exact knowledge about the problem: rotations don't change energies, forces come from energies, and physical laws hold at every point.
This chapter is about turning that knowledge into architecture. We'll keep coming back to our rotated molecule, and we'll see that a network can be built so that the rotation never matters (that property is called equivariance), measure how many training examples that saves, and follow it into models of molecules and proteins. Then we'll move to the second kind of structure, a differential equation you know the solution has to satisfy, and to models whose output is an equation or a proposal that someone can check. Along the way one question keeps coming up: how do you know the model's answer is right?
That last question is where these systems most often fail. A model that emits candidates nobody can cheaply check produces a list, not a discovery. Page 37 argues that case across industries, and this page is the machinery underneath it.
01Why this is a different game
Little data, a lot of knowledge
Start with what a model for water has to learn from. One density-functional-theory energy is CPU-hours of computing, so energies add up fast. One crystal structure is a lab. The dataset you'd like to have doesn't exist and can't be bought. That's the opposite of the situation in vision and language.
What you have instead is knowledge a web-scale engineer doesn't. The first kind is exact symmetries. Translate a molecule, rotate it or renumber its atoms, and the energy doesn't change, and this holds exactly, with no approximation. The second is conservation laws. Forces are the negative gradient of an energy, and mass and momentum are conserved, so a model can be built to respect these by construction. The third is cheap verifiers. A predicted structure can be scored against a held-out experiment, a forecast is scored by tomorrow, and a proposed equation can just be evaluated.
Now we can name the idea the whole chapter rests on. An inductive bias is an assumption a model carries before it has seen any data. Convolution assumes that a local pattern matters more than where exactly it sits in the image, and attention assumes any token may matter to any other. A symmetry is an unusually strong inductive bias, because it's exactly true. And it's a substitute for data: every symmetry you fail to build in is something the model has to learn from examples, and learning it uses up examples you don't have. In language that trade hardly matters, because examples are free and the symmetries are weak. In chemistry it decides the outcome. That's why scientific machine learning looks like a different discipline and not only a different application.
Four ways to treat a rotated molecule
So what are the options for our rotated water molecule? There are four, and the diagram lays them out from left to right by how much symmetry the architecture already knows. One reads raw coordinates and assumes nothing. Another reads the same raw coordinates but is shown every training sample at random poses, a technique called augmentation. Our third option throws the pose away and reads only distances between atoms, so a rotation can't be detected at all. Last, the fourth carries the pose through the network in a form that rotates correctly. Everything else in this chapter is a variation on picking one of these columns.
Read the middle row of the diagram first. Only the right-hand two columns give an exact guarantee, and they get it from the architecture and not from examples. That last column costs the most to build, and it's the only one that can output a direction, so force fields live there. We'll measure the first three columns in sections 02 and 03, and section 04 is where the fourth earns its cost. First, though, we need to say precisely what "the rotation doesn't matter" means, because there are two different meanings and they decide what a model is allowed to output.
02Invariance and equivariance, precisely
Two kinds of "unchanged"
Let be a transformation from some group, meaning a collection of transformations that can be combined and undone, such as rotations, translations or relabellings of atoms. A function is invariant if applying the transformation to the input makes no difference to the output, and equivariant if the output transforms in the same way the input did.
For our water molecule, the energy is invariant, since turning the molecule doesn't change how much energy it has. Each atom's force is equivariant, since it's an arrow, and when you turn the molecule the arrows turn with it. A model that predicts energy should be invariant, and a model that predicts forces has to be equivariant, so we'll need both.
Only a few groups matter here, and they're small and concrete. E(3) is the set of rotations, translations and reflections of 3D space, and SE(3) is the same set without reflections, and it matters when a molecule and its mirror image behave differently (chirality). Permutation covers identical atoms or graph nodes, since renumbering the atoms can't change the energy. And physics problems have gauge and scale symmetries, so a PDE residual (the amount by which a candidate solution fails to satisfy the equation) holds at every point and not only where you sampled, and that's the symmetry at work.
The cheap route: throw the pose away
Maybe the easiest way to get invariance is to give the network only things that don't depend on the pose. Distances between pairs of atoms are exactly that: rotate the molecule and every distance stays the same. If the network reads distances and never sees coordinates, it can't tell the molecule was rotated, because the information isn't there.
Below, we build a five-atom point cloud, rotates it 0.7 radians (about 40 degrees) around the z axis with the matrix R, and feeds both versions to two untrained networks. coord_mlp reads the 15 raw coordinates. dist_mlp computes all pairwise distances with np.linalg.norm and broadcasting, then keeps each pair once using np.triu_indices(5, 1), a call that picks the entries above the diagonal, so 10 numbers go in. Both share the output layer W2. Nothing is trained, because we're only checking what the architecture does to a rotated input.
Try it Rotate a point cloud and watch one network change its mind
import numpy as np
rng = np.random.default_rng(0)
X = rng.normal(0, 1, (5, 3)) # a 5-atom point cloud
c, s = np.cos(0.7), np.sin(0.7) # 0.7 rad about z, ~40 degrees
R = np.array([[c, -s, 0.], [s, c, 0.], [0., 0., 1.]])
Xr = X @ R.T # the same molecule, turned
W1 = rng.normal(0, .4, (15, 8)) # 15 = 5 atoms x 3 coordinates
V1 = rng.normal(0, .4, (10, 8)) # 10 = the pairwise distances
W2 = rng.normal(0, .4, 8) # shared output layer
def coord_mlp(P): # reads raw xyz, the naive way
return np.tanh(P.reshape(-1) @ W1) @ W2
def dist_mlp(P): # reads |ri - rj| instead
D = np.linalg.norm(P[:, None, :] - P[None, :, :], axis=-1)
return np.tanh(D[np.triu_indices(5, 1)] @ V1) @ W2
print("coords", tuple(X.shape), " distances", (10,))
print("coord_mlp %.4f -> %.4f" % (coord_mlp(X), coord_mlp(Xr)))
print("dist_mlp %.4f -> %.4f" % (dist_mlp(X), dist_mlp(Xr)))
print("dist_mlp shifted by %.2e" % abs(dist_mlp(X) - dist_mlp(Xr)))
coord_mlp moving from 1.4112 to 1.1209 for a molecule that didn't change. dist_mlp returns 2.0109 both times, and the gap is exactly 0.00e+00. No training happened here and none is needed.Look at the last two printed lines. Here coord_mlp gave different answers for two copies of the same molecule, and dist_mlp gave identical ones, to the last bit. Invariance came from the representation. That's what "built into the architecture" means in practice.
This trick has a price. Distances are scalars, so a network that reads only distances can only produce scalars, and if you ask it for a force vector it has no way to point. To get vectors out, we have to keep the geometry inside the network and not discard it at the input.
Keeping the geometry: equivariant networks
Equivariant networks do that by carrying geometric objects through the layers. Each feature is typed by how it behaves under rotation: it's a scalar (unchanged), a vector (turns like an arrow), or a higher-order tensor, written formally as irreducible representations of the rotation group. Tensor Field Networks introduced the construction for 3D point clouds. Layers combine features using spherical harmonics, a standard family of functions on the sphere, through tensor products, and the bookkeeping of types guarantees that the output rotates correctly. The e3nn library is the standard implementation.
Why isn't augmentation enough?
Augmentation, the second column of the diagram, also makes the model see rotated copies, and it's much easier to implement. What differs is what you get. With augmentation the model has seen rotated examples and hopes to generalise. Its guarantee is statistical, it holds only near the poses you sampled, and every new layer has to earn it again. Built-in equivariance is an algebraic identity. It holds for every rotation, at initialisation, before a single gradient step, and it can't degrade during training. One is evidence and the other is proof. Whether the proof is worth its price is something we can measure.
03What the symmetry buys, measured
So far the argument is qualitative, so let's put a number on it. We'll fix a target that depends only on geometry (a sum over pairs of atoms of exp(-distance)), then train three models on the same 32 molecules and test them on fresh molecules in arbitrary orientations. One model reads raw coordinates, the second reads raw coordinates with rotation augmentation, and the third reads pairwise distances.
In the code, rot draws a random rotation for each sample by taking the QR decomposition of a random matrix and fixing its sign so it's a proper rotation. flat and dist are the two feature maps, y_of is the target, and fit trains a small network for 1500 steps. When aug is true, each step draws fresh random rotations of the training set. Everything else is identical across the three runs.
Try it The data-efficiency gap, on 32 training examples
import torch, torch.nn as nn
torch.manual_seed(0)
def rot(P): # a random 3D rotation per sample
Q, _ = torch.linalg.qr(torch.randn(len(P), 3, 3))
return P @ (Q * torch.sign(torch.det(Q))[:, None, None]).mT
D = lambda P: torch.cdist(P, P) # (n, 4, 4)
dist = lambda P: D(P).flatten(1) # (n, 16), invariant
flat = lambda P: P.reshape(len(P), -1) # (n, 12), not
y_of = lambda P: torch.exp(-D(P)).triu(1).sum((1, 2))[:, None]
Ptr = torch.randn(32, 4, 3) # only 32 training molecules
Pte = rot(torch.randn(600, 4, 3)) # fresh ones, arbitrary poses
ytr, yte = y_of(Ptr), y_of(Pte)
def fit(feat, aug):
net = nn.Sequential(nn.Linear(feat(Ptr).shape[1], 64), nn.Tanh(),
nn.Linear(64, 1))
opt = torch.optim.Adam(net.parameters(), lr=0.02)
for _ in range(1500):
loss = ((net(feat(rot(Ptr) if aug else Ptr)) - ytr) ** 2).mean()
opt.zero_grad(); loss.backward(); opt.step()
return ((net(feat(Pte)) - yte) ** 2).mean().sqrt().item()
print("train", tuple(Ptr.shape), "| std(y) %.3f" % yte.std())
print("coords test RMSE %.3f" % fit(flat, False))
print("coords + aug test RMSE %.3f" % fit(flat, True))
print("distances test RMSE %.3f" % fit(dist, False))
0.741, a worse score than the 0.411 you get from predicting the mean (std(y)). Augmentation rescues it to 0.349, and the distance model gets 0.078, about nine times better than the coordinate model.To judge the numbers, you need a reference, and std(y) = 0.411 is it: that's the error you'd get by always predicting the mean. The coordinate model scores 0.741, and that's worse than a constant. Augmentation brings it to 0.349, only a little better than the mean. The distance model reaches 0.078, about nine times better than the coordinate model, from identical data and a near-identical network. Only one thing changed, namely what the first layer is allowed to see.
That gap is the field's central selling point, and it shows up in real systems. The NequIP paper reports matching or beating existing interatomic potentials with up to three orders of magnitude fewer training data. Notice also what augmentation did in our run. It helped a lot, and at a fixed number of steps it still didn't close the gap.
When the bias stops paying for itself
Equivariance is a constraint, and constraints cost throughput and engineering effort. Brehmer et al. studied the trade directly and found that augmentation can close the data-efficiency gap given enough epochs, while equivariant models still won at every compute budget they tested. Our strongest counterexample comes from AlphaFold 3, whose diffusion module works on raw atom coordinates with no equivariant processing at all, and whose authors say plainly that they found none was required. So enough data and enough scale can stand in for the constraint. Most scientific problems don't have enough of either, so the rest of the chapter mostly stays on the equivariant side. Let's see what that looks like on real molecules.
04Molecules: graphs, point clouds and forces
Two ways to describe a molecule
A molecule is a graph with 3D coordinates attached, and which of those two things you use decides what you can predict. The 2D route treats the molecule as a graph of atoms and bonds and runs message passing over it (page 18 covers that). That's permutation-equivariant by construction, and it never sees geometry. For many property-prediction tasks that's enough, and the baseline to beat is older than any of it: extended-connectivity fingerprints hash local substructures into a bit vector, feed it to gradient boosting, and win more often than the literature admits.
When geometry matters, the 3D route uses coordinates, and the architectures form a ladder where each rung fixes something the one below can't do. SchNet applies continuous-filter convolutions over interatomic distances, so it's invariant and produces scalars only. DimeNet adds bond angles, because distances alone can't distinguish some geometries. EGNN keeps the coordinates themselves as a feature and updates them using relative-position vectors, and that's enough for E(n) equivariance with almost no machinery. NequIP and MACE go fully equivariant with tensor features, and MACE raises the body order of each message, so a single layer captures interactions among many atoms at once.
Learned interatomic potentials
The largest application of these models is the machine-learned interatomic potential. Density functional theory gives accurate energies, but at a cost that makes long molecular dynamics (simulating how atoms move over time) impossible. A learned potential fits the DFT energies and forces, and then runs simulations orders of magnitude faster. For that to work, the model has to give forces as well as energies, which brings up a design choice.
Why predict an energy and not the forces directly?
You could give the network a second output head for forces, but there's a better way. Predict only the scalar energy , where holds the atom positions, and define the forces as its negative gradient, which autodiff computes for you.
Two things follow immediately. Forces defined this way are equivariant, because the gradient of an invariant scalar is a vector that turns with the molecule, exactly the property from section 02. And they're conservative, so energy is conserved along a trajectory. A separate force head gives you neither, and the simulation drifts.
Where this goes wrong is extrapolation. A potential fitted near equilibrium will meet configurations that no training point resembled, because molecular dynamics goes looking for them. A low force error on a held-out benchmark isn't evidence that a 100-nanosecond trajectory stays stable. Those are different claims, and only the second one matters for the simulation you wanted. So far the molecules have been small. What about the largest molecules, proteins?
05Protein structure prediction, mechanism first
Page 37 covers what AlphaFold changed and what it didn't, and this section is about how it works. A protein is a chain of amino acids that folds into a shape, and the shape determines what the protein does. Predicting that shape from the sequence of amino acids was an open problem for fifty years.
AlphaFold 2 combines several priors, and it helps to name them separately because each one is a piece of knowledge handed to the network. The first is coevolution. The input isn't a single sequence but a multiple sequence alignment, a stack of the same protein's sequences from evolutionary relatives, lined up. Residue pairs (a residue is one amino acid in the chain) that mutate together across relatives are probably touching in the folded protein, so evolution did a kind of labelling for free.
The second is two coupled representations. The Evoformer, the core module, maintains one representation of the alignment and one of residue pairs, and passes information between them again and again. The third is geometric consistency. Triangle multiplicative updates constrain the edge between residues and using the edges and through a third residue . Distances have to obey the triangle inequality, so this update enforces something that's true and not merely something learned.
The fourth is equivariant structure. Each residue gets a local coordinate frame, and Invariant Point Attention reasons about points in those frames, so the module is equivariant to global rotation and translation, our water-molecule symmetry again. The fifth is recycling: the whole network is run again on its own output, three times, which adds depth cheaply. AlphaFold 2 is trained end to end against a frame-aligned point error, and it outputs a per-residue confidence score, pLDDT, alongside the coordinates.
Protein language models take a different bet. ESM-2 is a masked language model trained on sequences alone, and ESMFold predicts structure from a single sequence with no alignment. It's much faster and generally less accurate on hard targets, and that tells you how much the alignment was contributing. AlphaFold 3 then replaced the structure module with a diffusion module over raw atom coordinates, dropped the explicit equivariance (the exception we met in section 03), and extended coverage to ligands, nucleic acids and complexes.
One caution about that confidence score. A high pLDDT reliably marks confidently folded regions and a low one reliably marks disorder, so it's excellent for triage. But it's a ranking signal, and it isn't calibrated as the "probability this residue is within 1 Å". Teams that threshold on it as though it were, and then pass the surviving structures into a downstream pipeline, inherit an error rate nobody measured. Prediction scores a structure that somebody gave you, though. What about producing a new one?
06Designing molecules and proteins
Design is the reverse job, producing a structure with the properties you want, and the symmetry argument comes back in a sharper form. Page 12 has the diffusion machinery, and the scientific version changes one thing: the denoiser is equivariant.
That constraint has a purpose. If the noise is isotropic (the same in every direction) and the denoising network is equivariant, the learned distribution over structures is invariant to rotation. So the model never spends capacity on orientation, because every orientation of a molecule counts as the same sample. Equivariant Diffusion for Molecule Generation in 3D is the reference construction.
Protein design runs as a pipeline of several models, each handing its output to the next.
- RFdiffusion generates a backbone, optionally conditioned on a binding site or a motif to scaffold.
- ProteinMPNN solves the inverse problem: given that backbone, which amino-acid sequence folds into it?
- AlphaFold is then run as an in-silico filter. Does the designed sequence fold back to the requested backbone?
- The wet lab expresses the survivors and measures whether they do anything.
Step three is the interesting one, because it's a cheap verifier attached to a generator, the same pattern page 37 traces across every field where this has worked. The one caveat is that the wet-lab hit rate is the only number that counts. It varies enormously by target class, and a generator's reported validity rate tells you nothing about it.
Everything so far has exploited symmetry. There's a second kind of structure in science that has nothing to do with rotation: many systems obey a known differential equation, and that's what we turn to next.
07Physics-informed neural networks
Putting the equation in the loss
Suppose you know the equation that governs a system, and you have a few measurements. Represent the solution as a network that takes time and position and returns the quantity of interest. Because the network is differentiable, autodiff can evaluate the differential operator on it exactly, at any point you like. That means the residual of the PDE, how far the network's output is from satisfying the equation, can be turned into a loss term.
Reading the equation from left to right, the loss has three terms. The first fits the observations. The second makes the network respect the boundary condition , and the third drives the PDE residual to zero. We evaluate the residual at collocation points, points you choose yourself that needn't be data points, and there's no mesh. The weights say how much each term counts.
Here's the payoff: physics constrains the solution where no data exists, and probably the easiest way to see that is to take the data away. In the code below the truth is the ODE with , whose solution is . Both networks see the same 12 data points, all in [0, 2]. The physics-informed one also gets a residual term, evaluated at 200 collocation points spread over [0, 8]. Inside train, torch.autograd.grad differentiates the network with respect to its input tc, and create_graph=True keeps that derivative differentiable so the residual can be trained on. Both are scored on [2, 8], where there's no data.
Try it Extrapolate an ODE far outside the data, using only the equation
import torch, torch.nn as nn
torch.manual_seed(0)
net = lambda: nn.Sequential(nn.Linear(1, 32), nn.Tanh(),
nn.Linear(32, 32), nn.Tanh(),
nn.Linear(32, 1))
td = torch.linspace(0, 2, 12)[:, None] # data exists only on [0, 2]
ud = torch.sin(td) # truth: u' = cos t, u(0) = 0
tc = torch.linspace(0, 8, 200)[:, None].requires_grad_(True)
tt = torch.linspace(2, 8, 61)[:, None] # scored where no data exists
def train(physics):
f = net()
opt = torch.optim.Adam(f.parameters(), lr=0.01)
for _ in range(4000):
loss = ((f(td) - ud) ** 2).mean()
if physics: # residual of the ODE itself
u = f(tc)
du, = torch.autograd.grad(u, tc, torch.ones_like(u),
create_graph=True)
loss = loss + ((du - torch.cos(tc)) ** 2).mean()
opt.zero_grad(); loss.backward(); opt.step()
return (f(tt) - torch.sin(tt)).abs().max().item()
print("data", tuple(td.shape), "collocation", tuple(tc.shape))
print("data loss only max |error| on [2,8]: %.4f" % train(False))
print("+ physics residual : %.4f" % train(True))
1.6343 on [2, 8], and the physics-informed one has 0.0005, a factor of three thousand. Both networks saw the same 12 data points, all in [0, 2], so the residual term is what carries the second one.Without the residual, the fit leaves the data and produces nonsense: a maximum error of 1.6343 on a function whose entire range is . The physics-informed network tracks sin out to with an error of 0.0005, a factor of three thousand better, and nobody told it the answer out there. Its residual term is carrying it, not the data.
Where PINNs go wrong
That demo is also a fair warning, because the ODE there is trivial. Real problems behave worse, and the failure modes are well documented. First, the loss terms compete. Data, boundary and residual terms have different scales and different gradients, and a badly set weight lets the network satisfy the residual while ignoring the boundary. Many residuals are also, perhaps surprisingly, minimised by , so if the data and boundary terms are weak, that trivial solution is where the optimiser goes.
Networks also learn low frequencies first, a tendency called spectral bias, so stiff and multiscale problems converge slowly or not at all. And for a problem a finite-element solver handles well, you've swapped an exact method (a linear solve) for non-convex optimisation by gradient descent. Given all that, when is a PINN worth using?
When is a PINN the right tool?
On forward problems that classical solvers handle well, PINNs are usually slower and less accurate. A 2023 study asked this directly in its title and found the finite-element method competitive or better across its benchmarks. The real niche is the inverse problem. An unknown coefficient in the PDE becomes one more trainable parameter, and sparse, noisy measurements plus the equation are enough to recover it. That's awkward for a classical solver and natural here. So choose a PINN when you have partial data and a missing constant, and use a classical solver when you have a well-posed problem and a mesh. One more limit remains: a PINN is trained for one problem instance, and if you change the initial condition you retrain it.
08Neural operators: learning the solver, not the solution
Operators fix that limit. A neural operator learns a mapping between function spaces: give it an initial condition or a coefficient field as a function, and it returns the solution as a function. Training costs a lot of solved instances, and after that inference is a single forward pass.
Two designs dominate. The Fourier Neural Operator transforms each layer's input to Fourier space, multiplies a learned complex weight per frequency mode, truncates the high modes, and transforms back. The FFT makes this a global convolution, so information crosses the whole domain in one layer. DeepONet uses two networks: a branch network encodes the input function sampled at fixed sensors, a trunk network encodes the query location, and the output is their inner product, a structure that follows a universal approximation theorem for operators.
One property deserves a closer look, discretisation invariance. The FNO's weights live on Fourier modes, not on grid cells, so the same trained model can be evaluated on a finer grid than it was trained on. It learned an operator, not an array. Weather models apply the same idea at scale: GraphCast and GenCast learn the map from one atmospheric state to the next, and page 37 has the deployment evidence and the skill numbers.
The costs are real. You need a large corpus of solved instances, so the classical solver has to run many times first. Also, the surrogate has no error bar, and it degrades silently off distribution, the regime you most wanted it for. Both PINNs and operators output numbers, though. Next comes a family whose output a person can read.
09Symbolic regression, and outputs you can check
Searching for the equation itself
Everything above outputs numbers. Symbolic regression outputs an equation that a scientist can read and an algebra system can verify. It searches the space of mathematical expressions for one that fits the data, and that space is discrete, combinatorial and enormous, so the approaches differ mainly in how they cut it down.
Genetic programming mutates and recombines expression trees and keeps what fits, and PySR is the practical modern implementation. Physics-motivated decomposition is the idea behind AI Feynman: it tests for properties that shrink the problem, including dimensional analysis, symmetry and separability, and then recurses on the smaller pieces. Sparse regression is the idea behind SINDy, one that fixes a library of candidate terms and selects a sparse combination of them. That turns the search into a regression with an penalty (a cost on the sum of absolute coefficients that pushes most of them to zero), and that's dramatically more tractable.
Its output is a Pareto front, a set of equations trading accuracy against complexity, and not a single answer. You pick the point, and that choice is a scientific judgement the method can't make for you. Its limits are real too: symbolic regression scales badly past a handful of variables, and an expression that fits your data may not be a law of nature.
Two other fields with the same shape
Look at what symbolic regression, theorem proving and program synthesis have in common. Each has a vast discrete search space and a checker that costs almost nothing: evaluate the expression, compile the Lean proof, run the tests. That combination is where current AI is strongest, and it's the argument page 36 makes for mathematics and page 37 makes for industry. Where the checker is a wet-lab experiment instead, throughput on candidates stops being the bottleneck. And that raises a last question: in science the model doesn't have to take a fixed dataset, so who decides what to measure next?
10The loop around the model
In science the model rarely gets a fixed dataset. It gets to ask for the next experiment, and that changes what a good model is. Bayesian optimisation is the standard machinery for optimising something expensive: fit a probabilistic surrogate, usually a Gaussian process, then choose the next point by maximising an acquisition function over it. Three acquisition functions are common. Expected improvement scores how much a point is likely to beat the current best. Upper confidence bound adds a tunable multiple of the predicted standard deviation to the mean. Thompson sampling draws one function from the posterior and takes its argmax, so uncertainty drives exploration directly.
Active learning is the same idea aimed at the model and not the objective: label the points the model is least sure about. For neural potentials the usual uncertainty estimate is the disagreement across a small ensemble. Inverse design turns the question around. You know the property you want and need a structure that has it, so you either search a generative model's latent space against a property predictor, or condition the generator on the property directly.
Every one of these assumes the surrogate's uncertainty means something. A Gaussian process on twenty points is reasonable. A deep ensemble of neural potentials is often confidently wrong in exactly the regions it has never seen. When that happens the loop stops exploring and repeatedly samples a region it believes is understood, and the symptom is an active-learning campaign whose error curve flattens early while coverage of the design space quietly stays tiny.
That brings us back to where the chapter started. Symmetry and equations are exact knowledge you can build in, uncertainty is knowledge you have to earn, and the whole field depends on being able to check what a model says.
11Summary
- Science has little data and a lot of exact structure. One DFT energy costs CPU-hours, a crystal structure takes a lab, and what you have in return is symmetries, conservation laws and cheap verifiers.
- Symmetry substitutes for data. Every symmetry you don't build in is something the model has to learn from examples you can't afford.
- Invariant means unchanged, equivariant means transformed the same way. Energy is invariant under rotation, and force rotates with the molecule.
- Pairwise distances give invariance for free but only scalars. Equivariant networks keep typed geometric features through the layers, so they can output vectors such as forces.
- Built-in equivariance is a guarantee and augmentation is evidence. In our run the distance model reached an RMSE of 0.078 against 0.741 for raw coordinates and 0.349 with augmentation, and NequIP reports up to three orders of magnitude less training data.
- The bias can be replaced by scale. Augmentation can close the gap given enough epochs, and AlphaFold 3 works on raw coordinates, but most scientific problems have neither enough data nor enough compute for that.
- Predict an energy and take its negative gradient for forces. The forces are then equivariant and conservative, and a low force error on a benchmark still doesn't prove a long simulation stays stable.
- AlphaFold stacks several priors: coevolution, coupled representations, triangle updates, equivariant frames and recycling. pLDDT is a ranking signal and not a calibrated probability.
- A PINN puts the equation in the loss. It extrapolates where data doesn't exist, but it's fragile and usually loses to a classical solver on forward problems, so its niche is inverse problems with a missing constant.
- Neural operators learn the solution map for a whole family of problems, and the Fourier version can be evaluated on a finer grid than it was trained on. They need many solved instances and give no error bar.
- Everything depends on a check. Generators attached to cheap verifiers work, loops are only as good as their uncertainty, and a list of candidates with no hit rate isn't a discovery.
12Build this
Section 03 showed the gap at one training-set size. The interesting object is the whole curve, and it takes an afternoon on a laptop.
Build a five-atom system with a known analytic energy, fit it with and without the symmetry built in, and then use each learned energy as a force field. The second half is where the differences stop being academic.
- Define ground truth: a Lennard-Jones energy over all pairs of five atoms in 3D. Generate configurations by perturbing a cluster, and keep the analytic forces too. You will need them later.
- Build three feature maps. Flattened coordinates, flattened coordinates with a fresh random rotation each epoch, and the sorted vector of pairwise distances. Same network body for all three.
- Train each at sizes 8, 32, 128, 512 and 2048, holding steps and architecture fixed. Plot test RMSE against training size on log-log axes. This is the figure this page is built around.
- Now get forces by differentiating the predicted energy with respect to the input coordinates, and skip adding a second head. Compare direction against the analytic force using cosine similarity.
- Run velocity-Verlet molecular dynamics for a few thousand steps under each learned force field. Plot total energy against time.
13What breaks
Almost none of these are modelling failures. They are evaluation failures that a modelling story got attached to.
- The random split leaked. Molecular datasets are full of near-duplicate scaffolds, so a random split puts relatives on both sides. Re-split by scaffold or by date and the headline number drops, sometimes by half.
- The potential is accurate and the simulation explodes. Force error on the held-out set looks excellent. Molecular dynamics wanders into configurations the training set never contained and the trajectory diverges.
- Symmetry was built in, then broken by preprocessing. A canonical orientation, an unsorted feature vector, or a global coordinate frame quietly reintroduces pose dependence that the architecture had eliminated.
- The PINN found a trivial solution. The residual is satisfied, the boundary term had a weight three orders of magnitude too small, and the network is happily returning something close to zero.
- The neural operator was only ever tested at training resolution. The discretisation-invariance claim is the selling point and is the thing nobody checked.
- The generated molecules cannot be made. Validity, novelty and synthesisability are three different properties. Only the first is usually in the loss.
- A confidence score is treated as a probability. pLDDT, ensemble variance and softmax outputs all rank well and none of them are calibrated out of the box.
- The result is a list with no hit rate. A model proposed 380,000 candidate crystals. The number that matters is what fraction survived contact with a chemist, and page 37 has that story in full.
14Where you meet this in the wild
Same inductive-bias argument, four very different verifiers.
Millions of candidate compounds, a few hundred that can be tested, and a verifier that costs weeks. The model's job is to rank, and the honest metric is the wet-lab hit rate of the top slice.
2D fingerprints and graph models as the cheap filter, 3D structure for the survivors.
Not an end-to-end generator pointed at the clinic.
Decades of uniform reanalysis data and a free honest verifier, because tomorrow arrives. It is the most favourable setup in the field, and the one that reached operations.
Learned surrogates for the full forecast, run alongside the physics model.
Screening needs simulations that DFT cannot afford, so a learned potential replaces it inside a larger search. Stability of the resulting dynamics matters more than any benchmark error.
Equivariant potentials plus active learning on the configurations the simulation visits.
Thousands of near-identical CFD or structural runs during design iteration. A surrogate trained on those runs turns a nightly job into an interactive one, inside the design envelope.
Neural operators for the repeated sweep.
Not for the certification run, where an unbounded error is unacceptable.
15Interview questions
BeginnerWhat is the difference between invariance and equivariance, and why does it matter?
A function is invariant to a transformation if applying the transformation to the input leaves the output unchanged, and equivariant if the output undergoes the corresponding transformation. Rotating a molecule leaves its energy unchanged, so energy is a rotation-invariant quantity, while the force on each atom rotates along with the molecule, so forces are equivariant. The distinction decides what a model is capable of emitting. A network built on pairwise distances discards the orientation entirely, which makes it exactly invariant but means it can only ever produce scalars, since it has no representation of direction. To predict a vector quantity you need equivariant internal features that carry orientation through the layers. Getting this wrong shows up as a model that cannot express the target at all, rather than as a model that trains badly.
BeginnerWhy is data augmentation not equivalent to building a symmetry into the architecture?
Augmentation teaches the symmetry statistically from examples, so the model approximately satisfies it near the transformations that were sampled and the guarantee degrades away from them. Built-in equivariance is an algebraic property of the architecture, so it holds exactly for every element of the group, at initialisation, before any training, and it cannot be lost during optimisation. The practical consequences are data efficiency and reliability. The augmented model spends capacity and training samples relearning something already known, and it needs more epochs to approach the same accuracy. Published work comparing the two finds that augmentation can eventually close the data-efficiency gap given enough epochs, while equivariant models still win at a fixed compute budget. Augmentation also cannot give you correct equivariant outputs such as forces, only approximately invariant scalars.
IntermediateWhy should a machine-learned force field predict energy and differentiate it, rather than predicting forces directly?
Because two physical properties come for free. If the network outputs a rotation-invariant scalar energy and forces are defined as the negative gradient of that energy with respect to atomic positions, the forces are automatically equivariant, since the gradient of an invariant scalar is a vector that rotates with the input. They are also automatically conservative, so no work is created around a closed loop and total energy is conserved along a molecular dynamics trajectory. A separate force head enforces neither property. It may be approximately consistent on the training distribution, but it produces a non-conservative field, and the symptom is steady energy drift or an outright blow-up during long simulations. The gradient approach costs one extra backward pass per evaluation, which is cheap against the failure it prevents.
IntermediateWalk through how AlphaFold 2 gets from a sequence to coordinates.
The input is not a single sequence but a multiple sequence alignment of evolutionary relatives, plus any structural templates, because residue pairs that mutate together are likely to be in physical contact and that coevolution signal carries much of the prior. The Evoformer trunk maintains two coupled representations, one over the alignment and one over residue pairs, and passes information between them for many blocks. Triangle multiplicative updates constrain each pair edge using the other two edges of every triangle, imposing the triangle inequality that real distances obey. The structure module then gives each residue a local frame and uses Invariant Point Attention to reason about points in those frames, making it equivariant to global rotation and translation, and it outputs backbone frames and torsion angles. The network is recycled on its own output several times, trained end to end against a frame-aligned point error, and emits a per-residue pLDDT confidence.
IntermediateWhat is a neural operator, and how does it differ from a physics-informed neural network?
A physics-informed network represents the solution to one problem instance as a network of the coordinates, trained by penalising the residual of the governing equation at collocation points. Change the initial condition or a coefficient and you train again from scratch. A neural operator instead learns a mapping between function spaces, taking an input function such as an initial condition or a coefficient field and returning the solution function, so one trained model covers a whole family of instances and inference is a single forward pass. The Fourier Neural Operator learns weights on Fourier modes, which makes each layer a global convolution and gives discretisation invariance, since the model can be evaluated on a finer grid than it was trained on. DeepONet uses a branch network over the input function sampled at fixed sensors and a trunk network over the query point. The trade is that operators need a large corpus of already-solved instances, which means running the classical solver many times first.
DeepWhen would you not use a PINN, and what is it genuinely good at?
Avoid it for well-posed forward problems an established numerical method already handles, because you are replacing an exact linear solve with non-convex gradient descent, and published comparisons find finite elements competitive or better on standard benchmarks in both accuracy and time. The specific failure modes are several loss terms at different scales whose relative weights are hyperparameters, residuals trivially minimised by the zero function when the data and boundary terms are too weak, spectral bias that makes stiff or high-frequency problems converge slowly, and an optimisation landscape that gets harder as the physics gets harder. The genuine niche is the inverse problem. An unknown coefficient in the equation becomes another trainable parameter, and sparse noisy measurements combined with the residual recover it without a mesh and without an adjoint solver, which is awkward classically and natural here. It is also reasonable where meshing is itself the hard part.
DeepYour equivariant model reports a strong test score. What would you check before believing it?
First check the split. Random splits over molecular datasets put near-identical scaffolds on both sides and inflate the score, so re-evaluate under a scaffold or temporal split and expect the number to fall. Second, test the symmetry rather than trusting it: pass a rotated, translated and atom-permuted copy of the same input and confirm the prediction is unchanged to numerical precision, because a canonical frame, centring or an unsorted feature vector routinely breaks a guarantee the architecture provided. Third, check the metric matches the use. Low force error on held-out snapshots does not establish that a long molecular dynamics trajectory stays stable, so run the dynamics and look at energy conservation. Fourth, compare against an unfashionable baseline such as fingerprints plus gradient boosting. Finally, examine where the errors live, since aggregate error hides systematic failure on the chemically novel subset you cared about.
DeepAlphaFold 3 dropped explicit equivariance from its structure prediction. Does that undermine the case for inductive bias?
It bounds the case rather than undermining it. The AlphaFold 3 diffusion module operates directly on raw atom coordinates without rotational frames or equivariant processing, relying on random rotation and translation augmentation instead, and the authors state that they found no invariance or equivariance requirement in the architecture. That is a real data point. With enough training data, capacity and compute, a network can learn a symmetry well enough that enforcing it costs more in complexity and throughput than it returns, and scaling studies show augmentation closing the data-efficiency gap given sufficient epochs. The condition is the part that matters. Most scientific problems have neither a Protein Data Bank nor that compute budget, and in the low-data regime the constraint still buys orders of magnitude, as equivariant interatomic potentials show. The question is not whether the symmetry is true, which it is, but whether you can afford to learn it.
16Go deeper
Primary sources for each mechanism on this page, including the papers that report the limitations.