Abstract
Graph Neural Networks (GNNs) deployed in real-world environments face the challenge of evolving data distributions, where the underlying graph structure and node features change over time. This paper introduces Graph Contrastive Self-Training (GCST), a novel framework for incremental unsupervised domain adaptation (UDA) on graphs. Unlike traditional UDA methods that prioritize domain-invariance—often failing in the presence of label shift—GCST synergizes contrastive learning with iterative self-training to learn robust, discriminative representations. Evaluated on both synthetic and large-scale real-world datasets like the Elliptic Bitcoin network, GCST demonstrates superior stability and performance, effectively mitigating the risks of error accumulation and distribution shift in dynamic environments.
Introduction
In practical applications such as fraud detection, citation analysis, and social network monitoring, graphs are inherently dynamic. A model trained on a static snapshot of a Bitcoin transaction network, for instance, must adapt to new patterns as fraudsters evolve their tactics. This phenomenon, known as distribution shift, poses a significant challenge for maintaining model accuracy. While retraining with new labels is a standard solution, labels in many domains are delayed—often arriving weeks or months after the initial data.
This necessitates Incremental Unsupervised Domain Adaptation (UDA), where a model must continually adapt to a sequence of unlabeled target graph snapshots. Existing UDA techniques frequently rely on domain-adversarial training to make features from different domains indistinguishable. However, these methods often fail on evolving graphs due to label shift, where the proportions of classes change over time. Forcing domain invariance when class balances have shifted can lead to significant performance degradation.
Methodology: Graph Contrastive Self-Training (GCST)
To address the limitations of adversarial adaptation, we propose Graph Contrastive Self-Training (GCST). The framework avoids the pitfalls of forcing feature indistinguishability by focusing on learning robust representations through three concurrent objectives:
- Supervised Anchor Loss: The model maintains training on the original labeled source graph ($G^{(0)}$). This serves as an anchor, preventing catastrophic forgetting of the initial learned patterns.
- Iterative Self-Training (Pseudo-Labeling): The model generates pseudo-labels for unlabeled nodes in the current target snapshot ($G^{(t)}$) based on high-confidence predictions. We specifically advocate for Updated Pseudo-Labels (UPL), which are iteratively refined to better reflect the evolving distribution.
- Contrastive Learning: Utilizing the Multi-View Graph Representation Learning (MVGRL) framework, GCST maximizes mutual information between different structural views of the graph. This helps the model disentangle class-specific information from domain-specific noise, enhancing the reliability of pseudo-labels.
Experimental Evaluation
We evaluated GCST against several baselines, including a non-adaptive "Fixed" model, Domain-Adversarial Neural Networks (DANN), and standard Graph Self-Training (GST). The evaluation spanned four diverse datasets:
- SBMB & SBMF: Synthetic datasets simulating structural and feature shifts.
- ogbn-arxiv: A chronological citation graph where the model adapts to emerging research fields.
- Elliptic: A large-scale Bitcoin transaction dataset characterized by extreme class imbalance and rapid pattern evolution.
Key Results and Discussion
Our experiments reveal that adversarial methods like DANN often perform worse than a non-adaptive baseline on real-world datasets like ogbn-arxiv and Elliptic. This confirms that forcing domain invariance is a risky strategy when label shift is present. In contrast, GCST-UPL consistently outperformed all baselines.
On the Elliptic dataset, GCST-UPL was the only method to maintain a high F1 score, demonstrating its resilience in "wild" environments with severe class imbalance. Furthermore, in synthetic tests specifically designed with extreme label shift (SBMB-ys), GCST-UPL maintained 95.5% accuracy, while adversarial methods dropped to 82.6%, proving that GCST is much better suited for unbalanced real-world scenarios.
Conclusion
GCST provides a robust framework for adapting GNNs to evolving, unlabeled graph streams. By combining the anchoring effect of supervised learning, the adaptive power of iterative self-training, and the representational robustness of contrastive learning, GCST effectively navigates the challenges of distribution and label shift. Future research will focus on improving the computational efficiency of the contrastive component and enhancing the model's ability to handle sudden, non-gradual shifts in graph topology.
Summary updated