Effective Instruction Parsing Plugin for Complex Logical Query Answering on Knowledge Graphs
Xingrui Zhuo, Jiapu Wang, Gongqing Wu, Shirui Pan, Xindong Wu
Abstract
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 plugand-play method 1 improves the performance of eight basic KGQE models and outperforms two state-of-the-art QPL methods.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 6ead024a-a50f-4534-b223-3d35fe4416b0Cited by top-tier papers3
- Knowledge Reasoning Language Model: Unifying Knowledge and Language for Inductive Knowledge Graph ReasoningXingrui Zhuo, Jiapu Wang, Gongqing Wu, Zhongyuan Wang et al.ICLR 2026 · 2 citations
- PSQE: A Theoretical-Practical Approach to Pseudo Seed Quality Enhancement for Unsupervised Multimodal Entity AlignmentYunpeng Hong, Chenyang Bu, Jie Zhang, Yi He et al.KDD 2026
- Implicit Fine-tuning via Context Engineering: A Curriculum Learning Framework for Multimodal Entity AlignmentYunpeng Hong, Chenyang Bu, Di Wu, Yi He et al.KDD 2026
Builds on25
- Reasoning on Graphs: Faithful and Interpretable Large Language Model ReasoningLinhao Luo, Yuan-Fang Li, Gholamreza Haffari, Shirui PanICLR 2024 · 499 citations
- Query2box: Reasoning over Knowledge Graphs in Vector Space Using Box EmbeddingsHongyu Ren, Weihua Hu, Jure LeskovecICLR 2020 · 355 citations
- Beta Embeddings for Multi-Hop Logical Reasoning in Knowledge GraphsHongyu Ren, Jure LeskovecNeurIPS 2020 · 267 citations
- ConE: Cone Embeddings for Multi-Hop Reasoning over Knowledge GraphsZhanqiu Zhang, Jie Wang, Jiajun Chen, Shuiwang Ji et al.NeurIPS 2021 · 161 citations
- Structural Language Models of CodeUri Alon, Roy Sadaka, Omer Levy, Eran YahavICML 2020 · 115 citations
Related papers
- Fuzzy Logic Based Logical Query Answering on Knowledge GraphsXuelu Chen, Ziniu Hu, Yizhou SunAAAI 2022 · 42 citations
- ZeroEA: A Zero-Training Entity Alignment Framework via Pre-Trained Language ModelNan Huo, Reynold Cheng, Ben Kao, Wentao Ning et al.VLDB 2024 · 16 citations
- Knowledge Graph Completion with Relation-Aware Anchor EnhancementDuanyang Yuan, Sihang Zhou, Xiaoshu Chen, Dong Wang et al.AAAI 2025 · 12 citations
- Improving Complex Reasoning over Knowledge Graph with Logic-Aware Curriculum TuningTianle Xia, Liang Ding, Guojia Wan, Yibing Zhan et al.AAAI 2025 · 19 citations
- Neural-based Mixture Probabilistic Query Embedding for Answering FOL queries on Knowledge GraphsXiao Long, Liansheng Zhuang, Aodi Li, Shafei Wang et al.EMNLP 2022 · 6 citations
