Manuscript Offprint
arXiv:2611.01200GraCo: A Unified Toolkit of Graph Coarsening Algorithms and Metrics
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Graph coarsening aims to reduce a graph to a smaller one that preserves chosen properties of the original. It is increasingly used to scale graph learning to large graphs, as a non-differentiable step applied once before training. Many coarsening methods have been proposed in recent years, each with its own implementation, notation and evaluation. In this work, we introduce GraCo, a unified toolkit of graph coarsening methods. It relies on a single definition: a coarsening is fixed by a partition of the nodes and by the Laplacian the coarsened graph is consistent with. The coarsened graph, and the reduction and lifting matrices that map signals from the original graph to the coarsened one and back, follow from these two choices. We implement 17 methods from the literature and a random baseline, grouped into five families, with the same notation, inputs and outputs. We also build a collection of metrics from different papers, applicable to any coarsening. We check the implementations on a synthetic stochastic block model, then we report the runtime and peak memory of each method on Cora, PubMed, ogbn-arxiv and ogbn-products. GraCo is open-source and available at https://github.com/Antonin-J/graco.
1 Introduction
Graph neural networks have become a standard tool for learning on graph-structured data, but their cost grows with the size of the graph. On graphs with millions of nodes, full-batch message passing exceeds the memory of a single device, and each epoch is slow. Reducing the graph before learning is a common remedy, and it takes several forms: sampling a subgraph [10, 18, 20], sparsifying edges [3, 30, 33], condensing the graph into a small synthetic one [22, 43], or coarsening it by grouping nodes into supernodes to form a coarsened graph [19, 31]. Graph coarsening reduces a graph of nodes to a smaller graph of supernodes that preserves chosen properties of the original. It is applied once, as a preprocessing step, and is not required to be differentiable, which sets it apart from graph pooling.
Coarsening methods come from several communities: spectral graph theory [31], feature-aware optimization [11, 29], optimal transport [32, 34, 42], and topology preservation [40]. These methods differ in their input and output formats, their metrics and their notation. For instance, the reduction and the lifting matrices often swap names from one paper to the next, and each method is tied to one Laplacian. To our knowledge, there is no common interface through which a coarsening produced by one method can be scored by the metric of another, or reused outside its native setup.
This paper describes a toolkit: a single implementation of the coarsening algorithms, documented here method by method, together with metrics that apply to any coarsening.
Outline. Listing 1 shows the whole workflow, and the paper follows it in order:
-
A coarsening algorithm chooses a partition of the nodes into supernodes. Sec. 2 presents this step and the 17 methods of the toolkit, grouped into five families.
-
The toolkit derives the products of the coarsening from this partition:
-
the adjacency matrix of the coarsened graph (Sec. 2);
-
a lifting matrix, which maps a signal on the supernodes to the original nodes;
-
a reduction matrix, which maps a signal of the original graph to the supernodes.
Sec. 3 explains the choice of the lifting, which amounts to choosing the Laplacian of the original graph that the coarsened graph is consistent with. By default, the reduction is the pseudoinverse of the lifting.
- Metrics evaluate the quality of the coarsening (Sec. 4).
Sec. 5 checks the implementations on a synthetic graph drawn from a stochastic block model (SBM). Training graph neural networks on the coarsened graphs is planned for a later release of GraCo.
Listing 1: Coarsening and scoring a graph with GraCo. Every method is called through the same coarsen_<name> signature and returns only a partition; build_coarsening derives the coarsened graph, the lifting , and the reduction . The same coarsening is then scored under metrics from three different papers.
from graco import get_dataset, coarsen_local_variation, build_coarsening from graco.metrics import rsa, convolution_matching_error, max_acc
data = get_dataset("Cora")
every method has the same signature; change the suffix to change the algorithm partition, info = coarsen_local_variation(data, r=0.5)
the coarsened graph, the lifting and the reduction then follow
co = build_coarsening(data, partition, laplacian_kind="normalized_self_loop") co.coarsened
PyG Data with and
co.Q, co.P
lifting (), reduction () matrices
score the same coarsening under metrics from different papers
rsa(co, data)
spectral, Loukas 2019
convolution_matching_error(co, data)
features, ConvMatch (Dickens 2024)
max_acc(co, data)
label-based upper bound
2 A coarsening is a partition
A coarsening algorithm only chooses a partition of the nodes into supernodes, then the toolkit builds the coarsened graph from this partition. Any algorithm that assigns each node to a single supernode thus induces a coarsening, whether it was designed as graph clustering, community detection, or a proper coarsening. Methods differ only by the criterion they use to choose the partition. Every coarsening function takes the original graph and the coarsening ratio , and its other parameters keep the defaults of its paper.
Setup. A graph on nodes is described by a weighted adjacency matrix . Seven of the 17 methods also use a feature matrix (Table 1). Coarsening reduces to a graph on supernodes, at coarsening ratio . A partition assigns each node to a single supernode. We write it as the matrix , where means that node is mapped to supernode .
Coarsened graph. The adjacency matrix of the coarsened graph is
whose entry sums the weights of all edges between the two groups of original nodes. In the toolkit this is coarsened_adjacency(). By default the diagonal is subtracted (flag delete_diagonal), a convention inherited from Loukas [31] that removes the heavily weighted self-loops which would otherwise perturb an iterative edge-contraction scheme.
One interface for every algorithm. Every method of Sec. 2.1 has the same signature, coarsen_<name>(data, r, **params), and returns a Partition together with an info dictionary of run details (the achieved ratio, timing, method-specific diagnostics). The achieved ratio differs from the requested ratio for several methods. METIS [26] enforces a minimum block size, so it cannot return many small supernodes, i.e. low ratios. It returns 701 supernodes where 1740 were asked on Cora for r = 0.3. The random baseline may leave some supernodes empty. Graclus [12] matches each node with at most one neighbor per level, so its last level can overshoot the requested ratio. The dense-optimization methods can collapse onto fewer supernodes than requested. The Partition is the only algorithm-specific output; it is an assignment of the N nodes to n supernodes. Everything else comes from the toolkit, the same for all methods.
Input graph. The methods assume an undirected graph without self-loops. Several of them fail on a directed graph. The loader therefore symmetrizes each graph, strips self-loops and keeps the largest connected component, through three keyword arguments (symmetrize, remove_self_loops, keep_lcc) that can be turned off. preprocess_graph runs the same three steps on any PyG Data object. App. D gives the requirements of the methods and the effect of the three steps on our datasets.
Saving a coarsening. Saving the partition is enough: the toolkit rebuilds the rest of the coarsening on load (App. F.1).
2.1 The 17 methods
Table 1: The 17 coarsening methods and the random baseline, grouped by family. Criterion is the quantity each method optimizes or preserves. Impl. is the fastest supported backend. Feat. says whether the method uses the node features X of the original graph. Scale is the largest tier the method reaches within budget.
| Method | Year | Criterion | Feat. | Impl. | Scale |
|---|---|---|---|---|---|
| Global clustering | |||||
| Random | - | none | × | GPU | very large |
| METIS [26] | 1997 | balanced edge cut | × | CPU | very large |
| Graclus [12] | 2007 | normalized cut | × | GPU | very large |
| Leiden [35] | 2019 | modularity | × | CPU | very large |
| UGC [27] | 2024 | feature-structure similarity | ✓ | GPU | very large |
| GW-KGPC [34] | 2026 | Gromov-Wasserstein (GW) distortion | × | GPU | medium |
| Representative selection | |||||
| Kcenter [16] | 1985 | k-center covering | ✓ | GPU | very large |
| Herding [37] | 2009 | empirical-mean matching | ✓ | GPU | very large |
| OTCoarsening [32] | 2021 | learned Wasserstein feature loss | ✓ | GPU | small |
| Greedy contraction | |||||
| Local Variation [31] | 2019 | restricted spectral approximation (RSA) | × | CPU | very large |
| ConvMatch [13] | 2024 | convolution output | ✓ | GPU | very large |
| NOPE [4] | 2026 | neighborhood interference | ✓ | CPU | very largea |
| GW-GPC [34] | 2026 | GW distortion | × | GPU | small |
| STPGC [40] | 2026 | topology preservation | × | CPU | very large |
| Recursive splitting | |||||
| SGWL [42] | 2019 | GW distance to a block target | × | GPU | large |
| GBGC [36, 41] | 2025 | granular-ball quality | × | CPU | medium/very large |
| Dense optimization | |||||
| FGC [29] | 2023 | feature reconstruction + smoothness | ✓ | GPU | mediumb |
| IPE [11] | 2025 | spectral inner-product (Grassmann) | ×c | GPU | small |
a NOPE reaches ogbn-products only through its NOPE* variant, in 15.5 h, beyond the twelve-hour budget.
b FGC reaches the large tier only at a high coarsening ratio, where n is small enough for the dense assignment matrix to fit. It coarsens ogbn-arxiv at r = 0.99 in 454 s (Table 2) and runs out of memory on ogbn-products.
c IPE uses X only in its INGC variant. The default, SINGC, minimizes a Grassmann term, a group-sparsity term and a log-determinant.
We group the 17 methods of the toolkit and its random baseline into five families by how they assign the nodes to supernodes. For each method we give its principle, its source, and its key hyperparameter. By key hyperparameter we mean the parameter we would change first to adapt a method to a new graph: the one its paper names as its main hyperparameter, or the one that moved the result most in our runs. App. E.2 studies the hyperparameters of four methods in more depth, on the SBM. The default configuration of each method follows its paper, or its released code where the two differ. App. A gives the detail and the complexity of each method, and App. C lists these differences, together with our extensions. Table 1 also gives the criterion of each method, i.e. the quantity it optimizes or preserves. The same criterion can appear in several families. A Gromov-Wasserstein (GW) cost, for example, drives methods of three of them.
Global clustering. These methods assign all nodes in one pass, by a cut, a modularity, a hash, a k-means, or at random. METIS also merges nodes level by level, but it scores the final partition, while greedy contraction scores each merge.
-
Random, the baseline.
- Puts each node in a supernode drawn uniformly at random.
- Key hyperparameter: none. The variant force_equal_size gives all supernodes the same size, up to one node.
-
METIS [26].
- Cuts the graph into parts of balanced size, with as few edges between parts as possible.
- George Karypis and Vipin Kumar, METIS manual, University of Minnesota, 1997.
- Key hyperparameter: none.
-
Graclus [12].
- Minimizes the normalized cut by matching each node with a neighbor, level after level.
- Inderjit S. Dhillon, Yuqiang Guan and Brian Kulis, IEEE TPAMI, 2007.
- Key hyperparameter: none.
-
Leiden [35].
- Finds communities, i.e. groups of nodes with many edges inside and few to the rest, each of them connected.
- Vincent A. Traag, Ludo Waltman and Nees Jan van Eck, Scientific Reports, 2019.
- Key hyperparameter: resolution. A higher resolution gives more and smaller communities, and the toolkit searches it by default to reach the requested number of supernodes.
-
UGC [27].
- Hashes each node from its features and its row of the adjacency matrix. The nodes that fall in the same bin form a supernode.
- Mohit Kataria, Sandeep Kumar and Jayadeva, NeurIPS, 2024.
- Key hyperparameter: alpha, the weight of the adjacency against the features in the hash. Raise it to give more weight to the structure. Its default is computed from the labels.
-
GW-KGPC [34].
- Groups the nodes by a k-means on how much merging each pair of nodes would distort the graph, measured by a GW cost.
- Carlos A. Taveras, Santiago Segarra and César A. Uribe, ICASSP, 2026.
- Key hyperparameter: S_kind, the matrix whose distortion is measured, the adjacency by default.
Representative selection. These methods select n representative nodes and attach every other node to one of them.
-
Kcenter [16].
- Smooths the features over the graph, then selects greedily the node with the smoothed features farthest from those of the nodes already selected. Every other node joins the closest selected node.
- Teofilo F. Gonzalez, Theoretical Computer Science, 1985.
- Key hyperparameter: sgc_hops, the number of graph convolutions that smooth the features. Raising it smooths the features further over the graph, and 0 uses the raw features, without using the graph structure.
-
Herding [37].
- Smooths the features as Kcenter, then selects greedily the node that brings the mean smoothed features of the selected nodes closest to the mean over all nodes. The other nodes join as in Kcenter.
- Max Welling, ICML, 2009.
- Key hyperparameter: sgc_hops, as for Kcenter.
• OTCoarsening [32].
- A small graph neural network learns a score per node, and the best-scored nodes become the supernodes. Every other node joins the selected neighbor of highest score.
- Tengfei Ma and Jie Chen, AAAI, 2021.
- Key hyperparameters: n_epochs and 1r, the training of the scores. The defaults, 100 epochs at a learning rate of , are enough on Cora and CiteSeer. A bigger graph might need more epochs.
Greedy contraction. These methods merge nodes level by level. At each level, they score candidate pairs or sets of nodes and merge the best ones, until the target ratio is reached.
• Local variation [31], on edges or on whole neighborhoods.
- Merges the edges, or neighborhoods, whose contraction least changes the first eigenvectors of the Laplacian, i.e. the smoothest signals on the graph.
- Andreas Loukas, JMLR, 2019.
- Key hyperparameter: , the number of eigenvectors to preserve, 100 by default. On a very small graph, 100 eigenvectors cover a large part of the spectrum, noise included, and a smaller may suit it better. One might also change laplacian_type, the Laplacian these eigenvectors come from.
• ConvMatch [13].
- Merges the pairs of nodes that least change the output of one graph convolution when merged. The candidate pairs are nodes with close smoothed features.
- Charles Dickens, Edward Huang, Aishwarya Reganti, Jiong Zhu, Karthik Subbian and Danai Koutra, The Web Conference (Companion), 2024.
- Key hyperparameter: merge_candidates, the pairs the method may merge. By default, as in the paper, these are pairs of nodes with similar features after one graph convolution. knn+edges adds the edges of the graph, so that more merges follow the graph structure.
• NOPE [4].
- Merges the pair that least disturbs the neighbors the two nodes share.
- Xu Bai, Bin Lu, Kun Zhang, Shengbo Chen, Xinbing Wang, Chenghu Zhou and Meng Jin, ICML, 2026.
- Key hyperparameter: variant. NOPE* approximates the score of NOPE in closed form. The authors recommend NOPE at low to moderate ratios, and NOPE* when scalability matters more.
• GW-GPC [34].
- Merges, one pair at a time, the pair that least distorts the graph under the GW cost.
- Carlos A. Taveras, Santiago Segarra and César A. Uribe, ICASSP, 2026.
- Key hyperparameter: S_type, as for GW-KGPC.
• STPGC [40].
- Merges a node into a neighbor whose neighborhood contains its own, which preserves the topology of the graph, and relaxes this rule when no such pair is left.
- Xiang Wu, Rong-Hua Li, Xunkai Li, Kangfei Zhao, Hongchao Qin and Guoren Wang, ICML, 2026.
- Key hyperparameter: ( ratio), 1% of by default, which sets how soon the merge rule is relaxed once no exact merge is left. A larger relaxes it sooner, which may suit graphs where few neighborhoods are nested.
Recursive splitting. These methods first cut the graph into a few large parts, then cut each part again to refine the partition.
• SGWL [42].
-
Splits the graph in two by an optimal transport problem with a GW cost, then splits the largest part again until parts exist.
-
Hongteng Xu, Dixin Luo and Lawrence Carin, NeurIPS, 2019.
-
Key hyperparameter: beta, the weight of the regularization of the transport problem, which has to match the scale of the cost.
- GBGC [36, 41].
- Cuts the graph into about balls grown from the nodes of highest degree, then splits a ball in two whenever the split raises a quality score. It stops when no split helps, so the ratio it reaches depends on the graph.
- Shuyin Xia, Guan Wang, Gaojie Xu, Sen Zhao and Guoyin Wang, IJCAI, 2025. Follow-up work by Guan Wang, Shuyin Xia, Lei Qian, Tao Wu, Guoyin Wang, Yi Wang and Wei Wang, preprint, 2026.
- Key hyperparameter: init. The METIS start of the follow-up work [36] gives fewer initial balls, so the method can reach higher coarsening ratios.
Dense optimization. These methods learn a soft assignment of the nodes to the supernodes, i.e. a dense matrix. They train it by gradient descent on a differentiable loss. They then round it to a partition by a row-wise argmax. A fundamental limitation of the family is the size of this assignment matrix: memory, and time per iteration. It fits on a commodity GPU only at small , or at high ratios where is small. These methods also have many hyperparameters: several loss weights, a learning rate and an iteration count. They were the hardest methods to tune in our runs (App. E.2). Below, we name for each method the hyperparameters that moved its result most.
- FGC [29].
- Learns an assignment that preserves both the structure and the features of the graph.
- Manoj Kumar, Anurag Sharma, Shashwat Saxena and Sandeep Kumar, ICML, 2023.
- Key hyperparameters: , then and . A small graph might need a larger step than the default . Lowering the weight of the feature reconstruction, gives more weight to the structure. Too high a , the weight of a group penalty on the assignment, leaves supernodes empty.
- IPE [11].
- Same principle as FGC, with a spectral objective in place of the reconstruction terms.
- Ido Cohen and Ronen Talmon, NeurIPS, 2025.
- Key hyperparameters: , then . The default step, , comes from the runs of the paper on Cora, and a smaller graph might need a larger one. is the number of leading eigenvectors of the Laplacian the coarsened graph is aligned with. Close to the number of classes, it pulls the partition toward the classes, but it may then return fewer supernodes than requested.
Node-elimination reductions such as Kron's Schur complement [14], which shrink a graph without partitioning it into supernodes, fall outside this partition-based view and are out of scope. Data-driven refinements that re-weight an existing coarsened graph, such as GOREN [7], are also out of scope. Topological spatial coarsening [8] does fit the partition view, but it contracts edges by their length, which requires node positions in that the graphs considered here do not have.
Table 1 and the summaries of App. A give each method a Scalability label, the largest of four tiers it reaches, namely small (a few thousand nodes), medium (tens of thousands), large (hundreds of thousands, the scale of ogbn-arxiv), and very large (millions, the scale of ogbn-products). We call a method scalable at a tier when our implementation coarsens a graph of that size on a single A40 GPU of 48 GB within the budget of the tier, which is one hour up to medium, three hours for large, and twelve hours for very large. We filled the labels from the runs of Table 2.
2.2 Runtime and memory
Table 2 reports the wall-clock time and peak memory of each method over the four tiers, from Cora to ogbn-products. The ratio of each tier is chosen so that the coarsened graph has between 250 and 2500 supernodes on all four graphs. Only the size of the input then changes from one graph to the next. Every row was measured on the same CPU, an AMD EPYC 7413, with an NVIDIA A40 of 48 GB, and torch pinned to 24 threads. Three marks replace a measurement. OOM stands for an allocation the host or the device refused, OOT for an overrun of the per-method budget, one hour on Cora and PubMed, three on ogbn-arxiv and twelve on ogbn-products, and FAIL for a solver that did not converge. Both memory columns report the peak above the floor each method needs before
Table 2: Runtime (s) and peak memory (MB) of each method over the four tiers, at on Cora and PubMed, 0.99 on ogbn-arxiv and 0.999 on ogbn-products. Memory is the peak above the floor described in Sec. 2.2. A dash marks a method that never allocates on the GPU, and a grey cross an entry the run did not reach.
| Method | Cora | PubMed | ogbn-arxiv | ogbn-products | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| time | CPU | GPU | time | CPU | GPU | time | CPU | GPU | time | CPU | GPU | |
| Random | <0.01 | 0 | - | <0.01 | 11 | - | 0.01 | 0 | - | 0.12 | 0 | - |
| METIS | 0.07 | 0 | - | 0.83 | 16 | - | 4.5 | 163 | - | 84.6 | 0 | - |
| Graclus | 0.04 | 3 | - | 0.21 | 23 | - | 1.5 | 152 | - | 49.7 | 0 | - |
| Leiden‡ | 2.9 | 32 | - | 34.7 | 64 | - | 2718 | 355 | - | 33523 | 0 | - |
| UGC | 0.25 | 56 | - | 0.54 | 216 | - | 3.4 | 1496 | - | 35.1 | 4628 | - |
| GW-KGPC | 0.63 | 565 | 392 | 51.2 | 1587 | 23753 | × | OOM | × | × | OOM | × |
| Kcenter | 0.55 | 466 | 66 | 1.8 | 455 | 279 | 3.0 | 310 | 481 | 44.9 | 0 | 11132 |
| Herding | 0.51 | 444 | 66 | 1.7 | 423 | 279 | 2.6 | 282 | 481 | 40.6 | 0 | 11132 |
| OTCoarsening | 11.6 | 579 | 1042 | × | OOM | × | × | OOM | × | × | OOM | × |
| Local Var. | 0.98 | 101 | - | 3.3 | 300 | - | 100.0 | 2492 | - | 3164 | 1979 | - |
| Local Var. nbh. | 10.8 | 230 | - | 10.4 | 302 | - | 288 | 10130 | - | 13772 | 8198 | - |
| ConvMatch | 4.1 | 588 | 295 | 2.9 | 691 | 815 | 19.7 | 1380 | 1452 | 2402 | 0 | 16558 |
| A-ConvMatch | 5.2 | 555 | 215 | 2.4 | 634 | 616 | 18.7 | 1371 | 1443 | 2368 | 0 | 16571 |
| NOPE | 0.80 | 16 | - | 9.8 | 69 | - | 1587 | 479 | - | × | OOT | × |
| NOPE* | 0.21 | 14 | - | 3.1 | 66 | - | 183 | 425 | - | 55936 | 7054 | - |
| GW-GPC | 6.4 | 527 | 416 | × | OOT | × | × | OOM | × | × | OOM | × |
| STPGC | 0.14 | 1 | - | 1.9 | 27 | - | 106 | 265 | - | 16666 | 1329 | - |
| SGWL | 6.3 | 478 | 9 | 61.5 | 486 | 16 | 1124 | 375 | 246 | × | OOT | × |
| GBGC† | <0.01 | 2 | - | 0.07 | 26 | - | 2.3 | 159 | - | 142 | 0 | - |
| GBGC-METIS | 0.07 | 2 | - | 0.59 | 29 | - | 7.3 | 370 | - | 362 | 4561 | - |
| FGC | 6.3 | 433 | 80 | 94.6 | 576 | 1350 | 454 | 2117 | 9013 | × | OOM | × |
| IPE | 9.9 | 462 | 31 | × | FAIL | × | × | OOT | × | × | OOM | × |
† GBGC stops on its own quality criterion and returns 401, 7109, 28254 and 305151 supernodes where the four tiers ask for 249, 1972, 1694 and 2386. Its time therefore covers a different job. On ogbn-products it built a coarsened graph a hundred times larger than every other row of that column. GBGC-METIS starts from the parts METIS returns and splits them until the requested count is reached, which it reaches on all four tiers. ‡ On ogbn-products, the resolution search of Leiden stops before a third run would overrun the twelve-hour budget. It returns the closest partition it met, 599 supernodes for the 2386 asked.
it starts, namely torch and the loaded graph. This floor is 710, 730 and 1006 MB on the first three graphs, and 23.6 GB on ogbn-products. On ogbn-products, a method whose own peak stays below this floor thus has a 0 in that column. A method still has to reach the requested size for its time to mean anything. GBGC stops short of it on all tiers, and Leiden on ogbn-products.
Note however that the top tier is not reached everywhere (Table 2). OTCoarsening, GW-GPC and IPE remain capped at a few thousand nodes, and GW-KGPC at tens of thousands. OTCoarsening and GW-KGPC run out of memory on their dense matrices, GW-GPC runs out of time with its search, and IPE does not converge. FGC passes the medium tier only at very high ratios (Table 1).
3 Choosing the lifting and the reduction matrices
Sec. 2 builds a partition of the nodes into supernodes, and from it the coarsened graph. A coarsening also has to move signals between the two graphs. A signal on the nodes, such as a feature, lives in dimension on the original graph and in dimension on the coarsened one. Moving it from one graph to the other takes two matrices. The reduction matrix coarsens a signal of the original graph into a signal of the coarsened one. The lifting matrix lifts a coarse signal back to the original nodes. For , the coarsened signal and the re-lifted signal are
The same operators act row-wise on the feature matrix, and . Several of the metrics of Sec. 4 are computed with these operators, either on the reconstructed signal or on the coarse operators that produce it. We follow the setting of [24, 25], which builds on the graph coarsening framework of Loukas [31]. In this setting, choosing the lifting amounts to choosing the Laplacian of the original graph that the coarsened graph is consistent with. This section presents this choice, then briefly the choice of the reduction. Neither choice changes the partition or the coarse adjacency .
Binary lifting. The combinatorial Laplacian of is , with the degree matrix. The partition matrix of Sec. 2 has exactly one non-zero coefficient per row, equal to 1, since each node belongs to a single supernode.
Definition 1 (Well-partitioned matrix). A matrix is well-partitioned if it has exactly one non-zero coefficient per row.
In other words, a well-partitioned lifting maps each node of the original graph to a single supernode.
We call lifting of the partition any matrix with the non-zero pattern of , its coefficients may differ from 1. Such a is well-partitioned. A matrix is binary if all its coefficients are 0 or 1, and is the binary lifting. As Loukas [31] shows, up to a scale factor, the binary lifting is the only one for which the product of Eq. (1) also gives the coarse combinatorial Laplacian.
Theorem 1 (Loukas [31]). Let be a lifting. The following two properties are equivalent: (i) is proportional to a binary matrix; (ii) for all , .
Normalized liftings. So far the lifting is binary, and the coarsened graph is consistent with the combinatorial Laplacian as defined by Loukas. For a graph neural network the object worth preserving is not necessarily the combinatorial Laplacian, but it might be associated with the operator a graph convolution propagates with. We therefore adopt the broader family of -Laplacians [23, 24],
where is a strictly positive diagonal matrix. Setting recovers the combinatorial Laplacian, the symmetric normalized one, and the self-loop normalized Laplacian, for which with the propagation matrix of the graph convolutional network of Kipf and Welling [28]. This operator reappears in several metrics of Sec. 4. The toolkit provides these three choices through a laplacian_kind argument (combinatorial, normalized, normalized_self_loop). The -Laplacian family is more general, but these three cover the current release.
Consistency with such a normalized Laplacian requires a degree-aware lifting,
where . This lifting of the partition is no longer binary. Theorem 1 extends to the whole family.
Theorem 2 (Consistency, extension [24]). Let be a lifting, and . The following two properties are equivalent: (i) is proportional to a binary matrix; (ii) for all , .
With , it gives the lifting of Eq. (4). Theorem 1 is its combinatorial case . In the toolkit the lifting of Eq. (4) is , selected by a laplacian_kind argument. Its default is the self-loop normalized Laplacian, since a graph convolution propagates with it. The binary lifting remains available. convert_laplacian_kind_coarsening rebuilds and under another laplacian_kind.
Choosing the reduction. The reduction enters neither nor the coarse Laplacian, only the coarsened signal and the reconstruction . A GNN trained on the coarsened graph thus uses the features . By default, is the pseudoinverse , in closed form on a well-partitioned lifting (pinv_well_partitioned_torch). For the binary lifting, it averages each feature over its supernode. It is the default of most of the literature. Recent work [24] showed that, once the partition and the lifting are fixed, still has degrees of freedom that can be optimized. The module graco.refinement implements this optimization. We refer to [24] for more details.
From a partition to a coarsening. A single call, build_coarsening(data, partition, laplacian_kind), builds the coarse adjacency of Eq. (1), the lifting for the chosen laplacian_kind, the reduction and the coarse features . It returns them
Table 3: Metrics of the toolkit, grouped by family. Source is the paper that introduced the metric, and Used by the other coarsening papers that report it; a dash marks no other user, or an unclear origin. Feat., Struct. and Label mark the metrics that use the features, the graph structure and the node labels. A check under Lap. means that the metric depends on the choice of Δ-Laplacian.
| Metric | Source | Used by | Feat. | Struct. | Lap. | Label |
|---|---|---|---|---|---|---|
| Spectral fidelity | ||||||
| rsa | [31] | [23–25] | ✓ | ✓ | ||
| mean_REE | [31] | [11, 27, 29] | ✓ | ✓ | ||
| spectral_distance | [38] | [41] | ✓ | ✓ | ||
| Operator reconstruction | ||||||
| reconstruction_error | – | [11, 29] | ✓ | ✓ | ||
| gromov_wasserstein_distortion | [34] | – | ✓ | ✓ | ||
| Features | ||||||
| rsa_features | [29] | [27] | ✓ | ✓ | ✓ | |
| dirichlet_energy_error | – | [11, 29] | ✓ | ✓ | ✓ | |
| hyperbolic_error | [6] | [11, 27, 29] | ✓ | ✓ | ✓ | |
| inner_product_error | [11] | – | ✓ | ✓ | ✓ | |
| convolution_matching_error | [13] | – | ✓ | ✓ | ||
| wasserstein_feature_distance | [32] | – | ✓ | |||
| Inside the supernodes | ||||||
| max_acc | [23] | – | ✓ | |||
| partition_density_quality | [41] | – | ✓ | |||
in a Coarsening, together with the partition and the run metadata (method, requested and achieved ratios, laplacian_kind). Its coarsened graph is a standalone PyG Data object, on which any message-passing model runs unchanged. For the methods that choose their partition with a Laplacian, such as local variation, the laplacian_kind of the lifting matrix is independent of the Laplacian the coarsening algorithm uses internally (App. C.1).
4 Coarsening metrics
Every metric of this section takes the Coarsening of Sec. 3, and the original graph when it compares the two graphs, metric(coarsening, original). A coarse-only metric takes the coarsening alone, so a large original graph can be freed from memory once the coarsening is built. Any metric can be used on any coarsening. A coarsening designed to minimize one criterion can thus be measured under the criterion of a competing method. App. B.5 scores each method on Cora and PubMed under four of these metrics.
Table 3 organizes the metrics in four families, defined formally in App. B. For each metric, the table specifies whether it uses the features X or the graph structure, and whether it depends on the choice of Δ-Laplacian. A metric built on the Laplacian, e.g. the RSA through the norm , depends on that choice. It takes its own laplacian_kind argument, which defaults to the one of the coarsening. For instance, a partition that local variation chooses with the self-loop normalized Laplacian can be scored under the combinatorial one.
The table also gives, for each metric, the paper that introduced it and papers that reuse it. The spectral metrics and the energy errors on the features are shared across the literature, while method-specific metrics remain confined to their original paper.
Spectral fidelity. These metrics work on the spectrum of .
-
rsa, the Restricted Spectral Approximation of Loukas [31]: the worst-case error over the low-frequency signals, spanned by the first eigenvectors of .
-
mean_REE: the mean relative error between the smallest eigenvalues of and those of .
-
spectral_distance: the gap between the whole spectrum of and the smallest eigenvalues of .
Operator reconstruction. These metrics compare an operator of the graph with its approximation through .
-
reconstruction_error: the Laplacian against .
-
gromov_wasserstein_distortion: a structure matrix of the graph, the adjacency or a normalized version of it, against its block means over the pairs of supernodes.
Features. These metrics compare with the coarsened features.
-
rsa_features: the RSA error of each feature column.
-
dirichlet_energy_error: the error on the energy , and hyperbolic_error the same comparison in a scale-invariant form.
-
inner_product_error: the error on the full Gram matrix , the objective of IPE.
-
convolution_matching_error: the error on the output of one graph convolution, the objective of ConvMatch.
-
wasserstein_feature_distance: a transport cost between the feature distributions of the nodes and of the supernodes.
Inside the supernodes. These metrics use the partition itself.
-
max_acc: the fraction of nodes that have the majority label of their supernode, a training-free upper bound on the accuracy of a model that predicts one label per supernode [23].
-
partition_density_quality: the score GBGC uses to decide whether to split a ball.
5 A synthetic check
We propose a toy experiment on a stochastic block model (SBM) to check that the implementations behave as expected on a simple graph with a known structure, and to illustrate the differences between methods. We draw an SBM of 500 nodes with three communities of roughly equal size, a dense intra-community edge probability, and a sparse inter-community probability. We attach ten node features drawn as , the convention Kumar et al. [29] use for each graph of their experiments that has none of its own. At a moderate ratio, a good coarsening puts the nodes of a community in the same supernodes, a weaker requirement than exact community recovery [2]. We measure the purity max_acc of Sec. 4, with the communities as labels. Besides the purity, Fig. 1 shows whether the three-block structure survives. Each supernode is drawn at the mean position of its members in the layout of the original graph, with a size that grows with its number of nodes, so a coarsening that respects the communities shows three well-separated groups of supernodes. A supernode that mixes communities falls between them, and is greyed accordingly.
Most methods preserve the planted communities. METIS, Graclus, Leiden, GW-KGPC, Kcenter, Herding, OTCoarsening, local variation, ConvMatch, NOPE and SGWL merge within communities, with a purity above 0.9. They mostly differ in how they spread the reduction. A community is coarsened more when its nodes fall in fewer, larger supernodes. Some methods coarsen the three communities evenly, while GW-GPC and STPGC concentrate the reduction on one community first. The hashing and dense-optimization methods struggle. UGC mixes communities through its hash of features and adjacency, and FGC no longer respects them once its soft lifting matrix is discretized by a row-wise argmax. IPE recovers the communities only when its Grassmann rank is set well below the requested number of supernodes, and it then returns far fewer supernodes than requested (App. E.2, Fig. 4). The features here are smooth random signals, which depend on the communities only through the graph that generated them. UGC and FGC may do better on real graphs, where the features often contain class information.
App. E.3 repeats this check on a random geometric graph, whose nodes are points drawn in the unit square.

