Abstract
Graph Neural Networks (GNNs) have become the standard for node classification tasks, yet they often falter when faced with imbalanced datasets where one class significantly outnumbers others. In such scenarios, the majority class tends to dominate the loss function, and the message-passing mechanism of GNNs can "wash out" the unique features of minority nodes. This paper presents GraphSMOTE, a novel framework that extends synthetic over-sampling to the graph domain. By generating new minority-class nodes in a latent embedding space and predicting their structural relationships, GraphSMOTE provides a robust solution for imbalanced node classification.
Introduction: The Challenge of Imbalance in Graphs
In real-world applications like fraud detection, rare disease identification, or bot detection on social media, the classes of interest are often the minority. Standard GNNs struggle here for two primary reasons. First, Loss Dominance: the model prioritizes accuracy on the majority class to minimize total loss. Second, Message Passing Amplification: as nodes aggregate information from neighbors, a minority node surrounded by majority neighbors loses its distinct signal.
While techniques like SMOTE (Synthetic Minority Over-sampling Technique) are effective for tabular data, they assume data points are independent and identically distributed. In a graph, a node's identity is inextricably linked to its position in the network topology. Simply duplicating features is insufficient; the synthetic nodes must be integrated into the graph's structure to participate in message passing.
The GraphSMOTE Framework
GraphSMOTE addresses the limitations of traditional over-sampling by operating in a learned embedding space and explicitly modeling node relationships. The framework consists of four key stages:
- Feature Extraction (Encoder): A GNN encoder (e.g., GraphSAGE) maps raw, high-dimensional node features into a dense embedding space that captures both local attributes and neighborhood context.
- Synthetic Node Generation: Within this embedding space, the algorithm identifies minority nodes and generates "pseudo-nodes" by interpolating between a minority node and its nearest neighbors of the same class.
- Edge Generation: To weave these pseudo-nodes into the graph, a trained edge predictor estimates the probability of links between new nodes and existing ones. This ensures that synthetic nodes are not "islands" but active participants in the network.
- GNN Classification: A final GNN classifier is trained on the augmented, balanced graph.
Experimental Results
The framework was rigorously tested on three datasets: Cora (citation network), BlogCatalog (social network), and Twitter (large-scale bot detection). GraphSMOTE consistently outperformed traditional baselines, including simple over-sampling and re-weighting.
On the Cora dataset with a 10% imbalance ratio, GraphSMOTE achieved an AUC-ROC of 0.9167, a significant improvement over the baseline GNN's 0.8681. The results highlight that the Edge Generator is critical; without it, synthetic nodes cannot effectively contribute to the GNN's learning process through message passing.
Conclusion
GraphSMOTE represents a significant advancement in making GNNs more robust for real-world, imbalanced applications. By moving synthetic generation into the embedding space and accounting for graph topology, it overcomes the "island" problem of traditional over-sampling. Future work may extend this approach to multi-relational graphs or unsupervised settings where minority labels are not explicitly known.
Summary updated