[论文解读] Outlining and Filling: Hierarchical Query Graph Generation for Answering Complex Questions over Knowledge Graphs
本文提出了一种用于复杂知识图谱问答(KGQA)的分层查询图生成模型,采用一种新颖的图语法(AQG)来表示SPARQL查询,并通过两阶段端到端自回归解码实现:首先勾勒查询结构,然后填充实体和关系。该方法显著缩小了搜索空间并避免了局部歧义,在三个复杂KGQA基准上实现了最先进性能,尤其在使用预训练模型时表现突出。
Query graph construction aims to construct the correct executable SPARQL on the KG to answer natural language questions. Although recent methods have achieved good results using neural network-based query graph ranking, they suffer from three new challenges when handling more complex questions: 1) complicated SPARQL syntax, 2) huge search space, and 3) locally ambiguous query graphs. In this paper, we provide a new solution. As a preparation, we extend the query graph by treating each SPARQL clause as a subgraph consisting of vertices and edges and define a unified graph grammar called AQG to describe the structure of query graphs. Based on these concepts, we propose a novel end-to-end model that performs hierarchical autoregressive decoding to generate query graphs. The high-level decoding generates an AQG as a constraint to prune the search space and reduce the locally ambiguous query graph. The bottom-level decoding accomplishes the query graph construction by selecting appropriate instances from the preprepared candidates to fill the slots in the AQG. The experimental results show that our method greatly improves the SOTA performance on complex KGQA benchmarks. Equipped with pre-trained models, the performance of our method is further improved, achieving SOTA for all three datasets used.
研究动机与目标
- 为解决现有学习排序方法在处理嵌套子查询、大规模搜索空间及局部歧义的复杂SPARQL查询时的局限性。
- 重新定义查询图表示方式,以支持复杂SPARQL语法,包括嵌套查询和聚合函数。
- 通过分层、结构约束的解码方式,减少候选查询图生成过程中的搜索空间并避免局部歧义。
- 通过利用结构约束和预训练语言模型,提升KGQA中的零样本与少样本泛化能力。
提出的方法
- 提出一种新型形式文法,称为AQG(答案查询图),将每个SPARQL子句视为具有顶点和边的子图,从而支持嵌套查询和聚合等复杂SPARQL构造的表示。
- 提出一种两阶段分层自回归解码过程:首先生成高层AQG结构(勾勒阶段),然后用具体实体、关系或值填充槽位(填充阶段)。
- 采用基于图语法的解码策略,允许在生成过程中任意位置动态插入语义组件,避免了刚性树状结构的约束。
- 利用预训练语言模型增强自然语言问题(NLQ)的表示,并提升泛化能力,尤其在低资源场景下。
- 利用勾勒出的AQG结构施加结构约束,以剪枝搜索空间,降低生成局部正确但全局错误的查询图的可能性。
- 使用交叉熵损失端到端训练分层生成过程,并采用束搜索进行解码。
![Figure 1 : Examples of the challenges. (a) depicts a complex SPARQL program with a nested query in ComplexWebQuesions [ 12 ] . (b) illustrates a local ambiguity. The green and gold boxes represent the correct and incorrect query graphs, and the dashed boxes represent their structures. For clarity, w](https://ar5iv.labs.arxiv.org/html/2111.00732/assets/x1.png)
实验结果
研究问题
- RQ1具有结构约束的分层生成框架是否能有效缩小搜索空间并提升复杂KGQA的准确性?
- RQ2所提出的AQG语法在表示复杂SPARQL查询(包括嵌套子查询和聚合函数)方面有多高效?
- RQ3分层解码在多大程度上缓解了候选查询图生成中的局部歧义?
- RQ4该模型是否能在不依赖预定义模板或条件的情况下,在复杂KGQA基准上实现最先进性能?
主要发现
- 所提方法在三个主要复杂KGQA基准(WebQSP、ComplexWebQuestions和CSQA)上均达到最先进性能,尤其在结合预训练模型时表现更优。
- 分层生成策略显著缩小了搜索空间,提升了效率与准确性,尤其在包含嵌套子查询的查询中表现突出。
- 与现有学习排序基线相比,该模型在性能上大幅领先,尤其在涉及FILTER子句和聚合函数等复杂SPARQL语法的查询上。
- AQG语法的使用使得复杂SPARQL构造(如嵌套子查询)得以准确表示,而传统查询图无法建模此类结构。
- 该模型展现出强大的泛化能力,即使在少样本和零样本设置下,使用预训练语言模型也能观察到性能提升。
- 推理时间高效,HGNet在训练和推理阶段均表现出最佳效率,尤其得益于勾勒阶段搜索空间的显著减少。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。