Figure 1: Coarsened graph produced by each method on a three-community SBM (, , ), at the target ratio . The top-left panel is the original graph. UGC, STPGC, FGC and IPE, marked with , use hyperparameters tuned for this graph (App. E.2), and the others use their paper defaults. The panel NOPE is the variant NOPE* (Sec. 2.1). The same figure at and is in App. E.1.
Acknowledgments
We acknowledge the funding of France 2030, PEPR IA SHARP, ANR-23-PEIA-0008. We thank Nicolas Keriven for his advice and his comments on the paper, Esteban Pesnel for help in reviewing the code, and Adarsh Jamadandi for a careful reading of the paper.
References
[1] Carlo Abate, Ivan Marisca, and Filippo Maria Bianchi. Torch geometric pool: the pytorch library for pooling in graph neural networks. arXiv preprint arXiv:2512.12642, 2025. 43
[2] Emmanuel Abbe. Community detection and stochastic block models: recent developments. Journal of Machine Learning Research, 18(177):1–86, 2018. 10
[3] Zeyuan Allen-Zhu, Zhenyu Liao, and Lorenzo Orecchia. Spectral sparsification and regret minimization beyond matrix multiplicative updates. In Proceedings of the forty-seventh annual ACM symposium on Theory of computing, pages 237–245, 2015. 1
[4] Xu Bai, Bin Lu, Kun Zhang, Shengbo Chen, Xinbing Wang, Chenghu Zhou, and Meng Jin. Rethinking efficient graph coarsening via a non-selfishness principle. In Proceedings of the 43rd International Conference on Machine Learning, volume 306 of Proceedings of Machine Learning Research, pages 5389–5408. PMLR, 2026. 3, 5, 19, 31
[5] Vincent D Blondel, Jean-Loup Guillaume, Renaud Lambiotte, and Etienne Lefebvre. Fast unfolding of communities in large networks. Journal of statistical mechanics: theory and experiment, 2008(10):P10008, 2008. 16
[6] Gecia Bravo Hermsdorff and Lee Gunderson. A unifying framework for spectrum-preserving graph sparsification and coarsening. Advances in neural information processing systems, 32, 2019. 9, 23
[7] Chen Cai, Dingkang Wang, and Yusu Wang. Graph coarsening with neural networks. In International Conference on Learning Representations, 2021. 6
[8] Anna Calissano and Etienne Lasalle. Topological spatial graph coarsening. arXiv preprint arXiv:2512.24327, 2025. 6
[9] Jie Chen, Yousef Saad, and Zechen Zhang. Graph coarsening: from scientific computing to machine learning. SeMA Journal, 79(1):187–223, 2022. 42
[10] Wei-Lin Chiang, Xuanqing Liu, Si Si, Yang Li, Samy Bengio, and Cho-Jui Hsieh. Cluster-gcn: An efficient algorithm for training deep and large graph convolutional networks. In Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, pages 257–266, 2019. 1
[11] Ido Cohen and Ronen Talmon. Spectral graph coarsening using inner product preservation and the grassmann manifold. Advances in Neural Information Processing Systems, 38:117415–117446, 2025. 1, 3, 6, 9, 22, 23, 35
[12] Inderjit S Dhillon, Yuqiang Guan, and Brian Kulis. Weighted graph cuts without eigenvectors a multilevel approach. IEEE transactions on pattern analysis and machine intelligence, 29(11): 1944–1957, 2007. 3, 4, 16, 43
[13] Charles Dickens, Edward Huang, Aishwarya Reganti, Jiong Zhu, Karthik Subbian, and Danai Koutra. Graph coarsening via convolution matching for scalable graph neural network training. In Companion Proceedings of the ACM Web Conference 2024, pages 1502–1510, 2024. 3, 5, 9, 19, 24, 29
[14] Florian Dorfler and Francesco Bullo. Kron reduction of graphs with applications to electrical networks. IEEE Transactions on Circuits and Systems I: Regular Papers, 60(1):150–163, 2013. 6
[15] Matthias Fey and Jan Eric Lenssen. Fast graph representation learning with pytorch geometric. arXiv preprint arXiv:1903.02428, 2019. 43
[16] Teofilo F Gonzalez. Clustering to minimize the maximum intercluster distance. Theoretical computer science, 38:293–306, 1985. 3, 4, 17
[17] Daniele Grattarola, Daniele Zambon, Filippo Maria Bianchi, and Cesare Alippi. Understanding pooling in graph neural networks. IEEE transactions on neural networks and learning systems, 35(2):2708–2718, 2024. 43
[18] Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. Advances in neural information processing systems, 30, 2017. 1
[19] Mohammad Hashemi, Shengbo Gong, Juntong Ni, Wenqi Fan, B. Aditya Prakash, and Wei Jin. A comprehensive survey on graph reduction: Sparsification, coarsening, and condensation. In Kate Larson, editor, Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence, IJCAI-24, pages 8058–8066. International Joint Conferences on Artificial Intelligence Organization, 2024. doi: 10.24963/ijcai.2024/891. Survey Track. 1, 42
[20] Pili Hu and Wing Cheong Lau. A Survey and Taxonomy of Graph Sampling. pages 1–34, 2013. 1
[21] Zengfeng Huang, Shengzhong Zhang, Chong Xi, Tang Liu, and Min Zhou. Scaling up graph neural networks via graph coarsening. In Proceedings of the 27th ACM SIGKDD conference on knowledge discovery & data mining, pages 675–684, 2021. 29
[22] Wei Jin, Lingxiao Zhao, Shichang Zhang, Yozen Liu, Jiliang Tang, and Neil Shah. Graph condensation for graph neural networks. In International Conference on Learning Representations, 2022. 1, 17
[23] Antonin Joly and Nicolas Keriven. Graph coarsening with message-passing guarantees. Advances in Neural Information Processing Systems, 37:114902–114927, 2024. 8, 9, 10, 17, 23, 26, 29
[24] Antonin Joly, Nicolas Keriven, and Aline Roumy. Taxonomy of reduction matrices for graph coarsening. Advances in Neural Information Processing Systems, 38:96058–96083, 2025. 7, 8, 23, 29, 30
[25] Antonin Joly, Nicolas Keriven, and Aline Roumy. Core-gnn: Multilevel message passing on coarsened graphs. arXiv preprint arXiv:2608.02128, 2026. 7, 9, 26
[26] George Karypis and Vipin Kumar. Metis: A software package for partitioning unstructured graphs, partitioning meshes, and computing fill-reducing orderings of sparse matrices. 1997. 3, 4, 15
[27] Mohit Kataria, Sandeep Kumar, and Jayadeva. Ugc: Universal graph coarsening. Advances in Neural Information Processing Systems, 37:63057–63081, 2024. 3, 4, 9, 16, 23
[28] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations, 2017. 8
[29] Manoj Kumar, Anurag Sharma, Shashwat Saxena, and Sandeep Kumar. Featured graph coarsening with similarity guarantees. In International Conference on Machine Learning, pages 17953–17975. PMLR, 2023. 1, 3, 6, 9, 10, 22, 23, 34, 35
[30] Yin Tat Lee and He Sun. Constructing linear-sized spectral sparsification in almost-linear time. SIAM Journal on Computing, 47(6):2315–2336, 2018. 1
[31] Andreas Loukas. Graph reduction with spectral and cut guarantees. Journal of Machine Learning Research, 20(116):1–42, 2019. 1, 2, 3, 5, 8, 9, 18, 19, 22, 23, 28, 29
[32] Tengfei Ma and Jie Chen. Unsupervised learning of graph hierarchical abstractions with differentiable coarsening and optimal transport. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pages 8856–8864, 2021. 1, 3, 5, 9, 18, 24, 28
[33] Daniel A Spielman and Shang-Hua Teng. Spectral sparsification of graphs. SIAM Journal on Computing, 40(4):981–1025, 2011. 1
[34] Carlos A Taveras, Santiago Segarra, and César A Uribe. Gromov-wasserstein graph coarsening. In ICASSP 2026-2026 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 646–650. IEEE, 2026. 1, 3, 4, 5, 9, 17, 20, 23
[35] Vincent A Traag, Ludo Waltman, and Nees Jan Van Eck. From louvain to leiden: guaranteeing well-connected communities. Scientific reports, 9(1):5233, 2019. 3, 4, 16, 40
[36] Guan Wang, Shuyin Xia, Lei Qian, Tao Wu, Guoyin Wang, Yi Wang, and Wei Wang. Efficient and scalable granular-ball graph coarsening method for large-scale graph node classification. arXiv preprint arXiv:2603.29148, 2026. 3, 6, 21, 34
[37] Max Welling. Herding dynamical weights to learn. In Proceedings of the 26th annual international conference on machine learning, pages 1121–1128, 2009. 3, 4, 17
[38] Richard C Wilson and Ping Zhu. A study of graph spectra for comparing graphs and trees. Pattern Recognition, 41(9):2833–2841, 2008. 9, 23
[39] Felix Wu, Amauri Souza, Tianyi Zhang, Christopher Fifty, Tao Yu, and Kilian Weinberger. Simplifying graph convolutional networks. In International conference on machine learning, pages 6861–6871. Pmlr, 2019. 17, 19
[40] Xiang Wu, Rong-Hua Li, Xunkai Li, Kangfei Zhao, Hongchao Qin, and Guoren Wang. Scalable topology-preserving graph coarsening: Concepts and algorithms. In Forty-third International Conference on Machine Learning, 2026. 1, 3, 5, 20
[41] Shuyin Xia, Guan Wang, Gaojie Xu, Sen Zhao, and Guoyin Wang. Gbgc: Efficient and adaptive graph coarsening via granular-ball computing. In James Kwok, editor, Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence, IJCAI-25, pages 3489–3497. International Joint Conferences on Artificial Intelligence Organization, 2025. doi: 10.24963/ijcai.2025/388. Main Track. 3, 6, 9, 21, 23, 24, 34
[42] Hongteng Xu, Dixin Luo, and Lawrence Carin. Scalable gromov-wasserstein learning for graph partitioning and matching. Advances in neural information processing systems, 32, 2019. 1, 3, 5, 20, 33
[43] Xin Zheng, Miao Zhang, Chunyang Chen, Quoc Viet Hung Nguyen, Xingquan Zhu, and Shirui Pan. Structure-free graph condensation: From large-scale graphs to condensed graph-free data. Advances in Neural Information Processing Systems, 36:6026–6047, 2023. 1
Appendix contents
| A | Method catalogueGlobal clustering · Representative selection · Greedy contraction · Recursive splitting · Dense optimization | 15 |
|---|---|---|
| B | Metric definitionsSpectral fidelity · Operator reconstruction · Features · Inside the supernodes · Scoring on Cora and PubMed | 22 |
| C | Method remarks and extensionsOperator conventions · Summary of our extensionsOTCoarsening · Local Variation · ConvMatch · NOPE · STPGC · SGWL · GBGC · FGC · IPE | 25 |
| D | Datasets and preprocessing | 35 |
| E | Experiments on synthetic graphsSBM at other ratios · Hyperparameter tuning · IPE and the Grassmann rank · A random geometric graph | 36 |
| F | Additional detailsStoring and reloading a coarsening | 42 |
| G | Related surveys and tooling | 42 |
A Method catalogue
We describe each method in the family order of Sec. 2.1: first the method as published, then our implementation. Three short items close each entry. Complexity gives the asymptotic cost, Implementation the backend and the libraries it relies on, and Scalability the tier of Table 1, measured in Table 2.
A.1 Global clustering
Random. The random baseline assigns each node of the original graph to one of the supernodes, independently and uniformly at random. It uses neither the adjacency nor the features . It fixes an uninformative lower bound, so that a metric reported for a coarsening method can be compared with it. We consider two variants. The i.i.d. uniform variant leaves cluster sizes as a multinomial draw around . The equal-size variant shuffles the node index list and splits it into contiguous chunks of size or .
The i.i.d. variant is the default. Note that it does not reach the requested ratio. A uniform draw leaves some supernodes empty. Thus, the realized supernode count is in expectation. On Cora at this returns 1064 supernodes instead of 1243, that is . The gap shrinks as grows. The equal-size variant reaches the target exactly.
Complexity. time and memory. Implementation. Native torch, GPU. Scalability. Very large.
METIS. Karypis and Kumar [26] introduced METIS as a multilevel graph partitioning package. Given a target partition count , METIS minimizes the number of edges cut between the clusters under a balance constraint,
with a small imbalance tolerance, so cluster sizes are close to . The algorithm proceeds in three phases. First, a coarsening phase contracts edges via heavy-edge matching to produce a small graph. Second, an initial partitioning phase splits this small graph by recursive bisection. Third, an uncoarsening phase lifts the partition back to the original graph and refines it by local swaps at each level.
We wrap the reference pymetis binding with a single hyperparameter, the random seed. METIS enforces an implicit minimum cluster size of roughly three nodes. As a result it returns fewer non-empty clusters than requested at low coarsening ratios. For instance, on the Cora largest connected component (), requesting (i.e. 1740 clusters) returns only 701 non-empty clusters, a 60% shortfall. The gap closes to 7% at and vanishes at .
Complexity. time. Implementation. pymetis wraps the reference C library, CPU only. Scalability. Very large.
Graclus. Dhillon, Guan and Kulis [12] introduced Graclus as a multilevel algorithm that minimizes normalized-cut or ratio-cut objectives. For the normalized cut, the objective is
with the degree mass of cluster . Graclus differs from METIS by targeting a normalized cut objective, which biases the partition toward clusters of comparable degree mass. METIS cuts edges and balances node count. The original algorithm alternates a heavy-edge matching phase and a refinement phase guided by a weighted kernel -means objective, a relaxation of the normalized cut.
We use the PyG implementation (torch_geometric.nn.pool.graclus, backed by torch-cluster), which performs the matching phase only, without the refinement. One step matches each node with at most one neighbor, so it reduces the graph by at most half, and the number of supernodes it returns is not chosen. We therefore apply it recursively until the number of supernodes falls below , which may reduce more than asked.
Complexity. with the number of levels. Implementation. PyG graclus, backed by torch-cluster, GPU. Scalability. Very large.
Leiden. Traag, Waltman and van Eck [35] introduced Leiden as a refinement of the Louvain community detection algorithm [5]. Both maximize the modularity of the partition,
which compares the edges inside each community with the number expected at random for the same degrees . Here is the total edge weight. The entry is 1 when nodes and are in the same supernode, 0 otherwise. The resolution controls the number of communities. Louvain greedily moves each node to the neighboring community that increases the most, then contracts the communities into supernodes and repeats. Some of its communities can be internally disconnected, and Leiden adds a refinement step that splits them into connected parts before contraction.
Leiden takes a resolution and no number of supernodes. We therefore search by bisection on a log scale over , until the number of communities is within one of . When no resolution reaches the target, the search returns the closest partition it met: on Cora, a request for 1740 communities () returns 1696. A fixed resolution can also be passed, which skips the search.
Complexity. per sweep of local moves, repeated for each resolution. Implementation. igraph + leidenalg, CPU only. Scalability. Very large.
UGC. Kataria, Kumar and Jayadeva [27] introduced Universal Graph Coarsening (UGC) as a hashing-based coarsening method designed to work on both homophilic and heterophilic graphs. Each node receives an augmented feature vector that concatenates its feature row and its adjacency row, mixed by a heterophily factor ,
i.e. the fraction of edges joining nodes of different classes, computed from the label vector . As in the paper, our default computes it on the labels of all nodes, test nodes included. A heterophilic graph then gives more weight to the adjacency, and a homophilic one to the features.
UGC then groups the nodes whose augmented vectors are close, by locality-sensitive hashing. It draws random directions and projects every on each of them. It then cuts each projection into bins of width , so that two close vectors tend to fall in the same bin. Each node goes to the bin it falls in most often over the projections, and each bin becomes a supernode. The bin width sets the number of supernodes; our implementation searches it by bisection until this number meets the target, within 5%. We keep the defaults of the official repository, directions drawn uniformly with dot-product hashing.
Complexity. , with the average degree. Implementation. Sparse projections of and (App. C.2), GPU. Scalability. Very large. Label-aware. Yes, via the heterophily factor .
GW KGPC. Taveras et al. [34] look at coarsening through the Gromov-Wasserstein (GW) distance. A graph is a measure network , with a matrix representing the graph, e.g. its adjacency, and a measure on the nodes. For a binary lifting , they build and score the coarsening by the distortion
is the Gromov-Wasserstein cost between the graph and its coarsened graph , when the transport plan sends each node to its supernode. The partition plays the role of the transport plan, restricted to plans that do not split a node into multiple supernodes. For a uniform , the paper default, is the Moore-Penrose reduction , averages a signal over each supernode, and is proportional to . Note that , with the coarse propagation of [23]. thus measures how much the operator changes through the coarsening, for all signals at once, similarly to ConvMatch for one convolution.
Two algorithms minimize . GPC, a greedy contraction, is described in App. A.3. KGPC computes the distortion of merging each pair of nodes once, on the original graph, and gathers them in a matrix . It then runs a -means on the rows of , and each cluster becomes a supernode. Our implementation provides five choices of and a degree-normalized in addition to the uniform one (App. C.2).
Complexity. KGPC builds once in , then runs iterations of -means in . It stores densely, in memory. Implementation. Native torch, GPU, with a torch -means. Scalability. Medium.
A.2 Representative selection
Kcenter. Gonzalez [16] proposed a greedy algorithm for the -center problem, which selects centers so that every point lies as close as possible to its nearest center. It starts from one point and repeatedly adds the point farthest from the centers already selected (farthest-point sampling), which is within a factor two of the optimum. We run it on the nodes in an embedding space, then assign every other node to its nearest center, so that each center and the nodes around it form a supernode.
The Kcenter and Herding baselines of the condensation literature [22] are supervised: they train a GCN on the original graph and select nodes class by class. Ours use neither labels nor training, so the two are not comparable.
The embedding space is , where is the self-loop normalized propagation of Sec. 3 and is the number of Simplified-Graph-Convolution [39] propagation steps. Larger smooths the node representations more before the selection runs: falls back to the raw features . The distance is the Euclidean distance in . The graph enters only through , so the supernodes follow the topology up to hops. We default to propagation steps, matching the SGC-2 embedding of ConvMatch.
Complexity. for the propagation steps and for the steps of farthest-point sampling. Implementation. Native torch, GPU. Scalability. Very large at high ratios, where is small; at a fixed ratio the selection is quadratic in .
Herding. Herding, introduced by Welling [37], selects a small subset of points whose mean is as close as possible to the mean of the whole set. It is greedy, and each step adds the point that brings the mean of the selected points closest to ,
Herding thus selects points that are representative on average, which favors the dense regions.
We use the same embedding as Kcenter ( by default), select pivots by herding on , and assign every other node to its nearest pivot. Two nodes with the same closed neighborhood have the same row of . When both are selected, every node closest to one is as close to the other, so one pivot keeps no node and Herding returns fewer supernodes than requested (App. E.3).
Complexity. for the propagation and for the steps of herding. Implementation. Native torch, GPU. Scalability. Very large at high ratios.
OTCoarsening. Ma and Chen [32] learn a coarsening without labels, by training a graph neural network to minimize a transport loss. A GCN layer scores each node, , and the nodes of highest score become the supernodes. The lifting keeps the columns of at these nodes, weighted by their scores and normalized per row, so each node is spread over the selected nodes within one hop. The coarsened graph is . Its features come from an encoder-decoder: a GCN encodes on the original graph, pools the encoding onto the supernodes, and a second GCN decodes it on . The loss is the entropic Wasserstein distance between the rows of and those of ,
over the plans whose rows and columns sum to the node masses, with the entropy. Unlike in the Gromov-Wasserstein methods, the transport cost compares feature vectors. The graph structure enters it only through the decoder that produces . A fixed number of Sinkhorn iterations computes , and the loss is differentiated through them. The score layer and the two GCNs are thus trained together, so that the features of the supernodes cover the distribution of the original ones.
After training, our implementation sends each node to the selected node of largest weight in its row of , i.e. to the best-scored selected node among itself and its neighbors. A node with no selected node within one hop has an empty row. By default it becomes a supernode of its own, and the coarsened graph is coarsened again until supernodes remain (App. C.3). The paper needs no such step, since it targets graph classification, where only pools the graph and such a node drops out. The same appendix lists the points where the released code differs from the paper.
Complexity. per epoch, since the paper builds the graph convolutions and on the dense adjacency, plus for Sinkhorn iterations. A sparse implementation would bring the first term down to ; we keep the published one. Implementation. Native torch, GPU. Scalability. Small; the dense matrices run out of memory on PubMed.
A.3 Greedy contraction
Local Variation. Loukas [31] proposes the local variation methods, which aim to find the partition which best preserves the low-frequency signals of the graph. Loukas measures it by the Restricted Spectral Approximation (RSA) constant over the span of the first eigenvectors of (we default to ),
The constant depends on both and . Loukas takes at each level, so once the Laplacian is fixed it depends on the partition only.
Minimizing Eq. (12) directly over all partitions is out of reach. Loukas instead builds the coarsening in levels and bounds the error of each one. The RSA of the whole descent is at most , with the error of level . Each is in turn bounded by a sum of local terms, one per contraction set . A candidate set can therefore be scored on its own, by its local variation cost
(13) where is the preserved basis reduced to level , removes the mean of a signal over , weighted by the masses of the supernodes in our default (App. C.4), and is the Laplacian of the edges touching . The denominator counts the nodes the contraction removes.
Even with this decoupling, choosing the cheapest family of disjoint candidate sets is NP-hard, by reduction to maximum-weight independent set. Loukas therefore proposes a greedy algorithm. At each level, it builds a family of candidate sets, either each edge (variation edges, our default) or each node with its neighbors (variation neighborhood). It then scans the candidates by increasing cost, and contracts each one that shares no node with a set already accepted. A neighborhood that meets such a node loses it, is costed again and goes back in the queue, as in the algorithm of [31]. The scan stops once a fraction percent of the current nodes is contracted. The process repeats on the coarsened graph. Loukas reduces the basis from one level to the next with the pseudoinverse of each level. Our default chooses the reduction of each level so that their product over the levels is of the final partition, for each (App. C.4). The reduction of Loukas is available as an option. The toolkit implements the modified cost for each -Laplacian. Our implementation also adds an absorption pass for graphs where the disjoint matching stalls (App. C.4).
Complexity. for the initial eigensolve of the preserved eigenvectors, then per level over levels. On the combinatorial Laplacian the eigensolve switches to shift-invert, whose factorization can cost far more on large graphs. Implementation. scipy.sparse + ARPACK, edge costs vectorized in closed form (App. C.4), numba for the neighborhood cost, CPU only. Scalability. Very large.
ConvMatch. Dickens et al. [13] introduced a method to look for the partition that best preserves the output of one graph propagation. With the propagation of a GCN layer and the same operator rebuilt on the coarsened graph, with the size and the internal edges of each supernode as self-loops, the objective is
over binary liftings , with . This is the dickens variant of the convolution-matching error of App. B.
As for local variation, minimizing Eq. (14) over all partitions is intractable, and ConvMatch merges pairs of supernodes greedily, level by level. At each level, it embeds the current graph with an SGC [39] of depth , draws candidate pairs among the nearest neighbors of each node in that embedding, and merges the cheapest non-overlapping pairs. The cost of a pair is the change of the coarse outputs that merging them causes at the current level. Computing it exactly takes , since the merge changes the output of every neighbor of and . A-ConvMatch replaces it by an upper bound that only uses quantities local to and , computed in (Theorem 1 of the paper). Our implementation follows the paper by default. It adds two other pairs inside the cost and a larger candidate set, both detailed in App. C.5.
Complexity. for the SGC embedding at each level, plus per candidate pair for A-ConvMatch and for ConvMatch. Implementation. Torch, GPU for the embedding and the pair scoring; the candidate search runs scipy cKDTree and sklearn PCA on CPU. Scalability. Very large.
NOPE. Bai et al. [4] merge the pair whose contraction disturbs their shared neighborhood the least, a principle they call non-selfishness. They measure it by the neighborhood interference index of a candidate pair ,
with the dot product of the node features, the neighbors of , and the size of the current supernode of . A candidate pair is always adjacent, so belongs to and to . The released code removes both from the sum, and we follow it. As for local variation and ConvMatch, the algorithm is greedy: it pops the pair of smallest from a priority queue, merges it, and re-scores the pairs around the new supernode.
Computing Eq. (15) exactly costs per pair, since the sum runs over the union of the two neighborhoods. NOPE* replaces it by its expectation under a local isotropy assumption: the features of the neighbors of a node are i.i.d. with covariance . The sum then has a closed form,
computed in per pair. Bai et al. recommend NOPE at low to moderate ratios, and NOPE* when scalability matters more. Our implementation provides three variants: nope (Eq. (15)), nope_star, and nope_repo, the merge routine of the official repository, which differs from Eq. (15) (App. C.6). It also generalizes the similarity to for five choices of the matrix , the paper taking (App. C.1).
Complexity. for NOPE and for NOPE*, with the average degree, which grows as supernodes merge. Implementation. Adjacency as list [set [int]] and a priority queue with lazy deletion, CPU only. Scalability. Very large through NOPE*.
GW GPC. GPC is the greedy algorithm of Taveras et al. [34] for the distortion of Eq. (9) (App. A.1). At each step, it computes the distortion of merging each pair of nodes of the current graph, adjacent or not, merges the pair of least distortion, and updates to . It repeats until supernodes remain. Our implementation provides the same choices of and as for KGPC.
Complexity. GPC performs merges, each scoring all pairs at each, thus in total. It stores densely, in memory. Implementation. Native torch, GPU. Scalability. Small.
STPGC. Wu et al. [40] remove nodes and edges while preserving the topology of the graph, through three local operations on the closed neighborhood .
Strong collapse. A node is dominated by a neighbor if , and it is then merged into . This preserves the topology of the graph, i.e. its connected components and its cycles.
Edge collapse. An edge is dominated by a common neighbor if , and it is then removed.
Neighborhood coning. When neither applies, the algorithm adds a few edges around a low-degree node so that one of its neighbors dominates it, then collapses .
All three operations skip the high-degree nodes: they only consider a node of degree at most , or an edge whose endpoints have degrees summing to at most . This threshold bounds the cost of the dominance checks.
The three operations run in a loop of two phases. The exact phase applies them as stated, and preserves the topology of the graph. The approximate phase takes over once the exact one stalls. It no longer adds edges, and it relaxes the strong collapse: may be merged into when at most of its neighbors lie outside , and grows by one whenever a round removes fewer than nodes, 1% of by default. grows with it, as in the released code (App. C.7). This phase reaches any ratio, but it no longer preserves the topology exactly.
The paper uses the train and validation labels in all three operations: it tries the dominators of the same label first, and it keeps the dominated edges between two nodes of the same label. The released code uses the labels of all nodes. Our implementation follows the paper by default, and label_guide=False gives a label-free run. It leaves out the DropEdge that the paper applies to the coarsened graph before training (App. C.7).
Complexity. , with the average degree. Implementation. CPU; adjacency as list [set [int]]. Scalability. Very large. Label-aware. Yes, for stpgc (train and validation labels).
A.4 Recursive splitting
SGWL. Xu et al. [42] partition a graph by matching it, in the Gromov-Wasserstein sense, with a target graph of isolated nodes with self-loops, one per part. A transport plan gives the mass that node sends to part : each row sums to the mass of node , and each column to the mass of part . Where GW GPC only compares hard plans, SGWL optimizes a soft by proximal gradient steps (Eq. 3 of the paper),
(17)
with the adjacency of the target. is the Gromov-Wasserstein cost with one copy of frozen at the current plan, which makes it linear in . The KL term keeps each new plan close to the previous one, with as the step size. It also makes each step solvable by Sinkhorn iterations. Expanding the square gives
The first term only depends on , the second only on . These two terms do not change the minimizer, since the rows and columns of have fixed sums. Only the last term matters: is the mass that the neighbors of send to part , so each step pulls a node towards the part of its neighbors. The partition is taken from the final plan, each node going to the part that receives most of its mass, . To scale, the method splits recursively with , so the partition is built by successive binary cuts.
Our implementation stops the recursion once parts exist, by always splitting the largest part, where the paper fixes a depth and the code a part size (App. C.8). We also provide the GCN propagation operator as a variant of (App. C.2).
Complexity. . With and a fixed number of Sinkhorn iterations, a proximal step on a part of nodes and edges costs . Each split runs steps, as in the authors' code, so the first split dominates. Implementation. GPU. Scalability. Large; the NE time excludes it from the very large tier.
GBGC. Contrary to most of the other methods we present here, Xia et al. [41] coarsen by constructing the coarsened graph from a few supernodes and refining it instead of contracting the original graph. They first cover the graph with about granular-balls, grown by breadth-first search from the nodes of highest degree. Each ball is then split in two by the same breadth-first search, started from its two nodes of highest degree. The split is kept if , where q measures how tightly the nodes of a ball B are connected,
where and count the edges and the nodes inside B. The first term is the number of internal edges per node. The second is the transitivity: among the pairs of neighbors of a node, the fraction that are themselves connected. The splits recurse until none is accepted, and each final ball becomes a supernode.
The method has no ratio parameter. Our implementation reaches a requested by stopping the splits once the ball count meets it, so the initial balls set a floor on . On graphs with hubs, the breadth-first initialization returns many more balls than , which caps the reachable ratio. A later work of the same group [36] lets METIS set the ball count instead, which returns it exactly. We therefore report two versions: gbgc, with the breadth-first initialization of Xia et al., and gbgc_metis, with the METIS one and the rest of GBGC unchanged. The other two changes of the later work, a mean acceptance rule and a quality without the transitivity, are available as options, as is a factor that softens the acceptance rule (App. C.9).
Complexity. . A ball has at most nodes, so each node and each edge goes through at most splits. Implementation. CPU; adjacency as list [set [int]], pymetis for the METIS initialization. Scalability. Medium for gbgc, with a reachable ratio that depends on the graph; very large for gbgc_metis.
A.5 Dense optimization
FGC. Kumar et al. [29] optimize the structure and the features of the coarsened graph jointly. They relax the lifting matrix to a soft , , and minimize
with the coarsened features, , and the weights of the last three terms, the hyperparameters of the method. The first term is the Dirichlet energy of on the coarsened Laplacian , so it asks the coarsened features to be smooth. The log-determinant keeps well conditioned, i.e. the coarsened graph connected. The third term ties to the original features. The last one, , is a group-sparsity penalty on the rows of . With , it pushes each node towards a single supernode, a soft form of the partition constraint (Sec. 3.5 of the paper).
The paper alternates a closed-form update of with a projected gradient step on . The partition is the row-wise argmax of the final . Note that the soft is dense, with entries. At a fixed ratio, its memory grows quadratically with the size of the graph. Thus, FGC scales only at ratios high enough to keep small.
Our implementation provides the two solvers of the released code through variant (App. C.10). FGC is one of the four methods whose hyperparameters we tune on the block model (App. E.2).
Complexity. time per iteration and memory for the dense . Implementation. Native torch, GPU. Scalability. Medium, large at high ratios.
IPE. Cohen & Talmon [11] start from FGC and change the objective function slightly. While FGC wants each feature column to be reconstructed, IPE asks the inner products between feature columns, , to be preserved, i.e. the Gram matrix . They keep the soft lifting, the log-determinant and the group sparsity of FGC, and minimize
with the hyperparameters, named as in the paper. Note that weighs the log-determinant here, where FGC calls it . The first term is the inner-product error. The second, a Grassmann similarity, pulls the column space of towards the span of , the eigenvectors of of smallest eigenvalues.
The paper proposes two variants. INGC (Algorithm 1) minimizes Eq. (21) by block coordinate descent, with a Hardmax that rounds to a partition at each iteration. SINGC (Algorithm 2) drops the inner-product error, which the Grassmann term already controls on smooth signals, and rounds once at the end. SINGC thus never uses the features. We keep it as the default, the simpler of the two variants (App. C.11).
No official code was released, so we coded IPE from the paper (App. C.11). We also extend IPE to the -Laplacians (App. C.2). IPE is one of the four methods whose hyperparameters we tune on the block model (App. E.2).
Complexity. per iteration, as for FGC, plus one eigensolve for . Implementation. Native torch, GPU; ARPACK on CPU for . Scalability. Small; on PubMed at , the default run collapses onto a few supernodes, and the pseudo-inverse in the log-determinant gradient no longer converges.
B Metric definitions
We give the formal definition of each metric of Sec. 4, grouped by the same families. We write and throughout.
B.1 Spectral fidelity
The Restricted Spectral Approximation (RSA) of Loukas [31] is the worst-case reconstruction error over a subspace , the span of the first eigenvectors of ,
(22) with the Laplacian semi-norm. The constant depends on and , hence on the choice of -Laplacian (Sec. 4). Since for and , the triangle inequality turns Eq. (22) into a bound on the energy of the signals of ,
A small thus guarantees that the coarsening preserves the Laplacian energy of every signal of . The previous implementations use a full eigendecomposition of [23, 24, 31]. We compute the constant from the preserved eigenpairs only, by one sparse eigensolve, which scales to much larger graphs. With , this takes about 1 second on Cora, 3 on PubMed and 80 on ogbn-arxiv, whatever the coarsening.
With and the -th smallest nonzero eigenvalues of and of , the relative eigenvalue error (mean_REE) and the spectral distance (spectral_distance) are
mean_REE uses the smallest. spectral_distance compares the whole spectrum of with the smallest nonzero eigenvalues of . The larger eigenvalues of are left out. The first is used across the coarsening literature [27, 29, 31]. The second comes from Wilson and Zhu [38], and GBGC [41] reports it.
B.2 Operator reconstruction
These two metrics compare an operator of the graph with its approximation through . They use no features. The reconstruction error (reconstruction_error) compares with , the Laplacian reduced to the coarsened graph and lifted back. The Gromov-Wasserstein distortion (gromov_wasserstein_distortion) of Taveras et al. [34] compares a structure matrix with its block-mean approximation , weighted by a node measure . It is the Gromov-Wasserstein cost between the graph and its coarsened graph when the transport plan sends each node to its supernode. It has a closed form. The two metrics are
A normalize argument returns the raw squared norm for the first.
B.3 Features
These metrics compare the features with the coarsened features . The feature RSA (rsa_features) applies the measure of the RSA (Eq. (22)) to each feature column , as the relative error , and needs no eigendecomposition. Its norm argument chooses . The default, , measures the spectral fidelity of the features. The -similarity of FGC [29], reused by UGC [27], bounds the same quantity on the whole feature matrix, ; we report it per column. With , the measure becomes a reconstruction error of the features that no longer depends on . It is then below one, since is an orthogonal projection.
The Dirichlet energy error (dirichlet_energy_error) compares the energy of the features with that of the coarsened features,
A mode argument returns its logarithmic form , as in IPE [11]. The hyperbolic error (hyperbolic_error) of Bravo-Hermsdorff and Gunderson [6], reused by UGC, FGC and IPE [11, 27, 29], compares the residual with the two energies through a hyperbolic distance,
The next two metrics are close to the costs that two methods of the toolkit minimize. The inner-product error (inner_product_error) of IPE [11] compares the Gram matrices of the features in the inner product, before and after coarsening. The convolution-matching error (convolution_matching_error) of ConvMatch [13] is the entrywise difference between one graph convolution and its lifted coarse counterpart,
with for the pair of the coarsening, so that the lifted output is IISIX. The objective of Dickens et al. mixes two pairs. The toolkit also computes it (mode="dickens", App. C.5).
The feature Wasserstein distance (wasserstein_feature_distance) of OTCoarsening [32] is an entropic transport cost between the features of the nodes and those of the supernodes,
with the cost of moving node to supernode , a transport plan between uniform masses on the nodes and on the supernodes, and its entropy. ignores which node went to which supernode: it compares the features as distributions. We solve it by Sinkhorn iterations, stopped once the supernode marginal is met within a tolerance.
B.4 Inside the supernodes
The maximum accuracy (max_acc) is an upper bound on the accuracy of a model that predicts one label per supernode, e.g. a classifier trained on the coarsened graph. At best, it labels correctly the nodes that have the majority label of their supernode,
It needs the labels but no training, and gives a cheap estimate of how much a coarsening can hurt a node classification task.
The partition density quality (partition_density_quality) averages the granular-ball quality of GBGC [41] (Eq. (19)) over the supernodes of more than one node,
A high value means dense supernodes with many triangles, a low value sparse, chain-like clusters.
B.5 Scoring the methods on Cora and PubMed
Each method coarsens Cora and PubMed at with its default hyperparameters, its own operator (Table 5) and seed 14. We then build and under the self-loop normalized Laplacian , with the GCN propagation, and compute the RSA and the REE with the same . CME uses itself, and max_acc needs no operator. The scores of one column thus compare across methods. Table 4 reports the RSA (), the mean REE (), the CME and max_acc.
Table 4: Four metrics on each method at , under the self-loop normalized Laplacian. is the ratio each method actually reaches. CME is in thousands, max_acc in percent. Lower is better for RSA, REE and CME, higher for max_acc. The best score of each column is in bold. STPGC runs without labels, GBGC with its breadth-first initialization, IPE with its default variant SINGC. OOM: out of memory on a 48 GB GPU.
| Method | Cora | PubMed | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| RSA | REE | CME | max_acc | RSA | REE | CME | max_acc | |||
| Global clustering | ||||||||||
| Random | 0.71 | 7.14 | 10.03 | 58.7 | 48.4 | 0.71 | 4.43 | 12.59 | 37.2 | 61.8 |
| METIS | 0.72 | 1.95 | 3.20 | 37.9 | 86.0 | 0.79 | 2.49 | 3.66 | 28.7 | 84.3 |
| Graclus | 0.73 | 1.94 | 3.62 | 35.7 | 87.6 | 0.71 | 2.99 | 3.48 | 25.8 | 85.9 |
| Leiden | 0.70 | 1.58 | 3.40 | 29.2 | 89.3 | 0.70 | 1.59 | 4.54 | 22.3 | 87.7 |
| UGC | 0.71 | 7.01 | 8.92 | 59.6 | 49.2 | 0.71 | 5.26 | 12.67 | 36.5 | 61.5 |
| GW KGPC | 0.70 | 6.55 | 4.76 | 49.0 | 70.7 | 0.71 | 5.61 | 3.96 | 30.8 | 70.6 |
| Representative selection | ||||||||||
| Kcenter | 0.70 | 1.56 | 2.38 | 29.5 | 90.1 | 0.70 | 2.43 | 0.97 | 21.0 | 88.7 |
| Herding | 0.70 | 1.93 | 2.65 | 32.4 | 89.7 | 0.70 | 3.93 | 2.64 | 24.1 | 88.5 |
| OTCoarsening | 0.65 | 1.75 | 2.00 | 34.3 | 88.4 | OOM | ||||
| Greedy contraction | ||||||||||
| Local Var. | 0.70 | 0.67 | 1.16 | 32.9 | 90.8 | 0.70 | 0.34 | 0.08 | 23.2 | 89.1 |
| ConvMatch | 0.70 | 2.49 | 2.25 | 33.7 | 90.3 | 0.70 | 4.83 | 1.70 | 23.4 | 88.4 |
| NOPE | 0.70 | 2.07 | 3.85 | 36.0 | 89.0 | 0.70 | 3.30 | 3.83 | 25.2 | 86.4 |
| GW GPC | 0.70 | 3.43 | 2.52 | 38.0 | 81.0 | 0.70 | 2.42 | 1.53 | 23.7 | 84.2 |
| STPGC | 0.70 | 3.14 | 4.11 | 41.3 | 83.6 | 0.70 | 3.26 | 5.05 | 25.5 | 86.2 |
| Recursive splitting | ||||||||||
| SGWL | 0.70 | 2.26 | 2.61 | 37.0 | 85.8 | 0.70 | 2.62 | 1.54 | 25.5 | 83.4 |
| GBGC | 0.71 | 2.05 | 3.38 | 38.0 | 88.5 | 0.64 | 5.46 | 12.39 | 29.2 | 84.3 |
| Dense optimization | ||||||||||
| FGC | 0.70 | 7.16 | 9.47 | 52.7 | 65.0 | 0.70 | 5.38 | 12.67 | 36.3 | 60.5 |
| IPE | 0.70 | 6.84 | 11.09 | 57.9 | 48.6 | 0.70 | 5.55 | 8.04 | 34.6 | 65.7 |
Local variation has the lowest RSA and REE and the highest max_acc on both graphs. For the RSA this is expected, since its local cost bounds it; note also that it builds its partition with the Laplacian used for scoring. Under CME, local variation ranks fourth on Cora and third on PubMed. The best CME goes to Leiden on Cora and to Kcenter on PubMed. ConvMatch, whose objective mixes two pairs where CME uses one (App. C.5), ranks only fifth and fourth. ConvMatch on PubMed shows the widest gap between metrics: fourth under CME and fifth under REE, it has a worse RSA than Random. At their default hyperparameters, UGC, FGC and IPE score close to Random under RSA, REE and CME, and well below the other methods under max_acc. These defaults may misrank FGC and IPE: on the SBM, a grid search has raised their max_acc from 0.50 to 0.86 and from 0.49 to 0.84, while UGC does not improve (App. E.2). We did not tune them on Cora and PubMed. Note that the ratio is not met exactly by all methods: METIS returns fewer supernodes on PubMed () and GBGC more (), which penalizes the first and favors the second.
C Method remarks and extensions
Reimplementing a published method involves choices that the paper does not always fix. The paper and the released code may disagree, a constant may be set only in a script, or a corner case may be left open. These choices can change the output. We make ours explicit in this appendix. Method by method, we state whether we followed the paper or the released code, and why. The details are mostly useful to a reader who wants to compare one of our numbers with another published implementation. We also describe the extensions we added to each method. Most of them are options. The few that change the default output of a method are marked with a in the two tables below. Table 5 (App. C.1) records the operator each method uses internally to choose its partition. Table 6 (App. C.2) summarizes the other extensions. Many of them come from one choice the toolkit leaves open: the Laplacian a coarsening is consistent with and thus the corresponding pair . Both can change the intermediate costs of a method.
C.1 Operator conventions per method
Section 3 separates two roles of the Laplacian. The laplacian_kind passed to build_coarsening fixes the Laplacian the lifting is consistent with. The operator a method uses internally to choose its partition is a separate choice, which Table 5 records for each method, with the alternatives from the original paper and those we add. Every method defaults to the operator of its original paper, with three exceptions. Local variation defaults to the self-loop normalized Laplacian of [23–25], the operator a graph convolution propagates with. Kcenter and Herding were designed without a graph, and we run them on two hops of graph convolution on the features.
Table 5: The operator each method uses to choose its partition. is the GCN propagation . The three methods whose default differs from their original paper.
| Method | Default in the toolkit | Alternatives from the original paper | Alternatives we add |
|---|---|---|---|
| UGC | features and , mixed by | features only | — |
| GW GPC, GW KGPC | adjacency | combinatorial , signless | self-loop normalized |
| Kcenter | features after two hops, | raw features | any number of hops |
| Herding | features after two hops, | raw features | any number of hops |
| OTCoarsening | and features | — | — |
| Local Variation | self-loop normalized | combinatorial | normalized |
| ConvMatch | — | — | |
| NOPE | features (Euclidean) | — | , combinatorial , self-loop normalized , adjacency |
| SGWL | adjacency | — | |
| FGC | combinatorial | — | normalized , self-loop normalized |
| IPE | combinatorial | — | normalized , self-loop normalized |
| Random, METIS, Graclus, Leiden, GBGC, STPGC | structural (adjacency only), no operator choice |
C.2 Summary of our extensions
Table 6 collects what our implementations add to their source, beyond the operators of Table 5, which all implementations accept. Some additions are on by default: they reach a requested ratio, scale, make a run reproducible, or turn a method into a coarsener. The others are options. Without them, the implementation follows the source method. METIS runs as released and does not appear.
Table 6: Additions and options of each implementation beyond its original paper, apart from the operators of Table 5. † Changes the output with respect to the source, as in Table 5.
| Method | On by default | Other options |
|---|---|---|
| Random | – | equal-size variant: a shuffled index list split into balanced chunks (the default draws cluster identifiers i.i.d.). |
| Graclus | seeding of the global torch random stream, from which the torch-cluster kernel samples its visit order; the kernel takes no seed argument. | – |
| Leiden | log-scale binary search on the resolution to reach a requested ratio†, with a tolerance n_clusters_to1 on the community count. | – |
| UGC | projections of X and of the sparse A computed separately, so the N × (d + N) augmented matrix of the released code is never formed densely. | – |
| GW GPC, KGPC | – | two Π normalizations (paper: uniform); both coarse operators, C† SC of the paper and PSQ, returned in info. The partition is the same for both. |
| Kcenter, Herding | recast as coarseners: pivots on the propagated features plus nearest-pivot assignment (the originals are coreset selectors)†; the assignment is computed by blocks, so the N × n distance matrix is never formed. | – |
| OTCoarsening | hard partition taken from the row-wise argmax of Q† (the paper works with the soft Q). | three treatments of an unassigned node through uncovered; three options to choose between the paper and the released code; the soft Q returned optionally for graph classification (App. C.3). |
| Local Variation | vectorized edge cost; global reduction with the masses of the supernodes†; absorption pass to unstick stalls† (App. C.4). | per-level budget n_e_percent, proportional (default) or fixed; per-level reduction, the algorithm of Loukas with the combinatorial Laplacian; spectral norm of the neighborhood cost. |
| ConvMatch | – | pair: the binary or the normalized pair for both the operator and the features, where the paper mixes them (App. C.5); knn+edges candidate set (paper: knn only). |
| NOPE | rebuild of the priority queue without its dead entries (heap_purge). It bounds the memory and leaves all merges unchanged. | three merge variants (App. C.6). |
| STPGC | – | label-free run with label_guide=False (the paper method uses the train and validation labels); coning_once and incremental follow Algorithms 1, 2 and 4 as printed, the default following the released code (App. C.7). |
| SGWL | stop_rule splitting the largest part until the requested n is reached† (the paper stops at a fixed recursion depth, the repository at a size threshold). | the repository's size threshold. |
| GBGC | the split loop stops at the requested number of supernodes† (the paper has no ratio parameter). | quality_split_factor softening the accept rule; init and accept choosing between the two published variants (App. C.9). |
| FGC IPE | –the sign of the Grassmann gradient opposite to the paper's† (App. C.11). | both released solvers, through variant. the sign of the paper. |
C.3 OTCoarsening: three options, and the nodes the method leaves out
The released code of Ma & Chen [32] differs from their paper on several points. On four of them we follow the paper: the score uses the raw features (the code uses the encoder output ), Eq. 3 keeps only the selected columns, Eq. 6 fixes the number of Sinkhorn iterations, and the loss keeps the entropic term of Eq. 7. Three other points change a result, and we provide them as options (Table 7).
Table 7: The three OTCoarsening options, and the variant we ship as the default.
| Option | Paper | Released code | Default |
|---|---|---|---|
| score_square | (Eq. 2) | code | |
| cut | , the top- values (Eq. 3) | ReLU() | paper |
| zero_row_filter | no filter (Eq. 4, Eq. 9) | get_nonzero_rows | paper |
The squared score. The released code squares the pre-activation of Eq. 2 before the sigmoid. The square ranks nodes by and discards the sign. On Cora over four seeds, the two variants are within the spread of the seeds, so we keep the code, the version behind the published numbers.
The transport rows. The loss of Eq. (11) transports the rows of onto those of , all of them in the paper. The released get_nonzero_rows is meant to drop the all-zero rows first. It sorts the rows by their sum and keeps as many as there are nonzero rows, starting from the smallest, so it drops the rows of largest sum and keeps the zero ones. When no row is zero, it only reorders the rows. This is the case on Cora, where the results do not change, and we default to the paper.
The nodes the method leaves out. The lifting keeps the columns of at the selected nodes (Eq. 3 of the paper), so it has the sparsity of . A node further than one hop from every selected node is then uncovered: its row of is zero. The paper targets graph classification, where such a node simply drops out of the pooling. A partition has to place it, so the completion is ours. The uncovered argument provides three options. attach gives each uncovered node the supernode of the nearest covered one. isolate makes each uncovered node a supernode of its own. isolateRecursive, our default, coarsens the result again with isolate, level after level, as their MultiLayerCoarsening does, and keeps the level whose count comes closest to the request.
Table 8 shows why a completion is needed. Left alone, the argmax sends all uncovered nodes to supernode 0, since its zero row ties all columns. That supernode swallows 1836 of the 2485 nodes of Cora at . attach repairs the partition, but it returns fewer supernodes than asked. isolate returns more, since each uncovered node adds one. The recursive mode corrects the overshoot of isolate. It comes closer to the request than attach at each ratio, with 252 supernodes for 249 at , at the price of up to four levels of training. Its purity is higher than that of attach at and 0.7, and a bit lower at . We keep it as the default, since it follows the multi-level scheme of the authors.
Table 8: OTCoarsening on Cora () under the shipped defaults. The argmax returns fewer supernodes than requested; attach keeps that count and repairs the partition, isolate overshoots the request, and isolateRecursive stacks isolate levels and keeps the one closest to the request.
| asked | argmax alone | attach | isolate | isolateRecursive | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| purity | largest | purity | largest | uncovered | levels | purity | |||||
| 0.5 | 1243 | 987 | 0.795 | 418 | 0.901 | 59 | 417 | 1404 | 1 | 1404 | 0.930 |
| 0.7 | 746 | 656 | 0.661 | 1025 | 0.862 | 44 | 1024 | 1680 | 2 | 830 | 0.883 |
| 0.9 | 249 | 231 | 0.464 | 1836 | 0.794 | 178 | 1835 | 2066 | 4 | 252 | 0.780 |
C.4 Local variation: our generalizations and a vectorized edge cost
We extend the algorithm of Loukas [31] on four points, and vectorize its edge cost. We derive and evaluate these choices in a forthcoming work, and only state here what each one does and its default in the toolkit.
-Laplacian family. The original cost is derived for the combinatorial Laplacian . We replace it by the family of [23, 24], which covers the combinatorial, normalized and self-loop normalized Laplacians. The RSA cost, the spectral basis and the lifting between levels are all expressed through the chosen . The default is the self-loop normalized Laplacian (Table 5), with preserved eigenvectors.
Reduction between levels. Each level reduces the preserved basis before the next one, and the cost projects with that same reduction. The bound of Loukas thus holds for it. We offer two reductions, for each . The default, reduction="global", averages each supernode with the masses of its nodes, i.e. their summed. It is the only weighted average per level whose product over the levels is , the reduction every metric of the toolkit uses. The other, "per_level", takes the pseudoinverse of each level, an orthogonal projection at each level. With the combinatorial Laplacian, it is the algorithm of Loukas. Its reduction, the product of the per-level pseudoinverses, is returned as P_chain and stored with the partition (App. F.1).
Per-level budget. The original algorithm sets no limit on how many nodes a level may remove: each level aims at the whole remaining reduction. Our implementation lets each level contract a fraction n_e_percent of its current nodes, 10% by default. The descent thus contracts many edges in its first levels, and fewer and fewer as the graph shrinks. A fixed budget, with the same number of contractions at each level, is also available. The last level removes only the contractions still needed to reach the requested size.
Stalls and absorption. Within a level, a node can be included in at most one contraction, so a hub merges with only one of its neighbors per level. On graphs with a heavy-tailed degree distribution (such as a star), a level then removes far fewer nodes than its budget, which we call a stall. When a level removes less than half of its budget, our implementation lets a free node join a cluster already formed. The join is accepted if the enlarged cluster costs at most twice the worst cost accepted at that level, up to ten nodes per cluster. This pass is on by default, and how much it helps depends on the graph. Typically it is triggered only for extreme coarsening ratios, and never on the SBM.
Vectorized edge cost. The reference implementation scores each candidate edge separately, in a Python loop. For an edge, the cost has a simple closed form. It is the squared distance between the two nodes in the spectral embedding, i.e. their rows in the preserved eigenvectors, rescaled by their degrees and multiplied by a factor that depends on the two degrees and the edge weight. Intuitively, merging two nodes is cheap when the preserved eigenvectors barely tell them apart. On the combinatorial Laplacian, it is , the cost of the reference code, which the per-level reduction preserves at each level. Under the global reduction, this form holds at the first level only. The factor of the next levels also depends on the masses of the two supernodes. We then score the edges by blocks with array operations. The variation neighborhood family has no such closed form, and uses the general cost of Eq. (13) with the Frobenius norm of the reference code. The spectral norm of Eq. 6 of [31] is an option (cost_norm).
C.5 ConvMatch: the pair inside the cost, and a vectorized exact cost
ConvMatch [13] merges pairs of supernodes greedily. It scores a merge by how much it changes one graph convolution, computed on the coarsened graph and lifted back. We make three remarks on this cost. First, it uses one pair for the operator and another one for the features, and our implementation lets the user choose the pair. Second, once vectorized, its exact form runs about as fast as its bound. Third, adding the edges to the candidate pairs helps the normalized pair.
The objective of Dickens et al. Their cost (Eq. 8 of [13]) compares one graph convolution on the original graph with its lifted counterpart on the coarsened one,
where is the binary partition matrix and averages the features of each supernode. The coarse operator follows Huang et al. [21], , with the summed degrees of each supernode. Note that it keeps the internal edges and the size of each supernode as self-loops. We write it with an H to reserve for . Merging and into only changes the coarse outputs of and of their neighbors. ConvMatch scores a merge by this exact change (their Eq. 9). A-ConvMatch replaces it by an upper bound (their Theorem 1), cheaper to evaluate. Both only score candidate pairs, the nearest neighbors of each node in an SGC embedding (App. A.3).
The cost mixes two pairs. The operator is exactly for the lifting , whose columns have unit norm, and . This pair rescales the columns of the normalized pair of the self-loop -Laplacian [24], with the degrees of plus one, and . The two pairs share the projection . Their coarse operators are similar, with , the summed degree and the size of supernode , so is the identity on singletons. The only change is that does not preserve the Laplacian: takes the supernode sizes as self-loops, so it is not the self-loop -Laplacian of . The taxonomy [24] only studies pairs that preserve it. It therefore uses , and so does the toolkit.
The features, however, are reduced and lifted by the binary pair. The cost of Eq. (32) thus mixes two pairs: the operator comes from the normalized pair, while the features go through the binary one. The binary lift copies the coarse output to all nodes of a supernode, where shares it according to . In the view of [24], a single pair defines both the operator and the projection , and the lifted output is . Our implementation adds the two consistent pairs through pair, with the paper as the default:
Compared with the paper, binary changes only the operator, and normalized only the outer pair.
One form for the three pairs. To derive the exact cost and its bound once for the three pairs, we write the output of a supernode at a given level, i.e. the row of , as
where runs over the supernodes of the level, is non-zero when is itself or one of its neighbors, and is the reduced feature of supernode , rescaled according to the pair (Table 9).
Table 9: The three pairs of our ConvMatch implementation in the common form . is the mean feature of supernode , its size, the summed degree of its nodes and . The lift from back to multiplies by the last column.
| pair | lift | |||
|---|---|---|---|---|
| dickens | 1 | |||
| binary | 1 | |||
| normalized |
Exact cost and bound for the three pairs. Dickens et al. derive the exact cost (their Eq. 9) and its bound (their Theorem 1) for their pair only. We check that both extend to the two other pairs, so that each of the three runs as ConvMatch and as A-ConvMatch. The derivation only needs three facts, which hold for every pair when and merge into . First, for a fixed , so the row and the column of are the sums of those of and . Second, only depends on the supernode . Third, and only depend on and . Hence the output of a neighbor changes by
The exact cost sums the change of the outputs of , and of their neighbors. For the bound, the triangle inequality splits each neighbor term in two, , with equality when and share no neighbor. The two sums are cached per supernode, so the bound costs per pair. For pair=dickens, we recover Theorem 1.
A vectorized exact cost. The released code scores the candidate pairs one by one, in a Python loop. Our implementation scores them with array operations. It gathers the neighbors of all pairs in one pass, puts the two terms of a neighbor shared by and in one norm, and sums. To bound the memory, the pairs go in blocks under a fixed memory budget. A test against a dense recomputation of all the coarse outputs checks that the cost is still Eq. 9, for the three pairs. It runs one to two orders of magnitude faster than our earlier loop over pairs, and about as fast as A-ConvMatch (Table 2), for about a third more peak GPU memory on Cora and PubMed and the same on ogbn-arxiv. The partitions of A-ConvMatch are close to the exact ones (Table 10).
A second candidate set. Our option knn+edges adds the edges of the current graph to the candidate pairs. It is our addition, unused by default.
Which pair works best. Table 10 compares the three pairs. With the candidates of the paper, they are close in each column, although the two consistent pairs lower the RSA on PubMed. With the edges added, the normalized pair has the lowest CME and the lowest RSA in each column, for the bound and for the exact cost. At , it also gains up to four points of max_acc over the pair of the paper, and the binary pair mostly sits in between. Interestingly, with the edges added, the pair of the paper (dickens) lowers its max_acc and raises its CME at . The normalized pair lowers its CME and its RSA in each column. The exact cost gives the same ranking.
Table 10: ConvMatch under the three pairs, with the exact cost (ConvMatch) and the bound (A-ConvMatch), and with the candidates of the paper (kNN) or the edges added. CME is the objective of Dickens et al., Eq. (32), in thousands (mode="dickens" of the metric); acc is max_acc in %. Best value of each block in bold.
| Cand. | pair | Cora | PubMed | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CME | RSA | acc | CME | RSA | acc | CME | RSA | acc | CME | RSA | acc | ||
| Exact cost (ConvMatch) | |||||||||||||
| kNN | dickens | 36.2 | 2.14 | 90.5 | 53.0 | 2.61 | 86.4 | 28.2 | 4.83 | 88.5 | 36.2 | 4.01 | 84.0 |
| binary | 36.0 | 2.16 | 90.4 | 52.8 | 2.82 | 85.7 | 27.5 | 2.69 | 88.6 | 35.1 | 3.48 | 84.2 | |
| normalized | 35.5 | 2.16 | 90.2 | 51.6 | 2.78 | 86.1 | 27.4 | 2.69 | 88.5 | 34.9 | 2.98 | 84.3 | |
| kNN | dickens | 34.6 | 3.25 | 90.6 | 56.1 | 2.58 | 84.8 | 28.9 | 2.15 | 88.5 | 40.6 | 2.04 | 81.7 |
| + edges | binary | 32.4 | 3.19 | 91.2 | 53.5 | 2.77 | 84.3 | 27.5 | 2.79 | 88.8 | 37.7 | 2.28 | 84.0 |
| normalized | 30.4 | 1.65 | 90.8 | 47.8 | 2.11 | 86.3 | 26.1 | 1.32 | 89.0 | 34.2 | 1.93 | 85.7 | |
| Bound (A-ConvMatch) | |||||||||||||
| kNN | dickens | 36.5 | 2.49 | 90.3 | 53.2 | 2.70 | 86.2 | 28.4 | 4.83 | 88.4 | 36.5 | 3.39 | 84.0 |
| binary | 36.0 | 2.49 | 90.4 | 52.9 | 2.60 | 86.2 | 27.6 | 2.97 | 88.6 | 35.1 | 3.19 | 84.3 | |
| normalized | 35.6 | 2.14 | 90.2 | 52.0 | 2.57 | 86.1 | 27.5 | 2.97 | 88.5 | 35.2 | 4.31 | 84.2 | |
| kNN | dickens | 36.2 | 4.15 | 90.0 | 57.3 | 3.87 | 82.7 | 29.4 | 2.06 | 88.3 | 41.0 | 3.00 | 81.6 |
| + edges | binary | 32.4 | 3.25 | 90.9 | 52.8 | 3.11 | 83.9 | 27.6 | 2.29 | 88.7 | 37.9 | 3.18 | 83.7 |
| normalized | 30.5 | 1.85 | 90.7 | 47.8 | 2.06 | 85.4 | 26.2 | 1.49 | 89.0 | 34.5 | 2.02 | 85.2 | |
C.6 NOPE: two released routines, and a shortcut that differs from Eq. 1
Bai et al. [4] define two costs, NOPE (their Eq. 1) and its closed-form approximation NOPE* (their Eq. 2). Their repository implements them as two merge routines, selected by a flag relax: False, the default, for NOPE and True for NOPE*. The NOPE routine produces the numbers reported in the paper, but its cost differs from Eq. 1. Our implementation therefore provides three variants: nope (Eq. 1, our default), nope_repo (the NOPE routine of the repository) and nope_star (NOPE*).
nope: Eq. 1 of the paper. This variant computes as stated in Eq. 1, vectorized over the neighborhood union .
nope_repo: the NOPE routine of the repository. The repository scores a candidate pair as , with the size weight of Eq. (15). The sum is meant to compute , the sum of Eq. (15). Here and sum the squared similarities over each node's neighborhood, and .
runs over the intersection only. This saves time. Since and depend on one node each, they are cached and reused at each candidate merge, and only the small intersection is evaluated per pair.
The two sums differ: Equation 1 sums a single quantity, , over the neighborhood union. For a fixed summand , inclusion-exclusion is exact,
Applied to , it would recover Eq. 1 from two neighborhood sums and one intersection sum. But this summand couples both endpoints: depends on through , so it cannot be cached per node. A per-node cache can only store a self-term such as , which is not the summand of Eq. 1.
Split the union into , and , and expand . Table 11 compares the two costs region by region.
Table 11: Per-node contribution to the pair cost, by region of the neighborhood union.
| region | Eq. 1 (nope) | repository (nope_repo) |
|---|---|---|
| (only ) | ||
| (only ) | ||
| (both) |
On and , the repository keeps a single squared similarity and drops the cross term with the other square. On , it counts the squared similarities twice, since , and each contribute them. The two errors do not cancel. For instance, two nodes with equal features, , have for every , so Eq. (15) gives a null cost, the ideal merge. The repository gives them , the larger as and resemble their neighbors. On random graphs we measured a relative deviation of 24% to 228% between nope_repo and Eq. 1.
nope_star: the NOPE* routine of the repository. This routine implements the closed form of NOPE* (Eq. (16)), which weighs by the supernode sizes and by . It matches the paper.
C.7 STPGC: labels in the three operations, and where we differ from the code
Label-guided dominance (Sec. 3.4 of the paper). Labels enter all three operations of STPGC. In strong collapse, the neighbors of that share its label are checked first when looking for a dominator, which decides which node absorbs . In neighborhood coning, the same ordering decides which neighbor becomes the artificial dominator, hence the merge target. In edge collapse, a dominated edge whose two endpoints share a label is skipped, so intra-class edges survive by construction. This last one is a hard filter, where the other two only set an order.
As published, STPGC thus uses the train and validation labels while it coarsens. Two settings isolate this. The default of stpgc enables label-guided dominance with label_split="train_val", the setup of Table 1 of the paper. label_guide=False disables it, which makes the method purely topological. The label_split argument also offers train_only, which leaves out the validation labels. On Cora, the two settings never return the same partition.
The heterophilic DropEdge is out of scope. Sec. 4 of the paper applies a DropEdge to the coarsened graph before GNN training, at a 10% rate, prioritizing edges between supernodes of different labels. The released code implements it as a deterministic deletion of heterophilic edges. We leave it out. It rewires the coarsened graph, which our (Partition, info) output does not include, and the paper frames it as a stabilizer for GNN training. A DropEdge can be applied at training time instead.
Components without training nodes are kept. Their find_component deletes connected components under ten nodes that contain no training node. A partition maps every node, so we keep them.
Their edge and strong collapses also compare the labels of all nodes. Our implementation only uses the labels of the split chosen by label_split, so its partitions differ from theirs.
A law for . Their is a per-dataset constant: 15 on Cora and CiteSeer, 25 on DBLP, 50 on ogbn-arxiv, 100 on ogbn-products. We fit a law in the graph size to these five numbers, , which returns 15, 15, 26, 55 and 100 on the same five graphs. The floor and the ceiling recover the published values on the smallest and the largest graphs. The aim of this law is to give a reasonable initial value of on a new graph, before any tuning. As in their code, we also raise by one whenever the approximate phase raises , a step Algorithm 1 does not show.
Two speed-ups of the released code. The released code differs from the pseudo-code on two points that change the runtime and little else. First, the code runs neighborhood coning once, when strong and edge collapses stall, then switches to the approximate phase, as described in Sec. 3.4. Algorithm 4 instead repeats it at each stall. Second, the code only re-examines what the previous operation changed. The pseudo-code re-examines every candidate when it goes from one operation to the next. Our implementation follows the code on both points by default. The coning_once and incremental arguments switch back to the pseudo-code.
C.8 SGWL: which entry point, and when to stop splitting
Recall from App. A.4 that SGWL updates a soft transport plan between the nodes and parts by proximal steps (Eq. (17)). Each step multiplies entrywise by the kernel , then rescales it to the masses of the nodes and of the parts. Each node goes to the part that receives most of its mass in the final plan.
A single split or a recursive descent. The repository of Xu et al. [42] hosts two generations of the method. graph_partition cuts the graph once into parts with a single Gromov-Wasserstein transport plan. recursive_graph_partition cuts it recursively in two, the scalable method. We implement the recursive descent. The single split is still available by setting the number of parts per level, cluster_num, to the requested . We do not benchmark it. On a three-community SBM its purity is far below that of the descent, and its dense plan takes 57 GB on ogbn-arxiv at .
Each routine comes with its own . A step only acts through , so depends on the scale of the adjacency in . The released scripts call the single split with and , and the recursive descent with and . We take the second pair.
Two places where we follow the released code. Algorithm 4 of the paper assigns a node to the part . The released node_cluster_assignment first divides each column of by , so a node goes to the part that receives the largest mass relative to the mass of that part. Section 3.1 defines the node-prior cost as , and the released node_distribution_similarity squares it. We follow the code on both. On the SBM, the two versions of the assignment give the same number of supernodes and the same purity.
A stopping rule that targets a coarsening ratio. The paper stops after a fixed number of recursions , i.e. parts. The repository stops splitting a part once it has at most nodes. Neither targets a coarsening ratio. We provide two rules through stop_rule. The size rule reproduces the repository. The count rule, our default, always splits the largest part and stops once parts exist. The size rule overshoots the requested count, since a part typically ends well below the threshold: cutting a part of 12 under a threshold of 9 yields parts of 7 and 5 (Table 12). The count rule can only miss from below, when a part is too small to cut. Both rules run about the same number of proximal steps.
Table 12: SGWL on Cora () under the two stopping rules. The size rule is the one of the released code.
| asked | , size (repository) | , count (default) | |
|---|---|---|---|
| 0.5 | 1243 | 1281 | 1243 |
| 0.7 | 746 | 1057 | 746 |
| 0.9 | 249 | 407 | 249 |
C.9 GBGC: the target, and three options
Two papers of the same group define the method. GBGC, by Xia et al. [41], covers the graph with about granular-balls grown by breadth-first search, then splits them while a structural quality improves (App. A.4). A later work [36] keeps this splitting scheme and changes three of its ingredients. We catalogue the first paper, and provide the changes of the second as options.
The initial ball count is a floor, and it is not . Eq. 3 of [41] targets initial balls. Each ball grows by breadth-first search from the node of highest degree not yet covered, and stops before it exceeds nodes (Algorithm 2 of their appendix; Eq. 4 stops on the size of a layer instead). If every ball reached nodes, there would be balls. On a real graph, many balls stop early, since their neighbors already belong to earlier balls. On Cora (, ), we obtain 401 initial balls of about 6 nodes, instead of 50 balls of 50 nodes. METIS, used by the later work, is asked for balanced parts and returns exactly that number. A split only raises the count. The initial count is thus a floor. No smaller count can be requested. At the other end, the splits stop on their own at 720 balls. With the breadth-first initialization, GBGC thus only reaches the feasible range on Cora.
Three options. Table 13 lists the three changes of [36], with the GBGC paper as the default. Our implementation also provides quality_split_factor, a factor on the right-hand side of Eq. 8 of [41], equal to 1 in the paper.
Table 13: The three GBGC options. A ball is split into and when the criterion is met. The default is the paper we catalogue.
| Option | [41] | [36] | Default |
|---|---|---|---|
| init | BFS from the highest-degree centers (Eq. 4) | METIS asked for parts | BFS |
| accept | (Eq. 8) | sum | |
| use_transitivity | (Eq. 6) | alone | true |
Asking on Cora, the breadth-first initialization still gives its 401 balls under both criteria. With METIS, the sum of the paper gives exactly 249, and the mean returns 62, since it accepts only 12 splits. Only METIS with the sum reaches the request, and we report it as a second version, gbgc_metis (App. A.4).
C.10 FGC: two released solvers
The paper of Kumar et al. [29] presents FGC with and without a sparsity regularizer (its Sec. 4.1). Their repository implements the two as separate notebooks, which also differ in normalization, initialization and step. Our two variants replicate these two notebooks, through a variant argument.
Metric solver (default). The notebook FGC_experiment.ipynb produces the paper's REE, DE and HE tables. It has no sparsity regularizer (), normalizes the coarse features by their norm, initializes the lifting matrix as a dense Gaussian, and takes a fixed gradient step of over ten outer iterations of one hundred inner steps. We use it as the default (variant="metrics"). The notebook and the appendix of the paper agree on the three weights of Eq. (20) for the main Cora run, 500, 500 and with the number of features, but not on which weight takes which value. Both put on the feature term. The notebook puts on , the weight of the log-determinant, and 500 on , the weight of the group-sparsity penalty. The appendix of the paper reports and . weights_source provides both settings, and defaults to the notebook.
Sparsity solver. The notebook Node_classification_FGC_with_sparsity.ipynb targets node classification. It adds the sparsity regularizer , normalizes by the norm, initializes sparsely, and takes a single inner step. We provide it as variant="sparsity".
Step size. Algorithm 1 of the paper uses the true Lipschitz constant of the four gradient terms of Eq. 11 of [29]. Neither notebook computes it. The metric solver uses a fixed step of . The sparsity notebook sets a proxy and steps by . Its effective step is thus . Our implementation uses these two steps for the two variants. Which weights and step to change on the SBM is discussed in App. E.2.
Soft versus hard lifting matrix. The paper's metrics are computed on the continuous lifting matrix, which is not a partition. On Cora at , we reproduce a REE of 0.038 on that matrix, against the 0.058 reported. The hard partition given by its row-wise argmax gives 0.549. Our implementation always returns the hard partition. The continuous matrix is stored in info, behind a flag that warns against using it as a coarsening.
C.11 IPE: a sign in the gradient, and the default hyperparameters of the paper
No official code was released for IPE, so our implementation follows the gradients of Appendix A.4 of Cohen & Talmon [11].
A sign in the Grassmann gradient. The sign of the Grassmann gradient printed in Eqs. 16 and 17 of [11] differs from the derivative of the term. The term enters the objective as , so its gradient is , while the paper prints . With the printed sign, a descent step pushes the column space of away from . We provide both signs through correct_grassmann_sign, and default to the sign of the derivative.
IPE at the default hyperparameters of the paper. INGC rounds to a partition at each outer iteration. A column left empty makes singular, and the log-determinant then drives the collapse further. On Cora at , INGC ends with 3 supernodes for 249 requested. SINGC rounds once, at the end, and returns the requested count, but no better than random on the SBM and on Cora. On PubMed at , SINGC fails and INGC matches random. Tuning on the SBM lifts SINGC from random to a purity of 0.836 (App. E.2). A tuning per dataset would thus likely help. It is however costly, with three weights, a step and two iteration counts to set. We keep SINGC as the default, the simpler of the two variants.
D Datasets and preprocessing
The toolkit proposes loaders for ten node-classification graphs : three homophilic citation networks (Cora, CiteSeer, PubMed), four heterophilic graphs (chameleon, squirrel, Amazon-ratings, Roman-empire), and three large-scale graphs (ogbn-arxiv, ogbn-products, Reddit). We load them with the standard PyG and OGB loaders.
Two preprocessing steps make the inputs match the assumptions of the methods (Sec. 2). The spectral costs are written for a Laplacian that is symmetric by construction, which also makes the eigensolvers faster on it, and Graclus requires a graph without isolated node. First, we strip self-loops and symmetrize any directed input, since pymetis and the edge-contraction methods assume an undirected graph. Only chameleon, squirrel and ogbn-arxiv ship directed. Chameleon and squirrel also ship with self-loops. Second, we restrict a graph to its largest connected component, since the cost of local variation is built on a single null eigenvector of , i.e. a connected graph. We apply both steps to all datasets. Only Cora, CiteSeer and ogbn-products have several components. CiteSeer loses about a third of its nodes. PubMed, chameleon, squirrel, Amazon-ratings, Roman-empire, ogbn-arxiv and Reddit already form a single connected component, and the step leaves them unchanged. Table 14 summarizes the drop per dataset.
Table 14: The ten datasets after preprocessing. Symmetrized: the input graph is directed. Before LCC: number of nodes before we keep the largest connected component, for the three graphs that are not connected.
| Dataset | Type | Nodes | Feat. | Cls. | Symmetrized | Before LCC |
|---|---|---|---|---|---|---|
| Cora | homophilic | 2,485 | 1,433 | 7 | 2,708 | |
| CiteSeer | homophilic | 2,120 | 3,703 | 6 | 3,327 | |
| PubMed | homophilic | 19,717 | 500 | 3 | – | |
| chameleon | heterophilic | 2,277 | 2,325 | 5 | ✓ | – |
| squirrel | heterophilic | 5,201 | 2,089 | 5 | ✓ | – |
| Amazon-ratings | heterophilic | 24,492 | 300 | 5 | – | |
| Roman-empire | heterophilic | 22,662 | 300 | 18 | – | |
| ogbn-arxiv | large-scale | 169,343 | 128 | 40 | ✓ | – |
| ogbn-products | large-scale | 2,385,902 | 100 | 47 | 2,449,029 | |
| large-scale | 232,965 | 602 | 41 | – |
E Experiments on synthetic graphs
E.1 The SBM at other ratios
Figure 1 in the main text shows the coarsened graph of each method at the ratio . Figures 2 and 3 show the same panel at and . The observations of Sec. 5 hold across ratios. The methods that preserve the communities at 0.7 preserve them at each ratio. The concentrated methods coarsen one community first. The gap widens at 0.9, where fewer supernodes leave less room to respect the three communities at once.

