Elio Saade
Note

Equivariance with Learned Canonicalization Functions

The paper introduces a framework for building an invariant or equivariant model/function approximator by learning a canonicalization function. Instead of forcing the whole prediction network to be equivariant by architectural design, the model first maps the input to a canonical representative, applies a prediction network there, and then transforms the output back if needed.

Problem Setting

The authors consider inputs x∈Xx \in \mathcal{X} and outputs y∈Yy \in \mathcal{Y}, where both spaces are finite-dimensional vector spaces. A symmetry group GG acts on the input space through a representation ρ:G→GL(X)\rho : G \to \mathrm{GL}(\mathcal{X}) and on the output space through another representation ρ′:G→GL(Y)\rho' : G \to \mathrm{GL}(\mathcal{Y}).

The goal is to learn a function ϕ:X→Y\phi : \mathcal{X} \to \mathcal{Y}, that is equivariant. A function is GG-equivariant if transforming the input by gg causes the output to transform consistently:

ϕ(ρ(g)x)=ρ′(g)ϕ(x).\phi(\rho(g)x)=\rho'(g)\phi(x).

If ρ′(g)=I\rho'(g)=I, then the output does not transform, and the function is invariant.
The orbit of an input xx is the set of all transformed versions of xx:

ρ(G)x={ρ(g)x∣g∈G}\rho(G)x = \{\rho(g)x \mid g \in G\}

Canonicalization means choosing one representative from this orbit and mapping all equivalent inputs to that representative.

General Canonicalization Framework

The main construction writes an equivariant function as

ϕ(x)=h′(x)f(h(x)−1x).\phi(x)=h'(x)f(h(x)^{-1}x).

where

  • h(x)h(x) is the canonicalization function.
  • h(x)−1xh(x)^{-1}x is the canonicalized input.
  • ff is the prediction function applied in canonical space.
  • h′(x)h'(x) transforms the output back to the correct pose/frame.

Conceptually, this means that the input xx is canonicalized, then the predictor function is applied, then the output is transformed back from the canonical space.

For invariant tasks, such as classification, the final transformation h′(x)h'(x) is unnecessary because the output should not change under the group action. In that case,

h′(x)=Ih'(x)=I

and the model reduces to

ϕ(x)=f(h(x)−1x).\phi(x)=f(h(x)^{-1}x).

Partial Canonicalization

The paper then generalizes the framework by allowing only part of the symmetry to be handled by canonicalization. Let K≤GK \leq G be a subgroup. The prediction function ff is assumed to be KK-equivariant, while the canonicalizer handles the remaining symmetry.
In other words, if the predictor that is used already handles part of the symmetry naturally, the canonicalization only needs to handle the remaining symmetry.

For example, if we want to design an architecture that is equivariant to rotations and translations, we can use a canonicalizer with MLP. However, a CNN is already translation-equivariant, so the model can let the CNN handle translations and use the canonicalizer only for rotations/reflections.

Design of Canonicalization Functions

The paper presents two main approaches.

Direct Approach

In the direct approach, the canonicalization function is an equivariant neural network that directly outputs a group element:

h(x)∈ρ(G).h(x) \in \rho(G).

For example, if the symmetry group is rotations, the network outputs a rotation. If the group is permutations, it outputs a permutation or a relaxed permutation. If the group is Euclidean transformations, it outputs a rotation/reflection and translation.

The direct approach is simple conceptually, but it requires the canonicalization network itself to be equivariant.

Optimization Approach

In the optimization approach, the canonicalization function does not directly predict the transformation. Instead, it searches for the transformation that makes the input look most canonical.

The model defines an energy function EE that measures how “canonical” a transformed input looks. Then it chooses the transformation that gives the lowest energy:

h(x)=arg⁡min⁡ρ(g)E(ρ(g)−1x)h(x)=\arg\min_{\rho(g)} E(\rho(g)^{-1}x)

Conceptually, this is like mentally rotating an object until it appears upright or standard. The advantage is that the energy function itself can be ordinary; the structure comes from evaluating it on transformed versions of the input.

Connections

Direct relationships to this note.