Knowledge Graph Question Answering using Graph-Pattern Isomorphism

Daniel Vollmers, Rricha Jalota, Diego Moussallem, Hardik Topiwala, Axel-Cyrille Ngonga Ngomo, Ricardo UsbeckarXiv 2021 · DOI

TL;DR

TeBaQA is a novel Knowledge Graph Question Answering (KGQA) framework that maps natural language questions to SPARQL queries by learning the underlying "shape" of the graph patterns. By leveraging graph isomorphism to group similar queries into templates, it achieves state-of-the-art performance on benchmarks like QALD-8 while requiring significantly less training data and manual engineering than traditional deep learning approaches.

What Problem Does This Paper Address?

The core challenge in KGQA is the "semantic gap": translating a messy, ambiguous natural language question (e.g., "Who was the doctoral advisor of Albert Einstein?") into a precise, executable SPARQL query.

Current solutions generally fall into two camps:

  1. Deep Learning Models: These require massive amounts of annotated training data (thousands of question-query pairs) and are often "black boxes" that are difficult to adapt to new domains.
  2. Rule-Based/Template Systems: These rely on hand-crafted rules or templates, which are labor-intensive to build and brittle when the underlying Knowledge Graph (KG) structure changes.

The authors introduce TeBaQA to bridge this gap, aiming for a system that is easy to port to new domains, efficient to train, and capable of handling complex queries involving aggregations and superlatives.

Methods

TeBaQA’s architecture (shown in Figure 1) follows a multi-stage pipeline:

Figure 1. TeBaQA architecture on the running example.
  1. Graph-Isomorphism Detection: This is the "secret sauce." The system analyzes SPARQL queries from training data and groups them based on their Basic Graph Pattern (BGP) structure. Two queries are considered isomorphic if they have the same structural "shape," regardless of the specific entities or relations used. This reduces thousands of potential queries into a small, manageable set of template classes (see Figure 2).
  2. Question Classification: TeBaQA trains a statistical classifier to map new natural language questions to these template classes. It uses a mix of syntactic and semantic features, such as the presence of specific question words, the number of tokens, and part-of-speech tags (detailed in Table 1).
  3. Information Extraction: Instead of relying on external entity linkers, which often struggle with short questions, TeBaQA uses a custom, KG-agnostic indexing approach to identify candidate entities, relations, and classes within the question.
  4. Query Building & Ranking: The system fills the chosen template with the extracted candidates. It also applies rule-based modifiers for COUNT, FILTER, or ORDER BY operations. Finally, it ranks the generated SPARQL queries based on "Annotation Density" (how much of the question is covered by the query) and "Syntactic Similarity."
Figure 2. All basic graph patterns used as classes for QALD-8 and QALD-9 which later become templates. Note, the depicted templates contain more than five examples in the training dataset. Our running example, "Who was the doctoral advisor of Albert Einstein?" belongs to template (1).

Datasets

The authors evaluated TeBaQA across several prominent benchmarks:

  • QALD-8 & QALD-9: Standard heterogeneous datasets for Question Answering over Linked Data.
  • LC-QuAD v1 & v2: Large-scale datasets designed for complex questions. Notably, LC-QuAD v2 uses Wikidata, while the others use DBpedia, allowing the authors to demonstrate TeBaQA's cross-KG portability.

Key Insights and Ideas

  • Structure is Predictive: The fundamental insight is that structurally identical SPARQL queries often correspond to syntactically similar questions. By focusing on the isomorphism of the graph pattern, the system generalizes better than models trying to learn every specific query variation.
  • Efficiency through Sparsity: Because there are relatively few common graph patterns in standard QA datasets (only 8 were identified for QALD-8/9), the classification task is much simpler than end-to-end translation.
  • Domain Agnosticism: By using a search-index-based approach for information extraction rather than hard-coded rules, TeBaQA can be ported to a new Knowledge Graph simply by re-indexing the data and providing a small set of training examples.

Key Results

  • State-of-the-Art: TeBaQA achieved the highest F-measure on the QALD-8 benchmark (0.556), outperforming established systems like gAnswer2 and QAnswer.
  • Competitive Performance: It delivered comparable results on QALD-9 and LC-QuAD v1.
  • First to Evaluate on LC-QuAD v2: The authors claim to be the first to report results on LC-QuAD v2 (F-measure of 0.227), proving the system's ability to adapt to Wikidata.
  • Complex Query Handling: Unlike many competitors, TeBaQA successfully handled questions requiring operation modifiers (like "How many...") by using its rule-based look-up during the query-building phase.

Limitations and Future Work

  • Entity Linking Bottleneck: The ablation study revealed that entity linking is the primary performance bottleneck. If the system fails to link "Einstein" to the correct URI, the perfect template classification cannot save the query.
  • Template Coverage: The system struggles with questions that require complex templates not present in the training data. This was particularly evident in QALD-9, which contains more intricate queries than QALD-8.
  • Runtime Latency: TeBaQA is slower than some end-to-end models because the ranking mechanism fires multiple candidate SPARQL queries against the endpoint to find the best fit.
  • Future Directions: The authors plan to integrate deep learning for better question classification and information extraction while maintaining the efficient graph-isomorphism framework.

Summary updated

BibTeX
@misc{vollmers2021knowledge,
  author = {Daniel Vollmers and Rricha Jalota and Diego Moussallem and Hardik Topiwala and Axel-Cyrille Ngonga Ngomo and Ricardo Usbeck},
  title = {{Knowledge Graph Question Answering using Graph-Pattern Isomorphism}},
  year = {2021},
  eprint = {2103.06752},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.06752},
}
Figure