Introduction
Graph Neural Networks (GNNs) typically operate under a closed-world assumption, meaning all categories encountered during testing are presumed to have been present during training. However, real-world applications are inherently open-world, where models inevitably encounter nodes belonging to novel, unseen classes (out-of-distribution or OOD data).
Standard classification approaches rely on the softmax function, which forces output probabilities to sum to 1. This constraint causes deep neural networks to be notoriously overconfident, often assigning high confidence scores to completely unknown classes. While some approaches attempt to mitigate this by setting confidence thresholds or utilizing real OOD data during training, thresholds are notoriously difficult to tune, and real OOD data is often expensive or impossible to gather.
To address this, researchers introduce EGonc (Energy-based Generative open-set node classification), a novel framework designed to accurately classify known nodes while safely detecting and rejecting unknown nodes—without requiring any real unknown data during training.
Methodology
EGonc tackles open-set node classification through three primary modules:
- Substitute Unknown Generation: Rather than relying on random noise or real OOD data, EGonc generates strategic "fake" unknown nodes to train the model. Utilizing manifold mixup (blending hidden features), it creates two types of substitutes:
- Inter-class substitutes: Generated by mixing connected nodes from different known classes, simulating unknown classes that reside on the decision boundaries between known categories.
- External substitutes: Generated by mixing peripheral nodes with inverted class centers, simulating unknown classes located on the outer edges of the feature space.
- Energy Propagation: Moving away from softmax probabilities, EGonc treats the classifier as an Energy-Based Model (EBM). In an EBM, in-distribution data naturally yields lower energy scores, while OOD data yields higher energy scores. EGonc propagates these energy scores across the graph's edges, leveraging homophily to smooth and separate the energy levels of known versus unknown nodes.
- Open-set Classifier Learning: EGonc trains a $(C+1)$-class classifier, where $C$ represents the known classes and $+1$ represents the virtual "unknown" class. The optimization utilizes a combined loss function: standard cross-entropy, a tailored complement entropy (to prevent misclassification among knowns), and an energy regularization loss to maintain distinct energy margins.
Key Insights
- Strategic vs. Random Generation: Generating fake unknowns at the boundaries of known classes and the periphery of the feature space forces the model to draw tight, highly accurate decision boundaries, which is far more effective than using random noise.
- Energy over Softmax: Because softmax forces probabilities to sum to 100%, models are forced into false confidence. Energy scores lack this restriction, providing a mathematically sound indicator of true OOD-ness.
- Leveraging Graph Structure: Connected nodes typically share similar properties. By propagating energy scores across the graph structure, the model naturally pulls down the average energy of known class clusters while pushing up the energy of generated unknown substitutes.
Experimental Results
EGonc was evaluated on five standard benchmark citation networks: Cora, Citeseer, DBLP, PubMed, and Ogbn_arxiv.
- Superior Accuracy: In near open-set classification scenarios, EGonc outperformed 10 baseline methods. Averaged across the five datasets, it achieved 76.5% Accuracy and 69.1% Macro-F1, surpassing the second-best method ($G^2Pxy$) by approximately 2.4%.
- Enhanced Unknown Detection: While a standard GCN model completely fails at detecting unknowns (0% accuracy), EGonc boosted unknown-class detection to an impressive 76.1% on average, with only a marginal drop in known-class accuracy (from 79.5% to 76.3%).
- Architecture Agnostic: EGonc is not restricted to a single neural network architecture. Swapping the backbone between GCN, GAT, and GraphSAGE consistently yielded improved open-set performance across all configurations.
Limitations and Future Work
During "far open-set" experiments—where unknown nodes originate from an entirely different dataset (e.g., training on Cora but testing on Citeseer)—the authors noted an interesting limitation. In these extreme OOD scenarios, a simple baseline applying a threshold to a standard GCN's softmax output performed surprisingly well, nearly matching EGonc's performance.
This observation paves the way for future work: combining generative methods, like EGonc's substitute generation, with discriminative thresholding techniques to engineer an even more robust system for far open-set classification.
Summary updated