Answering complex logical queries on incomplete knowledge graphs is a challenging task, and has been widely studied. Embedding-based methods require training on complex queries, and cannot generalize well to out-of-distribution query structures. Recent work frames this task as an end-to-end optimization problem, and it only requires a pretrained link predictor. However, due to the exponentially large combinatorial search space, the optimal solution can only be approximated, limiting the final accuracy. In this work, we propose QTO (Query Computation Tree Optimization) that can efficiently find the exact optimal solution. QTO finds the optimal solution by a forward-backward propagation on the tree-like computation graph, i.e., query computation tree. In particular, QTO utilizes the independence encoded in the query computation tree to reduce the search space, where only local computations are involved during the optimization procedure. Experiments on 3 datasets show that QTO obtains state-of-the-art performance on complex query answering, outperforming previous best results by an average of 22%. Moreover, QTO can interpret the intermediate solutions for each of the one-hop atoms in the query with over 90% accuracy. The code of our paper is at https://github.com/bys0318/QTO.
翻译:在知识图谱不完整时回答复杂逻辑查询是一项具有挑战性的任务,并得到了广泛研究。基于嵌入的方法需要针对复杂查询进行训练,且难以推广至分布外的查询结构。近期工作将该任务建模为端到端优化问题,仅需预训练链接预测器即可完成。然而,由于组合搜索空间呈指数级增长,最优解仅能近似求解,限制了最终精度。本文提出QTO(查询计算树优化)方法,能够高效求得精确最优解。QTO通过在树状计算图(即查询计算树)上进行前向-后向传播来寻找最优解。特别地,QTO利用查询计算树中蕴含的独立性来缩减搜索空间,优化过程中仅涉及局部计算。在三个数据集上的实验表明,QTO在复杂查询回答中取得了最先进性能,平均超越此前最优结果22%。此外,QTO能够以超过90%的准确率解释查询中每个单跳原子的中间解。本文代码开源地址为:https://github.com/bys0318/QTO。