In-situ Adaptation for LLM-based Link Prediction: A Dynamic Cognition Paradigm for Temporal Knowledge Graphs

15 Sept 2025 (modified: 20 Nov 2025)ICLR 2026 Conference Withdrawn SubmissionEveryoneRevisionsBibTeXCC BY 4.0
Keywords: In-situ Test-time Adaptation, Temporal Knowledge Graphs, Few-shot QA
Abstract: Knowledge graphs continuously evolve, making the prediction of future links a crucial but challenging task. Current methods, whether based on dynamic graph neural networks or static retrieval-augmented generation (RAG) for Large Language Models (LLMs), struggle with generalization. They often fail to capture the real-time, characteristic evolution of the graph during the testing phase, leading to degraded performance from distribution shifts. To address this, we propose a new training-free paradigm, termed Dynamic Cognition (DyCo), which posits that effective link prediction hinges on an agent's ability to continuously perceive graph evolution and adapt its strategies in-situ. Inspired by this, we introduce a novel framework DyCo-LLM, which enables an LLM to perform live adaptation for temporal link prediction. At its core is a dynamic context engine that tailors the LLM's prompts on the fly. This engine features an adaptive multi-path recall and scoring mechanism that adjusts its parameters based on the evolving node- and graph-level features. Furthermore, the framework incorporates a dynamic few-shot learner that generates corrective reasoning examples from prediction failures, allowing the LLM to learn from its mistakes in real-time without retraining. Experimental results on two large-scale dynamic knowledge graphs demonstrate that our approach achieves state-of-the-art performance in the link prediction task. Ablations verify that each recall path is indispensable, and balanced weights are critical to fuse structural–semantic signals and history–self similarity. In addition, the reflective few-shot routine provides consistent gains. The source code is available at https://anonymous.4open.science/r/13htrueiwbgjkdsb/.
Primary Area: learning on time series and dynamical systems
Submission Number: 5802
Loading