Knowledge-Aware Conversational Semantic Parsing Over Web Tables

Yibo Sun, Duyu Tang, Nan Duan, Jingjing Xu, Xiaocheng Feng, Bing Qin

This post explores the paper "Knowledge-Aware Conversational Semantic Parsing Over Web Tables," which introduces a new framework for helping machines understand and answer sequences of questions about data stored in tables.

TL;DR

The authors present CAMP (Conversational Table-based Semantic Parser), a model that integrates grammar, expert, and external resource knowledge to map multi-turn natural language questions into executable SQL-like queries. By explicitly allowing the model to "copy" logic from previous turns and enriching table representations with entity typing, CAMP achieves state-of-the-art results on the SequentialQA benchmark.

What Problem Does This Paper Address?

Answering a single question about a table (e.g., "Who won the gold medal in 2008?") is a standard semantic parsing task. However, conversational QA is much harder because users rely on context.

Consider a sequence of questions:

  1. "Which city hosted the Summer Olympics in 2008?"
  2. "How many nations participated that year?" (Co-reference)
  3. "How about 2004?" (Ellipsis)

To answer these, a model must understand that "that year" refers to 2008 and that the third question is still asking about the number of nations, just for a different year. Traditional end-to-end models often struggle to maintain this context or require massive amounts of data to learn these reasoning patterns from scratch.

Figure 1: A running example that illustrates the input and the output of the problem.

Methods

The authors propose a "knowledge-aware" approach that breaks the problem down into three types of integrated knowledge:

  1. Grammar Knowledge (The Backbone): Instead of generating SQL character-by-character, the model generates a sequence of actions. Crucially, they added "copy" actions (A5, A6, A7) that allow the model to replicate the SELECT clause, the WHERE clause, or the entire query from the previous turn.
  2. Expert Knowledge (Decomposable Architecture): The model is split into a Controller and specialized sub-modules. The Controller predicts a "sketch" (the sequence of actions), while sub-modules handle specific tasks like Column Prediction, Operator Prediction, and Value Prediction. This modularity makes the system more controllable and easier to debug.
  3. External Resource Knowledge:
    • Language Models: They use a bi-directional GRU enriched with a language model pre-trained on Paralex (a dataset of 18 million question-paraphrase pairs) to better capture how people phrase questions.
  4. Entity Typing: To help the model understand table headers, they use Stanford CoreNLP to detect types (e.g., DATE, NUMBER, LOCATION) within the table cells. If a column contains mostly numbers, the model learns it is a good candidate for "how many" questions.
Figure 4: Overview of our model architecture. Part (a) shows how we handle a single turn question. Part (b) shows how we handle question that replicates logical form segment from the previous utterance.

Datasets

The model was evaluated on SequentialQA, a large-scale dataset containing 6,066 question sequences (totaling 17,553 question-answer pairs). Unlike some datasets, SequentialQA only provides the final answer (denotation), not the SQL query itself. The authors had to use a search-based approach to find "gold" logical forms that lead to the correct answers during training.

Key Insights and Ideas

  • Copying is Efficient: By treating context-handling as a "copy" action in a grammar, the model doesn't have to re-learn how to link "that year" to a previous constraint; it simply learns to trigger the COPY WHERE action.
  • Pruning Spurious Logic: A major challenge in learning from answers is "spurious" queries—SQL that gets the right answer for the wrong reason (e.g., filtering by Country=China instead of Year=2008 because both happen to result in "Beijing"). The authors found that filtering for queries whose components actually overlap with words in the question significantly boosted performance.
  • Type Awareness: Knowing the semantic type of a column (e.g., that "Nations" is a NUMBER type) is critical for matching it to the correct operators like > or argmax.

Key Results

CAMP outperformed existing state-of-the-art models on the SequentialQA dataset:

  • Overall Accuracy: CAMP achieved 45.5%, surpassing the previous best (DynSP*) at 44.7%.
  • Sequence Accuracy: (Getting every question in a conversation right) CAMP reached 13.2%, compared to 12.8% for DynSP*.
  • Ablation Study: Adding table knowledge (TU) and language model features (LM) provided consistent incremental gains across all modules, particularly in column prediction.
Figure 3: Possible action transitions based on our grammar as described in Table 1.

Limitations and Future Work

The authors identified a few key areas for improvement:

  • Error Propagation: Because the model often copies from the previous turn, an error in the first question often dooms the entire sequence.
  • Semantic Matching: The model sometimes struggles with subtle linguistic cues (e.g., confusing the word "ones" with the number "1").
  • Grammar Constraints: The current grammar is designed for simple questions and does not yet support complex operations like "contains" or joining multiple conditions with AND.

Expanding the grammar to handle more complex SQL and improving the robustness of the initial question parsing are the logical next steps for this research.

Summary updated

BibTeX
@inproceedings{sun2019knowledge,
  author = {Yibo Sun and Duyu Tang and Nan Duan and Jingjing Xu and Xiaocheng Feng and Bing Qin},
  title = {{Knowledge-Aware Conversational Semantic Parsing Over Web Tables}},
  booktitle = {NLPCC},
  year = {2019},
  doi = {10.1007/978-3-030-32233-5\_64},
}
Figure