arXiv:2611.01200cs.LGOct 2026

Manuscript Offprint

arXiv:2611.01200

GraCo: A Unified Toolkit of Graph Coarsening Algorithms and Metrics

Antonin Joly

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 NN nodes to a smaller graph of n≪Nn \ll N 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:

  1. 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.

  2. 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.

  1. 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 QQ, and the reduction PP. 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")

References (39)