Abstract
Dynamic graph learning is essential for modeling evolving networks, yet standard Temporal Graph Networks (TGNs) often fail when data distributions shift over time. This paper introduces SMILE (Structural teMporal Invariant LEarning), a framework designed to disentangle stable, invariant causal patterns from transient, variant ones. By incorporating a disentangled memory gating mechanism and a distributionally-diverse invariant learning strategy, SMILE significantly enhances the out-of-distribution (OOD) generalization and robustness of dynamic graph models.
Introduction
Dynamic graphs, which represent nodes and edges evolving over time (e.g., social media interactions or e-commerce transactions), are ubiquitous in real-world applications. While Temporal Graph Networks (TGNs) have become the state-of-the-art for modeling these systems, they suffer from a critical "blind spot": distribution shift. Most TGNs assume that the patterns observed during training will persist indefinitely. However, real-world behaviors are often influenced by temporary events, leading to models that rely on spurious correlations.
As shown in Figure 1, certain patterns are "invariant," such as the concurrent purchase of a car and insurance. Others are "variant," such as the surge in face mask purchases during a pandemic. If a model treats these equally, its predictive accuracy will plummet once the temporary context (e.g., the pandemic) subsides.
The SMILE Framework
To address these challenges, the authors propose SMILE, which introduces three primary innovations to bridge distribution gaps:
1. Disentangled Temporal Graph Memory Network
Standard TGNs typically compress interaction histories into a single, entangled memory state. SMILE replaces this with a disentangled memory gating mechanism. This filter splits history into "relevant" (invariant) and "remaining" (variant) components. A specialized attention network then models the dependencies within these invariant patterns to ensure the model prioritizes features with long-term predictive power.
2. Distributionally-diverse Invariant Learning
TGNs are usually trained on chronological batches, which lack the distributional diversity needed to learn stability. SMILE employs an Interaction History Approximator, a Transformer-based module that "hallucinates" diverse historical distributions based on short-term events. This allows the model to encounter a wider variety of "environments" during training.
3. Invariant Regularization
Using the generated diverse distributions, SMILE applies a regularization loss inspired by causal "do-calculus." The model is trained to ensure its predictions remain stable even when the variant parts of the data are swapped out, effectively testing if the model's logic holds up across different counterfactual scenarios.
Experimental Evaluation
The researchers evaluated SMILE on three real-world datasets: MOOC (student interactions), Enron (email correspondence), and LastFM (music listening). To measure long-term OOD performance, they used a 30/20/50 split for training, validation, and testing.
Key Results
SMILE consistently outperformed standard TGNs and specialized graph generalization methods like DIDA and GREA:
- OOD Generalization: On the Enron dataset, SMILE reduced the performance gap between in-distribution and OOD data to just 3.7%, compared to 11.1% for the baseline Jodie model.
- Robustness: In tests involving "Artificial Shifts" (intentional changes in negative link sampling), SMILE outperformed the best baseline by an average of 6.2%.
- Stability: SMILE exhibited the lowest standard deviation in performance across different distributions, indicating superior reliability.
Conclusion
SMILE addresses the fundamental issue of entanglement in dynamic graph learning. By distinguishing between causal signals and spurious correlations, it provides a robust blueprint for building models that understand the underlying, stable structures of evolving networks. Future work will focus on improving the interpretability of the discovered invariant patterns and optimizing the computational complexity of the history approximator for low-latency environments.
Summary updated