When and How to Canonize: a Generalization Perspective

Yonatan Sverdlov, Benjy Friedmann, Snir Hordan, Nadav DymNeurIPS 2026

TL;DR

When teaching neural networks to recognize symmetric objects (like rotated images or unordered 3D point clouds), "canonization"—snapping every input to a single standard orientation before processing—is a fast, popular shortcut. This paper introduces a mathematical framework showing that canonization is a double-edged sword: while smooth canonizations generalize just as well as gold-standard invariant architectures, discontinuous ones can be no better than ignoring symmetry altogether. Along the way, the authors provide the first mathematical proof explaining why sorting 3D points along space-filling Hilbert curves works so remarkably well in modern point-cloud Transformers.

What Problem Does This Paper Address?

Real-world data is full of symmetries. A molecule is the same molecule regardless of how it rotates in 3D space; a point cloud represents the same chair no matter how its points are ordered in a file.

Historically, researchers baked these symmetries directly into specialized "invariant" neural networks, or used group averaging (running all possible orientations of an input through a standard network and averaging the answers). Averaging works great, but it is computationally impossible when there are millions of permutations.

Enter canonization: a preprocessing step that maps all symmetric versions of an input (its "orbit") to one canonical representative—like rotating every image to sit upright, or sorting a list of 3D coordinates. You only run the model once, and you can use any off-the-shelf backbone! While canonization has driven major empirical breakthroughs (like Point Transformer V3), its effect on generalization—how well a model performs on unseen data—remained a mystery. When should we canonize instead of averaging, and what separates a good canonization from a bad one?

Methods

To measure generalization without getting bogged down in specific network weights, the authors adapt a classic statistical learning tool: covering numbers. Intuitively, the $\epsilon$-covering number asks: how many balls of radius $\epsilon$ do you need to completely cover your data space? Fewer balls mean a "smaller," simpler space where models are less likely to overfit, leading to tighter generalization error bounds.

While applying covering numbers to Lipschitz-continuous models is standard, the authors' novel contribution is comparing the covering numbers across three distinct spaces:

  1. The raw input space (used by symmetry-agnostic models).
  2. The canonized image space (the subset of inputs output by a canonization function).
  3. The quotient space (the space of symmetry orbits, which governs structurally invariant and group-averaged models).

They also introduce an empirical proxy called coverage—measuring the maximum and average distance from test samples to their nearest same-class training neighbors—to test whether their theoretical covering-number hierarchy holds up on real datasets.

Datasets

The authors evaluate their theoretical predictions on existing benchmarks across three domains (no new datasets are introduced):

  • 3D Point Clouds: ModelNet10 and ModelNet40.
  • 2D Images: Rotated-MNIST (evaluating 90-degree rotation symmetries).
  • Deep Weight Spaces: MNIST-INR and Fashion-MNIST-INR, where each image is represented by the weights of an Implicit Neural Representation (INR) network, and the model must classify the image directly from those weights (which have neuron-permutation symmetries).

Key Insights and Ideas

  • The Generalization Hierarchy: Invariant and group-averaged models always enjoy the lowest (best) generalization error bounds. Canonized models sit strictly in the middle—at best tying with group averaging, and at worst degrading to the bounds of symmetry-agnostic models.
  • Continuity is Everything: What makes a canonization "optimal" versus "poor"? Regularity. If a canonization is isometric (distance-preserving, and thus continuous), its covering number matches the optimal quotient space. If it is discontinuous—meaning tiny nudges to an input cause wild jumps in its canonical form—its covering number inflates, hurting generalization.
Continuous vs. discontinuous canonizations for sign symmetry: c(x)=|x| is continuous and optimal, while c1 and c_infinity introduce discontinuities that inflate covering numbers.
  • Why Hilbert Curves Beat Lexsort: To make a 3D point cloud order-invariant, you might try lexicographical sorting (lex-sort: sort by $x$, break ties with $y$, etc.). However, lex-sort is discontinuous, and the authors prove its covering number grows exponentially with the number of points $n$. Conversely, ordering points along a space-filling Hilbert curve preserves spatial locality (Hölder continuity), guaranteeing polynomial growth in $n$. This gives the first rigorous justification for why state-of-the-art models like Point Transformer V3 rely on Hilbert serialization.
Ordering a 2D grid via a continuous Hilbert curve preserves spatial locality, unlike discontinuous lexicographical sorting.

Key Results

Across every experiment, real-world test accuracy and empirical data coverage mirror the paper's theoretical hierarchy:

  • Point Cloud Serialization (ModelNet40): Pairing a simple MLP with no canonization yields 44.1% test accuracy (generalization gap of 0.559). Adding lex-sort jumps accuracy to 69.2% (gap: 0.256), while Hilbert canonization reaches 74.2% (gap: 0.082)—nearly matching the permutation-invariant DeepSets model at 75.5% (gap: 0.039). Empirical mean coverage drops in lockstep: 0.3823 (Euclidean) $\rightarrow$ 0.2989 (Lexsort) $\rightarrow$ 0.1951 (Hilbert) $\rightarrow$ 0.0958 (Group/Wasserstein distance).
  • 2D Rotations (Rotated-MNIST): A plain CNN scores 94.7%, learned canonization reaches 96.5%, and 4-way group averaging tops the chart at 97.3%.
  • PCA Sign Ambiguity (ModelNet40): When aligning 3D shapes with PCA, resolving sign flips via group averaging (76.0%) beats skewness canonization (74.2%) and ignoring the ambiguity (72.9%).
  • Weight Spaces (Fashion-MNIST-INR): Classifying neural network weights with a plain MLP gets 14.41%, canonizing the weights jumps to 40.02%, and a dedicated permutation-invariant architecture (DWSNet) achieves 65.53%.

Limitations and Future Work

The authors note that their theoretical hierarchy compares upper bounds on generalization error, which are not guaranteed to be tight. Furthermore, the theory assumes the underlying backbone maintains the same Lipschitz constant across training strategies, which may vary in practice during gradient descent. In future work, the team plans to apply covering-number analysis to compare other domain-specific canonizations and extend their mathematical framework to frame averaging (averaging over small, carefully chosen subsets of a symmetry group).

Summary updated

Abstract

While equivariant architectures are standard for processing symmetric data, there is growing interest in achieving equivariance by applying group averaging or canonization to non-equivariant backbones. However, the theoretical generalization properties of these alternative strategies remain poorly understood. We introduce a theoretical framework to analyze the generalization error of these methods by bounding their covering numbers. We establish a rigorous generalization hierarchy: the error bounds of canonized models are at best equal to the error bounds of structurally equivariant and group-averaged models, and at worst equal to the bounds of non-equivariant baselines. Furthermore, we show that there exist "optimal" canonizations which attain the optimal error bounds, and "poor" canonizations which attain the non-equivariant error bounds, and that this depends on the regularity of the canonization. Finally, applying this framework to permutation groups in point cloud processing, we rigorously prove that the covering number of lexicographical sorting grows exponentially with point cloud dimension, whereas Hilbert curve canonization guarantees polynomial growth. This provides the first formal theoretical justification for the empirical success of Hilbert curve serialization in state-of-the-art point cloud architectures. We conclude with experiments which support our theoretical claims.
BibTeX
@inproceedings{sverdlov2026when,
  author = {Yonatan Sverdlov and Benjy Friedmann and Snir Hordan and Nadav Dym},
  title = {{When and How to Canonize: a Generalization Perspective}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=auino4yMsg},
}
Figure