Table of Contents
Fetching ...

Self-Improvement Programming for Temporal Knowledge Graph Question Answering

Zhuo Chen, Zhao Zhang, Zixuan Li, Fei Wang, Yutao Zeng, Xiaolong Jin, Yongjun Xu

TL;DR

This paper tackles Temporal Knowledge Graph Question Answering (TKGQA) by explicitly modeling temporal constraints with designed operators and KoPL, rather than relying on time-aware embeddings alone. It introduces Prog-TQA, a two-stage framework that uses in-context learning to draft KoPL programs, then links these drafts to a Temporal Knowledge Graph and executes them, all within a self-improvement loop that bootstraps the LLM with high-quality, self-generated annotations. The approach yields state-of-the-art performance on MultiTQ and CronQuestions, with substantial gains on multi-constraint temporal questions, demonstrating the value of combining semantic parsing with LLM-driven program synthesis and iterative refinement. The work highlights the practical impact of explicit temporal reasoning in TKGQA and suggests promising avenues for scalable, data-efficient QA over temporally annotated knowledge graphs.

Abstract

Temporal Knowledge Graph Question Answering (TKGQA) aims to answer questions with temporal intent over Temporal Knowledge Graphs (TKGs). The core challenge of this task lies in understanding the complex semantic information regarding multiple types of time constraints (e.g., before, first) in questions. Existing end-to-end methods implicitly model the time constraints by learning time-aware embeddings of questions and candidate answers, which is far from understanding the question comprehensively. Motivated by semantic-parsing-based approaches that explicitly model constraints in questions by generating logical forms with symbolic operators, we design fundamental temporal operators for time constraints and introduce a novel self-improvement Programming method for TKGQA (Prog-TQA). Specifically, Prog-TQA leverages the in-context learning ability of Large Language Models (LLMs) to understand the combinatory time constraints in the questions and generate corresponding program drafts with a few examples given. Then, it aligns these drafts to TKGs with the linking module and subsequently executes them to generate the answers. To enhance the ability to understand questions, Prog-TQA is further equipped with a self-improvement strategy to effectively bootstrap LLMs using high-quality self-generated drafts. Extensive experiments demonstrate the superiority of the proposed Prog-TQA on MultiTQ and CronQuestions datasets, especially in the Hits@1 metric.

Self-Improvement Programming for Temporal Knowledge Graph Question Answering

TL;DR

This paper tackles Temporal Knowledge Graph Question Answering (TKGQA) by explicitly modeling temporal constraints with designed operators and KoPL, rather than relying on time-aware embeddings alone. It introduces Prog-TQA, a two-stage framework that uses in-context learning to draft KoPL programs, then links these drafts to a Temporal Knowledge Graph and executes them, all within a self-improvement loop that bootstraps the LLM with high-quality, self-generated annotations. The approach yields state-of-the-art performance on MultiTQ and CronQuestions, with substantial gains on multi-constraint temporal questions, demonstrating the value of combining semantic parsing with LLM-driven program synthesis and iterative refinement. The work highlights the practical impact of explicit temporal reasoning in TKGQA and suggests promising avenues for scalable, data-efficient QA over temporally annotated knowledge graphs.

Abstract

Temporal Knowledge Graph Question Answering (TKGQA) aims to answer questions with temporal intent over Temporal Knowledge Graphs (TKGs). The core challenge of this task lies in understanding the complex semantic information regarding multiple types of time constraints (e.g., before, first) in questions. Existing end-to-end methods implicitly model the time constraints by learning time-aware embeddings of questions and candidate answers, which is far from understanding the question comprehensively. Motivated by semantic-parsing-based approaches that explicitly model constraints in questions by generating logical forms with symbolic operators, we design fundamental temporal operators for time constraints and introduce a novel self-improvement Programming method for TKGQA (Prog-TQA). Specifically, Prog-TQA leverages the in-context learning ability of Large Language Models (LLMs) to understand the combinatory time constraints in the questions and generate corresponding program drafts with a few examples given. Then, it aligns these drafts to TKGs with the linking module and subsequently executes them to generate the answers. To enhance the ability to understand questions, Prog-TQA is further equipped with a self-improvement strategy to effectively bootstrap LLMs using high-quality self-generated drafts. Extensive experiments demonstrate the superiority of the proposed Prog-TQA on MultiTQ and CronQuestions datasets, especially in the Hits@1 metric.
Paper Structure (26 sections, 1 equation, 8 figures, 10 tables, 1 algorithm)

This paper contains 26 sections, 1 equation, 8 figures, 10 tables, 1 algorithm.

Figures (8)

  • Figure 1: SPARQL query with complex clauses for temporal operations (left) and extended KoPL with neat temporal operators (right).
  • Figure 2: The pipeline of proposed Prog-TQA. Prog-TQA firstly leverages the ICL ability of LLMs to generate KoPL program drafts. Subsequently, it adopts linking and execution modules to complete and execute the generated drafts on TKG and finally obtains the answers.
  • Figure 3: Performances (Hits@1) of Prog-TQA and MultiQA on the MultiTQ dataset against question types.
  • Figure 4: Performances (Hits@1) for each round of iterative fine-tuning on MultiTQ and CronQuestions. "w/o SI" indicates removing the self-improvement strategy.
  • Figure 5: Performances under different sizes of fine-tuning data. The solid and dash lines donate Hits@10 and Hits@1 metrics, respectively.
  • ...and 3 more figures