Figure 2: Coarsened graph per method on the three-community SBM, at ratio r = 0.5.

Figure 3: Coarsened graph per method on the three-community SBM, at ratio r = 0.9.
E.2 Hyperparameter tuning
Four methods of Fig. 1, marked with *, run with hyperparameters tuned on the SBM: UGC, STPGC, FGC and IPE. At their paper defaults, these four are well below the others. The tuning is done at r = 0.9, and the three SBM figures reuse the tuned configuration at each ratio.
This subsection measures how much of this gap tuning their hyperparameters closes. The setup is still an SBM with three communities, nodes, and coarsening ratio (so supernodes). Node features are drawn as , as in Sec. 5. Quality is the purity of Sec. 4, with the communities as labels: the fraction of nodes that belong to the majority community of their supernode. It equals 1.0 when every supernode lies inside one community.
Table 15 compares each method's default hyperparameters, usually the source paper's, against a grid search. We grid the methods whose default scores below 0.9, apart from NOPE (0.83). At their defaults, Leiden, Kcenter, Herding, local variation, ConvMatch and GW GPC score 1.0, and METIS, Graclus, GW KGPC, OTCoarsening, SGWL and GBGC lie between 0.90 and 0.99.
Table 15: Purity max_acc on the SBM () under default versus tuned hyperparameters. The tuned column is the best configuration of the grid that still returns the requested 50 supernodes.
| Method | Default | Tuned | Key hyperparameter |
|---|---|---|---|
| UGC | 0.50 | 0.50 | none (insensitive) |
| STPGC | 0.76 | 0.85 | raised from 1% to 5% of |
| FGC | 0.50 | 0.86 | learning rate 0.02; , lowered to 1 and 10, raised to 500; 200 iterations |
| IPE | 0.49 | 0.84 | Grassmann rank 50, learning rate , 5000 iterations |
Table 16: Grids behind Table 15. is the requested number of supernodes.
| Method | Configs | Grid |
|---|---|---|
| UGC | 12 | adjacency in the hash: yes, no; projectors ; distribution: uniform, normal |
| STPGC | 24 | |
| FGC | 1152 | solver: metrics, sparsity; learning rate (metrics only); ; iterations |
| IPE | 432 | variant: SINGC, INGC; learning rate ; ; Grassmann rank ; iterations for SINGC, outer steps for INGC |
UGC does not improve. None of its 12 configurations beats its default, at 0.50. Neither the number of projectors nor the adjacency block changes that.
The best setting for STPGC keeps the default and raises , the number of removed nodes below which a round of the approximate phase increments (App. A.3), from 1% to 5% of . It scores 0.85. This may be due to growing sooner, which on this graph keeps the merges inside the communities for longer. The gain over the default is 0.09. STPGC runs label-free here: its default uses the labels, and on the SBM the labels are the planted communities.
FGC gains the most from tuning, over a grid of 1152 configurations. Its default scores 0.50 and its best setting 0.86: a learning rate of 0.02 in place of , the reconstruction weight lowered from 500 to 1, the group-sparsity weight from 500 to 10, the log-det weight raised from to 500, over 200 outer iterations. The learning rate accounts for most of that gain. With the 10 iterations of the authors' notebook, the same setting still scores 0.82.
IPE scores 1.0 over its grid of 432 configurations, with a Grassmann rank of 10, but gives only 5 supernodes of the 50 requested. Among the configurations that return the requested count, the best has 0.84 purity, at rank 50 with a learning rate of over 5000 iterations of SINGC. At the published iteration count it is 0.78. FGC and IPE, the two dense optimization methods, are the hardest to tune: each has several weights, a learning rate and an iteration count, and their paper defaults score at the level of the random baseline on this graph.
IPE and the Grassmann rank. IPE aligns the coarsened graph with as many leading eigenvectors of as its Grassmann rank, which by default equals the requested number of supernodes. With the rank set to the number of communities and the best configuration of the grid otherwise (SINGC, a learning rate of , , ), IPE returns three community-pure supernodes on all seeds, for the 50 requested (Fig. 4). Under the published defaults, the same rank still returns 50 supernodes with no community structure. Intuitively, the three leading eigenvectors of this SBM separate the communities. On real graphs, where the classes are less tied to the spectrum, IPE may behave differently.
IPE on the SBM, its Grassmann rank set to the number of communities
Original N=500, 3 communities
IPE, Grassmann rank = 3 (number of communities) n=3 supernodes, purity = 1.00

