Skip to content

Menu

WorksComputer Science

LexiCan: Lexicographic Canonicalization of Point Clouds for Machine Learning Applications

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_apce7dp8. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

Abstract

Canonicalization resolves the rotational and permutation ambiguity of 3D point clouds by selecting a unique orbit representative, maintaining their geometric information while allowing standard architectures, such as Transformers, to operate on them. Existing canonicalizations, however, exhibit discontinuity jumps on molecular configurations and non-trivial invariance errors in popular molecular datasets, which lead to ambiguity in their representation. To bridge this gap, we introduce LexiCan, a canonicalization that is provably invariant under either O(3)O(3) or SO(3)SO(3), empirically invariant to rotations to within ∼10−6\sim 10^{-6} angstroms on the QM9 and QM-sym molecular datasets, and mitigates discontinuity jumps on QM-sym, while running orders of magnitude faster than an existing canonicalization. Finally, non-invariant models perform better on QM9 property prediction and ModelNet40 shape classification with LexiCan than with that canonicalization.

Introduction

Three-dimensional point clouds are an efficient and widely-used representation of geometric data in molecular modelling, computer vision, robotics, geometric processing, and scientific computing [2] (Thomas et al. 2018; Gebauer et al. 2019; Pomerleau et al. 2015). Unlike images expressed on a fixed pixel grid, point clouds generally do not come with a preferred coordinate system. The same object may be observed at arbitrary positions and orientations, whilst its geometric and physical properties remain unchanged. A reliable learning system must account for these transformations: invariant outputs, such as object classes or molecular energies, should not depend on the chosen reference frame, whereas geometric outputs, such as forces or trajectories, should transform accordingly. Incorporating these symmetries into the learning pipeline can substantially improve sample efficiency, robustness, and generalization by preventing a model from learning spurious dependencies only based on pose [7] (Hinton et al. 2011; Romero et al. 2024).

Nevertheless, constructing a reliable canonical frame is difficult. Classical alignment techniques often rely on Principal Component Analysis (PCA), using the eigenvectors of the point cloud’s covariance matrix as coordinate axes [5, 3] (Vranic et al. 2001). Yet, such frames are ambiguous under sign changes and become non-unique when covariance eigenvalues coincide. Frame Averaging methods retain multiple possible frames but do not fully resolve the degeneracies caused by repeated eigenvalues and can increase computational costs [8] (Puny et al. 2022). Learning-based canonicalization offers greater flexibility but introduces a different set of difficulties. A learned frame may depend on the symmetries represented in its training distribution, may generalize poorly to previously unseen stabilizer types, and can introduce errors into the canonicalized coordinates (Winter et al., 2022).

Exact canonicalizations of point clouds under the orthogonal O(3) and special orthogonal SO(3) groups exist. But, as recently shown, none of them can be made continuous (Dym et al., 2024; Baker et al., 2024). To address this, Baker et al. [1] introduce Asymmetric Unit Normalization (ASUN), an explicit construction that detects the point group of a point cloud to extract a component of the point clouds called an asymmetric unit and uses this component to align the point cloud to a canonical pose. In practice, however, we find that ASUN’s implementation assigns different orientations to rotationally equivalent point clouds, beyond numerical error, and fails to canonicalize some symmetric configurations and is unstable on molecular geometries in the QM9 dataset Ramakrishnan et al. (2014).

We address this theory-to-practice gap by introducing LEXICAN, a 3D point cloud canonicalization based on lexicographic ordering, which is both invariant to within ∼10−6\sim10^{-6} Å on molecular data, handles symmetric point clouds and improved stability on molecular configurations. Specifically, our main contributions are the following:

  1. Provable canonicalization. We construct a provable canonicalization for labeled point clouds under groups G3SO=Sn×SO(3)G_{3}^{\mathrm{SO}} = \mathfrak{S}_{n} \times\mathrm{SO}(3) and G3O=Sn×O(3)G_{3}^{\mathrm{O}} = \mathfrak{S}_{n} \times\mathrm{O}(3), where Sn\mathfrak{S}_{n} is the symmetric group on nn elements, using circular words and least cyclic shifts, proving its correctness in Lemma 1, Theorem 2, and Theorem 3 (see Appendix C).

  1. Efficient implementation. We provide an algorithm with a worst-case runtime complexity of O(n2log⁡n)O(n^{2} \log n) (see Theorem 4 in Appendix C). However, empirically, across the evaluated input sizes, LEXICAN is faster than ASUN by a factor of ∼130\sim130 to ∼5,400\sim5{,}400 on ModelNet40 (Wu et al., 2015) and of ∼6\sim6 to ∼22\sim22 on QM9, growing with the number of points.

  1. Almost-everywhere local regularity. We prove that LEXICAN’s exact construction and its tolerance-based construction are locally Lipschitz almost everywhere in the space of centered point clouds with fixed labels (Theorem 1). This establishes generic local regularity and we assess stability on molecular configurations specifically through our perturbation experiments.

  1. High-precision invariance. On the QM9 dataset, LEXICAN achieves mean invariance errors of ∼10−6\sim10^{-6} Å, four to five orders of magnitude lower than those of PCA- and ASUN-based canonicalizations (0.89 and 0.04 Å on molecules of rank 3) (see Section 5).

  1. Well-posedness at molecular geometries. We show that while PCA and ASUN maintain a non-zero probability of an ε\varepsilon-perturbation inducing an O(1)O(1) change in canonical form as ε→0\varepsilon\to0, for LEXICAN this probability is 0 at ε=10−8\varepsilon= 10^{-8} (no jump in 64,000 trials) on the QM-sym (Liang et al., 2019) dataset, and LEXICAN shows no jumps on any of the 82 pilot geometries (see Table 4).

Related Work

Point cloud canonicalization. Classical methods construct representatives using deterministic geometric rules, such as PCA-based alignment, eigenvector canonicalization, or lexicographic ordering. Frame Averaging constructs a set of PCA-derived frames and averages predictions over them (Puny et al., 2022), while ASUN [1] detects point-group symmetries, extracts an asymmetric unit, and aligns it with a canonical frame. Yet, PCA has sign ambiguities of its eigenvectors (and eigenbasis ambiguities on self-symmetric point clouds), leading to a mapping that is not well-defined, while ASUN has non-trivial invariance errors on QM9 and discontinuity jumps on molecular structures, see Section 5. More related work is presented in Appendix A.

Preliminaries

We consider point clouds with additional point-wise labels as our data object for canonicalization. Formally, let n≥1n \ge1 be a positive integer, and let Λ\Lambda be a totally ordered label set (for example, atomic symbols in the case of molecules) and let

P={(xi,ai)}i=1n∈(Rd×Λ)nP = \left\{(\mathbf{x}_{i}, a_{i})\right\}_{i=1}^{n} \in(\mathbb{R}^{d} \times\Lambda)^{n}

be a labeled point cloud. Here xi∈Rd\mathbf{x}_{i} \in\mathbb{R}^{d} is a point and ai∈Λa_{i} \in\Lambda its label.

Point clouds have natural symmetry to node reordering and rotations of the points, both proper and improper. These actions are formalized as the action of the symmetric group on nn elements, denoted by Sn\mathfrak{S}_{n}, and the action of SO(dd) and O(dd) on each of the points, respectively.

We denote the joint action of permutations and rotations by GdSO=Sn×SO(d)G_{d}^{\mathrm{SO}} = \mathfrak{S}_{n} \times\mathrm{SO}(d) and GdO=Sn×O(d)G_{d}^{\mathrm{O}} = \mathfrak{S}_{n} \times\mathrm{O}(d), where the first accounts for permutations and proper rotations and the second also includes reflections. The action of a group action gg on a point cloud PP is

(π,Q)⋅P=((Qxπ−1(i),aπ−1(i)))i=1n(1)(\pi, Q) \cdot P = \left((Q\mathbf{x}_{\pi^{-1}(i)}, a_{\pi^{-1}(i)})\right)_{i=1}^{n} \tag*{(1)}

where g:=(π,Q)∈Gdκg := (\pi, Q) \in G_{d}^{\kappa}, where dd is the dimension and κ\kappa stands for SO(dd) or O(dd).

The labels are unchanged by spatial transformations and are permuted together with their points. For point clouds having multiple attributes or labels, we consider the set of labels as A=A1×⋯×Aq\mathcal{A}=\mathcal{A}_1 \times\cdots\times\mathcal{A}_q, where each Ar\mathcal{A}_r is totally ordered. This gives a natural lexicographic ordering of the entire label set.

Under this notation, a point cloud is written as:

P={(xi,ai)}i=1n, ai:=(ai1,…,aiq)∈A.(2)P=\left\{(\mathbf{x}_i,\mathbf{a}_i)\right\}_{i=1}^{n},\ \mathbf{a}_i:=\left(a_i^1,\ldots,a_i^q\right)\in\mathcal{A}. \tag*{(2)}

We center PP by xi↦xi−c(P)\mathbf{x}_i\mapsto\mathbf{x}_i-\mathbf{c}(P), where c(P)\mathbf{c}(P) is the centroid of the point cloud, which is a translation canonicalization of the point cloud. We assume PP is centered henceforth, giving translational invariance, therefore we focus on canonicalizing point clouds with respect to the groups GdSOG_d^{\mathrm{SO}} and GdOG_d^{\mathrm{O}}.

We now formally define the term canonicalization for point clouds and use it throughout the text for the groups GdSOG_d^{\mathrm{SO}} and GdOG_d^{\mathrm{O}}, with d=2d=2 and d=3d=3.

Definition 1 (Canonicalization for Point Clouds). A point cloud canonicalization for the group GdκG_d^\kappa, where dd is the dimension and κ\kappa stands for the groups SO or O, is a function Cdκ(⋅):(Rd×Λ)n→(Rd×Λ)n\mathcal{C}_d^\kappa(\cdot):(\mathbb{R}^d\times\Lambda)^n\to(\mathbb{R}^d\times\Lambda)^n on centered, labeled point clouds that satisfies, for every group element g∈Gdκg\in G_d^\kappa,

Cdκ(g⋅P)=Cdκ(P),(3)\mathcal{C}_d^\kappa(g\cdot P)=\mathcal{C}_d^\kappa(P), \tag*{(3)}
Cdκ(P)∈Gdκ⋅P:={g′⋅P:g′∈Gdκ}.\mathcal{C}_d^\kappa(P)\in G_d^\kappa\cdot P:=\left\{g'\cdot P:g'\in G_d^\kappa\right\}.

That is, it is an invariant mapping that chooses a GdκG_d^\kappa orbit representative for each point cloud.

LexiCan: Lexicographic Canonicalization of Point Clouds

In this section, we present LexiCan and prove it satisfies the properties of a canonicalization of point clouds. We first build a canonicalization for 2D point clouds. To extend it to 3D, we select an invariant axis of rotation and then apply the 2D recipe to the projected planar cloud. LexiCan handles node features and is also valid in their absence. An overview of the LexiCan workflow is shown in Figure 1.

Figure 1. Visualization of LexiCan algorithm. (1) Each point of the labeled and centered point cloud described by a string of values wjw_j. (2) A candidate set Π(P)\Pi(P) for the axis of projection is chosen based on radius, labels (here, one point at distance r⋆r_\star). The projection axis is then oriented with e3e_3. (3) 2D canonicalization is performed on the projected point cloud, where the lexicographically minimal starting point (here w2w_2) is rotated around axis and aligned with +y+y. (4) This is performed across all choices of p∈Π(P)p \in\Pi(P) and the lexicographically minimal serialization yields the canonicalization.

Labels and their ranks. Each point carries one label ℓi∈Λ\ell_i\in\Lambda from a totally ordered set (the atomic label for molecules and unlabeled clouds use a single label). LexiCan compares labels through their rarest-first rank: with c(λ)=∣{i:ℓi=λ}∣c(\lambda)=\lvert\{i:\ell_i=\lambda\}\rvert the number of points carrying label λ\lambda, the labels present in PP are sorted by increasing c(λ)c(\lambda), ties broken by the order of Λ\Lambda, and ai∈{0,1,…}a_i\in\{0,1,\ldots\} is the position of ℓi\ell_i in that list (the rarest label has rank 0). Ranks are unchanged by spatial transformations and are permuted together with the points. In general, we denote node labels by ℓi\ell_i, but in the case they are vector valued, they are denoted by ai\mathbf{a}_i.

Canonicalization of a Labeled 2D Point Cloud

We draw inspiration from classical symmetry detection algorithms ((Wolter et al., 1985)) to represent 2D point clouds as a discrete one-dimensional torus with rotation-invariant multi-dimensional continuous and discrete features, intuitively resembling a circular string. We then choose the lexicographically minimal starting point and align it with the yy axis. Additionally, we extend this approach to handle reflections.

Any point cloud in 2D can be written as P∈Rn×2P\in\mathbb{R}^{n\times2}, where each Pi∈R2P_i\in\mathbb{R}^2 is the spatial coordinate of a point. Writing the position vector using polar coordinates and including the node labels (as in Eq. (2)), we can write a planar point cloud as: P={(ρi,ϕi,ai)}i=1nP=\{(\rho_i,\phi_i,\mathbf{a}_i)\}_{i=1}^{n}, where (ρi,ϕi)(\rho_i,\phi_i) are polar coordinates and ai\mathbf{a}_i are the label tuples. For the non-origin points, we create a canonical description through the following steps:

  1. We sort the points by increasing angle ϕi\phi_i. Points with the same angle are ordered by (ai,ρi)(\mathbf{a}_i,\rho_i). We denote the resulting sorted indices by i0,…,im−1i_0,\ldots,i_{m-1}.

  1. For each point, let δj\delta_j be the counterclockwise angular gap from iji_j to ij+1i_{j+1}, including the wrap-around from im−1i_{m-1} to i0i_0.

  1. We record each point by its radius, angular difference, and labels. This gives the circular word

W(P)=((aij,ρij,δj))j=0m−1.W(P)=\left((a_{i_j},\rho_{i_j},\delta_j)\right)_{j=0}^{m-1}.
  1. We read this word starting from every possible position and retain the lexicographically smallest reading: Wmin⁡(P)=min⁡0≤s<mτsW(P)W_{\min}(P)=\min_{0\leq s<m}\tau_sW(P), where τs\tau_s denotes a cyclic shift by ss positions. The first point of Wmin⁡(P)W_{\min}(P) therefore provides a canonical reference.

SO(2) canonicalization. If all points lie at the origin, return them ordered by their original labels. Otherwise, rotate the cloud so that the first point of Wmin⁡(P)W_{\min}(P) lies on the positive yy axis. If ϕ⋆\phi_\star is its angle, define ϕ^i=ϕi−ϕ⋆+π/2(mod2π)\hat{\phi}_i=\phi_i-\phi_\star+\pi/2\pmod{2\pi} for every non-origin point, and write u^i=ρi(cos⁡ϕ^i,sin⁡ϕ^i)\hat{\mathbf{u}}_i=\rho_i(\cos\hat{\phi}_i,\sin\hat{\phi}_i) if ρi>0\rho_i>0 and (0,0)(0,0) otherwise. Let σ\sigma order all point indices lexicographically by (ai,u^i,1,u^i,2)(a_i,\hat{u}_{i,1},\hat{u}_{i,2}). Then:

