Temporal Knowledge Graph Forecasting Without Knowledge Using In-Context Learning
Dong-Ho Lee, Kian Ahrabian, Woojeong Jin, Fred Morstatter, Jay Pujara
Abstract
Temporal knowledge graph (TKG) forecasting benchmarks challenge models to predict future facts using knowledge of past facts. In this paper, we develop an approach to use in-context learning (ICL) with large language models (LLMs) for TKG forecasting. Our extensive evaluation compares diverse baselines, including both simple heuristics and state-of-the-art (SOTA) supervised models, against pre-trained LLMs across several popular benchmarks and experimental settings. We observe that naive LLMs perform on par with SOTA models, which employ carefully designed architectures and supervised training for the forecasting task, falling within the (-3.6%, +1.5%) Hits@1 margin relative to the median performance. To better understand the strengths of LLMs for forecasting, we explore different approaches for selecting historical facts, constructing prompts, controlling information propagation, and parsing outputs into a probability distribution. A surprising finding from our experiments is that LLM performance endures (±0.4% Hit@1) even when semantic information is removed by mapping entities/relations to arbitrary numbers, suggesting that prior semantic knowledge is unnecessary; rather, LLMs can leverage the symbolic patterns in the context to achieve such a strong performance. Our analysis also reveals that ICL enables LLMs to learn irregular patterns from the historical context, going beyond frequency and recency biases 1 .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
13 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- AnRe: Analogical Replay for Temporal Knowledge Graph Forecasting cites Large Language Models-guided Dynamic Adaptation for Temporal Knowledge Graph Reasoning
- AnRe: Analogical Replay for Temporal Knowledge Graph Forecasting cites Language Models are Few-Shot Learners
- An Explanation of In-context Learning as Implicit Bayesian Inference cites Language Models are Few-Shot Learners
- An Explanation of In-context Learning as Implicit Bayesian Inference cites Calibrate Before Use: Improving Few-shot Performance of Language Models
- Rethinking the Role of Demonstrations: What Makes In-Context Learning Work? cites Language Models are Few-Shot Learners
- Rethinking the Role of Demonstrations: What Makes In-Context Learning Work? cites Calibrate Before Use: Improving Few-shot Performance of Language Models
- What Can Transformers Learn In-Context? A Case Study of Simple Function Classes cites An Explanation of In-context Learning as Implicit Bayesian Inference
- What Can Transformers Learn In-Context? A Case Study of Simple Function Classes cites Language Models are Few-Shot Learners
- What Can Transformers Learn In-Context? A Case Study of Simple Function Classes cites Calibrate Before Use: Improving Few-shot Performance of Language Models
- Calibrate Before Use: Improving Few-shot Performance of Language Models cites Language Models are Few-Shot Learners
Cited by top-tier papers13
- Large Language Models-guided Dynamic Adaptation for Temporal Knowledge Graph ReasoningJiapu Wang, Kai Sun, Linhao Luo, Wei Wei et al.NeurIPS 2024 · 82 citations
- Beyond Single Pass, Looping Through Time: KG-IRAG with Iterative Knowledge RetrievalRuiyi Yang, Hao Xue, Imran Razzak, Flora D. SalimWWW 2026 · 8 citations
- Tackling Sparse Facts for Temporal Knowledge Graph CompletionYuchao Zhang, Xiangjie Kong, Kailun Ye, Guojiang Shen et al.WWW 2025 · 8 citations
- MM-Forecast: A Multimodal Approach to Temporal Event Forecasting with Large Language ModelsHaoxuan Li, Zhengmao Yang, Yunshan Ma, Yi Bin et al.ACM MM 2024 · 4 citations
- AnRe: Analogical Replay for Temporal Knowledge Graph ForecastingGuo Tang, Zheng Chu, Wenxiang Zheng, Junjia Xiang et al.ACL 2025 · 3 citations
Builds on17
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Calibrate Before Use: Improving Few-shot Performance of Language ModelsZihao Zhao, Eric Wallace, Shi Feng, Dan Klein et al.ICML 2021 · 1,843 citations
- An Explanation of In-context Learning as Implicit Bayesian InferenceSang Michael Xie, Aditi Raghunathan, Percy Liang, Tengyu MaICLR 2022 · 1,030 citations
- What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 citations
- Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe et al.EMNLP 2022 · 634 citations
Related papers
- G2S: A General-to-Specific Learning Framework for Temporal Knowledge Graph Forecasting with Large Language ModelsLong Bai, Zixuan Li, Xiaolong Jin, Jiafeng Guo et al.ACL Findings 2025 · 3 citations
- From Implicit Graph Encoding to Explicit Evidence: A Training-Free LLM Framework for Temporal Knowledge Graph ReasoningGuo Tang, Ke Cheng, Huiming Fan, Heng Chang et al.ACL Findings 2026
- Critic Rule Induction: Improving Temporal Knowledge Graph Forecasting with Generator-Critic Language ModelsYingsong Ning, Fu Zhang, Jingwei Cheng, Jiashun Peng et al.ACL Findings 2026
- SRM-LLM: Semantic Relationship Mining with LLMs for Temporal Knowledge Graph ExtrapolationFu Zhang, Panfeng Zhang, Jingwei ChengEMNLP Findings 2025
- Context is Key: A Benchmark for Forecasting with Essential Textual InformationAndrew Robert Williams, Arjun Ashok, Étienne Marcotte, Valentina Zantedeschi et al.ICML 2025
