Inferring Logical Forms From Denotations

Panupong Pasupat, Percy Liang

Abstract

Semantic parsing—the task of mapping natural language to executable code—is a cornerstone of natural language interfaces to databases. However, training these systems often relies on weak supervision (question-answer pairs), which introduces two significant challenges: an exponential search space of possible programs and the prevalence of "spurious" logical forms that yield the correct answer for the wrong reasons. This paper presents a novel approach using Dynamic Programming on Denotations (DPD) and "fictitious worlds" to address these bottlenecks.

Introduction

The primary difficulty in weakly supervised semantic parsing is the Search Explosion. As program complexity increases, the number of possible logical forms grows exponentially, often causing standard beam search methods to prune the correct solution. Furthermore, Spurious Logical Forms pose a major threat; in a large search space, many incorrect programs may coincidentally produce the correct answer for a specific table, misleading the learning algorithm.

Methodology

The authors propose a two-pronged solution to these challenges:

Dynamic Programming on Denotations (DPD)

Instead of searching through the space of all possible program structures, DPD organizes the search based on the denotation (the execution result). By collapsing different programs that produce the same result on a given table into a single cell, DPD can exhaustively explore all consistent programs up to a certain size. This exact algorithm ensures that no valid solution is missed due to heuristic pruning, resulting in a 98.7% reduction in search states compared to naive methods.

Fictitious Worlds

To distinguish between logically correct and "lucky" spurious programs, the researchers introduce "fictitious worlds"—modified versions of the original data tables (e.g., shuffled rows or altered values).

Examples of correct and spurious logical forms.

By crowdsourcing the correct answers for these altered tables, the system can filter out programs that fail to generalize. If a program yields the correct answer on the original table but fails on the fictitious ones, it is flagged as spurious. This method successfully ruled out 92.1% of spurious logical forms.

Evaluation and Results

The approach was evaluated on the WIKITABLEQUESTIONS benchmark, which contains over 14,000 complex questions across diverse Wikipedia tables. The combination of DPD and fictitious worlds significantly improved performance. The system increased "coverage" (the percentage of questions for which a correct logical form is found) from 53.5% to 76%.

Coverage of annotated logical forms relative to the number of final LFs produced.

Furthermore, the pruning power of fictitious worlds was substantial: using just five annotated variations per question allowed the system to narrow down candidate programs to a single equivalence class in 32% of cases, and to three or fewer in over 51% of cases.

Conclusion and Future Work

While highly effective, DPD is currently limited by program size (max 7 operations) and requires human-in-the-loop annotation for fictitious worlds. Future work involves scaling these techniques to massive knowledge graphs and improving linguistic modeling to handle schema mismatches where question terms do not map cleanly to table headers.

Summary updated

BibTeX
@inproceedings{pasupat2016inferring,
  author = {Panupong Pasupat and Percy Liang},
  title = {{Inferring Logical Forms From Denotations}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2016},
  doi = {10.18653/v1/p16-1003},
}
Figure