BeGIN (Benchmarking for Graphs with Instance-dependent Noise)
收藏BeGIN 数据集概述
数据集简介
BeGIN 是一个提供带有实例依赖性标签噪声的图数据集的基准测试平台。该数据集包含10个图数据集,涵盖六种不同的噪声类型,并提供了多种噪声处理策略的评估基准。
标签噪声类型
| 噪声类型 | 类依赖性 | 实例依赖性(拓扑) | 实例依赖性(特征) |
|---|---|---|---|
| Uniform | ✔ | ||
| Pairwise | ✔ | ||
| Feature | ✔ | ✔ | |
| Topology | ✔ | ✔ | |
| Confidence | ✔ | ✔ | ✔ |
| LLM | ✔ |
内置数据集
| 类别 | Cora-ML | WikiCS | Product-s | Children | History | Photo | Cornell | Texas | Washington | Wisconsin |
|---|---|---|---|---|---|---|---|---|---|---|
| 类别数量 | 7 | 10 | 44 | 24 | 12 | 12 | 5 | 5 | 5 | 5 |
| 节点数量 | 2,995 | 11,701 | 54,025 | 76,875 | 41,551 | 48,362 | 191 | 187 | 229 | 265 |
| 边数量 | 8,158 | 216,123 | 74,420 | 1,554,578 | 358,574 | 500,939 | 292 | 310 | 394 | 510 |
| 节点同质性 | 0.810 | 0.659 | 0.790 | 0.464 | 0.784 | 0.790 | 0.116 | 0.067 | 0.162 | 0.151 |
| LLM噪声率 | 0.306 | 0.309 | 0.303 | 0.575 | 0.322 | 0.356 | 0.272 | 0.246 | 0.314 | 0.283 |
功能模块
- 噪声标签检测器:帮助识别图数据集中的错误标签数据。
- 噪声鲁棒学习:提供预配置的训练流程,支持多种噪声鲁棒模型的训练和比较。
使用方法
-
数据集生成: python from dataset.BeGINdataset import NoisyGraphDataset, NoisyProducts, NoisyCoraML, NoisyWikiCS from dataset.noisify import noisify_dataset noisy_dataset = NoisyGraphDataset(root=./data, name=cornell) noisy_label, transition_matrix = noisify_dataset(noisy_dataset, noise_type=topology)
-
噪声标签检测: python python train_detector.py --data cora_ml --noise_type llm --method gcn --device cuda
-
噪声鲁棒模型训练: python python train_noise_robust.py --data cora_ml --noise_type llm --method clnode --device cuda
环境配置
python conda create -n begin python=3.11 conda activate begin conda install pytorch==2.1.0 numpy==1.26.4 pytorch-cuda=12.1 -c pytorch -c nvidia conda install pyg -c pyg pip install torch_sparse==0.6.18+pt21cu121 -f https://data.pyg.org/whl/torch-2.1.0+cu121.html pip install torch_cluster==1.6.3+pt21cu121 -f https://data.pyg.org/whl/torch-2.1.0+cu121.html pip install torch_scatter==2.1.2+pt21cu121 -f https://data.pyg.org/whl/torch-2.1.0+cu121.html pip install huggingface-hub ruamel.yaml nltk pandas nni pyyaml matplotlib




