Skip to content

RingBDStack/UniIGL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UniIGL

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 only
  • topology: topology imbalance only
  • both: joint class-topology imbalance

The released main-experiment configs cover the six datasets used in the paper: Cora, CiteSeer, Photo, Chameleon, Squirrel, and Actor.

Installation

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.txt

Running Experiments

Run a single config:

python main.py --config config/Cora_both.yml

Use a specific device or MC-dropout sample count:

python main.py --config config/Cora_both.yml --device cuda:0 --mc_samples 20

Run all released configs:

for config in config/*.yml; do
  python main.py --config "$config"
done

Override the reporting seed from the command line:

python main.py --config config/Cora_both.yml --random_seed 0

Validate configs before running:

python scripts/validate_configs.py

Run 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 9

Aggregate existing result files without launching training:

python scripts/run_all.py --aggregate-only

The 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.

Reproducibility Notes

  • The YAML files contain the recommended per-dataset settings for this release.
  • The _both.yml configs use imbtype: "both" for naming and output consistency. In this code release, both reuses 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 use scripts/run_all.py.
  • --rho_cls is accepted as an alias for --imb_ratio; --least_pre_epochs is accepted as an alias for the historical --least_Pre_epochs option.
  • The configs intentionally omit compatibility-only keys that are not read by the released main pipeline.

About

UniIGL: Unified Imbalanced Graph Learning with Topology-aware Pretraining and Dual Prompt Fine-tuning

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages