# Formal Query Building with Query Structure Prediction for Complex Question Answering over Knowledge Base

arXiv: https://arxiv.org/abs/2109.03614 · HTML: https://mlsanity.com/paper/2109.03614/

## Key facts

- Cited by 16 papers in the map (data through 14 Oct 2026).
- Builds on 10 of its 26 references that are in the map.
- First posted on arXiv 8 Sep 2021.

## Builds on (most cited first, 10 of 10)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Deep Residual Learning for Image Recognition](https://mlsanity.com/paper/1512.03385/) (2015)
- [Pointer Networks](https://mlsanity.com/paper/1506.03134/) (2015)
- [Text Generation from Knowledge Graphs with Graph Transformers](https://mlsanity.com/paper/1904.02342/) (2019)
- [Improved Neural Relation Detection for Knowledge Base Question Answering](https://mlsanity.com/paper/1704.06194/) (2017)
- [KBQA: Learning Question Answering over QA Corpora and Knowledge Bases](https://mlsanity.com/paper/1903.02419/) (2019)
- [Universal Semantic Parsing](https://mlsanity.com/paper/1702.03196/) (2017)
- [Learning to Rank Query Graphs for Complex Question Answering over Knowledge Graphs](https://mlsanity.com/paper/1811.01118/) (2018)
- [S-MART: Novel Tree-based Structured Learning Algorithms Applied to Tweet Entity Linking](https://mlsanity.com/paper/1609.08075/) (2016)
- [Leveraging Frequent Query Substructures to Generate Formal Queries for Complex Question Answering](https://mlsanity.com/paper/1908.11053/) (2019)

## Built on by (most cited first, 16 of 16)

- [Modern Baselines for SPARQL Semantic Parsing](https://mlsanity.com/paper/2204.12793/) (2022)
- [Interactive-KBQA: Multi-Turn Interactions for Knowledge Base Question Answering with Large Language Models](https://mlsanity.com/paper/2402.15131/) (2024)
- [Prompting Large Language Models with Chain-of-Thought for Few-Shot Knowledge Base Question Generation](https://mlsanity.com/paper/2310.08395/) (2023)
- [Outlining and Filling: Hierarchical Query Graph Generation for Answering Complex Questions over Knowledge Graphs](https://mlsanity.com/paper/2111.00732/) (2021)
- [CypherBench: Towards Precise Retrieval over Full-scale Modern Knowledge Graphs in the LLM Era](https://mlsanity.com/paper/2412.18702/) (2024)
- [A Two-Stage Approach towards Generalization in Knowledge Base Question Answering](https://mlsanity.com/paper/2111.05825/) (2021)
- [Question Decomposition Tree for Answering Complex Questions over Knowledge Bases](https://mlsanity.com/paper/2306.07597/) (2023)
- [Semantic Structure based Query Graph Prediction for Question Answering over Knowledge Graph](https://mlsanity.com/paper/2204.10194/) (2022)
- [Crake: Causal-Enhanced Table-Filler for Question Answering over Large Scale Knowledge Base](https://mlsanity.com/paper/2207.03680/) (2022)
- [NuTrea: Neural Tree Search for Context-guided Multi-hop KGQA](https://mlsanity.com/paper/2310.15484/) (2023)
- [A Chinese Multi-type Complex Questions Answering Dataset over Wikidata](https://mlsanity.com/paper/2111.06086/) (2021)
- [SPARKLE: Enhancing SPARQL Generation with Direct KG Integration in Decoding](https://mlsanity.com/paper/2407.01626/) (2024)
- [Improving Complex Knowledge Base Question Answering via Question-to-Action and Question-to-Question Alignment](https://mlsanity.com/paper/2212.13036/) (2022)
- [Reducing the impact of out of vocabulary words in the translation of natural language questions into SPARQL queries](https://mlsanity.com/paper/2111.03000/) (2021)
- [Calculating Question Similarity is Enough: A New Method for KBQA Tasks](https://mlsanity.com/paper/2111.07658/) (2021)
- [A Method of Query Graph Reranking for Knowledge Base Question Answering](https://mlsanity.com/paper/2204.12808/) (2022)

## Abstract (arXiv)

Formal query building is an important part of complex question answering over knowledge bases. It aims to build correct executable queries for questions. Recent methods try to rank candidate queries generated by a state-transition strategy. However, this candidate generation strategy ignores the structure of queries, resulting in a considerable number of noisy queries. In this paper, we propose a new formal query building approach that consists of two stages. In the first stage, we predict the query structure of the question and leverage the structure to constrain the generation of the candidate queries. We propose a novel graph generation framework to handle the structure prediction task and design an encoder-decoder model to predict the argument of the predetermined operation in each generative step. In the second stage, we follow the previous methods to rank the candidate queries. The experimental results show that our formal query building approach outperforms existing methods on complex questions while staying competitive on simple questions.
