Rethinking Diffusion Models with Symmetries through Canonicalization with Applications to Molecular Graph Generation

Cai Zhou, Zijie Chen, Zian Li, Jike Wang, Kaiyi Jiang, Pan Li, Rose Yu, Muhan Zhang, Stephen Bates, Tommi Jaakkola

TL;DR

This paper introduces "canonicalization" as a novel approach to generative modeling for data with symmetries, like molecules. By mapping symmetric data to a unique "canonical slice," they train simpler, non-equivariant models, which surprisingly leads to faster training and better generation quality, outperforming existing methods on molecular graph generation.

What Problem Does This Paper Address?

Many scientific datasets, particularly in chemistry and physics, possess inherent symmetries. For instance, a molecule's identity remains the same regardless of its rotation or how its atoms are ordered (permutation). Generative models trained on such data often struggle because these symmetries create ambiguity. Traditional methods try to enforce these symmetries directly through complex, "equivariant" model architectures or by designing "invariant" prior distributions. However, this can lead to issues like "trajectory crossing" in diffusion models, where the model gets confused about which symmetric configuration to generate, slowing down training and potentially reducing performance. This paper questions the necessity of these complex equivariant approaches and proposes a simpler alternative: canonicalization.

Methods

The core idea is canonicalization: transforming each symmetric data point into a unique, standardized representation (a "canonical slice"). Instead of training a complex equivariant model on the original, symmetric data, they train a simpler, non-equivariant diffusion or flow model on this canonical slice. At generation time, they then reintroduce the symmetry by randomly applying a transformation.

Key techniques include:

  • Formal Quotient-Space Theory: The authors provide a theoretical framework to prove that modeling on the canonical slice is sufficient to represent any invariant distribution.
  • Geometric Spectra-Based Canonicalization: For molecular graphs, they use the Fiedler vector (an eigenvector of the graph Laplacian) derived from atomic coordinates to establish a principled, stable ordering of atoms. This breaks permutation symmetry.
  • Canonical SO(3) Frame: After ordering atoms, they optionally define a canonical orientation for the molecule to break rotational symmetry.
  • Canon Architecture: A novel neural network architecture that explicitly incorporates canonical information (like atom ranks) to improve denoising.
  • Canonical Positional Encoding: Injecting positional information derived from the canonical rank into the model to break permutation equivariance.
  • Adaptive Position-Dependent Prior: A more informed prior distribution for the noise, learned from the data's canonical positions.

Datasets

  • QM9: A standard benchmark for molecular property prediction and generation, containing relatively small molecules.
  • GEOM-DRUG: A more challenging dataset of drug-like molecules, used to test the models' capabilities on larger and more structurally diverse structures.

Key Insights and Ideas

  • Symmetry is a double-edged sword: While essential for defining data, enforcing symmetry directly in generative models can introduce complexity and ambiguity, hindering performance.
  • Canonicalization as a "gauge fixing" for data: By mapping symmetric data to a unique representative, they effectively "fix the gauge," simplifying the problem space and allowing simpler models to learn more effectively.
  • Non-equivariant models can be more expressive: The paper argues that by removing symmetry-induced ambiguity, non-equivariant models can actually achieve better expressivity on the canonical slice, leading to improved generation.
  • Canonicalization and Optimal Transport are complementary: While canonicalization removes symmetry ambiguity, optimal transport can further improve the "within-slice" learning by making trajectories straighter, leading to better training and sampling.
  • Few-step generation benefits significantly: The simplified and less ambiguous learning process on the canonical slice leads to models that can generate high-quality molecules in very few steps.

Key Results

  • State-of-the-art performance: Canonicalized models, particularly CanonFlow, achieve state-of-the-art results on the GEOM-DRUG dataset for molecular graph generation, outperforming baselines in molecule stability and validity.
  • Improved training efficiency: Canonicalization significantly accelerates training convergence, as demonstrated by training trajectories.
  • Superior few-step generation: The method shows remarkable performance even with a drastically reduced number of sampling steps (e.g., 50 steps), a significant improvement over previous methods.
  • Reduced Opt-RMSD: Canon. SemlaFlow (Prior + PCS) achieved the lowest Opt-RMSD on QM9, indicating better energy-minimized conformations.
  • Comparable or less computation: The canonicalized models achieve these gains with similar or even less computational overhead compared to equivariant baselines.

Limitations and Future Work

  • Stabilizers and non-uniqueness: The paper acknowledges that for molecules with non-trivial stabilizers (e.g., highly symmetric geometries), canonical representatives might not be unique, requiring remedies like weighted or probabilistic frames.
  • Extension to other symmetry groups: The current work focuses on $S_N \times SO(3)$ symmetries for molecules. The authors express interest in extending the framework to other symmetry groups for tasks like protein structure prediction or conditional generation.
  • Biomolecule generation: The current scope is limited to small molecule generation. Future work could explore applying this to larger biomolecules.

Summary updated

Abstract

Many generative tasks in chemistry and science involve distributions invariant to group symmetries (e.g., permutation and rotation). A common strategy enforces invariance and equivariance through architectural constraints such as equivariant denoisers and invariant priors. In this paper, we challenge this tradition through the alternative canonicalization perspective: first map each sample to an orbit representative with a canonical pose or order, train an unconstrained (non-equivariant) diffusion or flow model on the canonical slice, and finally recover the invariant distribution by sampling a random symmetry transform at generation time. Building on a formal quotient-space perspective, our work provides a comprehensive theory of canonical diffusion by proving: (i) the correctness, universality and superior expressivity of canonical generative models over invariant targets; (ii) canonicalization accelerates training by removing diffusion score complexity induced by group mixtures and reducing conditional variance in flow matching. We then show that aligned priors and optimal transport act complementarily with canonicalization and further improves training efficiency. We instantiate the framework for molecular graph generation under $S_N \times SO(3)$ symmetries. By leveraging geometric spectra-based canonicalization and mild positional encodings, canonical diffusion significantly outperforms equivariant baselines in 3D molecule generation tasks, with similar or even less computation. Moreover, with a novel architecture \emph{Canon}, CanonFlow achieves state-of-the-art performance on the challenging GEOM-DRUG dataset, and the advantage remains large in few-step generation.
BibTeX
@inproceedings{zhou2026rethinking,
  author = {Cai Zhou and Zijie Chen and Zian Li and Jike Wang and Kaiyi Jiang and Pan Li and Rose Yu and Muhan Zhang and Stephen Bates and Tommi Jaakkola},
  title = {{Rethinking Diffusion Models with Symmetries through Canonicalization with Applications to Molecular Graph Generation}},
  booktitle = {GenBio @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=TqNEdNHfjQ},
}
Figure