Skip to content

A Comprehensive Benchmark of Imbalanced Graph Learning (Accepted by ICLR 2025 Spotlight)

License

Notifications You must be signed in to change notification settings

RingBDStack/IGL-Bench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

39 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

logo


IGL-Bench: Establishing the Comprehensive Benchmark for Imbalanced Graph Learning (ICLR 2025 Spotlight๐ŸŒŸ) [PDF]

IGL-Bench is a comprehensive benchmark for Imbalanced Graph Learning (IGL) based on PyTorch and PyTorch Geometric. We embark on 16 diverse graph datasets and 24 distinct IGL algorithms with uniform data processing and splitting strategies.

๐Ÿ“” Overview of the IGL-Bench

pipeline

pipeline

IGL-Bench serves as the first open-sourced benchmark for graph-specific imbalanced learning to the best of our knowledge. IGL-Bench encompases 24 state-of-the-art IGL algorithms and 16 diverse graph datasets covering node-level and graph-level tasks, addressing class- and topology-imbalance issues, while also adopting consistent data processing and splitting approaches for fair comparisons over multiple metrics with different investigation focus. Through benchmarking the existing IGL algorithms for effectiveness, robustness, and efficiency, we make the following contributions:

  • First Comprehensive IGL Benchmark. IGL-Bench enables a fair and unified comparison among 19 state-of-the-art node-level and 5 graph-level IGL algorithms by unifying the experimental settings across 16 graph datasets of diverse characteristics, providing a comprehensive understanding of the class-imbalance and topology-imbalance problems in IGL for the first time.
  • Multi-faceted Evaluation and Analysis. We conduct a systematic analysis of IGL methods from various dimensions, including effectiveness, efficiency, and complexity. Based on the results of extensive experiments, we uncover both the potential advantages and limitations of current IGL algorithms, providing valuable insights to guide future research endeavors.
  • Open-sourced Package. To facilitate future IGL research, we develop an open-sourced benchmark package for public access. Users can evaluate their algorithms or datasets with less effort.

๐Ÿ“ฆ Installation

Follow the steps below to install and configure IGL-Bench properly for your local environment.

Environment Requirements

Please ensure your Python environment meets following dependencies:

Dependency Version (โ‰ฅ)
Python 3.8.12
PyTorch 1.9.1
PyTorch-Geometric 2.0.1
DGL 1.1
scipy 1.9

Recommendation: Use your specific Python virtual environment (e.g., via conda or venv) or use this Dockerfilewe provide to build a Docker image.

[Recommended] Installation Steps

Clone the repository and install required dependencies:

# Clone the repository
git clone https://github.com/RingBDStack/IGL-Bench.git
cd IGL-Bench

# Install dependencies
pip install -r requirements.txt

[Optional] Development Mode Installation

If you want to install the package for your local development, use:

pip install -e .

๐Ÿš€ Quick Start

pipeline

The following demonstrates how to quickly run algorithms from IGL-Bench for both node-level and graph-level classification tasks under various imbalance settings.

You can also refer to our runnable example : ๐Ÿ““ demo.ipynb

๐Ÿ”น Node-Level Task (e.g., PASTEL on Cora)

Step 1: Import Package

import IGL_Bench as igl

Step 2: Initialize Dataset

Dataset = igl.dataset.Dataset(
    task="node",
    data_name="Cora",
    imb_type="topo_global",
    imb_level="high"
)
dataset = Dataset.load_dataset()

Step 3: Load Configuration

config = igl.config.load_conf(
    task="node",
    imbtype="topo_global",
    algorithm="PASTEL"
)

Step 4: Run Solver

solver = igl.manage.Manager(config, dataset)
solver.run(num_runs=5)

๐Ÿ”ธ Graph-Level Task (e.g., G2GNN on D&D)

Step 1: Import Package

import IGL_Bench as igl

Step 2: Initialize Dataset

Dataset = igl.dataset.Dataset(
    task="graph",
    data_name="D&D",
    imb_type="class",
    imb_level="low"
)
dataset = Dataset.load_dataset()

Step 3: Load Configuration

config = igl.config.load_conf(
    task="graph",
    imbtype="class",
    algorithm="G2GNN"
)

Step 4: Run Solver

solver = igl.manage.Manager(config, dataset)
solver.run(num_runs=10)

โš™๏ธ Configuration Argument Options

You can flexibly configure algorithms using the Dataset(...) and load_conf(...) API with the following parameters:

task

Specifies the type of task:

'node' or 'graph'

data_name

Node-level datasets:

'Cora', 'CiteSeer', 'PubMed', 'Computers', 'Photo', 'ogbn-arxiv', 'Chameleon', 'Squirrel', 'Actor'

Graph-level datasets:

'PTC-MR', 'FRANKENSTEIN', 'PROTEINS', 'D&D', 'IMDB-B', 'REDDIT-B', 'COLLAB', 'ogbg-molhiv'

imbtype

Imbalance type (depends on task):

  • For node-level:
    'class', 'topo_local', 'topo_global'
    
  • For graph-level:
    'class', 'topology'
    

imb_level

Controls the severity of imbalance:

'low', 'mid', 'high'

algorithm

The algorithm to run. Supported algorithms include:

  • Node-level class imbalance:

    DRGCN, DPGNN, ImGAGN, GraphSMOTE, GraphENS, GraphMixup, LTE4G, TAM, TOPOAUC, GraphSHA
    
  • Node-level topology local imbalance:

    DEMONet, TailGNN, COLDBREW, LTE4G, meta-tail2vec, GRAPHPATCHER, RAWLSGCN
    
  • Node-level topology global imbalance:

    ReNode, TAM, PASTEL, TOPOAUC, HyperIMBA
    
  • Graph-level class imbalance:

    G2GNN, TopoImb, DataDec, ImGKB
    
  • Graph-level topology imbalance:

    TopoImb, SOLTGNN
    

