GraphMixup: Improving Class-Imbalanced Node Classification on Graphs by Self-supervised Context Prediction

Lirong Wu, Haitao Lin, Zhangyang Gao, Cheng Tan, Stan Z. LiarXiv 2021

Abstract

Class imbalance is a pervasive challenge in graph neural networks (GNNs), where majority classes often overshadow minority signals. Existing oversampling techniques like Mixup frequently fail on graphs due to out-of-domain feature generation, the difficulty of synthetic edge creation, and rigid upsampling scales. We present GraphMixup, a framework that addresses these issues by generating synthetic minority nodes in a disentangled semantic space and predicting their connectivity through self-supervised local and global context. Furthermore, GraphMixup employs Reinforcement Learning to adaptively determine optimal upsampling scales. Experimental results on benchmark datasets demonstrate that GraphMixup significantly outperforms state-of-the-art methods, particularly in scenarios of extreme class imbalance.

Introduction

Real-world graph data, such as social networks or citation graphs, are inherently imbalanced. For instance, fraudulent accounts are rare compared to legitimate users, yet identifying them is critical. Standard GNNs assume balanced class distributions, leading to biased predictions that favor majority classes. While Mixup-based data augmentation has seen success in computer vision, its application to graphs is hindered by three primary obstacles: the creation of "nonsense" nodes in raw feature space, the ambiguity of connecting synthetic nodes to the existing topology, and the lack of a principled way to determine the necessary amount of synthetic data.

Methods

GraphMixup introduces a three-stage pipeline to overcome these hurdles:

  • Semantic Feature Mixup: Instead of interpolating raw features, GraphMixup utilizes a Semantic Feature Extractor to map nodes into multiple disentangled semantic subspaces. Mixup is performed within these spaces, ensuring that synthetic nodes remain within the manifold of real data.
  • Contextual Edge Mixup: To integrate new nodes, an edge predictor is trained using two self-supervised tasks: Local-Path (LP) prediction, which focuses on immediate neighborhood structure, and Global-Path (GP) prediction, which uses graph partitioning and anchor nodes to capture long-range dependencies.
  • Reinforcement Mixup Module: The upsampling scale is treated as a Markov Decision Process. A Reinforcement Learning (RL) agent dynamically adjusts the number of synthetic nodes based on the model's performance (Macro-F1), preventing over-fitting and noise introduction.
The GraphMixup framework overview, illustrating semantic feature learning, synthetic node/edge generation, and the RL-based upsampling module.

Key Results and Insights

The framework was evaluated on Cora, BlogCatalog, and Wiki-CS datasets under various imbalance ratios. GraphMixup consistently outperformed baselines like SMOTE and GraphSMOTE. Notably, on the Cora dataset, it achieved a 3.3% improvement in Accuracy and a 3.4% improvement in Macro-F1 over GraphSMOTE. The model's robustness is particularly evident in extreme imbalance scenarios (e.g., 10% minority ratio), where it surpassed SMOTE by 6.4%.

Ablation studies highlight the importance of the self-supervised context prediction. Removing either the Local-Path (LP) or Global-Path (GP) prediction tasks leads to a measurable drop in performance across all datasets, confirming that both local topology and global structure are vital for realistic synthetic edge generation.

Ablation study showing the impact of Local-Path (LP) and Global-Path (GP) prediction on ROC-AUC across three datasets.

Conclusion

GraphMixup provides a comprehensive solution to class imbalance in GNNs by combining disentangled semantic interpolation, self-supervised context prediction, and adaptive reinforcement learning. While the approach introduces some computational overhead due to the RL agent and graph partitioning, its ability to generate high-quality synthetic data makes it a powerful tool for imbalanced node classification. Future work will focus on optimizing scalability for billion-node graphs and extending the framework to dynamic graph environments.

Summary updated

BibTeX
@misc{wu2021graphmixup,
  author = {Lirong Wu and Haitao Lin and Zhangyang Gao and Cheng Tan and Stan Z. Li},
  title = {{GraphMixup: Improving Class-Imbalanced Node Classification on Graphs by Self-supervised Context Prediction}},
  year = {2021},
  eprint = {2106.11133},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.11133},
}
Figure