Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Rules that never change
Gravity pulls towards the Sun the same way whether you look at the solar system from above, from the side or upside down. A swinging pendulum without friction never gains or loses energy. These facts hold before we collect any data, so a model can be told about them in advance. If we only show a learning model orbits on one side of the Sun, it has no way to guess the other side, unless we build in that turning the picture changes nothing. In the demo, train on a narrow range of angles and see which model still works everywhere.
Spacecraft trajectory software uses symplectic integrators for long propagations because they keep energy errors bounded for millions of steps; a learned dynamics model needs the same property.
- 1. A model that gives the same answer after the input is rotated is…
- 2. A frictionless pendulum conserves…
- 3. Building symmetry into a model mainly helps it…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.By hand
- Invariance: f(g·x) = f(x) for every group element g (energy is unchanged by rotating the system). Equivariance: f(g·x) = g·f(x) (rotate the system and the forces rotate with it).
- Groups in physics: translations in space and time, rotations SO(3), reflections, the Euclidean group E(3), Galilean and Lorentz boosts, permutations of identical particles, gauge symmetries.
- Noether’s theorem (1918): each continuous symmetry of the action gives a conserved quantity: time translation → energy, space translation → momentum, rotation → angular momentum.
- Three ways to get symmetry into a model:
- Data augmentation: add transformed copies of the data; the symmetry is learned approximately.
- Group averaging (symmetrisation): f_sym(x) = mean over g of g⁻¹ f(g x); exact for finite groups, costs one evaluation per group element.
- Equivariant architectures: invariant features (distances, angles) or layers that commute with the group by construction: G-CNNs, E(n)-equivariant GNNs, tensor-field networks and e3nn (E18).
- Conservation in dynamics: Hamiltonian systems preserve energy and phase-space volume. Symplectic integrators (symplectic Euler, leapfrog/Verlet) preserve the volume exactly and keep the energy error bounded; explicit Euler does not. Learned models can be built the same way: Hamiltonian and Lagrangian neural networks (J3-4).
- 1. If rotating the input rotates the output the same way, the map is…
- 2. By Noether's theorem, rotational symmetry implies conservation of…
- 3. Group averaging over a finite group gives…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.Testing and building symmetry
Exercise 1.
- Rotation matrices and the central-force field a = −r/|r|³.
- A numerical equivariance test, max |f(Rx) − R f(x)|.
- Symmetrisation by averaging over the rotations of a finite group Cₙ.
- Explicit and symplectic Euler steps for the harmonic oscillator.
Practice.
- Test the symmetry first: compute the equivariance error of the trained model on rotated or shifted inputs; it is a cheap, label-free check.
- Prefer invariant inputs when they exist (distances, relative positions, dimensionless groups); it is the simplest way to get exact symmetry.
- Use augmentation when the architecture cannot be changed; expect approximate symmetry and extra training cost.
- Use equivariant libraries for 3-D data: e3nn, escnn (2-D and 3-D steerable CNNs), and the equivariant GNNs behind MACE, NequIP and Allegro for interatomic potentials.
- Do not impose a symmetry the data break: gravity points down near Earth’s surface, sensors have fixed orientations, boundaries break translation invariance.
- For long rollouts, use symplectic or energy-conserving integrators and monitor conserved quantities as health checks.
import numpy as np
def equivariance_error(f, X, R): # label-free check of a trained model
return np.max(np.abs(f(X @ R.T) - f(X) @ R.T))
def invariant_model(X, coef): # build symmetry in: depend on |r| only
r = np.linalg.norm(X, axis=1, keepdims=True)
return -(X / r) * (coef[0] / r**2 + coef[1] / r**3)
# e3nn / escnn provide equivariant layers for 3-D data and images- 1. A cheap check that a trained model respects a symmetry:
- 2. A library of E(3)-equivariant layers:
- 3. A symmetry should not be imposed when…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
Why invariance generalises. If f is equivariant, its values on one representative of each orbit determine it everywhere: data at angles in [0°, 90°] fix the field at all angles. The hypothesis class shrinks from functions of (x, y) to functions of r, so fewer samples are needed and the error outside the training region is the same as inside. Without the constraint, nothing in the data says what happens at unseen angles; a polynomial fitted on a quarter-disc can do anything elsewhere.
Why augmentation is weaker. Augmenting with rotated copies makes the training data cover every orbit, so a flexible model can learn the symmetry. It is still only approximate, and the model must have the capacity to represent the symmetric function: here a cubic polynomial in (x, y) cannot represent r⁻³ well, so augmentation removed the extrapolation failure but left a bias floor (0.24 relative error) that the radial model did not have.
Group averaging. For a finite group G, f_sym(x) = (1/|G|) Σ_g g⁻¹ f(gx) is exactly equivariant: replacing x by hx re-indexes the sum. It is the projection of f onto equivariant functions, so it never increases the distance to an equivariant truth. For continuous groups, averaging over a finite subgroup gives approximate symmetry.
Conservation and stability. A linear one-step map z → Mz preserves the energy ‖z‖² only if M is orthogonal. A least-squares fit to noisy data gives M with eigenvalues of modulus 1 ± ε; after N steps the energy grows or shrinks like (1 ± ε)^(2N), so tiny fitting errors become large over long rollouts. Constraining M to a rotation removes the drift entirely and leaves only a phase error, which grows linearly with N. Symplectic integrators work the same way: they solve a nearby Hamiltonian system exactly, so the energy error stays bounded.
- 1. Data at a quarter of the angles determine an equivariant field everywhere because…
- 2. A least-squares step map lets energy drift because its eigenvalues have modulus…
- 3. Group averaging over a finite group is…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.How much does a built-in symmetry or conservation law buy, compared with learning it from data?
History.
- E. Noether (1918) linked symmetries to conservation laws; symplectic integrators (de Vogelaere 1956, Ruth 1983, Hairer, Lubich and Wanner’s “Geometric numerical integration”, 2002/2006) made the link practical for long simulations.
- In machine learning, T. Cohen and M. Welling (2016) introduced group-equivariant CNNs; tensor field networks (Thomas et al., 2018), SE(3)-transformers (Fuchs et al., 2020), E(n)-equivariant GNNs (Satorras et al., 2021) and e3nn (Geiger and Smidt, 2022) followed.
- Hamiltonian neural networks (Greydanus et al., 2019) and Lagrangian neural networks (Cranmer et al., 2020) built conservation into learned dynamics. Equivariant interatomic potentials (NequIP, 2022; MACE, 2022) showed large gains in data efficiency, and E(3)-equivariance is standard in molecular models.
Exercise 2.
- Symmetry. Learn the field a(x) = −r/|r|³ (radius 1–2) from 50 samples with noise 0.01, taken at angles in [0°, 90°] (“quarter”) or [0°, 360°] (“full”). Models: a cubic polynomial in (x, y) fitted by ridge regression (raw); the same with 7 random rotated copies of the training set (augmented); and an equivariant model −r̂ (c₁/r² + c₂/r³ + c₃/r⁴). Relative error on 2000 test points at all angles, median of 10 runs.
- Conservation. Learn the oscillator’s step map (rotation by 0.1 rad) from 40 noisy pairs (noise 0.01): unconstrained least squares or a pure rotation with fitted angle. Energy after 1000 steps (true 0.5), over 10 runs.
| training angles | raw cubic | augmented cubic | equivariant |
|---|---|---|---|
| quarter (90°) | 10.33 | 0.241 | 0.004 |
| full (360°) | 0.273 | 0.241 | 0.005 |
| learned step map | energy after 1000 steps |
|---|---|
| unconstrained least squares | 0.01 to 14.06 over 10 runs |
| rotation with fitted angle | 0.5 exactly (median phase error 0.83 rad) |
- Symmetry decides extrapolation. Trained on a quarter of the angles, the raw model was off by a factor of ten on the rest; the equivariant model’s error (0.004) was the same as with full coverage.
- Augmentation fixed the coverage but not the model class. With or without full data the cubic polynomial could not represent r⁻³ well, leaving a 0.24 error floor. Building in symmetry also reduced the model to three radial coefficients, which is the main reason it is so accurate here.
- Unconstrained dynamics drift in both directions: depending on the noise draw, the learned map’s energy collapsed to 0.01 or grew to 14 after 1000 steps. The rotation-constrained map kept energy exactly; its remaining error is in the phase, about 0.8 rad after 1000 steps.
- Seeds 1 and 2: quarter-angle raw errors 10.63 and 12.12, equivariant 0.004 and 0.005; unconstrained energies reached 4.09 and 99.83.
Symmetry and conservation in AI, robotics and aerospace
- Molecules and materials: E(3)-equivariant interatomic potentials (NequIP, MACE, Allegro) reach the accuracy of earlier models with 100 to 1000 times less training data.
- Orbital mechanics: learned perturbation models are built on top of a symplectic two-body propagator so that energy and angular momentum stay bounded over thousands of orbits.
- Robot perception: SE(3)-equivariant networks for grasping and point clouds generalise to object poses not seen in training (equivariant descriptor fields, 2022).
- Weather models: global models use spherical or icosahedral meshes so that the network treats all longitudes alike (GraphCast’s multi-mesh; spherical Fourier neural operators).
References
- E. Noether (1918). “Invariante Variationsprobleme.” Nachrichten der Königlichen Gesellschaft der Wissenschaften zu Göttingen.
- T. Cohen and M. Welling (2016). “Group equivariant convolutional networks.” ICML.
- V. G. Satorras, E. Hoogeboom and M. Welling (2021). “E(n) equivariant graph neural networks.” ICML.
- S. Greydanus, M. Dzamba and J. Yosinski (2019). “Hamiltonian neural networks.” NeurIPS.
- S. Batzner et al. (2022). “E(3)-equivariant graph neural networks for data-efficient and accurate interatomic potentials.” Nature Communications.
- E. Hairer, C. Lubich and G. Wanner (2006). “Geometric numerical integration.” Springer.