Official implementation for the main node-classification experiments of:
Learning on Imbalanced Graph with Topology-aware Pre-training and Dual Prompt Fine-tuning
UniIGL follows a pretrain-then-finetune pipeline for three settings:
classnum: class imbalance onlytopology: topology imbalance onlyboth: joint class-topology imbalance
The released main-experiment configs cover the six datasets used in the paper:
Cora, CiteSeer, Photo, Chameleon, Squirrel, and Actor.
The paper experiments used Python 3.8.12, CUDA 10.1, PyTorch 1.9.1, and PyTorch Geometric 2.0.1. Install the Python dependencies with:
pip install -r requirements.txtRun a single config:
python main.py --config config/Cora_both.ymlUse a specific device or MC-dropout sample count:
python main.py --config config/Cora_both.yml --device cuda:0 --mc_samples 20Run all released configs:
for config in config/*.yml; do
python main.py --config "$config"
doneOverride the reporting seed from the command line:
python main.py --config config/Cora_both.yml --random_seed 0Validate configs before running:
python scripts/validate_configs.pyRun the 10-seed protocol and aggregate result files:
python scripts/run_all.py --configs config/*.yml --seeds 0 1 2 3 4 5 6 7 8 9Aggregate existing result files without launching training:
python scripts/run_all.py --aggregate-onlyThe script writes tab-separated results to res/{dataset}_{imbtype}.txt with
the paper metric order: Acc., bAcc., M-F1, and W-F1.
scripts/run_all.py writes a summary table to res/summary.tsv.
- The YAML files contain the recommended per-dataset settings for this release.
- The
_both.ymlconfigs useimbtype: "both"for naming and output consistency. In this code release,bothreuses the long-tailed labeled split path and the topology-aware pretraining/fine-tuning modules. - The paper reports mean and standard deviation over 10 matched random seeds.
Use
--random_seed {0..9}and aggregate the generated result files to reproduce that protocol, or usescripts/run_all.py. --rho_clsis accepted as an alias for--imb_ratio;--least_pre_epochsis accepted as an alias for the historical--least_Pre_epochsoption.- The configs intentionally omit compatibility-only keys that are not read by the released main pipeline.