Introduction
Temporal Knowledge Graphs (TKGs) serve as structured logs of historical events, represented as quadruplets: (subject, relation, object, timestamp). Predicting future events—Temporal Knowledge Graph Forecasting (TKGF)—is crucial for understanding geopolitical dynamics and social trends. While Graph Neural Networks (GNNs) capture structural patterns, they often require extensive training and ignore semantic nuances. Conversely, Large Language Models (LLMs) possess strong reasoning capabilities but struggle with temporal "laws" and noise in long histories.
To bridge this gap, the authors propose AnRe (Analogical Replay), a training-free framework that leverages historical analogies to guide LLM reasoning. By retrieving similar historical "analogies" and using a dual-history extraction module to filter relevant context, AnRe enables LLMs to reason through past patterns to forecast the future with state-of-the-art accuracy.
Methodology
AnRe operates through three core modules designed to filter noise and provide high-quality context for forecasting.
1. Semantic-driven Historical Clustering
Forecasting often involves entities with similar roles. AnRe uses BERT embeddings and K-means clustering to group entities semantically. When a query $(s_q, r_q, ?, t_{n+1})$ is posed, the system identifies "analogous events"—past events involving entities from the same cluster as the subject $s_q$ that participated in the same relation $r_q$—to serve as a blueprint for the current prediction.
2. Dual History Extraction
To manage the trade-off between context richness and noise, AnRe retrieves both short-term and long-term histories:
- Short-term History: Provides immediate context from the most recent events.
- Long-term History: Filtered using Probability Distribution Calculation (PDC), where the LLM itself rates the helpfulness of past events, and a Dynamic Threshold Filtering (DTF) mechanism to prune irrelevant data based on how far back in time the event occurred.
3. Analogical Replay
The core innovation is the "replay" mechanism. The system constructs "analogical examples"—mini-case studies of how similar past events unfolded. The LLM analyzes these examples first, "replaying" the logic of the past to improve its reasoning for the current, unknown query.
Experimental Evaluation
AnRe was evaluated on four standard TKG benchmarks: ICEWS14, ICEWS05-15, ICEWS18, and GDELT.
- Superior Performance: AnRe outperformed all purely LLM-based methods across all datasets. On the ICEWS18 dataset, it showed a 51.16% improvement in Hit@1 compared to standard In-Context Learning.
- Training-Free Advantage: Despite being training-free, AnRe remained competitive with—and often beat—state-of-the-art GNN models (like RE-NET and TiRGN) that require extensive training.
- LLM Agnostic: The framework showed consistent improvements across various models, including InternLM2, Qwen2.5, Yi, Mistral, and Llama-3, proving the method's robustness.
Key Insights and Discussion
- Analogies as In-Context Learning: LLMs perform significantly better when shown how a similar event was resolved in the past. By providing an analysis process for a similar historical event, the model learns the underlying patterns of political or social interactions.
- The "Goldilocks" History: More data isn't always better. Performance typically peaks at a history length of around 100 events; beyond that, noise begins to degrade the LLM's reasoning.
- Dynamic Relevance: The correlation between a past event and a future one diminishes over time. The DTF module mathematically accounts for this, requiring a higher "relevance score" for older events to be included in the context window.
Conclusion and Future Work
AnRe demonstrates that LLMs can excel at temporal reasoning without task-specific training by effectively utilizing historical analogies. While the framework introduces some computational overhead due to multiple LLM calls, its ability to reason through complex event sequences marks a significant step forward. Future directions include optimizing the efficiency of the framework and exploring more sophisticated semantic extraction techniques to further improve analogy selection.
Summary updated