Computational Complexity of the Weisfeiler-Leman Dimension

Authors Moritz Lichter , Simon Raßmann , Pascal Schweitzer



PDF
Thumbnail PDF

File

LIPIcs.CSL.2025.13.pdf
  • Filesize: 0.89 MB
  • 22 pages

Document Identifiers

Author Details

Moritz Lichter
  • RWTH Aachen University, Germany
Simon Raßmann
  • TU Darmstadt, Germany
Pascal Schweitzer
  • TU Darmstadt, Germany

Cite As Get BibTex

Moritz Lichter, Simon Raßmann, and Pascal Schweitzer. Computational Complexity of the Weisfeiler-Leman Dimension. In 33rd EACSL Annual Conference on Computer Science Logic (CSL 2025). Leibniz International Proceedings in Informatics (LIPIcs), Volume 326, pp. 13:1-13:22, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2025) https://doi.org/10.4230/LIPIcs.CSL.2025.13

Abstract

The Weisfeiler-Leman dimension of a graph G is the least number k such that the k-dimensional Weisfeiler-Leman algorithm distinguishes G from every other non-isomorphic graph, or equivalently, the least k such that G is definable in (k+1)-variable first-order logic with counting. The dimension is a standard measure of the descriptive or structural complexity of a graph and recently finds various applications in particular in the context of machine learning. This paper studies the complexity of computing the Weisfeiler-Leman dimension. We observe that deciding whether the Weisfeiler-Leman dimension of G is at most k is NP-hard, even if G is restricted to have 4-bounded color classes. For each fixed k ≥ 2, we give a polynomial-time algorithm that decides whether the Weisfeiler-Leman dimension of a given graph with 5-bounded color classes is at most k. Moreover, we show that for these bounds on the color classes, this is optimal because the problem is PTIME-hard under logspace-uniform AC_0-reductions. Furthermore, for each larger bound c on the color classes and each fixed k ≥ 2, we provide a polynomial-time decision algorithm for the abelian case, that is, for structures of which each color class has an abelian automorphism group.
While the graph classes we consider may seem quite restrictive, graphs with 4-bounded abelian colors include CFI-graphs and multipedes, which form the basis of almost all known hard instances and lower bounds related to the Weisfeiler-Leman algorithm.

Subject Classification

ACM Subject Classification
  • Mathematics of computing → Graph algorithms
  • Theory of computation → Problems, reductions and completeness
  • Theory of computation → Complexity theory and logic
