Rademacher Meets Colors: More Expressivity, but at What Cost?

Martin Carrasco, Caio Netto, Vahan A. Martirosyan, Aneeqa Mehrab, Ehimare Okoyomon, Caterina GrazianiNPGML @ NeurIPS 2025

TL;DR

This paper provides a theoretical explanation for the trade-off between expressivity and generalization in Graph Neural Networks (GNNs). By connecting GNN expressivity (measured by coloring algorithms like Weisfeiler-Leman) to Rademacher complexity (a measure of generalization error), the authors show that more expressive GNNs inherently have higher complexity and thus weaker generalization guarantees.

What Problem Does This Paper Address?

Graph Neural Networks (GNNs) have shown remarkable success in various graph-based tasks. A key aspect of understanding GNNs is their "expressive power," which refers to their ability to distinguish between different graph structures. This expressivity is often linked to graph isomorphism tests like the Weisfeiler-Leman (WL) algorithm. While it's understood that more expressive GNNs can differentiate more complex graphs, empirical observations suggest they also tend to generalize poorly to unseen data. This paper aims to bridge this gap by providing a theoretical framework that explains why increased expressivity leads to decreased generalization.

Methods

The core of this work lies in connecting GNN expressivity to generalization through the lens of coloring algorithms. Specifically, the authors leverage the Rademacher complexity of a GNN's hypothesis class as a data-dependent measure of its generalization ability.

  1. Coloring as a Proxy for Expressivity: The paper uses coloring algorithms (like the Weisfeiler-Leman test) to partition graphs into equivalence classes. The number of these classes, denoted by p, serves as a measure of the GNN's expressive power. A finer partition (more classes) implies higher expressivity.
  2. Rademacher Complexity Bounds: The authors derive theoretical bounds on the empirical Rademacher complexity of GNNs. Crucially, these bounds are shown to be directly dependent on p, the number of equivalence classes induced by the coloring algorithm.
  3. Stability Analysis: They also prove that these Rademacher complexity bounds are stable under perturbations in the color counts across different samples, ensuring robustness.
  4. Generalization: The framework is designed to be general, applying not only to message-passing GNNs and the 1-WL test but to any GNN architecture and its corresponding coloring-based expressivity measure.

Datasets

Not discussed in the paper. The paper focuses on theoretical analysis and does not present empirical results on specific datasets.

Key Insights and Ideas

  • Expressivity = More Complexity: The most significant insight is the direct link established between the number of equivalence classes induced by a coloring algorithm (p) and the GNN's Rademacher complexity. More equivalence classes (higher expressivity) directly translate to a higher upper bound on Rademacher complexity.
  • The Cost of Expressivity: This higher Rademacher complexity implies a weaker generalization guarantee. In essence, the paper provides a formal explanation for the observed phenomenon: more expressive GNNs are more prone to overfitting.
  • Coloring as a Unifying Framework: The use of coloring algorithms as a general mechanism to characterize expressivity allows the framework to apply broadly across different GNN architectures and their respective expressivity measures.
  • Robustness to Data Variations: The stability analysis shows that the generalization bounds are not overly sensitive to minor variations in the distribution of graph colors within a dataset, which is a practical consideration.

Key Results

  • The paper derives an upper bound on the empirical Rademacher complexity of GNNs that is directly proportional to the square root of the number of equivalence classes (p) induced by a coloring function, scaled by 1/√m (where m is the number of samples).
  • This bound is shown to be tight under the assumption of uniform partitioning (all color classes having the same cardinality), resulting in a complexity of O(√p/m).
  • A stability result demonstrates that the Rademacher complexity is Lipschitz-continuous with respect to color count perturbations, meaning small changes in color distribution lead to small changes in complexity.

Limitations and Future Work

  • Focus on Binary Classification: The current theoretical analysis is primarily focused on graph-level binary classification tasks.
  • Future Work: The authors suggest extending the bounds to multi-class classification, regression tasks, and node-level bounds. They also propose exploring pseudometric-based notions of structural similarity instead of discrete partitioning and empirically validating the Rademacher-based bounds. Further theoretical work could investigate the behavior of true Rademacher complexity under specific graph models like graphons.

Summary updated

BibTeX
@inproceedings{carrasco2025rademacher,
  author = {Martin Carrasco and Caio Netto and Vahan A. Martirosyan and Aneeqa Mehrab and Ehimare Okoyomon and Caterina Graziani},
  title = {{Rademacher Meets Colors: More Expressivity, but at What Cost?}},
  booktitle = {NPGML @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=r7FHKqTsFG},
}
Figure