Rename the atoms in a molecule. Nothing physical has changed, yet the coordinate array has been reordered. Rotate the molecule, and its energy still should not change; its force vectors should rotate. A model that depends on arbitrary labels or laboratory orientation spends data learning relationships we already know.
These are architectural questions rather than optimisation questions. A dense layer from a single-channel image to 1,000 hidden units has 65,536,000 weights before biases. It can learn spatial structure, but supplies neither locality nor translation symmetry by construction. An inductive bias restricts or favours functions according to relevant structure.
In this chapter: group actions, structured architectures, message passing, permutation proof.
The output need not transform like the input
Let a group element act on inputs by and outputs by . A map is equivariant if
It is invariant when the output action is the identity, so . Distinct input and output actions are essential: positions, vectors, tensors and scalars transform differently. Invariance is not restricted to scalar-valued functions, and equivariance is not restricted to vectors.
For positions , a rigid transformation is , with orthogonal . Suppose a differentiable energy satisfies . Applying the chain rule gives
Forces rotate, but a pure translation leaves their vector components unchanged. They do not acquire the positional offset . This corrects the source's ambiguous statement that forces are “equivariant to translation” under the same action as positions. Translation invariance also implies by differentiating with respect to .
The distinction is visible in a small spring configuration. Rotate the positions and compare the transported force arrows with forces recomputed from the rotated geometry. Translation moves the configuration but contributes no offset to the force vectors.
E(Rr + a) = E(r) · F(Rr + a) = RF(r)
energy = 0.55630|ΣF| = 0.00000000
Pairwise distances and angles give rotation/translation-invariant scalar inputs. They do not automatically remove ordering dependence or guarantee a complete geometric representation; distances also identify mirror-related configurations. Whether reflections should be a symmetry depends on the target. Invariant energy models yield equivariant conservative forces by differentiation, assuming sufficient smoothness. Architectures with equivariant internal tensor features can retain directional information before forming an invariant energy.
Data augmentation exposes the model to transformed inputs, but does not generally enforce exact symmetry. An architecture enforces a symmetry only when every operation, feature and readout respects the required action. Claims about exact physical behaviour must therefore include the full computation, not just one equivariant layer.
Different structures call for different sharing rules
A convolution applies the same local filter at each location. On an ideal translation-compatible domain this is translation equivariant; finite padding, strides, pooling and boundaries can restrict the exact symmetry. Pooling can reduce spatial resolution and support approximate invariance, but invariance is not a universal property of a CNN. U-Net combines resolutions for spatially resolved predictions such as segmentation.
Residual networks, introduced in the previous chapter, share an identity route across depth. Their purpose is to ease learning changes to a representation; they can be combined with convolution or graph operations.
Self-attention instead computes data-dependent interactions between elements. Without positional encodings or order-dependent masks, ordinary self-attention is permutation equivariant. Positional information and causal masks change this statement; sequence transformers are not automatically permutation equivariant once their complete inputs and masks are fixed. Attention can model long-range relationships at the cost of pairwise interactions.
Graphs specify which elements should communicate. Molecules, meshes and networks have variable size and no privileged node ordering. A graph neural network shares its local update rule across nodes, allowing a single parameter set to operate on different graph sizes.
A local update that can travel
For clarity, use an undirected graph with symmetric adjacency . Let contain node embeddings as columns, and denote column . Atomic species can be encoded by one-hot features (the source uses 118 element categories); geometry requires additional information such as distances or directional features. A simple source-style update is
The weights apply to both the node itself and its neighbour sum. Shared parameters and commutative aggregation are what remove dependence on neighbour order. After layers, each embedding can depend on its -hop neighbourhood. Powers of an unweighted adjacency count walks of corresponding length, explaining how repeated propagation carries information, though nonlinear learned updates are not simply powers of .
Consider the path graph with three scalar node features and take , , identity activation. The update yields . Change the labels and follow the same update: the values should move with their nodes, without changing the graph's aggregate.
Degree matters: an unnormalised sum can grow with the number of neighbours. A commonly used GCN replaces by , with its degree matrix. The Kipf–Welling GCN uses such a normalised propagation. More general message-passing layers use separate self and neighbour weights, learned messages and edge features. For a directed graph with “receiver, sender” adjacency, the column convention above needs on the right; the undirected assumption is doing real work here.
Now give one node a signal and watch it spread over several layers. This example uses a self-plus-neighbour average so magnitudes remain bounded. Reverse the storage order at any stage: the features travel with their nodes, and the commutative graph readout remains the same.
hnext(n) = mean{ h(n), h(m) : m ∈ neighbours(n) }
completed layers = 0next-layer mean = 0.1667
Why the symmetry survives every layer
Let be a permutation matrix. Relabelling gives and . Since , , and elementwise activation commutes with column permutation,
Induction proves node-level equivariance for the whole stack. Mean pooling is invariant because . A final map can produce a scalar regression output or softmax class probabilities. Sum pooling is also invariant and often more appropriate for extensive quantities such as total energy; mean pooling can erase graph-size information. Neither choice alone guarantees generalisation to unseen graph sizes or compositions.
The source reports an ethanol relabelling test and application to propanol. Those are useful implementation checks, not substitutes for the proof or evidence of arbitrary molecular transfer. Plain connectivity and atomic numbers also omit geometry; predicting geometrically dependent energy requires suitable geometric features or equivariant representations. Repeated aggregation can blur node distinctions, and limited neighbourhoods may miss long-range interactions.
Architectural symmetry is one way to supply scientific knowledge. The next chapter supplies a different kind: a differential equation that the prediction should satisfy.