CALENDAR+: in-context contrastive learning for temporal knowledge graph reasoning
摘要
Temporal Knowledge Graph (TKG) reasoning aims to infer future events from historical facts. Recent advances in large language models (LLMs) have shown that in-context learning can effectively enhance temporal reasoning. While existing approaches over-rely on historical information and overlook crucial non-historical factors, which CALENDAR addresses. However, CALENDAR overlooks event recency and relies heavily on global principles, which leads to inaccuracies in TKG reasoning. To address this limitation, we propose CALENDAR+ (i.e., in-context ContrAstive Learning tEmporal kNowleDge grAph Reasoning), a novel approach that integrates contrastive demonstrations to improve in-context reasoning. In CALENDAR+, we propose a demonstration candidate generation with high-order information method, which generates demonstration candidates from both historical and non-historical information. Moreover, we devise a time-aware contrastive importance based demonstration selection method to emphasize the most informative examples across time. Furthermore, we design a global–local chain-of-history based demonstration format which provides explicit negative principles that guide the model to avoid over-reliance on global and local histories. Extensive experiments show that CALENDAR+ achieves consistent improvements of over 1% across multiple TKG datasets, including Hits@10 of 60.10% on ICEWS14, 53.30% on ICEWS18, and 69.95% on ICEWS05-15, with an MRR gain of 5.67% over the strongest baseline.