GC-Bench
收藏资源简介:
GC-Bench数据集由北京航空航天大学等机构创建,旨在评估图凝聚算法在不同场景下的性能。数据集包括12个图数据集,涵盖了节点级和图级的任务。创建过程中,数据集被系统地用于分析图凝聚方法的有效性、转移性和效率。该数据集主要应用于机器学习领域,特别是图数据处理,旨在解决大规模图数据的管理、存储和传输问题。
GC-Bench dataset was constructed by Beihang University and other institutions, aiming to evaluate the performance of graph coalescing algorithms across various scenarios. The dataset comprises 12 graph datasets covering both node-level and graph-level tasks. During its development, the dataset was systematically utilized to analyze the effectiveness, transferability and efficiency of graph coalescing methods. This dataset is primarily applied in the field of machine learning, particularly in graph data processing, and is designed to address the management, storage and transmission issues of large-scale graph data.
Graph Condensation Benchmark (GC-Bench)
概述
GC-Bench 是一个基于 PyTorch 和 PyTorch Geometric 的开源统一基准,用于图凝聚(Graph Condensation, GC)。该基准集成了 12 种最先进的图凝聚算法,并在 12 个不同的图数据集上进行节点级和图级任务的性能分析。
主要贡献
- 综合基准:GC-Bench 系统地整合了 12 种代表性和竞争性的 GC 方法,通过统一的凝聚和评估,提供了关于有效性、可转移性和效率的全面分析。
- 多方面的评估和分析:对 GC 方法进行了详细的评估,考察了它们的有效性、效率和复杂性,揭示了当前 GC 算法的优势和局限性,为未来的研究提供了有价值的见解。
- 开源基准库:GC-Bench 是开源的,易于扩展新的方法和数据集,促进了进一步的探索和可重复研究,有助于推动图凝聚领域的发展。
开始使用
安装
bash git clone https://github.com/RingBDStack/GC-Bench.git cd GC-Bench pip install -r requirements.txt conda env create -f environment.yml
下载数据集
下载数据集并存储在 data 目录中。项目结构应如下所示:
bash
GC-Bench
├── data
│ ├── cora
│ ├── citeseer
│ └── ...
└── DM
└── ...
凝聚图数据集
不同的图凝聚方法(如梯度匹配、分布匹配、核岭回归等)可以在相应的目录中使用。
例如,运行分布匹配(DM)方法的命令如下: bash python DM/main.py --dataset=citeseer --epochs=2000 --gpu_id=0 --lr_adj=0.001 --lr_feat=0.01 --lr_model=0.1 --method=GCDM --nlayers=2 --outer=10 --reduction_rate=1 --save=1 --seed=1 --transductive=1
运行梯度匹配(GM)方法进行节点分类的命令如下: bash python GM/main_nc.py --dataset cora --transductive=1 --nlayers=2 --sgc=1 --lr_feat=1e-4 --lr_adj=1e-4 --r=0.5 --seed=1 --epoch=600 --save=1
运行梯度匹配(GM)方法进行图分类的命令如下: bash python GM/main_gc.py --dataset ogbg-molhiv --init real --nconvs=3 --dis=mse --lr_adj=0.01 --lr_feat=0.01 --epochs=1000 --eval_init=1 --net_norm=none --pool=mean --seed=1 --ipc=5 --save=1
参数也可以在配置文件中设置。使用配置文件运行实验的命令如下: bash python GM/main_nc.py --config config_DosCond --section DBLP-r0.250
评估凝聚图
对于不同架构的评估,可以运行以下命令: bash python baselines/test_nc.py --method ${method} --dataset cora --gpu_id=0 --r=0.5 --nruns=5
将 ${method} 替换为使用的具体凝聚方法。
对于不同任务的评估,可以运行以下命令: bash python evaluator/test_other_tasks.py --method ${method} --dataset cora --gpu_id=0 --r=0.5 --seed=1 --nruns=5 --task=LP
将 ${method} 替换为使用的具体凝聚方法,--task 参数可以设置为 LP(链接预测)、AD(异常检测)等。
算法参考
图凝聚(GC)算法的总结如下:

- 1GC-Bench: An Open and Unified Benchmark for Graph Condensation北京航空航天大学 · 2024年