You can also manually modify the configuration files located in config/ for fine-grained control over hyperparameters.

๐Ÿšง Build Your Own IGL Algorithms

IGL-Bench is designed with modularity and extensibility. Due to the unified solver interface, users can seamlessly integrate their custom algorithms into our benchmarking pipeline with minimal redundant codes.

We provide a step-by-step tutorial to guide you through the process: ๐Ÿ““ Build_Your_Own_IGL.ipynb

This tutorial covers:

  • โœ… Using the pre-split datasets (with train_mask, val_mask, test_mask)
  • โœ… Understanding the Dataset and Config structure
  • โœ… Adding your own algorithm in a few easy steps

Your custom solver will automatically be discovered and benchmarked by the frameworkโ€”just like any built-in baseline.

๐Ÿงฉ Algorithm References

We have implemented the following IGL algorithms in the IGL-Bench:

Algorithm Conference/Journal Imbalance Type TASK Paper Code
DRGCN IJCAI 2020 Class-Imbalance NC Multi-Class Imbalanced Graph Convolutional Network Learning Link
DPGNN arXiv 2020 Class-Imbalance NC Distance-wise Prototypical Graph Neural Network for Imbalanced Node Classification Link
ImGAGN SIGKDD 2021 Class-Imbalance NC ImGAGN: Imbalanced Network Embedding via Generative Adversarial Graph Networks Link
GraphSMOTE WSDM 2021 Class-Imbalance NC GraphSMOTE: Imbalanced Node Classification on Graphs with Graph Neural Networks Link
GraphENS ICLR 2021 Class-Imbalance NC Graphens: Neighbor-aware ego network synthesis for class-imbalanced node classification Link
GraphMixup ECML PKDD 2022 Class-Imbalance NC GraphMixup: Improving Class-Imbalanced Node Classification on Graphs by Self-supervised Context Prediction Link
LTE4G CIKM 2022 Class/Local Topology-Imbalance NC LTE4G: Long-Tail Experts for Graph Neural Networks Link
TAM ICML 2022 Class/Global Topology-Imbalance NC TAM: Topology-Aware Margin Loss for Class-Imbalanced Node Classification Link
TOPOAUC ACM MM 2022 Class/Global Topology-Imbalance NC A Unified Framework against Topology and Class Imbalance Link
GraphSHA SIGKDD 2023 Class-Imbalance NC GraphSHA: Synthesizing Harder Samples for Class-Imbalanced Node Classification Link
DEMO-Net SIGKDD 2019 Local Topology-Imbalance NC DEMO-Net: Degree-specific Graph Neural Networks for Node and Graph Classification Link
meta-tail2vec CIKM 2020 Local Topology-Imbalance NC Towards locality-aware meta-learning of tail node embeddings on networks Link
Tail-GNN SIGKDD 2021 Local Topology-Imbalance NC Tail-GNN: Tail-Node Graph Neural Networks Link
Cold Brew ICLR 2022 Local Topology-Imbalance NC Cold Brew: Distilling Graph Node Representations with Incomplete or Missing Neighborhoods Link
RawlsGCN WWW 2022 Local Topology-Imbalance NC RawlsGCN: Towards Rawlsian Difference Principle on Graph Convolutional Network Link
GraphPatcher NeuIPS 2023 Local Topology-Imbalance NC GRAPHPATCHER: Mitigating Degree Bias for Graph Neural Networks via Test-time Augmentation Link
ReNode NeurIPS 2021 Global Topology-Imbalance NC Topology-Imbalance Learning for Semi-Supervised Node Classification Link
PASTEL CIKM 2022 Global Topology-Imbalance NC Position-aware Structure Learning for Graph Topology-imbalance by Relieving Under-reaching and Over-squashing Link
HyperIMBA WWW 2023 Global Topology-Imbalance NC Hyperbolic Geometric Graph Representation Learning for Hierarchy-imbalance Node Classification Link
G2GNN CIKM 2022 Class-Imbalance GC Imbalanced Graph Classification via Graph-of-Graph Neural Networks Link
TopoImb LOG 2022 Class/Topology-Imbalance NC/GC TopoImb: Toward Topology-level Imbalance in Learning from Graphs Link
DataDec ICML 2023 Class-Imbalance NC/GC When Sparsity Meets Contrastive Models: Less Graph Data Can Bring Better Class-Balanced Representations Link
ImGKB ACM MM 2023 Class-Imbalance GC Where to Find Fascinating Inter-Graph Supervision: Imbalanced Graph Classification with Kernel Information Bottleneck Link
SOLT-GNN WWW 2022 Class-Imbalance GC On Size-Oriented Long-Tailed Graph Classification of Graph Neural Networks Link

๐Ÿ“š Citation

If you find this repository helpful, please consider citing us. We welcome any discussions with [email protected].

@inproceedings{qin2025iglbench,
  title={{IGL}-Bench: Establishing the Comprehensive Benchmark for Imbalanced Graph Learning},
  author={Jiawen Qin and Haonan Yuan and Qingyun Sun and Lyujin Xu and Jiaqi Yuan and Pengfeng Huang and Zhaonan Wang and Xingcheng Fu and Hao Peng and Jianxin Li and Philip S. Yu},
  booktitle={The Thirteenth International Conference on Learning Representations},
  year={2025}
}

About

A Comprehensive Benchmark of Imbalanced Graph Learning (Accepted by ICLR 2025 Spotlight)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published