TL;DR
This paper argues that the standard batch-based evaluation for dynamic link prediction in temporal graphs is flawed, leading to inaccurate model performance assessments due to information loss and leakage. They propose "link forecasting," a new task definition using fixed-duration time windows, which provides a more realistic and fair evaluation of temporal graph learning models.
What Problem Does This Paper Address?
Temporal graphs, which capture interactions over time, are increasingly important in fields like social networks and financial systems. A key task for these graphs is dynamic link prediction: predicting future connections. To train and evaluate models efficiently, researchers typically group edges into fixed-size batches. However, this paper highlights significant issues with this batch-based evaluation.
The core problem is that fixed-size batches, regardless of when edges actually occurred, can lead to:
- Information Loss: Edges within the same batch, even if they happened at different times, are often treated as simultaneous. This means earlier edges in a batch cannot inform predictions for later edges in the same batch, losing valuable temporal context.
- Information Leakage: In discrete-time graphs or periods of high activity, edges with the same timestamp might be split across different batches. If models use memory to store past information (common in Temporal Graph Neural Networks or TGNNs), this can lead to them "seeing" information from the current snapshot before it should be available, giving them an unfair advantage.
- Inconsistent Task Difficulty: Fixed-size batches can result in time windows of varying durations. Predicting interactions in a short, dense period is different from predicting in a long, sparse period, making it hard to compare models fairly.
- Hyperparameter Tuning Issues: Batch size becomes a tunable parameter that directly affects task difficulty, making model performance comparisons unreliable if different models use different batch sizes.
These issues collectively lead to skewed model performance estimates and hinder the development of truly robust temporal graph learning models.
Methods
The paper's main contribution is the introduction of link forecasting as an alternative evaluation paradigm. Instead of fixed-size batches, link forecasting uses fixed-duration time windows.
Here's how it works:
- Time Windows: The temporal graph's timeline is divided into segments of a predetermined, fixed duration (e.g., 1 hour, 1 day). All edges occurring within such a window are considered together.
- Variable Edges per Window: Unlike batches, the number of edges within a time window can vary significantly, depending on the temporal activity of the graph.
- Controlled Temporal Granularity: This approach allows researchers to choose a time horizon that aligns with the application's needs and the data's characteristics, providing a more natural way to aggregate temporal information.
- Mitigation of Issues: By using fixed-duration windows, the method directly addresses information loss (by considering all edges within a window together) and information leakage (by treating the entire window as a single evaluation unit). It also standardizes the task difficulty across different evaluation periods.
The authors also propose practical implementations and provide code extensions for common graph learning libraries to facilitate the adoption of their link forecasting approach.
Datasets
The paper evaluates their proposed method on a diverse set of 14 real-world temporal graphs, comprising:
- 8 continuous-time temporal graphs: Enron, UCI, MOOC, Wikipedia, LastFM, Myket, Social Evolution, Reddit.
- 6 discrete-time temporal graphs: UN Vote, US Legislators, UN Trade, Canadian Parliament, Flights, Contacts.
These datasets cover various domains and characteristics, including different temporal resolutions, edge densities, and activity patterns (e.g., bursty, seasonal). The authors do not introduce new datasets but rather use established ones to demonstrate the shortcomings of existing evaluation practices.
Key Insights and Ideas
- Batching is a Compromise, Not a Solution: The paper convincingly shows that while batching is necessary for computational efficiency, it fundamentally distorts the temporal nature of the data, leading to misleading evaluation results.
- Information Leakage is a Real Problem for Memory-Based Models: The study highlights how memory-based TGNNs are particularly susceptible to information leakage in discrete-time settings, leading to inflated performance metrics when evaluated with traditional batching.
- Link Forecasting is More Realistic: By aligning evaluation windows with natural time scales relevant to the application (e.g., hours for email communication, days for political interactions), link forecasting provides a more accurate reflection of how models would perform in real-world scenarios.
- Dataset Characteristics Matter: The impact of batch-based evaluation varies significantly depending on the dataset's temporal activity patterns. Datasets with highly irregular or bursty activity are more prone to skewed results.
Key Results
- Quantified Information Loss: Using Normalized Mutual Information (NMI), the paper demonstrates that larger batch sizes lead to significantly higher information loss in continuous-time graphs.
- Significant Performance Discrepancies: Experiments show substantial differences in model performance (AUC-ROC and Average Precision) when evaluated using batch-based prediction versus link forecasting, especially for memory-based models on discrete-time datasets. For instance, memory-based models often show a large performance drop with link forecasting due to the elimination of information leakage.
- Improved Model Comparability: The link forecasting approach ensures that models are evaluated under consistent conditions, facilitating fairer comparisons.
- Runtime is Comparable: The empirical runtime analysis shows that link forecasting is generally comparable to batch-based prediction, with some minor variations depending on dataset characteristics.
Limitations and Future Work
- Binary Classification vs. Ranking: The authors acknowledge that their current evaluation metrics (AUC-ROC, Average Precision) treat link prediction as a binary classification problem. They suggest that extending ranking-based metrics (like MRR or Hits@K) to the link forecasting task could be a valuable future direction.
- Window-Based Training: While the paper focuses on evaluation, they hypothesize that a window-based training approach could further improve model robustness and performance, especially for memory-based models, by preventing them from learning from leaked information. This remains an open area for future research.
- Ethical Implications: The authors believe that a more practice-oriented evaluation is crucial for understanding the ethical implications of temporal graph models in real-world applications.
Summary updated