English

Smoothed analysis for graph isomorphism

Combinatorics 2025-10-17 v3 Computational Complexity Data Structures and Algorithms

Abstract

There is no known polynomial-time algorithm for graph isomorphism testing, but elementary combinatorial "refinement" algorithms seem to be very efficient in practice. Some philosophical justification is provided by a classical theorem of Babai, Erd\H{o}s and Selkow: an extremely simple polynomial-time combinatorial algorithm (variously known as "na\"ive refinement", "na\"ive vertex classification", "colour refinement" or the "1-dimensional Weisfeiler-Leman algorithm") yields a so-called canonical labelling scheme for "almost all graphs". More precisely, for a typical outcome of a random graph G(n,1/2)G(n,1/2), this simple combinatorial algorithm assigns labels to vertices in a way that easily permits isomorphism-testing against any other graph. We improve the Babai-Erd\H{o}s-Selkow theorem in two directions. First, we consider randomly perturbed graphs, in accordance with the smoothed analysis philosophy of Spielman and Teng: for any graph GG, na\"ive refinement becomes effective after a tiny random perturbation to GG (specifically, the addition and removal of O(nlogn)O(n\log n) random edges). Actually, with a twist on na\"ive refinement, we show that O(n)O(n) random additions and removals suffice. These results significantly improve on previous work of Gaudio-R\'acz-Sridhar, and are in certain senses best-possible. Second, we complete a long line of research on canonical labelling of random graphs: for any pp (possibly depending on nn), we prove that a random graph G(n,p)G(n,p) can typically be canonically labelled in polynomial time. This is most interesting in the extremely sparse regime where pp has order of magnitude c/nc/n; denser regimes were previously handled by Bollob\'as, Czajka-Pandurangan, and Linial-Mosheiff. Our proof also provides a description of the automorphism group of a typical outcome of G(n,pn)G(n,p_n) (slightly correcting a prediction of Linial-Mosheiff).

Keywords

Cite

@article{arxiv.2410.06095,
  title  = {Smoothed analysis for graph isomorphism},
  author = {Michael Anastos and Matthew Kwan and Benjamin Moore},
  journal= {arXiv preprint arXiv:2410.06095},
  year   = {2025}
}
R2 v1 2026-06-28T19:13:06.214Z