Symmetry-Aware Generative Modeling through Learned Canonicalization

Kusha Sareen, Daniel Levy, Arnab Kumar Mondal, Sékou-Oumar Kaba, Tara Akhound-Sadegh, Siamak Ravanbakhsh

TL;DR

Standard generative models for symmetric data (like 3D molecules) rely on specialized, computationally heavy equivariant networks to ensure symmetric output distributions. This paper shows that full output invariance is often unnecessary: by learning an equivariant "canonicalizer" that rotates data into a standardized pose, one can train a faster, non-equivariant generative model over just a representative slice of the data distribution. On molecular generation, this halves inference time while improving sample validity and stability.

What Problem Does This Paper Address?

In domains like computational chemistry and physics, physical systems exhibit fundamental Euclidean symmetries—a molecule's validity and energy are invariant to translations and rotations. The dominant generative modeling paradigm guarantees symmetric outputs by combining an invariant prior distribution with strictly group-equivariant network architectures (such as equivariant graph neural networks or spherical CNNs).

However, enforcing architectural equivariance comes with steep costs:

  1. Computational complexity: Operations like Clebsch–Gordan tensor products and group convolutions are slow and memory-intensive.
  2. Expressivity bottlenecks: Constraining layers strictly to equivariant functions limits their capacity to model complex dependencies.
  3. Task misalignment: In practical applications like drug discovery, practitioners care about generating valid, novel, and stable molecular structures; generating them across every arbitrary orientation is redundant.

Methods

Instead of modeling the entire invariant density $p_X(x)$ over the full state space $X$, the authors propose modeling the quotient space $X/G$ (the space of group orbits). This restricts the generative model to learning only one representative sample per orbit.

  • Learned Canonicalization: The approach defines a quotient map $c(x) = h(x)^{-1}x$, where $h: X \to G$ is a relaxed group-equivariant canonicalization network. $h(x)$ predicts the transformation needed to align input $x$ into a standardized, canonical orientation.
  • Non-Equivariant Generator: A standard, flexible, non-equivariant denoising diffusion model $\phi$ is trained directly on these canonicalized samples $c(x)$.
  • Joint Training: The canonicalizer $h$ and denoiser $\phi$ are trained jointly using the standard diffusion objective: $$\min_{h, \phi} \mathbb{E}_{t, \epsilon} \|\epsilon - \phi(z_t, t)\|^2$$ where $z_t = \alpha_t c(x) + \sigma_t \epsilon$.

For 3D molecules, translations are handled as standard by centering at the center of mass. For rotations, $h$ is parameterized via a multi-channel EGNN that outputs vectors orthonormalized into an $\mathrm{SO}(3)$ rotation matrix using Gram–Schmidt.

Datasets

  • RotMNIST: Rotated MNIST digits, used as a 2D proof-of-concept for discrete image canonicalization using steerable CNNs (ESCNN).
  • QM9: A standard molecular benchmark containing roughly 130k small organic 3D molecules with up to 9 heavy atoms (plus hydrogens).

No new datasets were introduced.

Key Insights and Ideas

  • Slicing the Distribution: By mapping data to a canonical slice, the generative model only learns a simplified, lower-dimensional manifold rather than replicating the same density across every orientation.
  • Learning the "Easiest" Orientation: Because the canonicalizer $h$ is trained end-to-end with the denoiser, it learns poses that minimize denoising error. Qualitatively, generated planar molecules end up aligned with the $xy$-plane and elongated molecules orient horizontally, simplifying coordinates for the non-equivariant backbone.
  • Unlearned Slicing Still Helps: Even an untrained canonicalizer with random, frozen weights (canon(fr)+GDM) yields competitive molecular stability compared to a fully equivariant model, demonstrating that breaking symmetry into fixed canonical slices provides a massive structural benefit.

Key Results

On the QM9 molecule generation benchmark, combining a learned canonicalizer with a non-equivariant Graph Diffusion Model (canon+GDM) outperformed both the baseline non-equivariant model (GDM) and the fully equivariant baseline (EDM):

  • Generation Quality & Stability:
  • Test NLL: $-117.4 \pm 1.2$ (vs. $-110.7 \pm 1.7$ for EDM and $-105.8$ for GDM).
  • Molecule Stability: $84.6 \pm 0.4\%$ (vs. $82.0 \pm 0.4\%$ for EDM).
  • Validity: $94.4 \pm 0.3\%$ (vs. $91.9 \pm 0.5\%$ for EDM).
  • Uniqueness: $99.7 \pm 0.2\%$ (vs. $90.7 \pm 0.6\%$ for EDM).
  • Speed:
  • Halved sampling inference time: 0.55 s/sample for canon+GDM vs. 1.16 s/sample for EDM.
  • RotMNIST:
  • Reduced reconstruction $L_2$ test loss from 0.0312 (baseline U-Net) to 0.0255 (canon+U-Net with 16 discretizations).

Limitations and Future Work

  • Preliminary Scale: Experiments are restricted to small benchmarks (RotMNIST and QM9). Evaluation on larger macromolecules (e.g., proteins or materials) remains to be demonstrated.
  • Non-Equivariant Backbone Choice: The authors evaluated a relatively simple GNN counterpart to EDM as their generative denoiser; exploring state-of-the-art non-equivariant architectures (e.g., unconstrained transformers) is left for future work.
  • Canonicalization Singularities: As noted in broader canonicalization literature, learning a continuous, discontinuity-free quotient map over continuous Lie groups like $\mathrm{SO}(3)$ can be theoretically challenging for certain symmetric geometries.

Summary updated

BibTeX
@inproceedings{sareen2024symmetry,
  author = {Kusha Sareen and Daniel Levy and Arnab Kumar Mondal and Sékou-Oumar Kaba and Tara Akhound-Sadegh and Siamak Ravanbakhsh},
  title = {{Symmetry-Aware Generative Modeling through Learned Canonicalization}},
  booktitle = {NeurReps @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=emQQupUb2n},
}
Figure