A Neural Question Answering Model Based on Semi-Structured Tables

Hao Wang, Xiaodong Zhang, Shuming Ma, Xu Sun, Houfeng Wang, Mengxiang Wang

Introduction

Question Answering (QA) systems typically operate on either unstructured text or highly structured knowledge graphs. While text is plentiful, it is difficult for machines to parse deeply; conversely, knowledge graphs are precise but labor-intensive to construct. This research explores a "Goldilocks" middle ground: semi-structured tables. Commonly found in textbooks, these tables provide a rich, machine-readable structure without the overhead of formal logic.

The Challenge of Table-Based QA

Previous attempts to leverage tables for QA faced two primary hurdles. First, they often relied on rigid, hand-crafted features like TF-IDF for table retrieval, which limits generalizability. Second, they treated all cells in a row with equal importance. This "bag-of-cells" approach makes models vulnerable to "distractor" cells—information that is technically in the correct row but irrelevant to the specific question asked. For example, in a table row describing a "summer solstice," one cell might mention the "shortest period of night." If the question is specifically about daylight duration, that cell acts as noise that can mislead a model.

Methodology: A Two-Stage Neural Pipeline

The authors propose an end-to-end neural model that breaks the problem into two distinct stages: selection and scoring.

High-level overview of the two-stage pipeline, showing how table titles and patterns are used alongside the question to generate a relevance score.

1. Candidate Table Selection

To efficiently narrow down the search space, the model uses a Directional Self-Attention Network (DiSAN). DiSAN encodes the question and table metadata—specifically titles and row patterns—into vector representations to rank the most relevant tables. By using directional masks, DiSAN captures the temporal order of information more efficiently than traditional recurrent neural networks (RNNs) or CNNs.

2. Cell Scoring and Answer Selection

Once the most relevant tables are identified, the model performs a fine-grained analysis of individual rows to find the specific cell containing the answer.

The detailed neural architecture for cell scoring, featuring a similarity matrix between the question and candidate cells, followed by Bi-GRU encoding.

The core innovation is a Soft Attention Layer. This layer constructs a similarity matrix between the question and the table cells. A Convolutional Neural Network (CNN) processes this matrix to assign weights to each cell, effectively "masking out" irrelevant columns. The weighted cells and the question are then processed by a Bidirectional Gated Recurrent Unit (Bi-GRU) to produce a final relevance score. The model is trained using a triplet loss function, which teaches the network to rank correct answer-cell pairs higher than randomly sampled incorrect ones.

Key Results

The model was benchmarked on the TabMCQ dataset, which contains over 9,000 science questions based on 63 tables. The results were significant:

  • Accuracy Leap: The model achieved 79.0% accuracy, a substantial improvement over the previous state-of-the-art (TabNN) at 56.8%.
  • Retrieval Precision: The DiSAN-based selection reached an Acc@3 of 99.0%, ensuring the correct table was almost always considered.
  • Efficiency: With only ~605k parameters (compared to TabNN's 3.9M), the model is highly efficient and less prone to overfitting on small, specialized datasets.
  • Ablation Study: Removing pre-trained word embeddings (GloVe) dropped accuracy to 75.1%, showing that while the architecture is strong, external linguistic knowledge still provides a significant boost.

Discussion and Future Work

The success of this approach highlights the power of "semi-structure." By treating rows as sentences and columns as attributes, the model leverages an inherent inductive bias that raw text lacks. Furthermore, the soft attention mechanism acts as a critical noise filter, allowing the model to focus on the specific facts needed for a query while ignoring irrelevant context in the same row.

While the model excels at fact retrieval, it still struggles with complex reasoning, multi-step induction, and semantic variations (e.g., synonyms). Future work will focus on improving semantic flexibility and scaling the knowledge base by automatically converting raw text into semi-structured formats.

Summary updated

BibTeX
@inproceedings{wang2018neural,
  author = {Hao Wang and Xiaodong Zhang and Shuming Ma and Xu Sun and Houfeng Wang and Mengxiang Wang},
  title = {{A Neural Question Answering Model Based on Semi-Structured Tables}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2018},
}
Figure