用代码式指令解析复杂逻辑查询,提升知识图谱问答准确率
Effective Instruction Parsing Plugin for Complex Logical Query Answering on Knowledge Graphs
- 将一阶逻辑查询转为带变量和嵌套元组的代码式指令
- 在8个基础模型上提升性能,超越2个先进方法
- 适合需要高效处理复杂查询的知识图谱研究者
知识图谱查询嵌入(KGQE)旨在将一阶逻辑(FOL)查询嵌入低维知识图谱空间,以实现对不完整知识图谱的复杂推理。为增强KGQE模型的泛化能力,近期研究引入实体类型、关系上下文等外部信息以更好地捕捉FOL查询的逻辑语义,该过程称为查询模式学习(QPL)。然而,现有QPL方法普遍存在模式-实体对齐偏差问题,导致学习到的查询模式存在缺陷,限制了模型性能。为此,本文提出一种有效的查询指令解析插件(QIPP),利用预训练语言模型(PLM)的上下文感知能力,从类代码查询指令中捕捉潜在查询模式。不同于以往引入外部信息的方式,我们首次提出以代码式指令表达FOL查询:使用文本变量与嵌套元组传递逻辑语义,作为基于PLM的指令编码器获取完整查询模式的原始材料。在此基础上,设计查询引导的指令解码器,使查询模式适配于KGQE模型。为进一步提升QIPP在各类KGQE模型中的有效性,提出基于压缩优化边界的模式注入机制与自适应归一化组件,使模型更高效利用查询模式。大量实验表明,本插件式方法在8个基础KGQE模型上均取得性能提升,优于两个当前最优的QPL方法。
原文摘要 · Abstract (English)
Knowledge Graph Query Embedding (KGQE) aims to embed First-Order Logic (FOL) queries in a low-dimensional KG space for complex reasoning over incomplete KGs. To enhance the generalization of KGQE models, recent studies integrate various external information (such as entity types and relation context) to better capture the logical semantics of FOL queries. The whole process is commonly referred to as Query Pattern Learning (QPL). However, current QPL methods typically suffer from the pattern-entity alignment bias problem, leading to the learned defective query patterns limiting KGQE models' performance. To address this problem, we propose an effective Query Instruction Parsing Plugin (QIPP) that leverages the context awareness of Pre-trained Language Models (PLMs) to capture latent query patterns from code-like query instructions. Unlike the external information introduced by previous QPL methods, we first propose code-like instructions to express FOL queries in an alternative format. This format utilizes textual variables and nested tuples to convey the logical semantics within FOL queries, serving as raw materials for a PLM-based instruction encoder to obtain complete query patterns. Building on this, we design a query-guided instruction decoder to adapt query patterns to KGQE models. To further enhance QIPP's effectiveness across various KGQE models, we propose a query pattern injection mechanism based on compressed optimization boundaries and an adaptive normalization component, allowing KGQE models to utilize query patterns more efficiently. Extensive experiments demonstrate that our plug-and-play method improves the performance of eight basic KGQE models and outperforms two state-of-the-art QPL methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。