Ontology-Guided, Hybrid Prompt Learning for Generalization in Knowledge Graph Question Answering

📅 2025-02-06
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Existing knowledge graph question answering (KGQA) systems heavily rely on specific knowledge graphs (e.g., Wikidata, DBpedia) and struggle with zero-shot transfer to unseen graphs (e.g., DBLP-QuAD, CoyPu), primarily due to cross-graph schema and structural heterogeneity. Method: We propose OntoSCPrompt, a two-stage large language model (LLM) framework: (1) ontology-guided generation of SPARQL structural templates, and (2) injection of graph-specific information. It introduces the first ontology-driven hybrid prompting mechanism, decoupling semantic parsing from graph interaction, and integrates task-customized constrained decoding with syntactic validation to ensure query executability. Contribution/Results: OntoSCPrompt achieves state-of-the-art performance on CWQ, WebQSP, and LC-QuAD 1.0 without retraining. It significantly enhances cross-graph generalization while substantially reducing computational and annotation overhead.

Technology Category

Application Category

📝 Abstract
Most existing Knowledge Graph Question Answering (KGQA) approaches are designed for a specific KG, such as Wikidata, DBpedia or Freebase. Due to the heterogeneity of the underlying graph schema, topology and assertions, most KGQA systems cannot be transferred to unseen Knowledge Graphs (KGs) without resource-intensive training data. We present OntoSCPrompt, a novel Large Language Model (LLM)-based KGQA approach with a two-stage architecture that separates semantic parsing from KG-dependent interactions. OntoSCPrompt first generates a SPARQL query structure (including SPARQL keywords such as SELECT, ASK, WHERE and placeholders for missing tokens) and then fills them with KG-specific information. To enhance the understanding of the underlying KG, we present an ontology-guided, hybrid prompt learning strategy that integrates KG ontology into the learning process of hybrid prompts (e.g., discrete and continuous vectors). We also present several task-specific decoding strategies to ensure the correctness and executability of generated SPARQL queries in both stages. Experimental results demonstrate that OntoSCPrompt performs as well as SOTA approaches without retraining on a number of KGQA datasets such as CWQ, WebQSP and LC-QuAD 1.0 in a resource-efficient manner and can generalize well to unseen domain-specific KGs like DBLP-QuAD and CoyPu KG Code: href{https://github.com/LongquanJiang/OntoSCPrompt}{https://github.com/LongquanJiang/OntoSCPrompt}
Problem

Research questions and friction points this paper is trying to address.

Generalizing Knowledge Graph Question Answering to unseen KGs
Reducing resource-intensive training for KGQA systems
Enhancing KG understanding with ontology-guided prompt learning
Innovation

Methods, ideas, or system contributions that make the work stand out.

Ontology-guided hybrid prompts
Two-stage SPARQL generation
Task-specific decoding strategies
🔎 Similar Papers
No similar papers found.