Paraphrase Generation from Latent-Variable PCFGs for Semantic Parsing

Shashi Narayan, Siva Reddy, Shay B. Cohen

Introduction: Bridging the Lexicosyntactic Gap

Semantic parsing—the task of mapping natural language questions to structured database queries—faces a significant challenge known as the "lexicosyntactic gap." This gap occurs when the phrasing of a human question differs substantially from the internal representation of facts in a knowledge base (KB). For example, a user might ask, "What do people in the Czech Republic speak?", while a KB like Freebase stores this under a predicate like official_language.

Semantic graph mapping a natural language question to KB entities and predicates.

Traditional semantic parsers often fail when encountering unseen words or complex sentence structures that do not align with the KB's schema. While paraphrasing is a potential solution, most existing tools rely on Machine Translation (MT) techniques. These MT-based methods require expensive sentence-aligned parallel corpora and often produce "boring" paraphrases that merely swap synonyms without altering the underlying syntactic structure.

Methodology: Grammar-Based Paraphrasing

The authors propose a novel framework using Latent-Variable Probabilistic Context-Free Grammars (L-PCFGs) to generate diverse paraphrases without the need for parallel training data.

The L-PCFG Model

Standard PCFGs assign probabilities to grammar rules. L-PCFGs extend this by introducing "latent states" to non-terminals (e.g., NP, VP). These hidden states capture contextual nuances, allowing the model to distinguish between different uses of the same syntactic category. To ensure scalability and robustness, the authors employ a spectral method for parameter estimation rather than the traditional Expectation-Maximization (EM) algorithm.

The Paraphrase Pipeline

The generation process involves several key steps:

  1. Word Lattices: For an input question, the system constructs a "word lattice"—a directed graph representing possible lexical and phrasal substitutions derived from resources like the Paraphrase Database (PPDB).
  2. Controlled Sampling: Instead of identifying a single "best" paraphrase, the system samples multiple variations from the grammar. A top-down sampling approach, guided by the word lattice, ensures that outputs are both grammatically correct and semantically relevant.
  3. Bi-Layered L-PCFGs: A specialized version of the grammar uses two latent layers—one for syntax and one for semantics/topic—to preserve the original meaning even during drastic structural transformations.
  4. Filtering: A binary classifier filters out low-quality or nonsensical samples before they are passed to the semantic parser.
A word lattice representing various lexical and phrasal substitutions for a query.

Evaluation and Key Insights

The system was evaluated by integrating it with GRAPHPARSER, a semantic parser for Freebase, and testing on the WebQuestions dataset.

  • Syntactic Diversity is King: Unlike MT baselines that primarily perform lexical swapping, the L-PCFG approach successfully generates paraphrases with entirely different sentence structures. This diversity is crucial for matching the varied schemas of large-scale knowledge bases.
  • No Parallel Data Required: The model can be trained on a large corpus of individual questions (like the Paralex corpus), removing the dependency on perfectly aligned paraphrase pairs.
  • Performance Gains: The L-PCFG-based system achieved an F1 score of 47.7 on WebQuestions, outperforming both the original parser (45.0) and MT-based baselines.
  • Oracle Potential: The "Oracle" F1 score reached 71.8, indicating that the system generates high-quality paraphrases; the primary remaining challenge is improving the selection mechanism to pick the optimal paraphrase for the parser.

Conclusion and Future Directions

By leveraging grammar-based sampling, this research demonstrates that syntactic diversity is a powerful tool for overcoming the lexicosyntactic gap in semantic parsing. Future work may focus on refining topical resolution within the latent states and improving the filtering mechanisms to better handle the "partially correct" answers that currently constitute the majority of errors.

Reference: Narayan, S., Reddy, S., & Cohen, S. B. (2016). Paraphrase Generation from Latent-Variable PCFGs for Semantic Parsing. Proceedings of the 9th International Natural Language Generation conference.

Summary updated

BibTeX
@inproceedings{narayan2016paraphrase,
  author = {Shashi Narayan and Siva Reddy and Shay B. Cohen},
  title = {{Paraphrase Generation from Latent-Variable PCFGs for Semantic Parsing}},
  booktitle = {INLG},
  year = {2016},
  doi = {10.18653/v1/w16-6625},
}
Figure