Symmetry and Groups: Invariance, Equivariance, and Why You Build It In
Published:
Groups, actions, orbits
A group $(G,\cdot)$ is a set with an associative operation, an identity $e$, and inverses. An action of $G$ on a set $X$ is a map $G\times X\to X$ with $e\cdot x = x$ and $(gh)\cdot x = g\cdot(h\cdot x)$ — the group’s structure is faithfully reflected in how it moves points.
The orbit of $x$ is \(\mathcal{O}_x = \\{g\cdot x : g\in G\\}\): everything reachable from $x$ by a symmetry. Orbits partition $X$, which gives the cleanest description of invariance — an invariant function is one that is constant on every orbit, i.e. a function on the quotient $X/G$ rather than on $X$.
The three groups worth knowing cold:
| Group | Acts on | Elements |
|---|---|---|
| $\mathbb{Z}^2$ (translations) | image grids | integer shifts |
| $S_n$ (permutations) | node sets, sets | relabellings, $n!$ of them |
| $SE(3)$ | point clouds in $\mathbb{R}^3$ | rotation $R\in SO(3)$ plus translation $t$ |
The two definitions, precisely
Let $G$ act on the input space $X$ and on the output space $Y$. A map $f: X\to Y$ is
where $\rho$ is the action (a representation, when $Y$ is a vector space) of $G$ on $Y$. Equivariance says $f$ commutes with the symmetry: transform-then-predict equals predict-then-transform. Invariance is the special case $\rho(g)=\mathrm{id}$ for all $g$.
The three cases that come up
Translation in CNNs. For a signal $x:\mathbb{Z}^2\to\mathbb{R}$ and shift $(T_v x)(u) = x(u-v)$, cross-correlation with a kernel $\psi$ satisfies $(T_v x)\star\psi = T_v(x\star\psi)$. A convolution layer is translation equivariant: shift the input and the feature map shifts identically. Invariance appears only when you collapse the spatial axes — global pooling, or in practice the classifier head. In real networks the equivariance is approximate: striding and pooling alias, so it holds exactly only for shifts that are multiples of the stride, and padding breaks it at the borders.
Permutation in GNNs and set models. With node features $X\in\mathbb{R}^{n\times d}$, adjacency $A$, and a permutation matrix $P$, a message-passing layer $F$ satisfies
Node-level predictions must be equivariant — relabel the nodes and the predictions come along. Graph-level predictions must be invariant, which is what the sum/mean/max readout provides. The same split governs Deep Sets and set transformers.
$SE(3)$ in molecular models. A potential energy is invariant, $E(Rx+t) = E(x)$, while forces are equivariant, $F(Rx+t) = R\,F(x)$ — a rotated molecule feels rotated forces. There is a neat consistency here: since $F = -\nabla_x E$, the gradient of an $SE(3)$-invariant scalar is automatically equivariant, so getting the energy right gets the forces right by construction. See the GNN book’s posts on equivariance, EGNN and SE(3) transformers for the architectures.
The counter-argument is real too. A symmetry that is only approximately true in the data — near-symmetry, or a symmetry broken by context, like gravity breaking full rotational symmetry for a robot — is expensive to hard-code and can hurt. Constraints are priors: correct ones help, wrong ones bite.
Recap
- An action satisfies \(e\cdot x = x\) and \((gh)\cdot x = g\cdot(h\cdot x)\); orbits partition the space, and invariant functions are exactly functions on the quotient.
- Invariance: \(f(g\cdot x) = f(x)\). Equivariance: \(f(g\cdot x) = \rho(g)f(x)\). Invariance is equivariance with the trivial output representation.
- Convolution is translation equivariant (approximately so under striding); message passing is permutation equivariant, with an invariant readout for graph-level tasks.
- Molecular energies are \(SE(3)\) invariant, forces are \(SE(3)\) equivariant, and \(F = -\nabla E\) makes the second follow from the first.
- Built-in symmetry holds exactly and everywhere; augmentation only approximates it near the training data and spends capacity doing so.
That closes the book — back to the overview for the map of all seven posts.
References
- Bronstein, M. M., Bruna, J., Cohen, T., & Veličković, P. Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges. arXiv:2104.13478, 2021.
- Cohen, T., & Welling, M. Group Equivariant Convolutional Networks. ICML 2016.
- Zaheer, M., Kottur, S., Ravanbakhsh, S., Poczos, B., Salakhutdinov, R., & Smola, A. Deep Sets. NeurIPS 2017.
- Satorras, V. G., Hoogeboom, E., & Welling, M. E(n) Equivariant Graph Neural Networks. ICML 2021.
- Elesedy, B., & Zaidi, S. Provably Strict Generalisation Benefit for Equivariant Models. ICML 2021.
- Zhang, R. Making Convolutional Networks Shift-Invariant Again. ICML 2019.
