BuffGraph: Enhancing Class-Imbalanced Node Classification via Buffer Nodes

Qian Wang, Zemin Liu, Zhen Zhang, Bingsheng HearXiv 2024

Abstract

Class imbalance in graph-structured data, where minor classes are significantly underrepresented, poses a critical challenge for Graph Neural Networks (GNNs). To address this challenge, existing studies generally generate new minority nodes and edges connecting new nodes to the original graph to make classes balanced. However, they do not solve the problem that majority classes still propagate information to minority nodes by edges in the original graph which introduces bias towards majority classes. To address this, we introduce BuffGraph, which inserts buffer nodes into the graph, modulating the impact of majority classes to improve minor class representation. Our extensive experiments across diverse real-world datasets empirically demonstrate that BuffGraph outperforms existing baseline methods in class-imbalanced node classification in both natural settings and imbalanced settings. Code is available at https://anonymous.4open.science/r/BuffGraph-730A.

Introduction

Most Graph Neural Networks (GNNs) operate on the "homophily" assumption—the idea that connected nodes likely share the same label. However, real-world graphs are often class-imbalanced and exhibit heterophily, where edges connect nodes of different classes. In these scenarios, standard GNN message-passing acts like a megaphone for the majority class. When a minority node is connected to several majority neighbors, the majority signal "drowns out" the minority node's unique features during neighborhood aggregation.

The Heterophily Challenge

A key insight of this work is the clear correlation between heterophily and performance degradation in minority classes. As shown in the figure below, minority classes with higher heterophily scores (more connections to other classes) consistently show lower classification accuracy in standard GNNs. Existing solutions usually try to synthesize new minority nodes (oversampling), but they fail to address the underlying issue: the original graph structure still allows biased information to flow unchecked from the majority to the minority.

Correlation between heterophily score and classification accuracy across different classes, showing how buffer nodes mitigate performance drops.

Methodology: The BuffGraph Framework

BuffGraph shifts the focus from data generation to modulating information flow. The framework consists of four main components:

  1. Buffer Node Generation: For every existing edge between two nodes ($u$ and $v$), BuffGraph inserts an artificial "buffer node." The features of this buffer node are created via interpolation (mixup) of the two original nodes. These buffer nodes are unlabeled and act as neutral intermediaries.
  2. Dual-Link Message Passing: Instead of a single edge, the model utilizes two paths: a direct "residual" link (the original edge) and an indirect path through the buffer node.
  3. Adaptive Modulation: The model calculates an edge heterophily score based on the distance between node embeddings. If an edge connects very different nodes (high heterophily), the model routes the message primarily through the buffer node to "slow down" and filter the influence. If nodes are similar, it prefers the direct link.
  4. Training Strategy: A joint loss function combines standard classification loss with a specific "heterophily loss" to refine the message-passing speeds.
The BuffGraph workflow: from toy graph to loss function via buffer node construction and adaptive aggregation.

Experimental Evaluation

The authors evaluated BuffGraph on five diverse, real-world datasets: Amazon-Photos, Amazon-Computers, Coauthor-CS, Coauthor-Physics, and WikiCS. These were tested in both "natural" settings and "manually imbalanced" settings (imbalance ratio of 10).

BuffGraph consistently outperformed state-of-the-art baselines like GraphENS, TAM, and GraphSHA. On the Amazon-Computers dataset, BuffGraph achieved a 3% increase in accuracy and a 4% boost in F1-score over the second-best model. Furthermore, the training time per epoch scales linearly with the number of nodes, demonstrating viability for large-scale graphs.

Conclusion and Future Work

BuffGraph demonstrates that structural filtering is as crucial as data augmentation for imbalanced node classification. By transforming one-hop neighbors into two-hop neighbors via buffer nodes, the model effectively dilutes aggressive feature propagation from majority nodes. Future work includes exploring more complex buffer node feature definitions and investigating the interplay of heterophily in directed or multi-relational graphs.

Summary updated

BibTeX
@misc{wang2024buffgraph,
  author = {Qian Wang and Zemin Liu and Zhen Zhang and Bingsheng He},
  title = {{BuffGraph: Enhancing Class-Imbalanced Node Classification via Buffer Nodes}},
  year = {2024},
  eprint = {2402.13114},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.13114},
}
Figure