Official implementation of GALClean+ (Graph Active Learning and Cleaning) from the paper "Active Learning for Graphs with Noisy Structures".
Tested with Python 3.10 and PyTorch 2.5:
conda create -n galclean python=3.10 pip
conda activate galclean
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu121
pip install numpy scipy scikit-learn pandas matplotlib seaborn tqdm networkx pyyaml ogb
pip install torch_geometric==2.6.1
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.5.0+cu121.htmlRun GALClean+ on Cora with default settings:
python train.py --data Cora --noise_level 0.0 --rand_seed 0 --init_split 0Outputs are written to outputs/ as:
outputs/<run_id>/metrics.jsonoutputs/<run_id>/selected_indices.json
metrics.json records the paper-aligned settings used for the run.
Defaults (paper-aligned in this repo):
- Planetoid split:
public_fixed - Random noise sampling:
any - Edge filtering:
legacy
Splits: Planetoid (Cora, CiteSeer, PubMed) uses the legacy fixed split (public_fixed). Amazon/Coauthor use random.
Budget: Default is 2 initial nodes/class + 8 selected nodes/class = 10 total/class.
Random Edge-Adding Attack:
python train.py --data Cora --noise_level 0.6Unsupervised Adversarial Attack (CLGA):
python train.py --data Cora --attack clga --attack_percent 20This repo ships the paper CLGA attacked graphs under data/attacks/clga/:
Cora/CiteSeer/PubMed/Amazon-Photo/Coauthor-CS at 5/10/15/20%.
Random noise sweep (defaults to noise levels 0.0..1.0 step 0.2):
python scripts/run_sweep.py --mode random --datasets Cora CiteSeer PubMed --seeds 0 --splits 0
python scripts/collect_results.py
python scripts/plot_results.py --scale_percentCLGA sweep:
python scripts/run_sweep.py --mode clga --datasets Cora CiteSeer PubMed Amazon-Photo Coauthor-CS --seeds 0 --splits 0
python scripts/collect_results.py
python scripts/plot_results.py --scale_percent@article{chi2024active,
title={Active Learning for Graphs with Noisy Structures},
author={Chi, Hongliang and Qi, Cong and Wang, Suhang and Ma, Yao},
journal={arXiv preprint arXiv:2402.02321},
year={2024}
}