Neural Semantic Parsing over Multiple Knowledge-bases

Jonathan Herzig, Jonathan Berant · DOI

Abstract

A fundamental challenge in developing semantic parsers is the paucity of strong supervision in the form of language utterances annotated with logical form. In this paper, we propose to exploit structural regularities in language in different domains, and train semantic parsers over multiple knowledge-bases (KBs), while sharing information across datasets. We find that we can substantially improve parsing accuracy by training a single sequence-to-sequence model over multiple KBs, when providing an encoding of the domain at decoding time. Our model achieves state-of-the-art performance on the Overnight dataset (containing eight domains), improves performance over a single KB baseline from 75.6% to 79.6%, while obtaining a 7x reduction in the number of model parameters.

Introduction

Semantic parsing—the task of translating natural language into executable logical forms like SQL or lambda-DCS—is a cornerstone of conversational AI. The primary bottleneck in building these systems is the "paucity of strong supervision"; annotating natural language with complex logical formulas for every new domain is prohibitively expensive. Traditionally, parsers are trained independently for each domain (e.g., "Restaurants" vs. "Housing"). However, while entities and properties change across knowledge bases (KBs), the underlying structure of language remains consistent. This paper explores how to pool data from multiple distinct KBs to train a single, more generalized semantic parser.

Methodology

The authors utilize a standard sequence-to-sequence (seq2seq) neural semantic parser featuring a bidirectional RNN encoder and an attention-based decoder. They propose and evaluate three multi-domain architectures:

  1. One-to-one (DOMAINENCODING): A single encoder and decoder are shared across all domains. To manage domain-specific vocabulary, the decoder is fed a one-hot vector representing the target domain at each step.
  2. Many-to-many: Uses separate encoders and decoders for each domain, plus an additional shared "domain-general" encoder.
  3. One-to-many: Employs a single shared encoder with separate, domain-specific decoders for each KB.

The DOMAINENCODING approach was the most successful, proving that neural networks can effectively disentangle domain-specific vocabulary when provided with a simple domain hint, allowing for maximum parameter sharing.

Experimental Setup

The models were trained and evaluated on the OVERNIGHT semantic parsing dataset, which contains 13,682 examples across eight distinct domains: Basketball, Blocks, Calendar, Housing, Publications, Recipes, Restaurants, and Social.

Discussion: Linguistic Compositionality

A core insight of this research is that linguistic compositionality is highly transferable. The benefit of multi-KB training lies in learning how language composes rather than just learning specific vocabulary. Structural regularities, such as how superlatives ("the most") or comparatives ("no more than") map to logical operations, are shared across domains.

Examples of structural regularities in logical forms across different domains.

This parameter sharing is particularly effective for smaller domains. The authors found a strong negative correlation ($\rho = -0.86$) between a domain's training set size and its relative performance improvement, indicating that data-starved domains successfully "piggyback" off the patterns learned from larger ones.

Key Results

The DOMAINENCODING model achieved state-of-the-art accuracy on the OVERNIGHT dataset, improving the average parsing accuracy from 75.6% to 79.6%.

Comparison of parsing accuracy and parameter counts across models.

Beyond accuracy, the unified model achieved a 7x reduction in parameters (from 14.1M to 2M). The approach also demonstrated significant data efficiency; in low-data regimes (e.g., 10% of training data), the shared models outperformed independent baselines by more than 15 accuracy points.

Conclusion

This work demonstrates that training a single model across multiple KBs significantly improves performance and efficiency by leveraging shared linguistic structures. Future work includes exploring character-level models to better handle unseen KB constants and applying these methods to weakly supervised datasets where only final answers are available.

Summary updated

BibTeX
@inproceedings{herzig2017neural,
  author = {Jonathan Herzig and Jonathan Berant},
  title = {{Neural Semantic Parsing over Multiple Knowledge-bases}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2017},
  url = {https://openreview.net/forum?id=B1WzChl_-r},
}
Figure