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.
翻译:时间知识图谱问答(TKGQA)旨在回答针对时间知识图谱(TKGs)中包含时间意图的问题。该任务的核心挑战在于理解问题中多种时间约束(如“之前”、“首先”)所涉及的复杂语义信息。现有端到端方法通过学习问题和候选答案的时间感知嵌入来隐式建模时间约束,但这种方法远未能全面理解问题。受基于语义解析的方法启发——这类方法通过生成带有符号运算符的逻辑形式显式建模问题中的约束——我们设计了针对时间约束的基础时间运算符,并提出了一种新颖的自我改进编程方法用于TKGQA(Prog-TQA)。具体而言,Prog-TQA利用大语言模型(LLMs)的上下文学习能力来理解问题中的组合时间约束,并通过少量示例生成相应的程序草稿。随后,该方法通过链接模块将这些草稿与TKGs对齐,并执行草稿以生成答案。为增强问题理解能力,Prog-TQA进一步配备了自我改进策略,通过高质量自生成草稿有效引导LLMs。大量实验表明,所提出的Prog-TQA在MultiTQ和CronQuestions数据集上具有优越性,尤其在Hits@1指标上表现突出。