GraCo:统一图粗化算法工具包,集成 17 种方法与评测指标
GraCo: A Unified Toolkit of Graph Coarsening Algorithms and Metrics
做图学习的朋友可以看看 GraCo,17 种图粗化方法统一接口,还带指标和四个数据集上的耗时内存对比,选方法省事多了。
论文 GraCo 将图粗化统一定义为节点划分加一个拉普拉斯算子的组合,粗化图及对应的缩减与提升矩阵均由这两个选择推出。工具包用同一套符号、输入和输出实现了文献中的 17 种方法与 1 个随机基线,分为五个家族,并整理了适用于任意粗化结果的指标集合。作者在合成随机块模型上验证实现正确性,并在 Cora、PubMed、ogbn-arxiv 和 ogbn-products 四个数据集上报告了各方法的运行时间与峰值内存。代码开源于 GitHub。
GraCo: A Unified Toolkit of Graph Coarsening Algorithms and Metrics
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.