C2SO(P)=((u^σ(i),aσ(i)))i=1n.(4)\mathcal{C}_2^{\mathrm{SO}}(P)=\left((\hat{\mathbf{u}}_{\sigma(i)},a_{\sigma(i)})\right)_{i=1}^{n}. \tag*{(4)}

Points at the origin are excluded from reference selection but included in the final ordering.

O(2) canonicalization. To additionally remove reflections for the point cloud PP, we do the following:

  1. compute the SO(2) canonical form C2SO(P)C_2^{\mathrm{SO}}(P);

  1. reflect PP across the XX axis and compute the same canonical form;

  1. Call the reflected point cloud P‾={(ρi,−ϕi(mod2π)),ai}i=1n\overline{P} = \{(\rho_i,-\phi_i \pmod{2\pi}),a_i\}_{i=1}^{n}. For m>0m>0, let s(P)s(P) be a starting index producing Wmin⁡(P)W_{\min}(P) and write jt=i(s(P)+t) mod mj_t=i_{(s(P)+t)\bmod m}. After choosing this start, define

B(P):=((ajt)t=0m−1,(δ(s(P)+t) mod m)t=0m−1,(ρjt)t=0m−1).B(P):=\left((a_{j_t})_{t=0}^{m-1},(\delta_{(s(P)+t)\bmod m})_{t=0}^{m-1},(\rho_{j_t})_{t=0}^{m-1}\right).

This comparison examines the complete label-rank sequence first, then the complete angular-gap sequence, and finally the complete radial sequence. Define B‾(P)\overline{B}(P) by the same construction applied to the reflected cloud. If m=0m=0, both keys are empty. Define:

