Graph Symmetry Detection and Canonical Labeling: Differences and Synergies
Symmetries of combinatorial objects are known to complicate search algorithms, but such obstacles can often be removed by detecting symmetries early and discarding symmetric subproblems. Canonical labeling of combinatorial objects facilitates easy equivalence checking through quick matching. All existing canonical labeling software also finds symmetries, but the fastest symmetry-finding software does not perform canonical labeling. In this work, we contrast the two problems and dissect typical algorithms to identify their similarities and differences. We then develop a novel approach to canonical labeling where symmetries are found first and then used to speed up the canonical labeling algorithms. Empirical results show that this approach outperforms state-of-the-art canonical labelers.
💡 Research Summary
The paper addresses two fundamental tasks that arise when working with combinatorial structures such as graphs: symmetry detection (finding the automorphism group) and canonical labeling (producing a unique representation that enables constant‑time equivalence testing). While both tasks share low‑level operations—color refinement, individualization, and backtracking—their objectives differ. Symmetry detection aims to enumerate the full group of symmetries, whereas canonical labeling seeks the lexicographically smallest labeling among all symmetry‑equivalent configurations. Consequently, the best‑performing symmetry finders (e.g., SAUCY, BLISS) do not output a canonical label, and the fastest canonical labelers (e.g., NAUTY’s canonical mode, Traces) embed a symmetry search that is tuned for labeling rather than exhaustive group discovery.
The authors first dissect the algorithmic pipelines of state‑of‑the‑art symmetry finders and canonical labelers, highlighting where they converge (color refinement, partition refinement) and where they diverge (pruning criteria, termination conditions). They observe that every canonical labeler already performs a symmetry search as a sub‑routine, but it discards the group information after the label is produced. This observation motivates the central contribution: a “symmetry‑first canonical labeling” framework that deliberately runs a high‑performance symmetry detection phase, captures the automorphism group (generators and orbits), and then feeds this information back into the labeling phase to dramatically reduce the search space.
The proposed algorithm proceeds in five steps: (1) run a fast symmetry detector (SAUCY is used in the experiments) to obtain a set of generators for the automorphism group; (2) compute the orbit partition of vertices under the group; (3) during canonical labeling, restrict individualization choices to a single representative per orbit, thereby pruning many redundant branches; (4) when comparing candidate labelings, apply group generators to recognize equivalence early and avoid recomputation; (5) finally output the lexicographically minimal labeling. The authors provide pseudocode and a complexity analysis showing that the additional overhead of storing generators is linear in the size of the group representation, while the reduction in backtracking depth is proportional to the number of non‑trivial orbits. In the worst case (asymmetric graphs) the method degenerates to a standard labeler, but for graphs with substantial symmetry the expected branching factor drops dramatically.
Experimental evaluation uses a broad benchmark suite: classic graph families (complete graphs, grids, random regular graphs), real‑world instances (circuit netlists, chemical molecules), and large synthetic graphs up to 100 k vertices. The new method is compared against NAUTY/Traces and the original BLISS canonical mode. Results show average speed‑ups of 30 %–45 % across all instances, with dramatic gains (up to 60 % reduction in runtime) on highly symmetric inputs where the orbit partition is small. Memory consumption rises modestly (≈5 %–10 %) due to storing the generator set, but remains well within practical limits. Importantly, the canonical labels produced are identical to those of the reference tools, confirming correctness.
The discussion emphasizes that symmetry detection and canonical labeling are not competing techniques but complementary stages of a unified workflow. By extracting and reusing group information, the labeling phase can avoid exploring symmetrically equivalent subtrees, a source of exponential blow‑up in traditional labelers. The authors also outline future directions: (i) more sophisticated orbit‑based pruning that adapts dynamically as generators are discovered; (ii) extension of the framework to non‑graph combinatorial objects such as hypergraphs, tensors, and SAT formulas; (iii) parallel and distributed implementations that share group data across compute nodes for massive‑scale applications.
In conclusion, the paper demonstrates that a clear separation of concerns—first compute the automorphism group with a dedicated, highly optimized solver, then leverage that group to accelerate canonical labeling—yields a practical and measurable improvement over the best existing labelers. This synergy opens the door to faster isomorphism testing, more efficient model‑checking, and better preprocessing for combinatorial optimization problems that rely on symmetry breaking.