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

Abstract

Many generative tasks in chemistry and science involve distributions invariant to group symmetries, such as permutation and rotation. A common strategy enforces invariance and equivariance through architectural constraints like equivariant denoisers. 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 model on the canonical slice, and finally recover the invariant distribution by sampling a random symmetry transform at generation time. Our work provides a comprehensive theory of canonical diffusion, proving its correctness, universality, and superior expressivity. We instantiate the framework for molecular graph generation under $S_n \times SE(3)$ symmetries. By leveraging geometric spectra-based canonicalization, our approach significantly outperforms equivariant baselines in 3D molecule generation tasks, achieving state-of-the-art performance on the GEOM-DRUG dataset.

Introduction: The Symmetry Tax in Generative Modeling

In scientific domains like chemistry, data is inherently symmetric. A molecule is physically identical regardless of its rotation in space ($SO(3)$) or how its atoms are indexed ($S_N$ permutations). The traditional approach to handling these symmetries is to build equivariant architectures (e.g., EGNNs) that mathematically respect these properties. However, this often imposes a "symmetry tax":

  1. Computational Overhead: Equivariant layers and tensor algebra are computationally expensive.
  2. Expressivity Limits: Strict architectural constraints can limit a model's ability to learn complex distributions.
  3. Trajectory Crossing: During diffusion training, a symmetric noise vector might correspond to multiple valid orientations of the same molecule. This creates "conflicting gradients" where the model struggles to decide which orientation to generate, leading to inefficient sampling paths.
Illustration of the trajectory crossing problem where a single noisy state corresponds to multiple ground-truth orientations, leading to conflicting gradients.

Methodology: The Canonicalization Framework

We propose a framework that explicitly breaks symmetry during training to simplify the learning task, then restores it during inference.

Canonicalization Map

Every molecule is mapped to a unique "orbit representative." For permutations, we use Geometric Spectral Ordering (based on the Fiedler vector of the graph Laplacian) to consistently order atoms. For rotations, we fix a global reference frame using anchor atoms. This eliminates the "gauge" ambiguity, smoothing the optimization landscape and making training significantly faster.

The Canon Architecture

We introduce a novel three-stream architecture that processes coordinates, node features, and "canonical rank" (positional encodings). Because the data is now in a fixed pose, we can utilize powerful, non-equivariant components like standard Transformers. Theoretically, these non-equivariant models can be more expressive than equivariant ones when provided with canonical information.

Aligned Priors and Invariance Restoration

To ensure the "transport" from noise to data is as straight as possible, we use priors aligned with the canonical distribution and employ Optimal Transport (OT)-based flow matching. At generation time, the model produces a molecule in the canonical pose. To recover the full invariant distribution, we apply a random rotation and permutation (Haar randomization) to the final output.

Experimental Results

The model was evaluated on two standard benchmarks for 3D molecule generation: QM9 (~134k small organic molecules) and GEOM-DRUG (larger, structurally diverse drug-like molecules with up to 72 atoms).

  • State-of-the-Art Performance: On GEOM-DRUG, CanonFlow achieved SOTA results, reaching 98.4% molecule stability and 95.9% validity, outperforming previous equivariant baselines by a significant margin.
  • Geometric Precision: On QM9, the model achieved a 26% reduction in Opt-RMSD (0.17Å vs 0.23Å), generating geometries much closer to energy-minimized ground truths.
  • Efficiency in Few-Step Sampling: The advantage of canonicalization is most apparent in few-step generation. Even with only 50 sampling steps, CanonFlow maintains high validity, whereas standard models often see a sharp decline in quality.

Conclusion

Canonicalization offers a powerful alternative to strict equivariance, allowing generative models to bypass the computational and expressivity constraints of traditional architectures. By straightening the diffusion trajectory and leveraging standard high-capacity backbones, CanonFlow sets a new standard for 3D molecular generation. Future work will explore extending this framework to even larger systems, such as protein-ligand complexes and crystalline materials.

Summary updated

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