Figure 4: IPE on the three-community SBM, with the Grassmann rank set to 3 and the best configuration of Table 16. It returns three community-pure supernodes on all seeds.
E.3 A random geometric graph
We repeat the check of Sec. 5 on a random geometric graph (RGG). Its nodes are 500 points drawn uniformly in the unit square, and two points closer than 0.08 are joined. This gives a connected graph with 2306 edges, i.e. a mean degree of about 9. The features are drawn as for the SBM, . No method sees the positions. Intuitively, a good coarsening of this graph forms supernodes that are compact in the square and connected in the graph, close to the Voronoi cells of their centroids.
We measure two quantities on the partition. The Voronoi agreement (vor) is the fraction of nodes whose nearest centroid, in the square, is the centroid of their own supernode. It equals 1 when the partition is the Voronoi diagram of its centroids. The connectivity (conn) is the fraction of supernodes whose nodes induce a connected subgraph of the original graph. Every method runs at its default, except UGC at , since its default computes from the labels. Fig. 5 shows the coarsened graph of each method at . Table 17 gives both quantities at and .
Graclus, Leiden, local variation, NOPE, NOPE*, STPGC and GBGC return only connected supernodes at both ratios. This is expected from their construction. Graclus, local variation and NOPE only merge adjacent nodes or supernodes. STPGC merges a node into one of its neighbors. GBGC grows its balls by breadth-first search. Leiden guarantees connected communities [35]. It is also the closest to a Voronoi diagram, with vor = 0.96 at . Random, UGC, FGC and IPE scatter their supernodes over the square, with vor and few or no connected supernodes at . Note that UGC, FGC and IPE run here without the tuning of App. E.2. METIS returns 56% of connected supernodes at . METIS has an option that forces connected parts. It is off by default. Our wrapper keeps this default. Several methods do not return exactly the requested number of supernodes. Table 17 gives the number they return.

