TL;DR
Temporal networks are everywhere, but training models on them is tricky due to "positive sparsity" and "positive shift." This paper introduces CurNM, a novel curriculum learning framework that intelligently mines negative samples to help models learn more effectively and robustly from temporal data.
What Problem Does This Paper Address?
Temporal networks, which capture evolving interactions over time (like social networks or e-commerce), are becoming increasingly important. To train models on these networks, especially Temporal Graph Neural Networks (TGNNs), researchers use "negative sampling" to avoid overwhelming the model with too many non-existent connections. However, temporal networks present unique challenges for negative sampling:
- Positive Sparsity: The sheer number of possible non-existent connections (negatives) compared to actual connections (positives) explodes with time, making it hard to find truly informative negative samples.
- Positive Shift: User preferences and relationships change over time. Standard negative sampling methods, often borrowed from static networks, struggle to adapt to these evolving dynamics, potentially leading to models trained on outdated information.
Existing methods for static graphs don't directly translate, and even temporal-specific methods like ENS have limitations in adaptability and efficiency. This paper aims to solve these issues by developing a more intelligent and adaptive negative sampling strategy for TGNNs.
Methods
The core of this paper is the Curriculum Negative Mining (CurNM) framework. It's a model-aware curriculum learning approach that dynamically adjusts the difficulty of negative samples during training. CurNM has two main components:
- Dynamically Updated Negative Pool: To combat positive sparsity, CurNM constructs a pool of negative samples that balances:
- Random Negatives: Standard, uniformly sampled negatives.
- Historical Neighbors: Nodes that were previously connected to the source node but are not currently.
- Hard Negatives: These are introduced later in training, once the model shows improvement. They are identified by disentangling relevant and irrelevant factors of interactions and are prioritized based on their similarity to positive samples. This pool is dynamically updated to ensure computational efficiency and to adapt to the model's learning progress.
- Temporal-Aware Negative Selection Module: This module addresses the "positive shift" challenge. It uses a disentanglement technique to separate relevant and irrelevant factors of interactions. By incorporating Time2Vec, a method for encoding temporal information, it prioritizes negative samples that have higher "temporal proximity" to positive samples. This means it looks at historical relevance and recent activity to find negatives that are more challenging and representative of evolving user preferences.
The framework also includes an annealing random negative component, which provides a baseline for exploration and adaptation, especially in early training stages. The influence of these random negatives is gradually reduced as the model improves.
Datasets
The authors evaluate their method on 12 standardized datasets obtained from DyGLib and TGL. These datasets cover a broad range of domains, including social, political, economic, transport, and interaction networks. They are divided into training, validation, and test sets using a chronological split (70:15:15) to prevent temporal data leakage.
Key Insights and Ideas
- The "Curriculum" is Key: The idea of gradually increasing the difficulty of negative samples is crucial. Starting with easier negatives (random and historical) and then introducing harder ones as the model learns prevents it from being overwhelmed and leads to more stable training.
- Temporal Awareness Matters: Simply treating temporal networks like static ones misses the boat. Explicitly modeling temporal proximity and evolving relationships is essential for effective negative sampling.
- Disentanglement for Granularity: Separating relevant and irrelevant factors of interactions allows for a more nuanced understanding of why connections form, enabling the selection of more informative hard negatives.
- Balancing Act: CurNM strikes a balance between capturing historical patterns and adapting to recent shifts, and between exploiting hard negatives and maintaining exploration with random negatives.
Key Results
- Consistent Improvement: CurNM consistently outperforms baseline methods (random sampling, recent sampling, ENS, TASER) across most of the 12 datasets in both transductive and inductive settings.
- Significant Gains: On average, CurNM achieves an 8.7% improvement when paired with the TGN model. For JODIE, it's a 7.1% improvement.
- Robustness: The method shows strong generalization to unseen nodes (inductive setting) and maintains robustness even when paired with models that are less compatible with its temporal approach (like DySAT).
- Efficiency: CurNM adds minimal computational overhead, making it practical for deployment. It is significantly more efficient than ENS on large datasets.
Limitations and Future Work
- Hyperparameter Tuning: The paper acknowledges that CurNM requires tuning several hyperparameters to optimize its performance.
- Future Work: The authors aim to simplify these designs to reduce the need for extensive parameter tuning.
Summary updated