Keywords
  • Weisfeiler-Leman algorithm
  • dimension
  • complexity
  • coherent configurations

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Markus Anders and Pascal Schweitzer. Parallel computation of combinatorial symmetries. In 29th Annual European Symposium on Algorithms, ESA 2021, September 6-8, 2021, Lisbon, Portugal (Virtual Conference), volume 204 of LIPIcs, pages 6:1-6:18. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021. URL: https://doi.org/10.4230/LIPICS.ESA.2021.6.
  2. Vikraman Arvind, Johannes Köbler, Gaurav Rattan, and Oleg Verbitsky. Graph isomorphism, color refinement, and compactness. Comput. Complex., 26(3):627-685, 2017. URL: https://doi.org/10.1007/S00037-016-0147-6.
  3. Albert Atserias and Elitza N. Maneva. Sherali-Adams relaxations and indistinguishability in counting logics. SIAM J. Comput., 42(1):112-137, 2013. URL: https://doi.org/10.1137/120867834.
  4. László Babai. Graph isomorphism in quasipolynomial time [extended abstract]. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2016, Cambridge, MA, USA, June 18-21, 2016, pages 684-697. ACM, 2016. URL: https://doi.org/10.1145/2897518.2897542.
  5. László Babai and Ludek Kucera. Canonical labelling of graphs in linear average time. In 20th Annual Symposium on Foundations of Computer Science, San Juan, Puerto Rico, 29-31 October 1979, pages 39-46. IEEE Computer Society, 1979. URL: https://doi.org/10.1109/SFCS.1979.8.
  6. László Babai. Monte-Carlo algorithms in graph isomorphism testing. Technical Report 79-10, Université de Montréal, 1979. Google Scholar
  7. Hans L. Bodlaender. A linear-time algorithm for finding tree-decompositions of small treewidth. SIAM J. Comput., 25(6):1305-1317, 1996. URL: https://doi.org/10.1137/S0097539793251219.
  8. Hans L. Bodlaender. A partial k-arboretum of graphs with bounded treewidth. Theor. Comput. Sci., 209(1-2):1-45, 1998. URL: https://doi.org/10.1016/S0304-3975(97)00228-4.
  9. Hans L. Bodlaender, Édouard Bonnet, Lars Jaffke, Dušan Knop, Paloma T. Lima, Martin Milanič, Sebastian Ordyniak, Sukanya Pandey, and Ondřej Suchý. Treewidth is NP-complete on cubic graphs. In 18th International Symposium on Parameterized and Exact Computation, IPEC 2023, September 6-8, 2023, Amsterdam, The Netherlands, volume 285 of LIPIcs, pages 7:1-7:13. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2023. URL: https://doi.org/10.4230/LIPICS.IPEC.2023.7.
  10. Béla Bollobás. Distinguishing vertices of random graphs. North-holland Mathematics Studies, 62:33-49, 1982. URL: https://doi.org/10.1016/S0304-0208(08)73545-X.
  11. Jin-yi Cai, Martin Fürer, and Neil Immerman. An optimal lower bound on the number of variables for graph identification. Comb., 12(4):389-410, 1992. URL: https://doi.org/10.1007/BF01305232.
  12. G. Chen and I. Ponomarenko. Lectures on Coherent Configurations. Central China Normal University Press, 2019. A draft is available at URL: https://www.pdmi.ras.ru/~inp/.
  13. Anuj Dawar and David Richerby. The power of counting logics on restricted classes of finite structures. In Computer Science Logic, 21st International Workshop, CSL 2007, 16th Annual Conference of the EACSL, Lausanne, Switzerland, September 11-15, 2007, Proceedings, volume 4646 of Lecture Notes in Computer Science, pages 84-98. Springer, 2007. URL: https://doi.org/10.1007/978-3-540-74915-8_10.
  14. Zdenek Dvorák. On recognizing graphs by numbers of homomorphisms. J. Graph Theory, 64(4):330-342, 2010. URL: https://doi.org/10.1002/JGT.20461.
  15. Frank Fuhlbrück, Johannes Köbler, and Oleg Verbitsky. Identifiability of graphs with small color classes by the Weisfeiler-Leman algorithm. SIAM J. Discret. Math., 35(3):1792-1853, 2021. URL: https://doi.org/10.1137/20M1327550.
  16. Merrick Furst, John Hopcroft, and Eugene M. Luks. A subexponential algorithm for trivalent graph isomorphism. Technical report, Cornell University, USA, 1980. Google Scholar
  17. Leslie M. Goldschlager. The monotone and planar circuit value problems are log space complete for P. SIGACT News, 9(2):25-29, 1977. URL: https://doi.org/10.1145/1008354.1008356.
  18. Erich Grädel and Wied Pakusa. Rank logic is dead, long live rank logic! J. Symb. Log., 84(1):54-87, 2019. URL: https://doi.org/10.1017/jsl.2018.33.
  19. Martin Grohe. Equivalence in finite-variable logics is complete for polynomial time. Comb., 19(4):507-532, 1999. URL: https://doi.org/10.1007/S004939970004.
  20. Martin Grohe. Fixed-point definability and polynomial time on graphs with excluded minors. J. ACM, 59(5):27:1-27:64, 2012. URL: https://doi.org/10.1145/2371656.2371662.
  21. Martin Grohe. Descriptive Complexity, Canonisation, and Definable Graph Structure Theory, volume 47 of Lecture Notes in Logic. Cambridge University Press, 2017. URL: https://doi.org/10.1017/9781139028868.
  22. Martin Grohe, Moritz Lichter, Daniel Neuen, and Pascal Schweitzer. Compressing CFI graphs and lower bounds for the Weisfeiler-Leman refinements. In 64th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2023, Santa Cruz, CA, USA, November 6-9, 2023, pages 798-809. IEEE, 2023. URL: https://doi.org/10.1109/FOCS57990.2023.00052.
  23. Martin Grohe and Julian Mariño. Definability and descriptive complexity on databases of bounded tree-width. In Database Theory - ICDT '99, 7th International Conference, Jerusalem, Israel, January 10-12, 1999, Proceedings, volume 1540 of Lecture Notes in Computer Science, pages 70-82. Springer, 1999. URL: https://doi.org/10.1007/3-540-49257-7_6.
  24. Martin Grohe and Daniel Neuen. Canonisation and definability for graphs of bounded rank width. ACM Trans. Comput. Log., 24(1):6:1-6:31, 2023. URL: https://doi.org/10.1145/3568025.
  25. Martin Grohe and Martin Otto. Pebble games and linear equations. J. Symb. Log., 80(3):797-844, 2015. URL: https://doi.org/10.1017/JSL.2015.28.
  26. Lauri Hella. Logical hierarchies in PTIME. Inf. Comput., 129(1):1-19, 1996. URL: https://doi.org/10.1006/INCO.1996.0070.
  27. Neil Immerman and Eric S. Lander. Describing Graphs: A First-Order Approach to Graph Canonization, pages 59-81. Springer New York, New York, NY, 1990. URL: https://doi.org/10.1007/978-1-4612-4478-3_5.
  28. Tommi A. Junttila and Petteri Kaski. Engineering an efficient canonical labeling tool for large and sparse graphs. In Proceedings of the Nine Workshop on Algorithm Engineering and Experiments, ALENEX 2007, New Orleans, Louisiana, USA, January 6, 2007. SIAM, 2007. URL: https://doi.org/10.1137/1.9781611972870.13.
  29. Tommi A. Junttila and Petteri Kaski. Conflict propagation and component recursion for canonical labeling. In Theory and Practice of Algorithms in (Computer) Systems - First International ICST Conference, TAPAS 2011, Rome, Italy, April 18-20, 2011. Proceedings, volume 6595 of Lecture Notes in Computer Science, pages 151-162. Springer, 2011. URL: https://doi.org/10.1007/978-3-642-19754-3_16.
  30. Sandra Kiefer, Ilia Ponomarenko, and Pascal Schweitzer. The Weisfeiler-Leman dimension of planar graphs is at most 3. J. ACM, 66(6):44:1-44:31, 2019. URL: https://doi.org/10.1145/3333003.
  31. Sandra Kiefer, Pascal Schweitzer, and Erkal Selman. Graphs identified by logics with counting. ACM Trans. Comput. Log., 23(1):1:1-1:31, 2022. URL: https://doi.org/10.1145/3417515.
  32. Ludek Kucera. Canonical labeling of regular graphs in linear average time. In 28th Annuqal Symposium on Foundations of Computer Science, Los Angeles, California, USA, 27-29 October 1987, pages 271-279. IEEE Computer Society, 1987. URL: https://doi.org/10.1109/SFCS.1987.11.
  33. Moritz Lichter. Separating rank logic from polynomial time. J. ACM, 70(2), March 2023. URL: https://doi.org/10.1145/3572918.
  34. Moritz Lichter. Witnessed symmetric choice and interpretations in fixed-point logic with counting. In 50th International Colloquium on Automata, Languages, and Programming (ICALP 2023), volume 261 of LIPIcs, pages 133:1-133:20. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2023. URL: https://doi.org/10.4230/LIPIcs.ICALP.2023.133.
  35. Moritz Lichter, Simon Raßmann, and Pascal Schweitzer. Computational complexity of the Weisfeiler-Leman dimension. CoRR, abs/2402.11531, 2024. URL: https://doi.org/10.48550/arXiv.2402.11531.
  36. Brendan D. McKay and Adolfo Piperno. Practical graph isomorphism, II. J. Symb. Comput., 60:94-112, 2014. URL: https://doi.org/10.1016/J.JSC.2013.09.003.
  37. Christopher Morris, Martin Ritzert, Matthias Fey, William L. Hamilton, Jan Eric Lenssen, Gaurav Rattan, and Martin Grohe. Weisfeiler and Leman go neural: Higher-order graph neural networks. In The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, The Thirty-First Innovative Applications of Artificial Intelligence Conference, IAAI 2019, The Ninth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2019, Honolulu, Hawaii, USA, January 27 - February 1, 2019, pages 4602-4609. AAAI Press, 2019. URL: https://doi.org/10.1609/AAAI.V33I01.33014602.
  38. Daniel Neuen and Pascal Schweitzer. Benchmark graphs for practical graph isomorphism. In 25th Annual European Symposium on Algorithms, ESA 2017, September 4-6, 2017, Vienna, Austria, volume 87 of LIPIcs, pages 60:1-60:14. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2017. URL: https://doi.org/10.4230/LIPICS.ESA.2017.60.
  39. Daniel Neuen and Pascal Schweitzer. An exponential lower bound for individualization-refinement algorithms for graph isomorphism. In Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2018, Los Angeles, CA, USA, June 25-29, 2018, pages 138-150. ACM, 2018. URL: https://doi.org/10.1145/3188745.3188900.
  40. Thomas Schneider and Pascal Schweitzer. An upper bound on the Weisfeiler-Leman dimension, 2024. https://arxiv.org/abs/2403.12581, URL: https://doi.org/10.48550/arXiv.2403.12581.
  41. Kyoungah See and Sung Y. Song. Association schemes of small order. Journal of Statistical Planning and Inference, 73(1):225-271, 1998. URL: https://doi.org/10.1016/S0378-3758(98)00064-0.
  42. Tim Seppelt. An Algorithmic Meta Theorem for Homomorphism Indistinguishability. In 49th International Symposium on Mathematical Foundations of Computer Science (MFCS 2024), volume 306 of Leibniz International Proceedings in Informatics (LIPIcs), pages 82:1-82:19, Dagstuhl, Germany, 2024. Schloss Dagstuhl - Leibniz-Zentrum für Informatik. URL: https://doi.org/10.4230/LIPIcs.MFCS.2024.82.
  43. B. Weisfeiler and A. Leman. The reduction of a graph to canonical form and the algebra which appears therein. Nauchno-Technicheskaya Informatsia, Seriya 2, 9:12-16, 1968. An english translation due to Grigory Ryabov is available at URL: https://www.iti.zcu.cz/wl2018/pdf/wl_paper_translation.pdf.
  44. Faried Abu Zaid, Erich Grädel, Martin Grohe, and Wied Pakusa. Choiceless polynomial time on structures with small abelian colour classes. In Mathematical Foundations of Computer Science 2014 - 39th International Symposium, MFCS 2014, Budapest, Hungary, August 25-29, 2014. Proceedings, Part I, volume 8634 of Lecture Notes in Computer Science, pages 50-62. Springer, 2014. URL: https://doi.org/10.1007/978-3-662-44522-8_5.
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail