Interactive Explainer
Equivariant Networks, Live
A neural network is equivariant to a transformation when rotating the input rotates the output the same way. For satellite imagery, molecules, point clouds, and any system without a privileged orientation, this is what you want and most vanilla networks don't deliver it.
Equivariance vs invariance
$f$ is equivariant to a transformation $T_g$ if applying $T_g$ to the input has the same effect as applying some (possibly different) transformation to the output. Invariance is the special case where the output doesn't change at all.
- Translation equivariance. Move an object sideways — feature maps shift the same way. Standard CNN convolution gives you this for free (modulo padding).
- Rotation equivariance. Rotate the input by 90° — feature maps rotate by 90° too. Standard CNNs don't have this; you'd need C4 group convolutions (Cohen & Welling, 2016).
- Scale equivariance. Zoom in — features scale. Mostly approximated via pyramids; true equivariant architectures exist but are rare.
- SE(3) equivariance. 3-D rigid-body symmetries. Critical for molecules / point clouds (E(3)NN, SE(3)-Transformer).
- Permutation equivariance. Sets and graphs. Self-attention is permutation-equivariant; GNN aggregations are too.
Why a vanilla CNN can't rotate
A standard 3×3 convolution filter is a fixed pattern in pixel space. Rotating the input does not rotate the filter; the response thrashes. Three classical fixes:
- Data augmentation. Train with random rotations. Cheap; nearly works for classification; the response is approximately invariant but not equivariant, and the model still has to learn each rotation redundantly.
- Group convolutions (G-CNN). Apply $k$ rotated copies of the same filter at each layer; the feature map has an extra "rotation" axis. Cohen & Welling 2016; provably equivariant.
- Steerable CNNs. Use filters that transform continuously under rotation (linear combinations of circular harmonics). Equivariant to the continuous $\mathrm{SO}(2)$ group, not just discrete.
Live: rotate the input, watch three architectures respond
A synthetic airplane-silhouette input is rotated by θ. Three tiny networks emit a feature vector. Plot the L2 distance between the feature at θ=0 and the feature at the current θ. A perfectly invariant network would output a flat line at zero; a perfectly equivariant one would show a clean orbit shape. The vanilla CNN responds erratically.
Where to use what
- Satellite / aerial imagery. Sentinel and Landsat tiles have no canonical "up"; aerial / drone footage rotates with the platform. C4 / C8 group convolutions on the backbone, or rotation augmentation + test-time average-of-rotations.
- Molecular & atomic systems. Energies are invariant to rigid rotations; forces are equivariant. Use E(3)NN, SE(3)-Transformer, MACE for molecular ML; AlphaFold-2's invariant point attention is in this family.
- Point clouds. 3-D LiDAR / scans need SE(3) equivariance for object detection that respects how you mounted the sensor.
- Sets and graphs. Permutation equivariance is non-negotiable: GNNs, Deep Sets, transformers (without positional encoding) all sit here.
- Medical 3-D volumes. CT / MRI / PET with rotated patient pose. Rotation equivariance helps small-data fine-tunes generalise.
Practical gotchas
- Discrete vs continuous group. C4 (90°) and C8 (45°) are easy to implement; continuous SO(2) requires steerable filters or harmonic networks.
- Cost. A C4 group conv has 4× the channels of a vanilla conv; train and inference cost scale accordingly. Modern hardware tolerates it.
- Combine with augmentation, don't replace it. Equivariant ≠ no augmentation; you still want crops, brightness, noise. The equivariant axis takes one source of variation off the table.
- Don't equivary the wrong thing. If your task depends on orientation (text recognition, scene understanding with "up"), rotation equivariance is wrong. Use it where symmetry truly exists.
- Libraries.
escnn/e2cnn(PyTorch),se3-transformer(PyTorch),e3nn(PyTorch for molecules),jaxon/JAX-MDfor SE(3) equivariant work in JAX.