C2O(P)={C2SO(P),B(P)≤lexB‾(P),C2SO(P‾),B‾(P)<lexB(P).(5)C_2^{O}(P)= \begin{cases} C_2^{\mathrm{SO}}(P), & B(P)\le_{\mathrm{lex}}\overline{B}(P),\\ C_2^{\mathrm{SO}}(\overline{P}), & \overline{B}(P)<_{\mathrm{lex}}B(P). \end{cases} \tag*{(5)}

If the two keys agree, the two branches produce the same exact labeled canonical form. For projected 3D clouds, append the complete height sequence (hjt)t=0m−1(h_{j_t})_{t=0}^{m-1} as the final component of B(P)B(P).

Canonicalization of a Labeled 3D Point Cloud

We extend the 2D canonicalization to a 3D one via the insight that once we fix an anchor axis in 3D, the projections of the points onto its orthogonal hyperplane form a 2D point cloud. This reduces the problem of 3D canonicalization to a 2D one, which we have solved in Section 4.1. Using lexicographic sorting and only invariant features, we can choose this axis invariantly to permutations, rotations, and translations, thus allowing us to obtain a 3D canonicalization.

Let PP be a centered labeled point cloud in R3\mathbb{R}^3. We reduce its canonicalization to the 2D construction above via the following steps:

  1. We choose a candidate set for the axis based on invariant features: the largest radius and, among those points, the rarest label as follows:

r⋆=max⁡i∥xi∥,r_\star=\max_i\lVert x_i\rVert,
Π(P)={p:∥xp∥=r⋆, ap=min⁡∥xi∥=r⋆ai}.(6)\Pi(P)=\left\{p:\lVert x_p\rVert=r_\star,\ a_p=\min_{\lVert x_i\rVert=r_\star}a_i\right\}. \tag*{(6)}
  1. For every p∈Π(P)p\in\Pi(P), choose a rotation ApA_p that places xpx_p on the positive ZZ axis. We can write Apxi=(ui(p),hi(p))A_px_i=(u_i^{(p)},h_i^{(p)}), where ui(p)∈R2u_i^{(p)}\in\mathbb{R}^2 is the planar projection and hi(p)h_i^{(p)} is the height. The planar cloud keeps the height as an extra label: Pp={(ui(p),ai,hi(p))}i=1nP_p=\{(u_i^{(p)},a_i,h_i^{(p)})\}_{i=1}^{n}, and its circular word is W(Pp)={(aij,ρij,δj,hij)}j=0m−1W(P_p)=\{(a_{i_j},\rho_{i_j},\delta_j,h_{i_j})\}_{j=0}^{m-1}, with points of equal angle ordered by (ai,ρi,hi)(a_i,\rho_i,h_i); that is, the label rank first and the height last.

  1. Once a candidate axis is fixed, we canonicalize the projected planar cloud using the 2D canonicalizations defined in the preceding subsection. For every possible candidate p∈Π(P)p\in\Pi(P), we perform this project and canonicalize procedure and select the output with the minimum lexicographic order.

SO(3) canonicalization. For each p∈Π(P)p\in\Pi(P), apply C2SOC_2^{\mathrm{SO}} to PpP_p, including height and retaining the original labels. Restore each height hh as the third coordinate: (u^,a,h)↦(u^1,u^2,h,a)(\hat{u},a,h)\mapsto(\hat{u}_1,\hat{u}_2,h,a). Order the resulting labeled 3D points lexicographically by (a,x,y,z)(a,x,y,z), where aa is the rarity rank, and denote this ordered candidate by YpSOY_p^{\mathrm{SO}}. We define the canonicalization as:

C3SO(P)=min⁡p∈Π(P)YpSO,(7)C_3^{\mathrm{SO}}(P)=\min_{p\in\Pi(P)}Y_p^{\mathrm{SO}}, \tag*{(7)}

O(3) canonicalization. We perform the same construction as before ∀p∈Π(P)\forall p\in\Pi(P) using C2O(⋅)C_2^{\mathrm{O}}(\cdot) instead of C2SO(⋅)C_2^{\mathrm{SO}}(\cdot) and call the resulting 3D cloud YpOY_p^{\mathrm{O}}. We define the canonicalization as:

C3O(P)=min⁡p∈Π(P)YpO.(8)C_3^{\mathrm{O}}(P)=\min_{p\in\Pi(P)}Y_p^{\mathrm{O}}. \tag*{(8)}

By comparing the reflected planar projection, we remove 3D reflections in this case. In Theorem 2, we prove that C3SO(⋅)C_3^{\mathrm{SO}}(\cdot) and C3O(⋅)C_3^{\mathrm{O}}(\cdot) are canonical representations for G3SOG_3^{\mathrm{SO}} and G3OG_3^{\mathrm{O}}, respectively. The theorem statement and formal proofs are in Appendix § 11.

Algorithms for Computing the Canonicalizations

Algorithm 1: LexiCan

Input: Centered labeled cloud PP

if all points are at the origin then &nbsp;&nbsp;&nbsp;&nbsp;return points ordered by their labels

Construct the admissible pole set Π(P)\Pi(P) using Eq. (6)

for each p∈Π(P)p\in\Pi(P) do

&nbsp;&nbsp;&nbsp;&nbsp;Align pp with e3e_3 and construct PpP_p as in Algorithm 3

&nbsp;&nbsp;&nbsp;&nbsp;Apply the planar canonicalization to PpP_p, using Algorithm 2 for the least cyclic shift

&nbsp;&nbsp;&nbsp;&nbsp;Restore heights and order the lifted records by (a,x,y,z)(a,x,y,z) to obtain YpκY_p^\kappa

&nbsp;&nbsp;&nbsp;&nbsp;if this is the first candidate then

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dbest←DpD_{\mathrm{best}}\leftarrow D_p

&nbsp;&nbsp;&nbsp;&nbsp;else if Dp<lexDbestD_p<_{\mathrm{lex}}D_{\mathrm{best}} then

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dbest←DpD_{\mathrm{best}}\leftarrow D_p

return DbestD_{\mathrm{best}}

The LexiCan algorithm (see Algorithm 1), that computes the canonicalizations C3SO(⋅)C_3^{\mathrm{SO}}(\cdot) and C3O(⋅)C_3^{\mathrm{O}}(\cdot), is divided into two subroutines: Algorithm 2 for the canonicalization of a 2D point cloud and Algorithm 3 that computes the required 3D canonicalization by repeatedly using Algorithm 2 after selecting an axis of projection.

Specifically, we first select an axis of projection based on frame invariant features like radius and label and project the 3D point cloud into a 2D one from the chosen axis. On this 2D projection, we apply Algorithm 2, which is a two-pointer based approach inspired by Booth’s algorithm [4] to find the lexicographically minimum representation of a circular string. In case of ties in choosing the axis of projection, we perform this projection followed by Algorithm 2 for all possible axis choices and then select the one that produces the lexicographically smallest output. More details on the algorithm are given in Appendix § 10.

In Theorem 3, we show that LexiCan computes the canonicalizations C3κ(⋅)C_3^\kappa(\cdot), where κ\kappa is SO or O, and analyze the complexity in Theorem 4 (Appendix § 11). LexiCan has a worst case runtime of O(n2log⁡n)O(n^2\log n) since the number of ties kk for the axis choice is O(n)O(n) in the worst case. But in most practical settings, kk grows sublinear in nn. For datasets such as QM9 or ModelNet40, we have k≈O(1)k\approx O(1) and the runtime is log-linear in nn, as shown in Table 1.

ModelNet40
#PointsLexiCanPCAASUN
1280.428±0.0090.189±0.00156.8±0.2
2560.467±0.0080.204±0.001158.6±0.5
5120.574±0.0120.231±0.001562.7±1.4
1,0240.782±0.0230.279±0.0011,873.0±1.8
2,0481.274±0.0420.374±0.0016,883.9±12.4
QM9
#AtomsLexiCanPCAASUN
6–100.411±0.0510.171±0.0042.490±0.113
11–150.358±0.0030.169±0.0003.940±0.037
16–200.360±0.0010.171±0.0005.186±0.016
21–250.363±0.0030.170±0.0006.302±0.024
26–290.355±0.0060.169±0.0057.872±0.056

Table 1. Per-cloud canonicalization runtime in milliseconds (ms) on ModelNet40 and QM9, mean ± standard error over clouds of the per-cloud median of 10 calls, one thread, for SO(3) canonicalization. Best results are in bold.

Robustness of the LexiCan Algorithm

The canonicalizations C3κ(⋅)C_3^\kappa(\cdot) with κ∈{SO,O}\kappa\in\{\mathrm{SO},\mathrm{O}\}, are defined using exact comparisons, but for their numerical implementations LexiCan uses a fixed relative tolerance η>0\eta>0: two lengths differing by at most ηR\eta R, where RR is the largest distance of a point from the centroid, and two angles differing by at most η\eta radians may be treated as tied. We write C^3,ηκ(⋅)\widehat{C}_{3,\eta}^\kappa(\cdot) for the implemented numerical map with tolerance η\eta.

It is known that the C3κ(⋅)C_3^\kappa(\cdot) canonicalizations cannot be globally continuous (Dym et al., 2024). But we show that for all η≥0\eta\geq0, the map C^3,ηκ(⋅)\widehat{C}_{3,\eta}^\kappa(\cdot) is locally Lipschitz almost everywhere, establishing the robustness of the exact maps C3κ(⋅)C_3^\kappa(\cdot) as well as that of the numerical approximations C^3,ηκ(⋅)\widehat{C}_{3,\eta}^\kappa(\cdot).

In the following Theorem 1 (proof in Appendix § 11) we show that for almost every point cloud P0P_0, the canonical map C^3,ηκ(⋅)\widehat{C}_{3,\eta}^\kappa(\cdot) is Lipschitz in a neighbourhood of P0P_0, thus proving almost everywhere continuity of the implemented map accounting for numerical approximations. This is due to the fact that sorting is piecewise continuous, although discontinuous when tie-breaking occurs, and the points of discontinuity form a Lebesgue-measure zero set, which then implies that LexiCan satisfies this as well. It should be noted that the analysis does not account for floating-point roundoff or machine-range restrictions.

Theorem 1 (Locally Lipschitz almost everywhere property of LexiCan). Fix the number of points, their labels, the group G3κG_3^\kappa with κ∈{SO,O}\kappa\in\{\mathrm{SO},\mathrm{O}\}, and a value η≥0\eta\geq0.

For almost every centered point cloud P0P_0, there exist δη(P0)>0\delta_\eta(P_0)>0 and Lη(P0)<∞L_\eta(P_0)<\infty such that ∀P,P′∈B∞(P0,δη(P0))\forall P,P'\in\mathcal{B}_\infty(P_0,\delta_\eta(P_0)) it holds that

EMD⁡(C^3,ηκ(P),C^3,ηκ(P′))≤Lη(P0)d∞(P,P′)\operatorname{EMD}\left(\widehat{C}_{3,\eta}^\kappa(P),\widehat{C}_{3,\eta}^\kappa(P')\right)\leq L_\eta(P_0)d_\infty(P,P')

Consequently, for every fixed η≥0\eta\geq0, the map C^3,ηκ(⋅)\widehat{C}_{3,\eta}^\kappa(\cdot) is continuous almost everywhere.

The local Lipschitz property guarantees that small perturbations to a generic point cloud PP do not cause its canonical representation C3(P)\mathcal{C}_3(P), as produced by LexiCan, to change discontinuously. Such a robustness result is not proven in the literature for existing canonicalization methods like ASUN, and we empirically validate this in Tables 4 and 5, where LexiCan is more robust to small perturbations compared to ASUN and PCA.

Dependence of LexiCan on numerical tolerance. The numerical tolerance η\eta plays an important role in LexiCan. Since LexiCan is a sorting-based algorithm, the quantities considered tied below a certain numerical threshold play an important role in the properties discussed below.

Robustness: As η→0\eta\to0, the algorithm becomes more sensitive to small perturbations because most of them now start to cross the tolerance threshold, Canonicalization invariance: As η\eta increases, the exactness of the sorting ceases to exist since all differences below η\eta are now considered tied. Consequently, the numerical implementation starts to differ from Algorithms 1 and 3. Thus different poses may start to output different canonicalizations, and Runtime: As η\eta increases, the number of tied points increases (the cardinality of Π(P)\Pi(P) from Algorithm 1 increases). So, more tie-breaking comparisons need to be made, increasing runtime.

Tables 12 and 13 from Appendix § 12.4 give a detailed analysis on how robustness and runtime vary according with respect to tolerance, and we have subsequently chosen the tolerances of LexiCan (as well as of PCA and ASUN) to achieve the optimal trade-offs.

Experiments

In this section, we test the validity, efficiency, robustness, and end-to-end learning performance of LexiCan against ASUN [1], and centered PCA, which are leading methods for point cloud canonicalization. In all the experiments of this section, the numerical tolerances of the corresponding canonicalization algorithms are taken as: 10−210^{-2} for ASUN (absolute, in Å) and 10−310^{-3} for LexiCan (relative to the cloud’s radius); PCA has no tolerance. This choice was based on optimal performance for each canonicalization, see Appendix § 12.4 for more details. We discuss more experiments and setup details in Appendix § 12.

Our data and code are publicly available at https://anonymous.4open.science/r/lexican-anon/.

Runtime Analysis

We consider the wall-clock runtime of LexiCan against ASUN and PCA on the ModelNet40 and QM9 datasets. We report the wall-clock runtime in milliseconds (ms) grouped by the number of points in the point cloud in Table 1. As observed, LexiCan is faster than ASUN at every size, by 130 to 5,400× on ModelNet40 and by 6 to 22× on QM9. PCA, which computes a single eigendecomposition, is the fastest method, about 2 to 3× faster than LexiCan, but it is not a proper canonicalization: each eigenvector is defined only up to sign (and up to an orthogonal transformation within a repeated eigenvalue), so PCA is not invariant (Table 2 and Table 3).

MethodR1R2R3
PCA3.5×10⁻¹⁶5.4×10⁻¹⁶8.9×10⁻¹
ASUN1.3×10⁻¹⁵1.3×10⁻¹⁵3.8×10⁻²
LexiCan3.5×10⁻¹⁶4.2×10⁻¹⁶1.8×10⁻⁶

Table 2. Invariance error by rank: mean EMD (Å, two significant digits) between the canonical form of each QM9 molecule and that of a random rotation, translation and permutation of it. Best results are in bold.

GroupNmolN_{\mathrm{mol}}PCA MeanPCA Fail%ASUN MeanASUN Fail%LexiCan MeanLexiCan Fail%
C2hC_{2h}81,5640.56499.90.61650.30.0000.0
C3hC_{3h}81,0171.715100.00.15532.00.0000.0
C4hC_{4h}25,6681.447100.00.26760.00.0000.0
All188,2491.18099.90.37043.80.0000.0

Table 3. Symmetry group canonicalization errors: mean EMD (in Å) over random transformations in QM-sym. Best results are in bold.

Rank-wise Invariance Error

We measure consistency by comparing canonical forms before and after random rotations and translations. We report the mean Earth Mover’s Distance (EMD) in Å, lower is better.

From Table 2, we make the following observations: (1) LexiCan stays invariant at every rank, with a mean error of at most 2×10−62 \times10^{-6} Å, (2) for the molecules of rank 3, neither ASUN nor PCA stays invariant.

Invariance Error on QM-sym

In Table 3 we test the reliability of LexiCan versus PCA and ASUN baselines on the QM-sym dataset, containing molecules with non-trivial self-symmetries. We rotate and translate each molecule ten times at random and measure the EMD between the canonical form of the molecule and that of each copy. We classify failure as a copy that surpasses the 0.1 Å EMD threshold, which is the error in measurement range of molecules in the QM9 dataset (Kim et al., 2019).

As observed, (1) LexiCan stays within the 0.1 Å threshold on every molecule in QM-sym (mean EMD 2×10−72 \times10^{-7} Å), while the baselines do not, (2) ASUN breaks its own invariance on 43.8% of molecules and PCA breaks on 99.9%.

Perturbation Stability on Molecular Configurations

Almost-everywhere regularity in the ambient point-cloud space does not determine behavior on molecular geometries, which may belong to lower-dimensional families. We therefore evaluate perturbation sensitivity directly on QM-sym. For each tested perturbation magnitude ε\varepsilon, we report the empirical fraction p^(ε)\widehat{p}(\varepsilon) of trials in which the EMD between the canonical forms of the original and perturbed clouds exceeds the jump threshold of 0.1. These measurements characterize finite-scale sensitivity.

In tbl:4 we see that (1) PCA and ASUN converge to 0.171 and 0.031, respectively, while LexiCan reaches 0 (no jump in 64,000 trials at ε=10−8\varepsilon= 10^{-8}), (2) LexiCan shows no jumps on the pilot set, while PCA and ASUN jump on 33/82 and 9/75 geometries.

tbl:4: The ε→0\varepsilon\to0 limit on QM-sym geometries. α99\alpha_{99} is the 99-th percentile amplification, pooled over all ε\varepsilon, while Jumps specifies the number of geometries that show a jump on the pilot set. Best results are in bold.

p(ε)p(\varepsilon)PCAASUNLexiCan
p(10−8)p(10^{-8})0.1710.0310.000
p(10−6)p(10^{-6})0.5150.0320.001
p(10−4)p(10^{-4})0.5190.0940.093
p(10−2)p(10^{-2})0.5430.7860.522
α99\alpha_{99}2.7×1072.7 \times10^{7}7.5×1057.5 \times10^{5}3×1033 \times10^{3}
Jumps33/829/750/82

We also performed the analysis on a pilot set of 82 example point clouds, comprised of QM9 and GDB structures in their equilibrium geometries, together with synthetic high-symmetry solids (specified in Appendix § 12.§ 6). Resolving p(ε)p(\varepsilon) per geometry (see Figure 2 in Appendix § 12.§ 5) shows that failures are widespread rather than concentrated on a few specific inputs: PCA exhibits discontinuities on 33 of 82 geometries, and ASUN on 9 of the 75 it can process, at a median of 82% and 36% across all discontinuous directions respectively, while LexiCan is continuous across all geometries.

Fraction of perturbation directions that jump for ASUN, LexiCan, and PCA

Figure 2. Each point represents the fraction of 500 random perturbation directions, at ε=10−8\varepsilon= 10^{-8}, that move the canonical form by more than 0.1 of the cloud’s RMS radius, for each geometry. The geometries are sorted descending on the x axis independently per method. ASUN is drawn over the 75 geometries it can process; it raises an assertion on the octahedron and the six bipyramids at every tolerance.

Stability Under Controlled Perturbation

To further test robustness to perturbation of LexiCan, in Table 5 we consider a set of four common molecules (NH3_3, CH4_4, H2_2O2_2, and C6_6H6_6). We define a one-parameter path γ:[0,1]→(R3×R)n\gamma: [0,1] \to(\mathbb{R}^3 \times\mathbb{R})^n, with γ(t)=Pt=((xi(t),ℓi))i=1n\gamma(t) = P_t = ((x_i(t), \ell_i))_{i=1}^n, from each symmetric molecule P0P_0 in its equilibrium geometry, to a fully perturbed geometry P1P_1. We measure discontinuity, which we define as a difference in canonical form by more than 0.1 in the radius of the point cloud (given by r=1n∑i∥xi∥2r = \sqrt{\frac{1}{n}\sum_i \lVert x_i \rVert^2}) along γ(t)\gamma(t), between the canonicalized output at tit_i and ti+1t_{i+1} along 600 steps.

tbl:5: Number of discontinuities (summed over 12 rotated copies) along controlled perturbation paths, with the largest single move (in Å) in parentheses. Best results are in bold.

PathPCAASUNLexiCan
NH3_3 stretch17 (0.875)0 (0.001)0 (0.000)
NH3_3 bend17 (0.860)0 (0.011)0 (0.001)
CH4_4 stretch5301 (1.019)12 (0.802)0 (0.001)
C6_6H6_6 stretch4 (0.742)0 (0.018)0 (0.000)
H2_2O2_2 torsion3 (0.745)46 (0.804)24 (0.428)
Max move1.0190.8040.428

As observed, LexiCan has no discontinuity on 4/5 paths and never more discontinuities than ASUN; on the H2_2O2_2 torsion, which passes through a symmetric configuration, PCA has fewer (3 against 24) and LexiCan has the lowest overall maximum move. We extend these tests to explore more general perturbation effects on a larger set of 18 representative clouds in Appendix D.6.

We further test the robustness of LexiCan and baselines in a real dataset of symmetric molecules, namely QM-sym. We quantify our results by considering the “flip rate”, the amplification factor and the failure to be invariant. In Table 6, flip rate is the fraction of perturbations whose canonical form varied 10×\times further than the input moved, α\alpha is the output movement divided by the input movement (1 means no amplification). Both of the values, if lower, imply robustness.

Flip rateMedian α\alphap95 α\alphaNot invariant
PCA0.58157.93.1×1063.1 \times10^{6}1000/1000
ASUN @ 10−210^{-2}0.78254.91.5×1031.5 \times10^{3}456/1000
LexiCan @ 10−310^{-3}0.2081.524350/1000

Table 6. Robustness in QM-sym (1,000 molecules). Not invariant counts the molecules with one of 12 random views more than 0.1 Å (EMD) from the canonical form, out of those the algorithm canonicalizes. Best results are in bold.

As observed, (1) LexiCan has lower flip rate than baselines and has a lower median amplification rate (2) LexiCan preserves invariance across all the tested QM-sym molecules which the baselines fail to do.

End-to-end Learning Experiments

To test the impact of our method on downstream learning tasks, we evaluate LexiCan against baselines on molecular property prediction and 3D shape classification tasks.

Regression on molecules. We tested property prediction on QM9 using a standard Transformer architecture (details in Appendix D.1) trained on the regular dataset, on the ASUN-canonicalized dataset, and on the proposed canonicalized representation.

As observed in Table 7, LexiCan achieves the lowest error and improves on ASUN on every seed.

RepresentationMAERMSE
Regular0.81±0.070.81 \pm0.071.22±0.091.22 \pm0.09
ASUN0.46±0.040.46 \pm0.040.70±0.040.70 \pm0.04
LexiCan0.40±0.040.40 \pm0.040.60±0.060.60 \pm0.06

Table 7. QM9 isotropic polarizability prediction (Transformer, Table 9). Test MAE and RMSE over three seeds (mean ± STD), on randomly rotated, permuted and translated test molecules (see Appendix D.1 for more details).

Classification of 3D point clouds. Using the ModelNet40, we further demonstrate the superiority of LexiCan against ASUN for point cloud alignment. We sample 512 points from each cloud and train invariant/equivariant (SchNet (Schütt et al., 2017) and EGNN (Satorras et al., 2021)) and non-invariant (GCN (Kipf and Welling, 2017), GCNII (Chen et al., [6]), SchNet-Pos and EGNN-Pos) models on ASUN versus LexiCan canonicalized data.

As seen in Table 8, (1) performance for invariant models remains largely unchanged, but LexiCan beats ASUN for 4/4 non-invariant models and produces overall best accuracy of 37.1% across architectures, (2) using LexiCan representation in EGNN-pos/SchNet-pos (which add an embedding of the coordinates to the invariant backbone of EGNN/SchNet) improves upon the respective baseline invariant models.

ModelNet40 (n=512n = 512)
Modelz/SO(3)z/SO(3)SO(3)/SO(3)SO(3)/SO(3)ASUNLexiCan
SchNet27.8±0.527.8 \pm0.528.7±0.328.7 \pm0.328.6±0.728.6 \pm0.728.1±0.128.1 \pm0.1
EGNN34.9±0.734.9 \pm0.731.4±4.931.4 \pm4.932.2±0.832.2 \pm0.833.4±0.133.4 \pm0.1
GCN8.2±0.68.2 \pm0.615.2±0.215.2 \pm0.217.1±2.517.1 \pm2.528.6±1.328.6 \pm1.3
GCNII6.9±0.86.9 \pm0.819.1±1.119.1 \pm1.121.9±1.321.9 \pm1.329.1±2.729.1 \pm2.7
SchNet-Pos10.5±1.110.5 \pm1.129.2±2.329.2 \pm2.330.0±0.830.0 \pm0.837.1±3.237.1 \pm3.2
EGNN-Pos10.3±1.410.3 \pm1.431.5±2.331.5 \pm2.331.8±1.531.8 \pm1.537.0±0.537.0 \pm0.5

Table 8. Accuracy of classification (%, mean ± STD over three seeds). Best results are in bold.

Conclusion and Future Work

In this work, we introduced LexiCan, a lexicographic canonicalization method for labeled 3D point clouds that provides a provable canonical representative under permutation and either SO(3) or O(3) transformations, while achieving high-precision invariance and a substantially improved runtime over ASUN. Experiments on QM9, QM-sym, ModelNet40 datasets, and controlled perturbation on molecular configurations further show that LexiCan avoids the invariance failures and reduces discontinuity jumps observed in PCA- and ASUN-based approaches, while improving downstream performance for non-invariant architectures. Our canonicalization runs in the worst case O(n2log⁡(n))O(n^{2}\log(n)) compared to ASUN’s O(nlog⁡(n))O(n\log(n)), yet empirically it is faster on QM9 and ModelNet40, as seen in Table 1. Extending our empirical evaluation of combining LexiCan with additional state-of-the-art architectures remains a direction for future work. In particular, we aim to investigate the trade-offs between specialized equivariant architectures and lightweight standard models aided by canonicalization.

AI use statement

In this work, we used generative AI tools for assistance in implementing the algorithmic methods for the experiments, assist in the writing proofs of theorems and claims by finding errors and refining notation, refining the readability of the manuscript, assistance in generating a synthetic data set of symmetric point clouds in Appendix § 12.7, and provide feedback on the experiment methodology. We have not used generative AI tools to help develop theoretical models or conceptual frameworks, formulate mathematical claims, provide critical ingredients for proving mathematical claims, propose or refine hypotheses, clean and reformat datasets, support qualitative and thematic data analysis, interpret results, and assisting with translation is not applicable to this work. Additionally, we used generative AI tools for formatting the tex document, assistance in refining figures and tables, and conducting literature review to survey the state of progress in the field. We have reviewed all AI-assisted work. We manually inspected LLM-generated code and tested for correctness by 3 authors. All writing edits and refinements assisted by LLMs was verified and reviewed by the authors. All proofs refined by LLMs were checked and verified line by line by the authors. We take responsibility for the final content of this work, including text, claims, or artifacts produced with the aid of generative AI.

Acknowledgments

The authors acknowledge London Geometry and Machine Learning (LOGML) Summer School 2026 since this work was initially started as a project during the School. D.M. acknowledges support by the UKRI Centre for Doctoral Training in Algebra, Geometry and Quantum Fields (AGQ), Grant Number EP/Y035232/1. L.B. acknowledges financial support from the European Regional Development Fund for the project ‘Materials for clean energy, advanced sensors and quantum technologies’ (Grant No. PK.1.1.10.0002). S.H. thanks the Gloria and Ken Levy Foundation for a research fellowship.

Additional Related Work

Additional canonicalization methods. Other approaches learn the canonicalization itself (Kaba et al., 2023). Together with the methods in § 2, these approaches either average over multiple valid frames, resolve only specific ambiguities in the representation, or rely on assumptions that exclude non-trivial stabilizers. In contrast, our method defines a single map that returns a provable canonical representative for every point cloud, including symmetric inputs with non-trivial stabilizers.

Theoretical limitations of canonicalization. Dym et al. (2024) establish impossibility results for continuous canonicalization under common group actions and illustrate the trade-off using exact but discontinuous constructions, such as lexicographic sorting. Relatedly, Baker et al. [1] show that continuous frames do not exist in general for O(n)O(n) and SO(n)SO(n) when n≥3n \ge3. The difficulty arises particularly at symmetric inputs, where non-trivial stabilizers make the choice of a unique representative inherently ambiguous. Our work, therefore, focuses on constructing an exact representative and characterizing its numerical behavior around these unavoidable discontinuities.

Equivariant and invariant representations. Beyond canonicalization, equivariant models preserve the transformation structure throughout the network, while invariant architectures produce outputs that are unchanged under the group action. Another line of work constructs complete geometric invariants of point clouds using quantities such as point- or simplex-wise distance distributions (Widdowson and Kurlin, 2023; Kurlin, 2022, 2023; Widdowson and Kurlin, 2022). Unlike canonicalization, invariant representations generally do not return an oriented representative of the original orbit. Canonicalization therefore provides a complementary strategy, allowing standard non-equivariant architectures to operate directly on a canonical representative.

Algorithms for Canonical Pose Computation

First, we present the two-pointer based algorithm to find the lexicographically minimum orientation of a 2D string. The exact details of the algorithm are given in the main text. For a point cloud Y=((yi,ℓi))i=1nY = ((y_i, \ell_i))_{i=1}^n, let L(Y)L(Y) list its original labeled records in the order determined by (ai,yi,1,…,yi,d)(a_i, y_{i,1}, \ldots, y_{i,d}). When comparing two candidate sequences for the same input cloud, we compare these rank-coordinate keys lexicographically.

Algorithm 2: Least cyclic shift of a circular word.

Input: Nonempty word W = (ω₀, …, ωₘ₋₁)
Output: Index s such that τₛW = min₀≤r<m τᵣW
if m = 1 then
    return 0;
i ← 0, j ← 1, t ← 0;
while i < m and j < m and t < m do
    u ← ω_(i+t) mod m, v ← ω_(j+t) mod m;
    if u = v then
        t ← t + 1;
    else if u < v then
        j ← j + t + 1;
        if j ≤ i then
            j ← i + 1;
        t ← 0;
    else
        i ← i + t + 1;
        if i ≤ j then
            i ← j + 1;
        t ← 0;
return min{i, j};

Now we give the algorithm to compute the canonicalization of a 3D point cloud that uses Algorithm 2 after projecting from a chosen axis and chooses the representation with the lexicographically minimum output. The exact details of the algorithm are given in the main text.

Algorithm 3: Canonicalization of a centered labeled 3D point cloud.

Input: Centered cloud P=((xi,ℓi))i=1nP = ((x_i,\ell_i))_{i=1}^n, group G3κG_3^\kappa with κ∈{SO,O}\kappa\in\{\mathrm{SO},\mathrm{O}\}

Output: Canonical form C3κ(P)C_3^\kappa(P)

Compute ri←∥xi∥r_i \leftarrow\lVert x_i\rVert, r⋆←max⁡irir_\star\leftarrow\max_i r_i;

if r⋆=0r_\star= 0 then

return zero points ordered by their labels;

Compute the rarest-first ranks aia_i of the original labels ℓi\ell_i;

construct Π(P)\Pi(P) as in Eq. (6);

Dbest←⊥D_{\mathrm{best}} \leftarrow\bot;

for p∈Π(P)p \in\Pi(P) do

Choose Ap∈SO(3)A_p \in\mathrm{SO}(3) s.t. Apxp/∥xp∥=e3A_p x_p/\lVert x_p\rVert= e_3;

Write Apxi=(ui(p),hi(p))A_p x_i = (u_i^{(p)},h_i^{(p)}) and construct Pp=((ui(p),ℓi,hi(p)))i=1nP_p = ((u_i^{(p)},\ell_i,h_i^{(p)}))_{i=1}^n, retaining the previously computed ranks aia_i;

if κ=SO\kappa= \mathrm{SO} then

P^p←C2SO(Pp)\widehat{P}_p \leftarrow C_2^{\mathrm{SO}}(P_p), using Algorithm 2 to compute s(Pp)s(P_p);

else

P^p←C2O(Pp)\widehat{P}_p \leftarrow C_2^{\mathrm{O}}(P_p), using Algorithm 2 for PpP_p and P‾p\overline{P}_p;

Restore each retained height: (u^,ℓ,h^)↦((u^1,u^2,h),ℓ)(\widehat{u},\ell,\widehat{h}) \mapsto((\widehat{u}_1,\widehat{u}_2,h),\ell);

Order the lifted records by (a,x,y,z)(a,x,y,z), and denote the ordered candidate by YpκY_p^\kappa;

Dpκ←YpκD_p^\kappa\leftarrow Y_p^\kappa;

if Dbest=⊥D_{\mathrm{best}} = \bot or Dpκ<DbestD_p^\kappa< D_{\mathrm{best}} then

Dbest←DpκD_{\mathrm{best}} \leftarrow D_p^\kappa;

return DbestD_{\mathrm{best}};

Proofs of Technical Results

We use the circular word W(P)=(ω0,…,ωm−1)W(P) = (\omega_0,\ldots,\omega_{m-1}) defined in the main text. For m>0m > 0, let τsW(P)\tau_s W(P) denote the word read cyclically from position ss, with indices taken modulo mm. Define

s(P)∈arg⁡min⁡0≤s<m τsW(P).(9)s(P) \in\underset{0\leq s<m}{\arg\min}\ \tau_s W(P). \tag*{(9)}

The minimum uses lexicographic order. In two dimensions, each letter is (aij,ρij,δj)(a_{ij},\rho_{ij},\delta_j), where aija_{ij} is the rarity rank of the original label. For a projected three-dimensional cloud, the height hijh_{ij} is appended to each letter.

For m>0m > 0, let jt=i(s(P)+t) mod mj_t = i_{(s(P)+t)\bmod m}. After selecting the cyclic start, define the orientation key

B(P):=((ajt)t=0m−1,(δ(s(P)+t) mod m)t=0m−1,(ρjt)t=0m−1).(10)B(P) := \left((a_{j_t})_{t=0}^{m-1},(\delta_{(s(P)+t)\bmod m})_{t=0}^{m-1},(\rho_{j_t})_{t=0}^{m-1}\right). \tag*{(10)}

This key compares the complete label-rank sequence first, then the complete angular-gap sequence, and finally the complete radial sequence. For a projected three-dimensional cloud, append the complete height sequence (hjt)t=0m−1(h_{j_t})_{t=0}^{m-1} as the final component. If m=0m = 0, no cyclic start is needed and B(P)B(P) is the empty sequence.

We start with formal theorem statements and proofs of the validity of our canonicalization Cdκ(⋅)C_d^\kappa(\cdot) for d∈{2,3}d \in\{2,3\} and κ∈{SO,O}\kappa\in\{\mathrm{SO},\mathrm{O}\}.

Lemma 1 (Correctness of 2D canonical maps). The maps C2SO(⋅)C_2^{\mathrm{SO}}(\cdot) and C2O(⋅)C_2^{\mathrm{O}}(\cdot) are canonicalizations for G2SOG_2^{\mathrm{SO}} and G2OG_2^{\mathrm{O}}, respectively.

Proof. We verify that the maps are well defined, invariant under their respective group actions, and lie in the orbit of the input under the corresponding group actions. Rarity ranks depend only on the multiset of original labels. They are unchanged by spatial transformations and are permuted together with their points. Distinct original labels present in the input have distinct ranks.

Well-definedness: Let II be the set of indices of points not at the origin and let m:=∣I∣m := |I|. First suppose m>0m > 0. Let ϕi\phi_i be the polar angle of each such point. Order the indices in II lexicographically by (ϕi,ai,ρi)(\phi_i,a_i,\rho_i) and denote them by i0,…,im−1i_0,\ldots,i_{m-1}. Define the angular gaps by

δj=ϕij+1−ϕij, ∀ 0≤j<m−1,δm−1=2π+ϕi0−ϕim−1\delta_j = \phi_{i_{j+1}}-\phi_{i_j},\ \forall\ 0\leq j<m-1,\qquad\delta_{m-1}=2\pi+\phi_{i_0}-\phi_{i_{m-1}}

This lets us write PP as a circular word:

W(P)=(ω0,…,ωm−1),ωj=(aij,ρij,δj)(11)W(P)=(\omega_0,\ldots,\omega_{m-1}),\quad\omega_j=(a_{i_j},\rho_{i_j},\delta_j) \tag*{(11)}

Such a circular word has an inherent total order, induced by its coordinates. We choose a shift s(P)s(P) (see Eq. (9)) which gives the word with the least lexicographic order. Thus, the starting position is selected by repeatedly comparing (a,ρ,δ)(a,\rho,\delta) around the circle and choosing the lexicographic minimum.

Suppose ss and s′s' both achieve the minimum in (9). Then τsW(P)=τs′W(P)\tau_sW(P)=\tau_{s'}W(P). Their corresponding rank, radius, and angular-gap sequences therefore agree. Consequently, they also give the same channelwise orientation key B(P)B(P).

Once the first selected point is placed at angle π/2\pi/2, the remaining canonical angles are determined recursively by angular increments. More precisely, for jt=i(s+t) mod mj_t=i_{(s+t)\bmod m}, we have:

ϕ^t=π2+∑r=0t−1δ(s+r) mod m(mod2π),\widehat{\phi}_t=\frac{\pi}{2}+\sum_{r=0}^{t-1}\delta_{(s+r)\bmod m}\pmod{2\pi},

The empty sum is zero. Thus either minimizing starting point reconstructs the same non-origin Cartesian records. Their original labels are determined by their ranks among the labels present in PP and points at the origin remain fixed and are included in the final ordering by (ai,u^i,1,u^i,2)(a_i,\widehat{u}_{i,1},\widehat{u}_{i,2}). Hence tied starting positions give the same complete output, and both C2SOC_2^{\mathrm{SO}} and B(P)B(P) are well defined.

Permutation invariance. A permutation changes only the indices attached to the points. The subsequent ordering by (ϕi,ai,ρi)(\phi_i,a_i,\rho_i) therefore produces the same ordered sequence of point records. If two such records are identical, their relative order is irrelevant because exchanging them does not change the output. After rotation, all points, including those at the origin, are ordered by (ai,u^i,1,u^i,2)(a_i,\widehat{u}_{i,1},\widehat{u}_{i,2}). This ordering also does not depend on the input row indices. Consequently, for every π∈Gn\pi\in\mathcal{G}_n,

W(π⋅P)=W(P),B(π⋅P)=B(P),C2SO(π⋅P)=C2SO(P).W(\pi\cdot P)=W(P),\quad B(\pi\cdot P)=B(P),\quad C_2^{\mathrm{SO}}(\pi\cdot P)=C_2^{\mathrm{SO}}(P).

SO(2) invariance. Let Rβ∈SO(2)R_\beta\in\mathrm{SO}(2) be a rotation by angle β\beta, and let P′=RβPP'=R_\beta P. The radii and attributes are unchanged, while every nonzero point has angle ϕi′=ϕi+β(mod2π)\phi'_i=\phi_i+\beta\pmod{2\pi}. Adding the same angle to every point preserves their circular order. Hence, for some rr, W(P′)=τrW(P)W(P')=\tau_rW(P). The set of cyclic shifts of a word is unchanged when the word itself is cyclically shifted. Therefore min⁡sτsW(P′)=min⁡sτsW(P)\min_s\tau_sW(P')=\min_s\tau_sW(P), and hence B(P′)=B(P)B(P')=B(P).

Choose corresponding minimizing positions for PP and P′P'. The selected points differ in angle by β\beta. For every index tt, we have:

ϕ^t′=ϕjt′−ϕj0′+π2(mod2π)=(ϕjt+β)−(ϕj0+β)+π2(mod2π)=ϕ^t.\begin{aligned} \widehat{\phi}'_t&=\phi'_{j_t}-\phi'_{j_0}+\frac{\pi}{2}\pmod{2\pi}\\ &=(\phi_{j_t}+\beta)-(\phi_{j_0}+\beta)+\frac{\pi}{2}\pmod{2\pi}\\ &=\widehat{\phi}_t. \end{aligned}

The canonical radii, angles, attributes, and row order are therefore unchanged. Together with permutation invariance, this proves that C2SO(g⋅P)=C2SO(P)C_2^{\mathrm{SO}}(g\cdot P)=C_2^{\mathrm{SO}}(P), ∀g∈GSO\forall g\in\mathcal{G}^{\mathrm{SO}}.

The output is obtained by rotating every point through π/2−ϕj0\pi/2-\phi_{j_0} and then applying a row permutation. Thus C2SO(P)∈GSO⋅PC_2^{\mathrm{SO}}(P)\in\mathcal{G}^{\mathrm{SO}}\cdot P. If m=0m=0, every point is at the origin, and the result follows directly from the prescribed ordering of the original labels. Hence C2SO(⋅)C_2^{\mathrm{SO}}(\cdot) is a canonicalization for G2SO\mathcal{G}^{\mathrm{SO}}_2.

O(2) invariance. Let F=diag⁡(1,−1)F=\operatorname{diag}(1,-1) be reflection across the first coordinate axis, so that P‾=FP\overline{P}=FP. We will use the fact that every Q∈O(2)Q\in O(2) is either Q=RβQ=R_\beta or Q=RβFQ=R_\beta F for some β\beta, where RβR_\beta denotes rotation in the 2D plane by an angle β\beta.

First suppose Q=RβQ=R_\beta. By the SO(2) invariance proved above, we get: B(QP)=B(P)B(QP)=B(P) and C2SO(QP)=C2SO(P)C_2^{\mathrm{SO}}(QP)=C_2^{\mathrm{SO}}(P). Since FRβ=R−βFFR_\beta=R_{-\beta}F, we also have QP‾=FRβP=R−βP‾\overline{QP}=FR_\beta P=R_{-\beta}\overline{P}. Another application of SO(2) invariance gives B(QP‾)=B(P‾)B(\overline{QP})=B(\overline{P}), C2SO(QP‾)=C2SO(P‾)C_2^{\mathrm{SO}}(\overline{QP})=C_2^{\mathrm{SO}}(\overline{P}). Thus a proper rotation leaves both candidates in Eq. (5) unchanged. Now suppose Q=RβFQ = R_{\beta}F. Then we have:

QP=RβP‾,QP‾=FRβFP=R−βP.QP = R_{\beta}\overline{P}, \qquad\overline{QP} = FR_{\beta}FP = R_{-\beta}P .

Consequently, we get

B(QP)=B(P‾),C2SO(QP)=C2SO(P‾),B(QP) = B(\overline{P}), \qquad C^{\mathrm{SO}}_{2}(QP) = C^{\mathrm{SO}}_{2}(\overline{P}),
B(QP‾)=B(P),C2SO(QP‾)=C2SO(P).B(\overline{QP}) = B(P), \qquad C^{\mathrm{SO}}_{2}(\overline{QP}) = C^{\mathrm{SO}}_{2}(P) .

Therefore, an improper transformation exchanges the two candidates in Eq. (5). Selecting the candidate with the smaller orientation key BB is unchanged by this exchange. Hence C2O(g⋅P)=C2O(P)C^{O}_{2}(g \cdot P) = C^{O}_{2}(P) for every g∈G2Og \in G^{O}_{2}. In any of the branches selected we have, C2O(P)∈G2O⋅PC^{O}_{2}(P) \in G^{O}_{2} \cdot P. Finally, if B(P)=B(P‾)B(P) = B(\overline{P}), the reconstruction argument at the beginning of the proof shows that the two branches give the same canonical cloud. Therefore C2O(⋅)C^{O}_{2}(\cdot) is well defined and is a canonicalization for G2OG^{O}_{2}.

The same argument applies when heights are retained as additional attributes unchanged by planar transformations. The angular ordering then uses (ϕi,ai,ρi,hi)(\phi_i, a_i, \rho_i, h_i), the circular letters use (ai,ρi,δi,hi)(a_i, \rho_i, \delta_i, h_i), and the complete height sequence is appended to B(P)B(P). The final ordering uses (ai,u~i,1,u~i,2,hi)(a_i, \widetilde{u}_{i,1}, \widetilde{u}_{i,2}, h_i). Ranks are still computed from the original labels alone. If every projected radius vanishes, the planar transformation is the identity and the retained records are ordered by (ai,hi)(a_i, h_i).

Theorem 2 (Correctness of 3D canonical maps). The maps C3SO(⋅)C^{\mathrm{SO}}_{3}(\cdot) and C3O(⋅)C^{O}_{3}(\cdot) are canonicalizations for G3SOG^{\mathrm{SO}}_{3} and G3OG^{O}_{3}, respectively.

Proof. We verify that the maps are well defined, invariant under the corresponding group actions, and return a representative from the appropriate orbit.

Let r⋆r_{\star} and Π(P)\Pi(P) be as defined in Eq. (6). First we suppose that r⋆=0r_{\star} = 0. Then every point lies at the origin, and both maps return the zero points ordered by their labels. This output is unchanged by rotations, reflections, and row permutations, and differs from PP only by a row permutation. The result therefore holds in this case. Henceforth, assume r⋆>0r_{\star} > 0.

Independence of pole-alignment rotation: For a fixed p∈Π(P)p \in\Pi(P), suppose that Ap,A~p∈SO(3)A_p, \widetilde{A}_p \in\mathrm{SO}(3) both align the pole with e3\mathbf{e}_3. Thus we have Apxp∥xp∥=A~pxp∥xp∥=e3A_p \frac{x_p}{\lVert x_p\rVert} = \widetilde{A}_p \frac{x_p}{\lVert x_p\rVert} = \mathbf{e}_3. The matrix T=A~pApTT = \widetilde{A}_p A_p^{\mathsf{T}} belongs to SO(3)\mathrm{SO}(3) and fixes e3\mathbf{e}_3. Since TT is orthogonal, it preserves the orthogonal complement e3⊥\mathbf{e}_3^{\perp}. Hence, with respect to R3=e3⊥⊕span⁡{e3}\mathbb{R}^{3} = \mathbf{e}_3^{\perp} \oplus\operatorname{span}\{\mathbf{e}_3\}, it has the form

T=(H001)T = \begin{pmatrix} H & 0 \\ 0 & 1 \end{pmatrix}

for some H∈SO(2)H \in\mathrm{SO}(2). Therefore, the projected clouds obtained from ApA_p and A~p\widetilde{A}_p differ only by the planar rotation HH, their heights and labels being identical. The height-augmented result of Lemma 1, using the unchanged original-label ranks, therefore gives the same planar output. Restoring heights and ordering by (a,x,y,z)(a, x, y, z) gives the same YpSOY^{\mathrm{SO}}_{p} and YpOY^{O}_{p} for either choice of ApA_p.

Invariance to Sn\mathcal{S}_n and spatial transformations: Let P′=(π,Q)⋅PP' = (\pi, Q) \cdot P, and write P′={(xi′,ℓi′)}i=1nP' = \{(x'_{i}, \ell'_{i})\}_{i=1}^{n}. By the group action, xπ(i)′=Qxix'_{\pi(i)} = Qx_i, ℓπ(i)′=ℓi\ell'_{\pi(i)} = \ell_i. Since QQ is orthogonal, we get ∥xπ(i)′∥=∥Qxi∥=∥xi∥\lVert x'_{\pi(i)}\rVert= \lVert Qx_i\rVert= \lVert x_i\rVert. The multiset of original labels is unchanged, so the rarity ranks satisfy aπ(i)′=aia'_{\pi(i)} = a_i for every ii. Thus PP and P′P' have the same maximum radius and the same smallest rarity rank among the farthest points. Consequently, Π(P′)=π(Π(P))\Pi(P') = \pi(\Pi(P)), and p↦π(p)p \mapsto\pi(p) is a bijection between the pole sets. Now, we fix p∈Π(P)p \in\Pi(P) and let p′=π(p)p' = \pi(p). Choose proper rotations Ap,Ap′′∈SO(3)A_p, A'_{p'} \in\mathrm{SO}(3) satisfying Apxp∥xp∥=e3A_p \frac{x_p}{\lVert x_p\rVert} = \mathbf{e}_3, Ap′′xp′′∥xp′′∥=e3A'_{p'} \frac{x'_{p'}}{\lVert x'_{p'}\rVert} = \mathbf{e}_3. Define S:=Ap′′QApTS := A'_{p'} Q A_p^{\mathsf{T}}. Since xp′′=Qxpx'_{p'} = Qx_p and orthogonal transformations preserve norms, we get:

Se3=Ap′′QApTe3=Ap′′Qxp∥xp∥=Ap′′xp′′∥xp′′∥=e3.S\mathbf{e}_3 = A'_{p'} Q A_p^{\mathsf{T}}\mathbf{e}_3 = A'_{p'} Q \frac{x_p}{\lVert x_p\rVert} = A'_{p'} \frac{x'_{p'}}{\lVert x'_{p'}\rVert} = \mathbf{e}_3 .

Thus, SS is orthogonal and fixes e3\mathbf{e}_3. Its restriction to e3⊥\mathbf{e}_3^{\perp} is therefore an element H∈O(2)H \in O(2), and we can write

S=(H001).S = \begin{pmatrix} H & 0 \\ 0 & 1 \end{pmatrix}.

Moreover, because Ap,Ap′′∈SO(3)A_p, A'_{p'} \in\mathrm{SO}(3), we have det⁡H=det⁡S=det⁡(Ap′′)det⁡(Q)det⁡(ApT)=det⁡Q\det H = \det S = \det(A'_{p'})\det(Q)\det(A_p^{\mathsf{T}}) = \det Q. Consequently, H∈SO(2)H \in\mathrm{SO}(2) when Q∈SO(3)Q \in\mathrm{SO}(3), and similarly H∈O(2)H \in O(2) when Q∈O(3)Q \in O(3). For every ii, we write Apxi=(ui(p),hi(p))A_p x_i = (u_i^{(p)}, h_i^{(p)}). Then we have:

