Diversity Curves for Graph Representation Learning

Katharina Limbeck, Nadja Häusermann, Martin Carrasco, Guy Wolf, Bastian Rieck

TL;DR

Diversity curves are a novel, size-aware graph representation that tracks a graph's structural diversity across a hierarchy of coarsening scales. By combining edge contraction pooling with the mathematical concept of metric "spread," this approach provides highly interpretable, unsupervised graph embeddings that excel at geometric and structural tasks regardless of graph size.

What Problem Does This Paper Address?

Comparing graphs of different sizes (or cardinalities) remains a fundamental challenge in graph representation learning. Even when two graphs are sampled from the exact same underlying distribution or share the same geometry, differences in node count can heavily bias standard graph neural networks (GNNs), graph kernels, and spectral embeddings.

In unsupervised settings—such as clustering simulated graph models, analyzing single-cell networks, or categorizing molecular structures—we need graph-level descriptors that are robust to size variations, computationally efficient, and highly interpretable. The authors address this gap by introducing a multi-scale framework that explicitly tracks how a graph's intrinsic geometry evolves as it is systematically shrunk.

Methods

The core proposal of the paper is the Diversity Curve. The framework constructs this representation through two main pillars:

  1. Graph Coarsening as a Multiscale Process: The graph is iteratively downsampled using edge contraction pooling. Edges are selected either randomly or via structural importance scores, and their incident nodes are merged. This provides direct, interpretable control over the graph's size at each step of the hierarchy.
  2. Structural Diversity via "Spread": At each coarsening scale, the authors compute the spread of the graph (Equation 1). Spread is an isometry-invariant metric that calculates the "effective number of distinct nodes or communities" in a metric space (typically using shortest-path distances).

By plotting this structural diversity against the number of nodes in the coarsened graph, they generate a vector representation—a diversity curve—for each graph.

Figure 1: Diversity curves for three example graphs. Our framework first coarsens the initial graphs via iterative edge contractions and tracks structural invariants across the coarsening process. Specifically, we compute structural diversity based on a choice of metric on the graph, e.g. shortest- path distances. Diversity curves then represent the structural diversity of a graph as a function of the number of nodes in the coarsened graph. The resulting vector representations compare the coarsened geometry of graphs for unsupervised visualisation, clustering, classification, or explanatory tasks.

Datasets

The authors evaluated their method across a diverse suite of synthetic and real-world datasets:

  • Simulated Random Graphs: Erdős-Rényi (ER), Stochastic Block Model (SBM), Random Partition (RP), and Random Geometric (RG) graphs.
  • Graph Perturbation Benchmarks: COMM20, EGO, LOBSTER, PLANAR, and SBM datasets used to test sensitivity to structural edits.
  • Single-Cell RNA Sequencing Graphs: A curated collection of 169 single-cell datasets (including an 87-graph "Gold" standard subset) annotated as either trajectory-like or cluster-like.
  • Molecular Graphs: The classic ENZYMES and PROTEINS datasets from the TUDataset collection.
  • Geometric Shapes (MANTRA): Triangulations of 2-manifolds (spheres, tori, Klein bottles, and real projective planes).
  • Expressivity Benchmark: The BREC dataset, specifically designed to test a model's ability to distinguish Weisfeiler-Leman (1-WL) indistinguishable graphs.

Key Insights and Ideas

  • Coarsening Boosts Expressivity: One of the paper's most significant theoretical contributions is proving that edge contraction pooling actually improves the expressivity of graph invariants. Tracking the invariant across a coarsening hierarchy allows the model to distinguish graphs that have identical global spread scores or are otherwise indistinguishable by the standard 1-WL isomorphism test.
  • Interpretation by Construction: Because the value of the curve at any given scale represents the "effective number of distinct nodes," the embedding has a clear, intuitive geometric meaning. Graphs with localized structural differences behave similarly under contraction, resulting in similar curves.
  • Robustness Through Randomness: Instead of relying on a single, perfectly optimized coarsening sequence, the authors show that simply averaging diversity curves across multiple random edge contractions yields highly stable and expressive structural descriptors.

Key Results

  • Superior Clustering Quality: On synthetic graph distributions, diversity curves achieved a classification accuracy of 90% and significantly outperformed all baselines (including NetLSD, TopER, and various graph kernels) in clustering quality, as measured by Silhouette scores.
Figure 4: Silhouette scores (↑) for dis- tinguishing different parameter choices.
  • Single-Cell Geometry Classification: Diversity curves successfully distinguished between continuous trajectory-like and distinct cluster-like single-cell graphs, hitting 86% accuracy on the Gold dataset and outperforming specialized, highly complex geometric scoring baselines.
  • Manifold Classification: When applied to the challenging MANTRA dataset using higher-order Hodge heat kernel distances, diversity curves achieved 99% accuracy in distinguishing complex 2-manifolds, beating the best-performing deep learning baseline (Cellular Transformer at 91%).
  • Empirical Expressivity: On the BREC dataset, using diversity curves evaluated over all single-edge contractions boosted the proportion of distinguishable graph pairs from 19% (using global spread alone) to 50.8%.

Limitations and Future Work

While diversity curves excel at unsupervised structural and geometric tasks, the authors note a few limitations:

  • Focus on Pure Structure: The method is designed primarily for structural comparisons and does not natively integrate rich node attributes in a supervised deep learning pipeline. It is not intended to compete with state-of-the-art supervised GNNs on standard node/graph classification tasks.
  • Coarsening Dependency: The theoretical guarantees and empirical performance implicitly rely on the quality and validity of the chosen graph coarsening procedure.

Future Directions: The authors suggest that diversity curves could be integrated directly into supervised graph neural network architectures as an expressive, multi-scale structural encoding layer. There is also potential to generalize the framework by exploring alternative coarsening operations or tracking different graph invariants over the hierarchy.

Summary updated

Abstract

Graph-level representations are crucial tools for characterising structural differences between graphs. However, comparing graphs with different cardinalities, even when sampled from the same underlying distribution, remains challenging. Unsupervised tasks in particular require interpretable, scalable, and reliable size-aware graph representations. Our work addresses these issues by tracking the structural diversity of a graph across coarsening levels. The resulting graph embeddings, which we denote diversity curves, are interpretable by construction, efficient, and directly comparable across coarsening hierarchies. Specifically, we track the spread of graphs, a novel isometry invariant that is inherently well-suited for encoding the metric diversity and geometry of graphs. We utilise edge contraction coarsening and prove that this improves expressivity, thus leading to more powerful graph-level representations than structural descriptors alone. Demonstrating their utility over a range of baseline methods in practice, we use diversity curves to (i) cluster and visualise simulated graphs across varying sizes, (ii) distinguish the geometry of single-cell graphs, (iii) compare the structure of molecular graph datasets, and (iv) characterise geometric shapes.
BibTeX
@inproceedings{limbeck2026diversity,
  author = {Katharina Limbeck and Nadja Häusermann and Martin Carrasco and Guy Wolf and Bastian Rieck},
  title = {{Diversity Curves for Graph Representation Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=CrzgnsQq7F},
}
Figure