Figure 5: Coarsened random geometric graph per method, at r = 0.9 (50 supernodes requested). The top-left panel is the original graph. Points are coloured by supernode, and two adjacent supernodes never share a colour. The shaded area is the convex hull of a supernode, and its inner edges are drawn in its colour. Crosses mark the centroids. A supernode that is not connected spreads its hull over other supernodes, and its centroid may fall outside its own points.
Table 17: Random geometric graph: number of supernodes returned (), Voronoi agreement (vor) and connectivity (conn) of each method, for 150 supernodes requested () and 50 ().
| Method | ||||||
|---|---|---|---|---|---|---|
| vor | conn | vor | conn | |||
| Random | 147 | 0.05 | 0.11 | 50 | 0.03 | 0.00 |
| METIS | 150 | 0.46 | 0.72 | 50 | 0.65 | 0.56 |
| Graclus | 145 | 0.72 | 1.00 | 45 | 0.83 | 1.00 |
| Leiden | 150 | 0.92 | 1.00 | 49 | 0.96 | 1.00 |
| UGC | 156 | 0.09 | 0.24 | 49 | 0.07 | 0.14 |
| GW-KGPC | 150 | 0.65 | 0.83 | 50 | 0.51 | 0.70 |
| Kcenter | 150 | 0.86 | 0.98 | 50 | 0.80 | 0.86 |
| Herding | 142 | 0.78 | 0.92 | 45 | 0.59 | 0.71 |
| OTCoarsening | 162 | 0.67 | 0.85 | 46 | 0.48 | 0.33 |
| Local variation | 150 | 0.94 | 1.00 | 50 | 0.81 | 1.00 |
| ConvMatch | 150 | 0.84 | 0.94 | 50 | 0.76 | 0.80 |
| NOPE | 150 | 0.62 | 1.00 | 50 | 0.67 | 1.00 |
| NOPE* | 150 | 0.71 | 1.00 | 50 | 0.78 | 1.00 |
| GW-GPC | 150 | 0.89 | 0.95 | 50 | 0.83 | 0.96 |
| STPGC | 150 | 0.79 | 1.00 | 50 | 0.64 | 1.00 |
| SGWL | 150 | 0.71 | 0.83 | 50 | 0.66 | 0.60 |
| GBGC | 62 | 0.71 | 1.00 | 50 | 0.73 | 1.00 |
| FGC | 147 | 0.21 | 0.40 | 50 | 0.26 | 0.00 |
| IPE | 150 | 0.03 | 0.04 | 50 | 0.04 | 0.00 |
F Additional details
F.1 Storing and reloading a coarsening
A coarsening is stored as its partition. Each saved coarsening is a directory with partition.npz (the integer assignment and the supernode count) and meta.json (the algorithm parameters, dataset, achieved ratio, coarsening time, and peak memory). The full Coarsening is reconstructed on load by replaying build_coarsening. Storing the partition shrinks a saved coarsening compared with storing , and , and it can still be inspected with np.load. Local variation under its per-level reduction also saves its P_chain in partition.npz. Listing 2 shows how a coarsening is saved and reloaded. The reloaded Coarsening is identical to a freshly computed one.
Listing 2: Storing and reloading a coarsening. Only the partition and its metadata are written to disk.
from graco import get_dataset, coarsen_local_variation, build_coarsening
from graco import save_coarsening, load_coarsening
data = get_dataset("Cora")
partition, info = coarsen_local_variation(data, r=0.5)
co = build_coarsening(data, partition, laplacian_type="normalized_self_loop")
# save: only partition.npz and meta.json are written to disk
save_coarsening(co, dir="runs/cora_lv_r05", dataset="Cora",
algo="local_variation", algo_params={r: 0.5})
# reload: the coarsened graph, Q and P are rebuilt by replaying build_coarsening
co = load_coarsening("runs/cora_lv_r05", data)
G Related surveys and tooling
There are existing surveys on coarsening: Chen et al. [9] review coarsening from its scientific-computing origins, and Hashemi et al. [19] cover it jointly with graph sparsification and condensation. These surveys organize the literature, but none provides a codebase on which the methods can be run and compared.
The closest general-purpose tools address the neighboring object of graph pooling, which has its own unifying abstractions and libraries: the Select-Reduce-Connect framework [17] and Torch Geometric Pool [1], both built on PyTorch Geometric [15] for pooling layers trained end-to-end inside a graph neural network. A few of their non-trainable operators overlap with coarsening, for instance Graclus [12], but they cover neither the modern coarsening literature nor its metrics. Pooling optimizes a task loss, while coarsening preserves a fixed graph property (see Sec. 3).