Ap′′xπ(i)′=Ap′′Qxi=SApxi=(Hui(p),hi(p)).A'_{p'}x'_{\pi(i)} = A'_{p'}Qx_i = SA_px_i = (Hu_i^{(p)}, h_i^{(p)}).

Together with ℓπ(i)′=ℓi\ell'_{\pi(i)} = \ell_i and aπ(i)′=aia'_{\pi(i)} = a_i, this shows that corresponding projected points have identical heights, original labels, and rarity ranks. Their planar coordinates differ by HH, and their rows differ by π\pi.

If Q∈SO⁡(3)Q \in\operatorname{SO}(3), then H∈SO⁡(2)H \in\operatorname{SO}(2). Applying Lemma 1 therefore gives Dπ(p)SO⁡(P′)=DpSO⁡(P) ∀p∈Π(P)D^{\operatorname{SO}}_{\pi(p)}(P') = D^{\operatorname{SO}}_p(P)\ \forall p \in\Pi(P). Since p↦π(p)p \mapsto\pi(p) is a bijection between the pole sets, we get {Dp′SO⁡(P′):p′∈Π(P′)}={DpSO⁡(P):p∈Π(P)}\{D^{\operatorname{SO}}_{p'}(P') : p' \in\Pi(P')\} = \{D^{\operatorname{SO}}_p(P) : p \in\Pi(P)\}. Taking the lexicographic minimum and using Eq. (7) yields C3SO⁡(P′)=C3SO⁡(P)C^{\operatorname{SO}}_3(P') = C^{\operatorname{SO}}_3(P). If Q∈O⁡(3)Q \in\operatorname{O}(3), then H∈O⁡(2)H \in\operatorname{O}(2). The same argument using C2O(⋅)C^O_2(\cdot) gives Dπ(p)O(P′)=DpO(P) ∀p∈Π(P)D^O_{\pi(p)}(P') = D^O_p(P)\ \forall p \in\Pi(P), and hence, by Eq. (8), we get C3O(P′)=C3O(P)C^O_3(P') = C^O_3(P). This proves invariance under G3SO⁡G^{\operatorname{SO}}_3 and G3OG^O_3, respectively.

Orbit membership. We fix p∈Π(P)p \in\Pi(P). Since C2SO⁡(⋅)C^{\operatorname{SO}}_2(\cdot) is a canonicalization, its output is obtained from PpP_p by a planar rotation Hp∈SO⁡(2)H_p \in\operatorname{SO}(2) and a row permutation. Lifting HpH_p to R3\mathbb{R}^3 gives H~p=(Hp001)∈SO⁡(3)\widetilde{H}_p = \begin{pmatrix} H_p & 0 \\ 0 & 1 \end{pmatrix} \in\operatorname{SO}(3). We denote the corresponding 3D transformation as H~pAp∈SO⁡(3)\widetilde{H}_pA_p \in\operatorname{SO}(3). The operation LL introduces at most another row permutation. Therefore, ∃ σp∈Sn\exists\ \sigma_p \in S_n such that DpSO⁡(P)=(σp,H~pAp)⋅PD^{\operatorname{SO}}_p(P) = (\sigma_p,\widetilde{H}_pA_p)\cdot P, implying DpSO⁡(P)∈G3SO⁡⋅PD^{\operatorname{SO}}_p(P) \in G^{\operatorname{SO}}_3\cdot P.

Similarly, the output of C2O(⋅)C^O_2(\cdot) is obtained using some Hp∈O⁡(2)H_p \in\operatorname{O}(2). Its lift to R3\mathbb{R}^3 given by H~p\widetilde{H}_p lies in O⁡(3)\operatorname{O}(3), and therefore H~pAp∈O⁡(3)\widetilde{H}_pA_p \in\operatorname{O}(3). After combining all row reorderings into a permutation σp∈Sn\sigma_p \in S_n, we obtain DpO(P)=(σp,H~pAp)⋅PD^O_p(P) = (\sigma_p,\widetilde{H}_pA_p)\cdot P. Hence DpO(P)∈G3O⋅PD^O_p(P) \in G^O_3\cdot P.

The pole set Π(P)\Pi(P) is nonempty and finite. Consequently, each lexicographic minimum in Eq. (7) and Eq. (8) is attained by at least one pole. It follows that C3SO⁡(P)∈G3SO⁡⋅PC^{\operatorname{SO}}_3(P) \in G^{\operatorname{SO}}_3\cdot P, C3O(P)∈G3O⋅PC^O_3(P) \in G^O_3\cdot P. If several poles attain the minimum, their sorted rank-coordinate keys agree. Since distinct original labels present in PP have distinct rarity ranks, their returned labeled records also agree. Thus the minimum is well defined. Points with zero planar projection remain fixed under every H∈O⁡(2)H \in\operatorname{O}(2), with their heights and labels retained. If all planar projections vanish, the planar transformation is the identity and the final ordering is determined by (ai,hi)(a_i,h_i).

Thus, each map is invariant under its stated group and returns a point in the corresponding orbit. By Definition 3, C3SO⁡(⋅)C^{\operatorname{SO}}_3(\cdot) and C3O(⋅)C^O_3(\cdot) are canonicalizations for G3SO⁡G^{\operatorname{SO}}_3 and G3OG^O_3, respectively.

Now, we prove correctness of LexiCan algorithm in computing the maps C3κ(⋅)C^\kappa_3(\cdot), κ∈{SO⁡,O}\kappa\in\{\operatorname{SO},O\} in the following theorem.

Theorem 3 (Correctness of LexiCan algorithm). Algorithm 2 returns a least cyclic shift of WW. Consequently, when used in the planar constructions Eq. (4) and Eq. (5), it computes C2SO⁡(⋅)C^{\operatorname{SO}}_2(\cdot) and C2O(⋅)C^O_2(\cdot), respectively. Algorithm 3 computes C3SO⁡(⋅)C^{\operatorname{SO}}_3(\cdot) when κ=SO⁡\kappa= \operatorname{SO} and C3O(⋅)C^O_3(\cdot) when κ=O\kappa= O. Hence the algorithms compute the canonicalizations established in Lemma 1 and Theorem 2.

Proof. We use exact arithmetic and exact comparisons. The entries of W=(ω0,…,ωm−1)W=(\omega_0,\ldots,\omega_{m-1}) belong to a totally ordered set. The scan receives a nonempty word. The case m=1m=1 is immediate, so assume m≥2m\ge2. We extend WW periodically by defining, for every r∈Zr\in\mathbb{Z}, ω~r:=ωr mod m\widetilde{\omega}_r:=\omega_{r\bmod m}, Rr:=(ω~r,ω~r+1,…,ω~r+m−1)R_r:=(\widetilde{\omega}_r,\widetilde{\omega}_{r+1},\ldots,\widetilde{\omega}_{r+m-1}). Thus Rr=τr mod mWR_r=\tau_r\bmod mW and Rr+m=RrR_{r+m}=R_r. Let M:={r∈{0,…,m−1}:Rr=min⁡0≤q<mRq}\mathcal{M}:=\{r\in\{0,\ldots,m-1\}:R_r=\min_{0\le q<m}R_q\} be the nonempty set of least starting positions.

Suppose that the words beginning at positions aa and bb agree for their first tt entries and then satisfy ω~a+q<ω~b+q\widetilde{\omega}_{a+q}<\widetilde{\omega}_{b+q} for 0≤q<t0\le q<t, ω~a+t<ω~b+t\widetilde{\omega}_{a+t}<\widetilde{\omega}_{b+t}. Then, for every 0≤h≤t0\le h\le t, we have Ra+h<Rb+hR_{a+h}<R_{b+h}. Indeed, for 0≤q<t−h0\le q<t-h, we get ω~a+h+q=ω~b+h+q\widetilde{\omega}_{a+h+q}=\widetilde{\omega}_{b+h+q}, whereas at the next position the two words contain ω~a+t\widetilde{\omega}_{a+t} and ω~b+t\widetilde{\omega}_{b+t}, respectively. The first word is therefore lexicographically smaller. Consequently, every valid starting position among b,b+1,…,b+tb,b+1,\ldots,b+t is excluded from M\mathcal{M}. The symmetric statement holds when ω~a+t>ω~b+t\widetilde{\omega}_{a+t}>\widetilde{\omega}_{b+t}.

We now establish the following loop invariants:

  1. The two candidate indices are distinct.

  1. If i,j<mi,j<m, then RiR_i and RjR_j agree in their first tt entries.

  1. Every least start below max⁡{i,j}\max\{i,j\} is represented by one of the two candidates:

M∩{0,…,max⁡{i,j}−1}⊆{i,j}.\mathcal{M} \cap\{0,\ldots,\max\{i,j\}-1\} \subseteq\{i,j\}.

These properties hold initially because i=0i=0, j=1j=1, and t=0t=0. Suppose they hold at the beginning of an iteration. If u=vu=v, increasing tt by one preserves all three properties.

Suppose that u<vu<v. The elimination claim shows that none of j,j+1,…,j+tj,j+1,\ldots,j+t belongs to M\mathcal{M}. Let j′=j+t+1j'=j+t+1. If j′>ij'>i, replacing jj by j′j' skips exactly this excluded block. If j′≤ij'\leq i, the algorithm instead sets j=i+1j=i+1. Every position between j′j' and i−1i-1 was already below the previous maximum and, by the third invariant, was already excluded; the position ii itself remains represented by the other pointer. Thus, the update skips no member of M\mathcal{M}. Resetting tt to zero makes the second invariant immediate, and the updated indices remain distinct. The case u>vu>v is symmetric. Therefore, all three invariants hold throughout the algorithm.

It remains to examine termination. First we suppose that one pointer reaches mm. For example, let j≥mj\geq m and i<mi<m. Since every valid start lies below jj, the third invariant gives M⊆{i}\mathcal{M}\subseteq\{i\}. Because M\mathcal{M} is non-empty, i∈Mi\in\mathcal{M}. Hence min⁡{i,j}=i\min\{i,j\}=i is a least starting position. The case i≥mi\geq m is symmetric.

Now suppose that the algorithm terminates because t=mt=m. Then i,j<mi,j<m and Ri=RjR_i=R_j. Assume without loss of generality that i<ji<j, and set d=j−id=j-i. Equality of these two length-mm words implies

ω~r+d=ω~r∀r∈Z.\widetilde{\omega}_{r+d}=\widetilde{\omega}_r\quad\forall r\in\mathbb{Z}.

Thus, dd is a cyclic period of WW, and Rr+d=RrR_{r+d}=R_r for every rr.

Choose any r∈Mr\in\mathcal{M}. If r<jr<j, the third invariant implies r=ir=i. If r≥jr\geq j, repeatedly subtracting dd gives an index r0∈{i,…,j−1}r_0\in\{i,\ldots,j-1\} such that Rr0=RrR_{r_0}=R_r. Hence r0∈Mr_0\in\mathcal{M}, and the third invariant again gives r0=ir_0=i. Therefore RiR_i is a least cyclic shift. Since Ri=RjR_i=R_j, both candidates are valid, and the returned index min⁡{i,j}=i\min\{i,j\}=i belongs to M\mathcal{M}. The case j<ij<i is symmetric.

We have therefore proved that Algorithm 2 returns an index ss satisfying

τsW=min⁡0≤r<mτrW.\tau_s W=\min_{0\leq r<m}\tau_r W.

Next, we connect the procedure to the planar maps. Applied to W(P)W(P), it returns an index satisfying Eq. (9), and hence computes the starting position used by C2O(⋅)C_2^{O}(\cdot). If two indices ss and s′s' both attain the minimum, then τsW(P)=τs′W(P)\tau_s W(P)=\tau_{s'}W(P). The shifted word records the rarity ranks, radii, angular gaps, and retained heights when present. The ranks identify the original labels among those present in PP. Once the first point is placed at angle π/2\pi/2, the remaining angles are reconstructed by

ϕ^t=π2+∑q=0t−1δ(s+q) mod m(mod2π).\widehat{\phi}_t=\frac{\pi}{2}+\sum_{q=0}^{t-1}\delta_{(s+q)\bmod m}\pmod{2\pi}.

Thus tied least shifts reconstruct the same non-origin records. Including the fixed origin records, converting to Cartesian coordinates, and applying the prescribed final ordering gives the same canonical output.

For C2OC_2^{O}, the scan is applied separately to W(P)W(P) and W(P‾)W(\overline{P}). The returned starts determine the channelwise keys B(P)B(P) and B(P‾)B(\overline{P}) in (10). Selecting the candidate with the smaller key gives exactly (5).

If m=0m=0, no cyclic start is required. The standalone zero cloud is ordered by its original labels; the height-augmented construction retains all heights and orders the records by (ai,hi)(a_i,h_i). Thus the planar constructions compute C2SOC_2^{SO} and C2OC_2^{O} exactly.

Finally, consider Algorithm 3. If r⋆=0r_\star=0, its output agrees with the separately defined all-zero case. Otherwise, it computes the original-label ranks once and constructs Π(P)\Pi(P) from (6). For each p∈Π(P)p\in\Pi(P), it forms Pp=((ui(p),ℓi,hi(p)))i=1nP_p=((u_i^{(p)},\ell_i,h_i^{(p)}))_{i=1}^n, retaining the previously computed ranks. It applies the height-augmented planar construction, restores the heights, and orders the lifted records by (a,x,y,z)(a,x,y,z) to obtain YpκY_p^\kappa. It then sets Dpκ=YpκD_p^\kappa=Y_p^\kappa. Candidate comparisons use the associated rank-coordinate keys.

The candidate does not depend on the particular proper rotation chosen to align the pole: two such rotations differ, after alignment, by an element of SO⁡(2)\operatorname{SO}(2) acting on the projection, which is removed by either planar canonicalization. After processing any collection of poles, DbestD_{\mathrm{best}} is, by induction, the lexicographic minimum of the candidates processed so far. Hence, the final output is

min⁡p∈Π(P)YpSOormin⁡p∈Π(P)YpO.\min_{p \in\Pi(P)} Y^{\mathrm{SO}}_p \quad\text{or} \quad\min_{p \in\Pi(P)} Y^{\mathrm{O}}_p.

which is precisely (7) or (8), respectively.

Therefore, the algorithms compute the maps established as canonicalizations in Lemma 1 and Theorem 2.

In the following result, we analyze worst case runtime complexity of LexiCan.

Theorem 4 (Runtime analysis of LexiCan algorithm). Assume that the number of labels is fixed and that arithmetic and label comparisons take constant time. For a word of length mm, Algorithm 2 runs in O(m)O(m) time and uses O(1)O(1) auxiliary memory after WW has been stored. The complete planar canonicalizations C2SO(⋅)C^{\mathrm{SO}}_2(\cdot) and C2O(⋅)C^{\mathrm{O}}_2(\cdot) require O(nlog⁡n)O(n \log n) time and O(n)O(n) auxiliary memory for a point cloud PP of size nn. Let k=∣Π(P)∣k = |\Pi(P)|, Algorithm 3 runs in O(knlog⁡n)O(kn \log n) time for n≥2n \ge2. Since k≤nk \le n, its worst-case running time is O(n2log⁡n)O(n^2 \log n). It uses O(n)O(n) auxiliary memory and the bounds hold for both SO and O variants.

Proof. We assume that all coordinate dimensions and the number of labels are fixed. Hence each arithmetic operation, label comparison etc. takes constant time.

We first analyze Algorithm 2. At the beginning of an iteration, define Φ:=i+j+t\Phi:= i + j + t. If the compared entries are equal, the algorithm replaces tt by t+1t + 1, while ii and jj remain unchanged. Hence Φ\Phi increases by one.

Suppose instead that u<vu < v. Before the optional correction enforcing j>ij > i, the update satisfies jnew≥j+t+1j_{\mathrm{new}} \ge j + t + 1, tnew=0t_{\mathrm{new}} = 0. Consequently, we get:

Φnew−Φ=i+jnew+tnew−(i+j+t)≥(j+t+1)−j−t=1.\Phi_{\mathrm{new}} - \Phi= i + j_{\mathrm{new}} + t_{\mathrm{new}} - (i + j + t) \ge(j + t + 1) - j - t = 1.

The optional assignment j←i+1j \leftarrow i + 1 can only increase jj further. The case u>vu > v is symmetric. Therefore, Φ\Phi increases by at least one in every iteration.

Whenever the loop condition is satisfied, i<mi < m, j<mj < m, and t<mt < m. Therefore, Φ=i+j+t<3m\Phi= i + j + t < 3m. Since Φ\Phi is integer-valued and increases by at least one per iteration, the loop performs at most O(m)O(m) iterations. Each iteration uses a constant number of arithmetic operations, comparisons, and assignments. Thus, the running time is O(m)O(m).

After WW has been stored, the procedure maintains only the indices ii, jj, tt and the two currently compared entries uu, vv. Because each word entry has fixed size, this requires O(1)O(1) auxiliary memory. Storing the word itself requires O(m)O(m) memory, but this storage is excluded from the stated auxiliary bound for the scan.

We next consider a planar cloud with nn points. Computing the rarest-first ranks of the original labels takes O(nlog⁡n)O(n \log n) time. Let m=∣{i:ρi>0}∣m = |\{i : \rho_i > 0\}|. Computing the radii and the angles of non-origin points takes O(n)O(n) time. Ordering those points by (ϕi,ai,ρi)(\phi_i, a_i, \rho_i) costs O(nlog⁡n)O(n \log n) time; appending a retained height does not change this bound. The cases n≤1n \le1 take constant time.

Once this ordering has been computed, constructing the angular increments and the circular word costs O(m)O(m). By the first part of the proof, selecting its least cyclic shift also costs O(m)O(m). Constructing the canonical angles, transforming the points, and forming the orientation key each require O(n)O(n) time. Sorting the final Cartesian records by (ai,xi,yi)(a_i, x_i, y_i), with height appended when retained, costs O(nlog⁡n)O(n \log n). The standalone all-zero case only sorts the original labels, with the same bound. Consequently, T2SO(n)=O(nlog⁡n)T^{\mathrm{SO}}_2(n) = O(n \log n). The O(2)O(2) construction repeats the circular construction for the reflected cloud and compares the two resulting keys. This performs at most a constant multiple of the work in the SO(2) case, so T2O(n)=O(nlog⁡n)T^{\mathrm{O}}_2(n) = O(n \log n). The angular ordering, circular word, reflected candidate, and output can all be stored using arrays of length at most nn. Thus either planar construction uses O(n)O(n) auxiliary memory.

Finally, consider Algorithm 3 for r⋆>0r_\star> 0. The original-label ranks are computed once in O(nlog⁡n)O(n \log n) time. Given these ranks, computing the radii, maximum radius, minimum admissible rank, and pole set Π(P)\Pi(P) takes O(n)O(n) time. Let k=∣Π(P)∣k = |\Pi(P)|. The planar constructions reuse these ranks. Fix a pole p∈Π(P)p \in\Pi(P). Since the ambient dimension is fixed, constructing ApA_p takes constant time. Applying ApA_p to all points and constructing PpP_p takes O(n)O(n) time. By the planar bound, canonicalizing PpP_p takes O(nlog⁡n)O(n \log n) time. Restoring the heights takes O(n)O(n) time. Ordering the lifted records by (a,x,y,z)(a,x,y,z) to obtain Ypκ=DpκY_p^\kappa= D_p^\kappa costs O(nlog⁡n)O(n \log n). Comparing its rank-coordinate key with that of the current best candidate takes O(n)O(n) time in the worst case. The total work for one pole is therefore O(n)+O(nlog⁡n)+O(n)+O(nlog⁡n)+O(n)=O(nlog⁡n)O(n) + O(n \log n) + O(n) + O(n \log n) + O(n) = O(n \log n).

Summing over all kk poles and including the initial rank computation gives

T3(n,k)=O(nlog⁡n)+k O(nlog⁡n)=O(knlog⁡n).T_3(n,k) = O(n \log n) + k\,O(n \log n) = O(kn \log n).

Since k≤nk \le n, we get T3(n,k)=O(n2log⁡n)T_3(n,k) = O(n^2 \log n) in the worst case. If the admissible pole is unique, the sharper bound is O(nlog⁡n)O(n \log n).

The all-zero case requires only ordering the labels and therefore costs O(nlog⁡n)O(n \log n) time, which is covered by the stated worst-case bound.

For memory, the algorithm only needs to retain the input, the current projected cloud, its circular representation, the current lifted candidate, and the best candidate found so far. Each contains O(n)O(n) records. Standard sorting workspaces also use at most O(n)O(n) memory. Because candidates are processed one pole at a time rather than stored simultaneously, the auxiliary memory is O(n)O(n) rather than O(kn)O(kn).

The O(2) and O(3) variants evaluate one additional reflected planar orientation. This multiplies the planar work by at most a constant and does not change any asymptotic time or memory bound.

Now we proceed to show that LexiCan is Lipschitz almost everywhere. We first define some notations. We fix the label sequence a=(a1,…,an)\mathbf{a} = (a_1,\ldots,a_n) and let

Xa={((xi,ai))i=1n:∑i=1nxi=0}.\mathcal{X}_{\mathbf{a}} = \left\{((\mathbf{x}_i,a_i))_{i=1}^{n} : \sum_{i=1}^{n}\mathbf{x}_i = 0\right\}.

be the corresponding space of centered point clouds. For P=((xi,ai))i=1nP = ((\mathbf{x}_i,a_i))_{i=1}^{n} and P′=((xi′,ai))i=1nP' = ((\mathbf{x}'_i,a_i))_{i=1}^{n} in Xa\mathcal{X}_{\mathbf{a}}, we define

