Distance-wise Prototypical Graph Neural Network in Node Imbalance Classification

Yu Wang, Charu Aggarwal, Tyler DerrarXiv 2021

Abstract

Recent years have witnessed the significant success of applying graph neural networks (GNNs) in learning effective node representations for classification. However, current GNNs are mostly built under the balanced data-splitting, which is inconsistent with many real-world networks where the number of training nodes can be extremely imbalanced among the classes. Thus, directly utilizing current GNNs on imbalanced data would generate coarse representations of nodes in minority classes and ultimately compromise the classification performance. This therefore portends the importance of developing effective GNNs for handling imbalanced graph data. In this work, we propose a novel Distance-wise Prototypical Graph Neural Network (DPGNN), which proposes a class prototype-driven training to balance the training loss between majority and minority classes and then leverages distance metric learning to differentiate the contributions of different dimensions of representations and fully encode the relative position of each node to each class prototype. Moreover, we design a new imbalanced label propagation mechanism to derive extra supervision from unlabeled nodes and employ self-supervised learning to smooth representations of adjacent nodes while separating inter-class prototypes. Comprehensive node classification experiments and parameter analysis on multiple networks are conducted and the proposed DPGNN almost always significantly outperforms all other baselines, which demonstrates its effectiveness in imbalanced node classification.

Introduction

Graph Neural Networks (GNNs) have revolutionized node classification, yet their performance often falters in real-world scenarios where class distributions are highly skewed. In applications like fraud detection or rare disease diagnosis, minority classes are frequently underrepresented. Standard GNNs trained on such imbalanced data suffer from two primary issues: gradient dominance, where majority classes dictate the loss function, and over-smoothing, where minority node features are aggregated with and eventually "washed out" by their majority-class neighbors. To address these challenges, we introduce the Distance-wise Prototypical Graph Neural Network (DPGNN).

Methodology

The DPGNN framework integrates four key components designed to mitigate the effects of class imbalance:

  • Class Prototype-driven Balanced Training: Borrowing from few-shot learning, DPGNN employs episodic training. Each episode samples an equal number of query nodes from each class, ensuring that the training loss treats minority and majority classes with equal importance.
  • Distance-wise Metric Learning: Rather than relying on raw embeddings, DPGNN calculates the distance between a node and all class prototypes. It learns a specific metric space to weight these distances, capturing the node's relative position within the graph's global structure.
  • Imbalanced Label Propagation (ILP): To augment the training set for minority classes, DPGNN uses a "Topological Information Gain" (TIG) filter to propagate labels to unlabeled nodes with high confidence, reducing noise in pseudo-labels.
  • Self-Supervised Learning (SSL): Two pretext tasks are used: one to maximize the separation between class prototypes and another to ensure that adjacent nodes maintain similar distance-metric representations.
The DPGNN framework architecture, illustrating balanced training, distance metric learning, label propagation, and self-supervised learning components.

Results and Performance Analysis

The model was evaluated on eight diverse datasets, including citation networks (Cora, Citeseer, DBLP), product networks (Amazon Computers), and social networks (Twitch PT). In experiments with extreme skew (down-sampling to a 1:10 ratio), DPGNN demonstrated superior robustness.

Comparison of F1-macro scores across different imbalance ratios for DPGNN and various baseline models on five datasets.

As shown in the performance plots, DPGNN consistently achieves higher F1-macro scores compared to state-of-the-art baselines like GraphSMOTE and DR-GCN. For instance, on the Cora dataset, DPGNN reached an F1-macro score of 0.7115, a significant improvement over the standard GCN's 0.5205. The model maintains stability even as the imbalance ratio increases, whereas competitors often see sharp performance declines as the data becomes more skewed.

Conclusion

A key insight from this work is the importance of "distance-wise" information; the relative distance to all prototypes provides a robust coordinate system for classifying tricky minority nodes. While the model faces challenges in datasets with very high class counts due to the dimensionality of distance vectors, it represents a significant step forward in handling imbalanced graph data. Future research will focus on multi-prototype representations and the phenomenon of "topology imbalance," where a class's structural position in the graph impacts its learnability.

Summary updated

BibTeX
@misc{wang2021distance,
  author = {Yu Wang and Charu Aggarwal and Tyler Derr},
  title = {{Distance-wise Prototypical Graph Neural Network in Node Imbalance Classification}},
  year = {2021},
  eprint = {2110.12035},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2110.12035},
}
Figure