Lune

WWW2025Top-tier venue

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 Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • ConE: Cone Embeddings for Multi-Hop Reasoning over Knowledge Graphs cites Query2box: Reasoning over Knowledge Graphs in Vector Space Using Box Embeddings
  • ConE: Cone Embeddings for Multi-Hop Reasoning over Knowledge Graphs cites Beta Embeddings for Multi-Hop Logical Reasoning in Knowledge Graphs
  • Knowledge Reasoning Language Model: Unifying Knowledge and Language for Inductive Knowledge Graph Reasoning cites Reasoning on Graphs: Faithful and Interpretable Large Language Model Reasoning
  • Beta Embeddings for Multi-Hop Logical Reasoning in Knowledge Graphs cites Query2box: Reasoning over Knowledge Graphs in Vector Space Using Box Embeddings
  • Implicit Fine-tuning via Context Engineering: A Curriculum Learning Framework for Multimodal Entity Alignment cites PSQE: A Theoretical-Practical Approach to Pseudo Seed Quality Enhancement for Unsupervised Multimodal Entity Alignment
  • Implicit Fine-tuning via Context Engineering: A Curriculum Learning Framework for Multimodal Entity Alignment cites Knowledge Reasoning Language Model: Unifying Knowledge and Language for Inductive Knowledge Graph Reasoning
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. 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
  2. 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
  3. 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 on28

  1. Reasoning on Graphs: Faithful and Interpretable Large Language Model ReasoningLinhao Luo, Yuan-Fang Li, Gholamreza Haffari, Shirui PanICLR 2024 · 499 citations
  2. Query2box: Reasoning over Knowledge Graphs in Vector Space Using Box EmbeddingsHongyu Ren, Weihua Hu, Jure LeskovecICLR 2020 · 355 citations
  3. Beta Embeddings for Multi-Hop Logical Reasoning in Knowledge GraphsHongyu Ren, Jure LeskovecNeurIPS 2020 · 267 citations
  4. ConE: Cone Embeddings for Multi-Hop Reasoning over Knowledge GraphsZhanqiu Zhang, Jie Wang, Jiajun Chen, Shuiwang Ji et al.NeurIPS 2021 · 161 citations
  5. Structural Language Models of CodeUri Alon, Roy Sadaka, Omer Levy, Eran YahavICML 2020 · 115 citations

Related papers

  1. Fuzzy Logic Based Logical Query Answering on Knowledge GraphsXuelu Chen, Ziniu Hu, Yizhou SunAAAI 2022 · 42 citations
  2. 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
  3. Knowledge Graph Completion with Relation-Aware Anchor EnhancementDuanyang Yuan, Sihang Zhou, Xiaoshu Chen, Dong Wang et al.AAAI 2025 · 12 citations
  4. From Phrases to Subgraphs: Fine-Grained Semantic Parsing for Knowledge Graph Question AnsweringYurun Song, Xiangqing Shen, Rui XiaACL Findings 2025 · 4 citations
  5. Improving Complex Reasoning over Knowledge Graph with Logic-Aware Curriculum TuningTianle Xia, Liang Ding, Guojia Wan, Yibing Zhan et al.AAAI 2025 · 19 citations
Dusk over the sea between two cliffs drawn in fine vertical lines