Knowledge Base Question Answering via Encoding of Complex Query Graphs

Kangqi Luo, Fengli Lin, Xusheng Luo, Kenny Q. Zhu

Abstract

Knowledge Base Question Answering (KBQA) systems often struggle with complex questions that require reasoning over multiple entities and constraints. This paper introduces a neural network approach that encodes the complete structure of a query graph into a single vector representation. By capturing global compositional semantics rather than matching individual components in isolation, the model effectively handles complex queries. Evaluation on benchmarks like ComplexQuestions demonstrates state-of-the-art performance, highlighting the importance of a global perspective in semantic parsing.

Introduction: The Challenge of Complex Queries

Standard KBQA systems perform well on simple questions that map to a single triple, such as "What is the capital of the US?" However, they often fail on complex queries like "What is the second longest river in the United States?" Answering such questions requires identifying a specific entity type (river), a spatial constraint (in the US), a numerical property (length), and an ordinal ranking (second longest).

A complex query graph representing the 'second longest river in the US', incorporating type, relation, and ordinal constraints.

Traditional methods typically decompose these questions into separate semantic components and compare them to the Knowledge Base (KB) individually. This "piecewise" approach lacks a global perspective, failing to capture how different components interact to form the overall meaning of the question.

Methodology

The proposed framework generates candidate query graphs and ranks them using a specialized neural matching model.

Staged Query Graph Generation

The process begins by linking focus entities and iteratively adding "main paths" and constraints. These constraints include entity, type, time, and ordinal constraints (e.g., MaxAtN).

A complete query graph for the question 'Who is the youngest US president after 2002?', showing the integration of entity, type, and temporal constraints.

Global and Local Encoding

To capture the question's semantics, the model employs two levels of encoding:

  1. Global Encoding: A bidirectional GRU (BiGRU) processes the entire question sequence.
  2. Local Encoding: Dependency parsing extracts the specific path between the answer placeholder (wh-word) and focus entities, clarifying the syntactic relationship between the answer and its constraints.

Semantic Component Encoding and Max-Pooling

Each branch of the query graph is encoded using both predicate names and unique predicate IDs. The key innovation is the use of max-pooling over the hidden vectors of all semantic components. This creates a uniform vector representing the entire complex query structure, allowing the model to "pick" the most salient features to match the question vector.

Evaluation and Results

The model was evaluated on three major benchmarks:

  • ComplexQuestions (CompQ): Designed for multi-constraint questions. The model achieved a state-of-the-art F1 score of 42.8.
  • WebQuestions (WebQ): A standard benchmark where the model reached a competitive F1 of 52.7.
  • SimpleQuestions (SimpQ): Used to ensure the model remains effective on single-relation tasks.

Ablation studies confirmed that both dependency parsing and the global pooling strategy are critical for performance. Removing these elements led to a significant drop in accuracy, validating the "global" structural approach.

Key Insights

  • Compositionality: Max-pooling across graph components allows the model to distinguish between graphs with similar predicates but different structures.
  • Syntactic Shortcuts: Dependency paths effectively filter noise in long questions by focusing on direct grammatical links.
  • Hybrid Representations: Combining natural language predicate names with internal KB IDs provides complementary information, capturing nuances that names alone might miss.

Limitations and Future Work

Despite its success, the model faces challenges with "implicit" constraints, such as temporal overlaps not explicitly stated as dates. Additionally, entity ambiguity remains a bottleneck, accounting for 16% of errors. Future research will focus on extending the model to support more complex logic, including negation and sophisticated temporal reasoning.

Summary updated

BibTeX
@inproceedings{luo2018knowledge,
  author = {Kangqi Luo and Fengli Lin and Xusheng Luo and Kenny Q. Zhu},
  title = {{Knowledge Base Question Answering via Encoding of Complex Query Graphs}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2018},
  doi = {10.18653/v1/d18-1242},
}
Figure