{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/large-language-models-guided-dynamic","title":"Large Language Models-guided Dynamic Adaptation for Temporal Knowledge Graph Reasoning","arxiv_id":"2405.14170","date":"2024-05-23","proceeding":null,"authors":["Jiapu Wang","Kai Sun","Linhao Luo","Wei Wei","Yongli Hu","Alan Wee-Chung Liew","Shirui Pan","BaoCai Yin"],"abstract":"Temporal Knowledge Graph Reasoning (TKGR) is the process of utilizing temporal information to capture complex relations within a Temporal Knowledge Graph (TKG) to infer new knowledge. Conventional methods in TKGR typically depend on deep learning algorithms or temporal logical rules. However, deep learning-based TKGRs often lack interpretability, whereas rule-based TKGRs struggle to effectively learn temporal rules that capture temporal patterns. Recently, Large Language Models (LLMs) have demonstrated extensive knowledge and remarkable proficiency in temporal reasoning. Consequently, the employment of LLMs for Temporal Knowledge Graph Reasoning (TKGR) has sparked increasing interest among researchers. Nonetheless, LLMs are known to function as black boxes, making it challenging to comprehend their reasoning process. Additionally, due to the resource-intensive nature of fine-tuning, promptly updating LLMs to integrate evolving knowledge within TKGs for reasoning is impractical. To address these challenges, in this paper, we propose a Large Language Models-guided Dynamic Adaptation (LLM-DA) method for reasoning on TKGs. Specifically, LLM-DA harnesses the capabilities of LLMs to analyze historical data and extract temporal logical rules. These rules unveil temporal patterns and facilitate interpretable reasoning. To account for the evolving nature of TKGs, a dynamic adaptation strategy is proposed to update the LLM-generated rules with the latest events. This ensures that the extracted rules always incorporate the most recent knowledge and better generalize to the predictions on future events. Experimental results show that without the need of fine-tuning, LLM-DA significantly improves the accuracy of reasoning over several common datasets, providing a robust framework for TKGR tasks.","url_abs":"https://arxiv.org/abs/2405.14170v3","url_pdf":"https://arxiv.org/pdf/2405.14170v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"large-language-models-guided-dynamic","repo_url":"https://github.com/jiapuwang/LLM-DA","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.14170","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.14170"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jiapuwang/LLM-DA","reach":null}],"summary":{"ran_draft_wrong":5,"unverified":1},"by_repo_kind":{"official":{"samples":6,"ran":5,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":6,"samples":[{"code_sha256_prefix":"ce7c550a5364d864","entry":"build_prompt","repo":"jiapuwang/LLM-DA","repo_kind":"official","path":"Iteration_reasoning.py","file_url":"https://github.com/jiapuwang/LLM-DA/blob/HEAD/Iteration_reasoning.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ce7c550a5364d864"}},{"code_sha256_prefix":"5064f2d5e686e53d","entry":"build_prompt_for_zero","repo":"jiapuwang/LLM-DA","repo_kind":"official","path":"Iteration_reasoning.py","file_url":"https://github.com/jiapuwang/LLM-DA/blob/HEAD/Iteration_reasoning.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5064f2d5e686e53d"}},{"code_sha256_prefix":"e4d50ba485df9f56","entry":"calculate_test_interval","repo":"jiapuwang/LLM-DA","repo_kind":"official","path":"evaluate.py","file_url":"https://github.com/jiapuwang/LLM-DA/blob/HEAD/evaluate.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"none","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e4d50ba485df9f56"}},{"code_sha256_prefix":"251e85046f76d164","entry":"load_candidates","repo":"jiapuwang/LLM-DA","repo_kind":"official","path":"evaluate.py","file_url":"https://github.com/jiapuwang/LLM-DA/blob/HEAD/evaluate.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"251e85046f76d164"}},{"code_sha256_prefix":"69ae10571200b576","entry":"load_test_and_score_data","repo":"jiapuwang/LLM-DA","repo_kind":"official","path":"evaluate.py","file_url":"https://github.com/jiapuwang/LLM-DA/blob/HEAD/evaluate.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"69ae10571200b576"}},{"code_sha256_prefix":"dfe7df22584925f9","entry":"read_paths","repo":"jiapuwang/LLM-DA","repo_kind":"official","path":"Iteration_reasoning.py","file_url":"https://github.com/jiapuwang/LLM-DA/blob/HEAD/Iteration_reasoning.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dfe7df22584925f9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}