d∞(P,P′):=max⁡1≤i≤n∥xi−xi′∥2,B∞(P0,δ):={P∈Xa:d∞(P,P0)<δ}.d_\infty(P,P') := \max_{1\le i\le n}\|\mathbf{x}_i-\mathbf{x}'_i\|_2,\qquad B_\infty(P_0,\delta) := \{P \in\mathcal{X}_{\mathbf{a}} : d_\infty(P,P_0) < \delta\}.

Thus d∞d_\infty measures the largest displacement of corresponding points, without optimizing over rotations or permutations while B∞(P0,δ)B_\infty(P_0,\delta) contains the centered clouds in which no point of P0P_0 is displaced by δ\delta or more.

For this theorem, C^3,ηκ\widehat{C}_{3,\eta}^{\kappa} denotes the construction evaluated in real arithmetic, retaining its grid comparisons and deterministic selection rules, with unbounded integer comparison keys. For η=0\eta= 0, it denotes the exact construction without quantization. The theorem does not account for floating-point roundoff or machine-range restrictions.

Theorem 1 (Locally Lipschitz almost everywhere property of LexiCan). Fix the number of points, their labels, the group G3κG_3^\kappa with κ∈{SO,O}\kappa\in\{\mathrm{SO},\mathrm{O}\}, and a value η≥0\eta\ge0.

For almost every centered point cloud P0P_0, there exist δη(P0)>0\delta_\eta(P_0) > 0 and Lη(P0)<∞L_\eta(P_0) < \infty such that ∀P,P′∈B∞(P0,δη(P0))\forall P,P' \in B_\infty(P_0,\delta_\eta(P_0)) it holds that

EMD⁡(C^3,ηκ(P),C^3,ηκ(P′))≤Lη(P0)d∞(P,P′).\operatorname{EMD}\left(\widehat{C}_{3,\eta}^{\kappa}(P),\widehat{C}_{3,\eta}^{\kappa}(P')\right) \le L_\eta(P_0)d_\infty(P,P').

Consequently, for every fixed η≥0\eta\ge0, the map C^3,ηκ(⋅)\widehat{C}_{3,\eta}^{\kappa}(\cdot) is continuous almost everywhere.

Proof. Fix η≥0\eta\ge0. We equip Xa\mathcal{X}_{\mathbf{a}} with its intrinsic Lebesgue measure as a finite-dimensional Euclidean space. We first prove that there is a countable collection of open sets {Uj}j≥1\{U_j\}_{j\ge1} such that their complement has a measure of zero and, on each UjU_j, the algorithm makes the same choices.

For a given n∈Nn \in\mathbb{N}, there is a finite upper bound N(n)N(n) on the number of comparisons made in an execution of LexiCan. We prove inductively that, after each decision, Xa\mathcal{X}_{\mathbf{a}} is covered, up to a set of measure zero, by countably many connected open sets on which all decisions made so far are fixed and all continuously varying quantities computed so far are real-analytic. If n=1n=1, the centered output is constant. Assume n≥2n \ge2 and exclude

E0:=⋃i=1n{P∈Xa:xi=0}.E_0 := \bigcup_{i=1}^{n} \{P \in\mathcal{X}_a : x_i = 0\}.

Each set in this union is a proper linear subspace, so μ(E0)=0\mu(E_0)=0. Every possible pole is nonzero outside E0E_0.

We use the following general finite-decision argument. Consider a deterministic procedure with finite decision depth satisfying two properties. First, between consecutive decisions, its continuously varying quantities are updated by real-analytic maps on open domains. Second, each decision is determined by the position of a real-analytic scalar quantity h(P)h(P) relative to a locally finite set of thresholds T⊂RT \subset\mathbb{R}.

Let UU be a connected open region on which all preceding decisions are fixed and all quantities computed so far are real-analytic. If the next decision compares an analytic scalar h(P)h(P) with thresholds TT, define

SU:=⋃c∈Th−c≢0 on U{P∈U:h(P)=c}.S_U := \bigcup_{\substack{c \in T\\ h-c \not\equiv0\text{ on }U}} \{P \in U : h(P)=c\}.

For each cc in this union, h−ch-c is a nonzero real-analytic function, so {h=c}\{h=c\} has Lebesgue measure zero (Mityagin, 2020). Since TT is locally finite, SUS_U is also null. If h−c≡0h-c\equiv0 on UU, the deterministic tie rule makes the same choice throughout UU. Hence, the next decision is fixed on each connected component of U∖SUU\setminus S_U. These components are open and countable.

The induction gives the claimed partition provided the intervening operations are defined and analytic on regions covering the input space up to a null set. We verify this condition for LEXICAN.

Polynomial operations, sine and cosine are real analytic. Square roots and reciprocals are analytic on their positive and nonzero domains, respectively. For an analytic vector v(P)v(P) on a connected region UU, either v≡0v\equiv0, in which case its norm is constant, or ∥v(P)∥22\lVert v(P)\rVert_2^2 is a nonzero analytic function. In the latter case, its zero set is null; away from this set, ∥v(P)∥2=∥v(P)∥22\lVert v(P)\rVert_2=\sqrt{\lVert v(P)\rVert_2^2} is analytic.

Pole normalization is defined outside E0E_0. For a unit pole direction uu, the coordinate helper ee is chosen using the smallest absolute coordinate of uu, giving ∥e×u∥22≥2/3\lVert e\times u\rVert_2^2 \ge2/3. A selected planar reference has nonzero projection; if no reference is selected, the planar transformation is the identity. Angular coordinates are analytic on local charts away from the origin. Refining these charts by coordinate signs uses the same scalar-comparison argument above.

These refinements discard only null sets and leave countably many open regions on which the geometric updates are analytic. Identically zero quantities are retained as constant functions.

The scale R(P)=max⁡i∥xi∥2R(P)=\max_i\lVert x_i\rVert_2 is computed by comparing the polynomial quantities ∥xi∥22\lVert x_i\rVert_2^2. Refine the preceding regions using these comparisons. On each resulting region, a maximizing index i∗i_* is fixed. Outside E0E_0, the function R(P)=∥xi∗∥22R(P)=\sqrt{\lVert x_{i_*}\rVert_2^2} is positive and real analytic. Consequently, t(P)/R(P)t(P)/R(P) is real analytic whenever t(P)t(P) is real analytic on that region. Identically tied maxima are handled by a fixed deterministic choice of index.

For η>0\eta>0, define Qη(s)=⌊s/η+12+β⌋Q_\eta(s)=\lfloor s/\eta+\frac{1}{2}+\beta\rfloor, where β=(5−2)/2\beta=(\sqrt{5}-2)/2. The implementation bins each spatial scalar t(P)t(P), including radii, heights, and Cartesian coordinates, as

Qη(t(P)R(P))=⌊t(P)ηR(P)+12+β⌋.Q_\eta\left(\frac{t(P)}{R(P)}\right)=\left\lfloor\frac{t(P)}{\eta R(P)}+\frac{1}{2}+\beta\right\rfloor.

while each angular quantity θ(P)\theta(P) is binned as Qη(θ(P))Q_\eta(\theta(P)). The same full-cloud scale R(P)R(P) is retained throughout the three-dimensional construction.

Thus each binning decision applies QηQ_\eta to an analytic scalar h(P)h(P), either t(P)/R(P)t(P)/R(P) or θ(P)\theta(P). Its bin can change only when

h(P)=(k+12−β)η,k∈Z.h(P)=\left(k+\frac{1}{2}-\beta\right)\eta,\qquad k\in\mathbb{Z}.

These thresholds are fixed and locally finite. Once the bins are fixed, comparisons of their integer keys are fixed as well. The remaining exact comparisons use analytic differences with threshold zero. For η=0\eta=0, quantization is omitted.

Thus, the preceding argument applies to LexiCAN and yields connected open sets {Uj}j≥1\{U_j\}_{j\ge1} and real-analytic maps Fj(⋅)F_j(\cdot) such that

μ(Xa∖⋃j≥1Uj)=0,C^3,ηκ(⋅)∣Uj=Fj(⋅).\mu\left(\mathcal{X}_a \setminus\bigcup_{j\ge1} U_j\right)=0,\qquad\left.\widehat{C}^{\kappa}_{3,\eta}(\cdot)\right|_{U_j}=F_j(\cdot).

Let Eη:=Xa∖⋃j≥1UjE_\eta:= \mathcal{X}_a \setminus\bigcup_{j\ge1} U_j. Fix P0∉EηP_0 \notin E_\eta and choose UjU_j containing P0P_0. Since UjU_j is open, there exists δη(P0)>0\delta_\eta(P_0)>0 such that K:=B∞(P0,δη(P0))‾⊂UjK:=\overline{B_\infty(P_0,\delta_\eta(P_0))}\subset U_j. For V=(v1,…,vn)V=(v_1,\ldots,v_n), define ∥V∥∞:=max⁡i∥vi∥2\|V\|_\infty:=\max_{i}\|v_i\|_2. Using its induced operator norm, since Fj(⋅)F_j(\cdot) is real-analytic and KK is compact, we define

Lη(P0):=sup⁡Q∈K∥DFj(Q)∥∞<∞.L_\eta(P_0):=\sup_{Q\in K}\|DF_j(Q)\|_\infty<\infty.

The mean-value inequality gives, for every P,P′∈KP,P'\in K,

max⁡1≤i≤n∥Fj(P)i−Fj(P′)i∥≤Lη(P0)d∞(P,P′).\max_{1\le i\le n}\|F_j(P)_i-F_j(P')_i\|\le L_\eta(P_0)d_\infty(P,P').

The row order and labels are fixed on UjU_j, so pairing the corresponding rows is an admissible EMD matching. Therefore,

EMD⁡(C^3,ηκ(P),C^3,ηκ(P′))≤1n∑i=1n∥Fj(P)i−Fj(P′)i∥≤Lη(P0)d∞(P,P′).\operatorname{EMD}\left(\widehat{C}^{\kappa}_{3,\eta}(P),\widehat{C}^{\kappa}_{3,\eta}(P')\right)\le\frac{1}{n}\sum_{i=1}^{n}\|F_j(P)_i-F_j(P')_i\|\le L_\eta(P_0)d_\infty(P,P').

Thus the local Lipschitz bound holds outside the null set EηE_\eta. Setting P′=P0P'=P_0 proves continuity almost everywhere.

Additional Experimental Results and Details

Licenses of datasets and baseline code. QM9 and QM-sym are released under the CC0 1.0 Universal Public Domain Dedication, as specified in their original dataset records.2 3 ModelNet40 is provided for academic research only, with copyright over the CAD models retained by their original creators.4 The ASUN implementation is publicly available in the authors’ repository accompanying their ICML 2024 paper, yet we did not identify an explicit software license in that repository.5

QM9 Property Prediction Experimental Details

In the transformer model, each molecule is represented as a sequence of atom tokens. For atom ii, its atomic-number embedding is added to an embedding of its Cartesian coordinates:

hi=Emb⁡(zi)+MLP⁡coord(xi),xi∈R3.\mathbf{h}_i=\operatorname{Emb}(z_i)+\operatorname{MLP}_{\mathrm{coord}}(\mathbf{x}_i),\qquad\mathbf{x}_i\in\mathbb{R}^3.

A learned [CLS] token is prepended to the sequence, and padding atoms are excluded using an attention mask. The tokens are processed by a standard transformer encoder without positional encodings, making the architecture invariant to permutations of the atom order. The encoded [CLS] token is passed to an MLP that predicts the molecular property. The model is not intrinsically rotation invariant or equivariant; instead, the canonicalized coordinates provide a consistent reference frame.

Table 9 shows the final selected hyperparameters, all architectural and optimization settings are held fixed when comparing regular, ASUN-canonicalized, and our canonicalized coordinates. After selecting the final configurations, models are evaluated using three random seeds.

HyperparameterTransformer
Model dimension128
Transformer layers6
Attention heads8
Feed-forward dimension512
Encoder activationGELU
Coordinate-MLP activationSiLU
Trainable parameters1,224,961
Train/val/test split100,000/10,000/20,831
Batch size256
Maximum epochs200
OptimizerAdamW
Learning rate3×10−43 \times10^{-4}
Weight decay10−510^{-5}
Early-stopping patience40 epochs
Learning-rate schedulerReduceLROnPlateau
Scheduler factor/patience0.5/5 epochs

Table 9. Final architecture and training hyperparameters selected for the Transformer model.

Each molecule is given one random rotation (or reflection), atom permutation and translation, fixed across epochs. ASUN and LexiCAN canonicalize this randomly posed copy in training, validation and test, so they cannot benefit from the stored QM9 coordinates, which share a common, non-random orientation. The regular representation is trained and validated on the stored coordinates and tested on the randomly posed molecules, as in the z/SO(3)z/\mathrm{SO}(3) setting of ModelNet40. This is because QM9 molecules share a common orientation (Lippmann et al. (2026)), so random rotations are applied at test time to measure the impact of canonicalization versus non-invariance on this dataset. Testing the canonicalized models on a second, independent random pose of every test molecule leaves their error unchanged up to 10−310^{-3} (seed 0: ASUN 0.428 and 0.429, LexiCan 0.406 on both poses).

ModelNet40 Classification Experimental Details

Each ModelNet40 shape is represented by n∈{200,512,1024}n \in\{200, 512, 1024\} points sampled uniformly (area-weighted) from its mesh surface, centered and scaled so that max⁡i∥xi∥∞=1\max_i \lVert x_i \rVert_\infty= 1. Every model operates on the kk-nearest-neighbor graph (k=20k = 20, no self-loops) of the posed points, recomputed for each batch, so that edges always refer to the posed coordinates. We use two families of models, following Baker et al. [1]. The non-invariant models take the coordinates as node features, so their output depends on the pose: GCN (Kipf and Welling (2017)) and GCNII (Chen et al. [6]) (α=0.1\alpha= 0.1, θ=0.5\theta= 0.5) with coordinate inputs and batch normalization, and SchNet-Pos and EGNN-Pos, which add a linear embedding of the coordinates to the node features of SchNet and EGNN. The invariant controls see only relative geometry: SchNet (Schütt et al. (2017)) (interaction blocks on edge lengths expanded in 50 Gaussians with cutoff 2.0, from a shared learned node embedding) and EGNN (Satorras et al. (2021)) (message passing on squared edge lengths without coordinate updates, nodes initialized from their distance to the centroid). All models end with a readout that concatenates mean and max pooling over the nodes, followed by a two-layer MLP classifier over the 40 classes.

All models and representations share one configuration (Table 10); no hyperparameter is tuned per representation. Training uses a fixed number of epochs, and test accuracy is reported at the epoch with the best validation accuracy. We report the mean and standard deviation over three seeds at every nn. In the z/SO(3)z/\mathrm{SO}(3) setting, models are trained on the upright shapes and tested on randomly rotated ones; in all other settings, each shape is given one fixed random rotation (and point permutation), and canonical representations canonicalize that rotated copy.

HyperparameterValue
Hidden dimension16
Layers4
Dropout0.5
kk-NN graphk=20k = 20
Readoutconcatenated mean and max pooling, then a two-layer MLP
Trainable parametersGCN 2,216; GCNII 2,424; SchNet 8,776; SchNet-Pos 8,840; EGNN 7,832; EGNN-Pos 7,864
Train/val/test split8,859/984/2,468
Batch size128
Epochs60 (no early stopping)
OptimizerAdam
Learning rate10−210^{-2}
Weight decay5×10−45 \times10^{-4}
Learning-rate schedulernone
Losscross-entropy
Model selectionbest validation accuracy

Table 10. Architecture and training hyperparameters for the ModelNet40 models, shared by every model and representation.

Additional Results on ModelNet40 Shape Prediction

The ModelNet40 dataset consists of 40 categorized CAD meshes, with 9,843 training and 2,468 testing samples. We sample n∈{200,512,1024}n \in\{200, 512, 1024\} points from the mesh and use the sampled points to predict properties of the point cloud. We train state-of-the-art invariant/equivariant SchNet ((Schütt et al., 2017)) and EGNN ((Satorras et al., 2021)) architectures. Upon adding positional encodings, the invariance breaks, which we denote as SchNet-Pos and EGNN-Pos. We also train non-invariant GCN and GCNII. The main paper reports the accuracy for n=512n = 512 sampled points, and here we do the same for n=200,1024n = 200, 1024 in Table 11.

Modeln=200n = 200, z/SO(3)z/\mathrm{SO}(3)n=200n = 200, SO(3)/SO(3)\mathrm{SO}(3)/\mathrm{SO}(3)n=200n = 200, ASUNn=200n = 200, LexiCANn=1,024n = 1{,}024, z/SO(3)z/\mathrm{SO}(3)n=1,024n = 1{,}024, SO(3)/SO(3)\mathrm{SO}(3)/\mathrm{SO}(3)n=1,024n = 1{,}024, ASUNn=1,024n = 1{,}024, LexiCAN
SchNet27.6 ± 0.828.2 ± 0.828.1 ± 0.427.8 ± 1.227.6 ± 0.228.2 ± 1.127.9 ± 0.127.5 ± 1.6
EGNN33.9 ± 1.733.3 ± 0.836.3 ± 0.132.1 ± 1.125.7 ± 5.330.8 ± 2.927.0 ± 2.528.9 ± 2.1
GCN7.4 ± 0.314.7 ± 0.516.6 ± 1.525.3 ± 1.38.9 ± 0.618.9 ± 0.620.7 ± 1.427.1 ± 1.4
GCNII7.7 ± 0.921.1 ± 1.124.4 ± 0.429.5 ± 2.17.2 ± 1.820.8 ± 1.125.2 ± 0.327.3 ± 2.8
SchNet-Pos10.7 ± 1.028.6 ± 0.429.9 ± 0.633.1 ± 1.810.2 ± 0.727.7 ± 1.631.3 ± 1.733.5 ± 3.1
EGNN-Pos9.8 ± 0.628.9 ± 3.130.3 ± 1.035.3 ± 2.910.0 ± 1.026.8 ± 0.630.1 ± 2.634.6 ± 1.9

Table 11. Accuracy of classification on ModelNet40 for n=200n = 200 and n=1,024n = 1{,}024 (%, mean ± STD over three seeds). Best results are in bold.

As observed from the table, (1) in the shape classification task, LEXICAN gives better performance than ASUN for 4/4 non-invariant architectures for both the mesh of 200 and 1024 points, (2) the invariant SchNet and EGNN do not benefit from canonicalization: SchNet stays within one point across representations, and EGNN is best with ASUN at n=200n = 200 and without canonicalization at n=1,024n = 1{,}024. Intuitively, LEXICAN computes a smoother canonicalization map than ASUN as observed from the other experiments, which can be used to explain the superior empirical performance.

Optimal Numerical Tolerance

All the canonicalization algorithms deal with O(3)O(3) invariance here. Each one of the baseline algorithms (PCA and ASUN), as well as LexiCan, implement a tolerance hyperparameter in a different manner. For PCA, the tolerance does not have any effect against its eigenvalue degeneracy, which is its main failure point. For ASUN, it has two main different effects: it sets the minimum sensitivity for interatomic distances (which is the dominant effect and the one that governs the varying behavior of the algorithm at different tolerances) and it sets a threshold for angular degeneracy (which is the reason why a higher tolerance fails at more configurations). LexiCan, consistently and at every step of the algorithm, treats as equal two lengths within ηR\eta R of each other (RR the largest distance from the centroid) and two angles within η\eta radians, so that one tolerance means the same on clouds of any size.

To run a fair set of experiments, we compare every algorithm against the 18 adversarial point clouds under a sweep of tolerances, recording the flip rate (amplification >10> 10) at perturbations from 10−710^{-7} to 10−210^{-2} and 12 random rotations for each. The results can be seen in Table 12. PCA has no tolerance, so its entries are the same in every row. ASUN raises errors on point clouds for tolerances 10−110^{-1} and 10−210^{-2}; we choose a tolerance of 10−210^{-2} as it has a good trade-off between flip rate and an acceptable number of failures. LexiCan has a decreasing flip rate as tol ↑1\uparrow1, however that hurts runtime; it stays invariant on every QM-sym molecule at the 0.1 Å threshold at every tol. Thus, to achieve a trade-off, we choose a tolerance of 10−310^{-3} for most of the experiments.

tolPCAASUNLexiCan
TimeFlipNon-inv.TimeFlipNon-inv.TimeFlipNon-inv.
10−910^{-9}0.1840.7621.0005.8380.418*0.3532.0510.6230.000
10−810^{-8}0.1840.7621.0005.9290.418*0.3532.0960.6230.000
10−710^{-7}0.1840.7621.0005.9820.418*0.3532.0820.6000.000
10−610^{-6}0.1840.7621.0006.0010.408*0.3532.0840.5030.000
10−510^{-5}0.1840.7621.0005.9870.393*0.3532.0940.4040.000
10−410^{-4}0.1840.7621.0005.8860.375*0.3532.0880.2970.000
10−310^{-3}0.1840.7621.0005.8900.358*0.3532.0580.1960.000
10−210^{-2}0.1840.7621.0005.9300.356*0.3532.0660.1030.000
10−110^{-1}0.1840.7621.0005.9160.345*0.3532.2460.0010.000

Table 12. Tolerance sweep across the 18 labeled point clouds. Time is the mean per-cloud canonicalization time in ms (median over 10 calls per cloud). Flip is the fraction of perturbations whose canonical form moved more than 10×10\times further than the input did, pooled over six noise magnitudes (σ=10−7,…,10−2\sigma= 10^{-7}, \ldots, 10^{-2} of the cloud’s RMS radius) and twelve draws per cloud. Non-inv. is the fraction of clouds whose random rotations give different canonical forms. Per method and column, bold marks the best tol and underline the second best (times compared to two significant figures); * marks a tol at which the method fails to return a canonicalization for some inputs. LexiCan ranks labels rarest first. PCA has no tolerance (one setting, repeated in every row). Best results are in bold.

We also do similar tolerance sweeps for the symmetric molecule dataset QM-sym, the results of which we show below in Table 13.

tolPCA TimePCA FlipPCA Non-inv.ASUN TimeASUN FlipASUN Non-inv.LexiCan TimeLexiCan FlipLexiCan Non-inv.
10−910^{-9}0.2060.5811.00038.60.8970.2761.3490.5340.000
10−810^{-8}0.2060.5811.000<u>38.1</u>0.8970.276<u>1.388</u>0.5340.000
10−710^{-7}0.2060.5811.000<u>37.9</u>0.896<u>0.297</u>1.6900.5190.000
10−610^{-6}0.2060.5811.000<u>37.8</u>0.8750.4681.7950.4570.000
10−510^{-5}0.2060.5811.000<u>37.6</u>0.8610.4131.8020.3730.000
10−410^{-4}0.2060.5811.000<u>38.0</u>0.8410.4141.8180.2890.000
10−310^{-3}0.2060.5811.00037.40.8170.4191.8250.2080.000
10−210^{-2}0.2060.5811.000<u>37.6</u><u>0.782</u>0.4561.877<u>0.125</u>0.000
10−110^{-1}0.2060.5811.000<u>37.9</u>0.6930.5932.0130.0360.000

Table 13. Tolerance sweep across 1,000 QM-sym molecules Time is the mean per-cloud canonicalization time in ms (median over 10 calls per cloud). Flip is the fraction of perturbations whose canonical form moved more than 10× further than the input did, pooled over six noise magnitudes (σ=10−7,…,10−2\sigma= 10^{-7}, \ldots, 10^{-2} of the cloud’s RMS radius) and twelve draws per cloud. Non-inv. is the fraction of molecules with one of 12 random views more than 0.1 Å (EMD) from the canonical form. Per method and column, bold marks the best tol and underline the second best (times compared to two significant figures); ∗ marks a tol at which the method fails to return a canonicalization for some inputs. LexiCan ranks labels rarest first. PCA has no tolerance (one setting, repeated in every row). Best results are in bold.

Additional Results on Robustness

Here, we compare LexiCan with ASUN and PCA on how much the canonical representations move upon random small perturbations. We take 500 random perturbation directions and report the fraction of representations that move more than 0.1 of the cloud’s RMS radius. We take multiple point cloud geometries, some more robust than the others in terms of immunity to big jumps upon random perturbations. We sort the geometries according to their jump percentage and report the fraction of representations that flip significantly for each of PCA, ASUN, and LexiCan in Figure 2.

At the tested perturbation magnitude, LexiCan exhibits no threshold-exceeding jumps across the 82 pilot geometries. PCA and ASUN exhibit positive observed jump frequencies on several geometries, with substantial variation across inputs. These results support lower observed perturbation sensitivity for LexiCan under this protocol.

Machine dependence of PCA. The PCA values in Tables 4 and 5 were computed on an Intel Xeon Gold 6336Y CPU with NumPy 2.5.3 (OpenBLAS 0.3.34). They may differ on other machines, since PCA’s eigenbasis at repeated eigenvalues is set by floating-point rounding, which depends on the processor’s linear-algebra kernels (for example, 5,680 instead of 5,301 discontinuities on the CH4_4 stretch on an Intel Xeon 6710E). The conclusions drawn from these tables are unchanged.

Perturbation Across Symmetric Polyhedra

In Table 14, we consider the effect of adding isotropic Gaussian noise at σ\sigma from 10−210^{-2} to 10−710^{-7} to a set of polyhedra described in Section D.7.

Flip rateMedian α\alphap95 α\alphaNot invariant
PCA0.7621.4×1031.4 \times10^{3}7.5×1067.5 \times10^{6}18/18
ASUN @ 10−210^{-2}0.3562.141.7×1061.7 \times10^{6}6/17
LexiCan @ 10−310^{-3}0.1961.255160/18
LexiCan @ 10−510^{-5}0.4041.665.4×1045.4 \times10^{4}0/18

Table 14. Algorithms applied to the 18 labeled point clouds spanning polyhedra, molecules, and adversarial cases (see Figure 3). Flip rate is the fraction of perturbations whose canonical form varied 10×10\times further than the input moved, α\alpha is the output movement divided by the input movement (1 means no amplification), and not invariant counts the clouds whose random rotations give different canonical forms, out of those the algorithm canonicalizes. Best results are in bold.

Figure 3. The 18 labeled point clouds used in the perturbation study. The set represents a mix of four molecules, symmetric polyhedra, unstructured clouds and three adversarial cases. Color indicates species, while edges are drawn only to make the shape legible and carry no information beyond the points themselves. Each cloud is scaled independently, so relative size across panels is not meaningful.

We quantify our results by considering the ‘flip rate’ and the failure to be invariant (the canonicalization is not unique, measured by considering the distance between canonicalized inputs at some tolerance).

Our algorithm shows 0 clouds with invariance errors (the ‘Not invariant’ column in the table below) against 18/18 and 6/17 for baselines, and the p95 amplification rate of the worse version of LexiCan is 30 times smaller than the best baseline. ASUN raises an error on one of the clouds (see Appendix § 12.4), which is why ASUN is compared against one less example. ASUN is unable to return a frame for certain configurations, as it requires three non-perpendicular directions. In this setup, it fails against a regular octahedron with its two axial vertices labeled differently from its four equatorial ones.

Symmetric Polyhedra Data for Perturbation Experiments

We handcraft a set of point clouds for the perturbation experiments. We aim for a computationally manageable sample that would carry a set of challenging configurations, which nonetheless could be representative across domains. It is comprised of:

  • Molecules. A set of four molecules: NH3_3, CH4_4, H2_2O2_2, and C6_6H6_6.

  • Symmetric solids. Nine polyhedra with structured labels: a tetrahedron and an icosahedron (one marked vertex each); a cube split into two inscribed tetrahedra; a cube with only one species; an octahedron divided into axial and equatorial sites; a hexagonal frustum and antiprism, each split into two rings; a hexagonal bipyramid with marked apices; and a cube-octahedron compound.

  • Unstructured clouds. Two completely asymmetric configurations: nine isotropic Gaussian points (two species) and twelve random spherical directions (three species).

  • Adversarial cases. Three configurations designed to defeat specific tie-breaking rules. In a cuboctahedron and a cube-octahedron compound, species are assigned by vertex index to break structural symmetry. The third case is a spherical shell with one point with a different label at one-tenth the outer radius. All three of these were meant to test the limits of LexiCan; the first two have full symmetries that cannot be easily broken by distance, angle or label, while the spherical shell forces a complete tie at the second step of the algorithm (after setting the zz axis).

Tolerance Threshold Dependence of LexiCan in End-to-end Learning

In the main experimental section, we have compared LexiCan with baselines across a broad range of tasks testing speed, invariance, robustness and performance in end-to-end learning tasks. However, we had chosen the tolerance threshold of 10−310^{-3} for those tasks. As seen in Table 12 and Table 13, having a lower threshold ensures invariance (thus, an accurate canonicalization) and runtime efficiency, but might hurt robustness.

However, it is unclear how that would impact end-to-end learning performance. Thus in this section, we demonstrate the performance of LexiCan across two thresholds: the chosen threshold of 10−310^{-3} and a lower threshold of 10−510^{-5}. We show the performance variation of LexiCan across the end-to-end learning tasks in the following Table 15 and Table 16:

RepresentationMAERMSE
Regular0.81±0.070.81 \pm0.071.22±0.091.22 \pm0.09
ASUN0.46±0.040.46 \pm0.040.70±0.040.70 \pm0.04
LexiCan @10−310^{-3}0.40±0.040.40 \pm0.040.60±0.060.60 \pm0.06
LexiCan @10−510^{-5}0.38±0.020.38 \pm0.020.59±0.030.59 \pm0.03

Table 15.

Modelz/SO(3)z/\mathrm{SO}(3)SO(3)/SO(3)\mathrm{SO}(3)/\mathrm{SO}(3)ASUNLexiCan @10−3^{-3}LexiCan @10−5^{-5}
SchNet27.8±0.527.8 \pm0.528.7±0.328.7 \pm0.328.6±0.728.6 \pm0.728.1±0.128.1 \pm0.128.7±1.128.7 \pm1.1
EGNN34.9±0.734.9 \pm0.731.4±4.931.4 \pm4.932.2±0.832.2 \pm0.833.4±0.133.4 \pm0.133.7±4.033.7 \pm4.0
GCN8.2±0.68.2 \pm0.615.2±0.215.2 \pm0.217.1±2.517.1 \pm2.528.6±1.328.6 \pm1.327.9±1.727.9 \pm1.7
GCNII6.9±0.86.9 \pm0.819.1±1.119.1 \pm1.121.9±1.321.9 \pm1.329.1±2.729.1 \pm2.727.8±0.427.8 \pm0.4
SchNet-Pos10.5±1.110.5 \pm1.129.2±2.329.2 \pm2.330.0±0.830.0 \pm0.837.1±3.237.1 \pm3.231.8±0.431.8 \pm0.4
EGNN-Pos10.3±1.410.3 \pm1.431.5±2.331.5 \pm2.331.8±1.531.8 \pm1.537.0±0.537.0 \pm0.537.3±2.637.3 \pm2.6

Table 16. Accuracy of classification (%, mean ±\pm STD over three seeds). Best results are in bold. ModelNet40 (n=512n = 512)

Table 15: QM9 isotropic polarizability prediction (Transformer). Test MAE and RMSE over three seeds (mean ±\pm STD), on randomly rotated, permuted and translated test molecules, as in Table 7. Regular is trained on the stored QM9 poses.

References

  1. [1]Justin Baker, Shih-Hsin Wang, Tommaso De Fernex, and Bao Wang. An Explicit Frame Construction for Normalizing 3D Point Clouds. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 2456–2473. PMLR, 2024. URL https://proceedings.mlr.press/v235/baker24a.html.
  2. [2]Simon Batzner, Albert Musaelian, Lixin Sun, Mario Geiger, Jonathan P. Mailoa, Mordechai Kornbluth, Nicola Molinari, Tess E. Smidt, and Boris Kozinsky. E(3)-Equivariant Graph Neural Networks for Data-Efficient and Accurate Interatomic Potentials. Nature Communications, 13(1):2453, 2022. doi: 10.1038/s41467-022-29939-5. URL https://doi.org/10.1038/s41467-022-29939-5.
  3. [3]Ben Bellekens, Vincent Spruyt, Rafael Berkvens, and Maarten Weyn. A Survey of Rigid 3D Point-cloud Registration Algorithms. In AMBIENT 2014: The Fourth International Conference on Ambient Computing, Applications, Services and Technologies, pages 8–13, 2014.
  4. [4]Kellogg S Booth. Lexicographically least circular substrings. Information Processing Letters, 10(4-5): 240–242, 1980.DOI
  5. [5]Mohamed Chaouch and Anne Verroust-Blondet. A Novel Method for Alignment of 3D Models. In 2008 IEEE International Conference on Shape Modeling and Applications, pages 187–195. IEEE, 2008.DOI
  6. [6]Ming Chen, Zhewei Wei, Zengfeng Huang, Bolin Ding, and Yaliang Li. Simple and deep graph convolutional networks. In Hal Daumé III and Aarti Singh, editors, Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 1725–1735. PMLR, 13–18 Jul 2020. URL https://proceedings.mlr.press/v119/chen20v.html.arxiv.org/abs/2007.02133
  7. [7]Taco Cohen and Max Welling. Steerable CNNs. In International Conference on Learning Representations, 2017. URL https://openreview.net/forum?id=rJQKYt5ll.arxiv.org/abs/1612.08498
  8. [8]Alexandre Agm Duval, Victor Schmidt, Alex Hernández-García, Santiago Miret, Frangiskos D. Malliaros, Yoshua Bengio, and David Rolnick. FAENet: Frame Averaging Equivariant GNN for Materials Modeling. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 9013–9033. PMLR, 2023. URL https://proceedings.mlr.press/v202/duval23a.html.arxiv.org/abs/2305.05577

AI tools statement

This work lists 1 AI tool.

  • generative AI tools · AI tool

    Roles
    Data curationFormal AnalysisInvestigationMethodologySoftwareVisualizationWriting — original draftWriting — review & editing
    Verification
    self-declared at submission

Recorded on the work at submission, not per version. Names and roles are shown as submitted; roles use the CRediT taxonomy.

How AI tools are recorded

Paper details

Cite this paper

Publication

Published
Version
Latest

Data & code

No code, data or supplementary files were declared for this version.

Pick where to look, or just type