Unnatural Language Processing: Bridging the Gap Between Synthetic and Natural Language Data

Alana Marzoev, Samuel Madden, M. Frans Kaashoek, Michael J. Cafarella, Jacob AndreasarXiv 2020

Abstract

Building specialized Natural Language Processing (NLP) tools typically requires labor-intensive collection and annotation of thousands of custom human utterances. This paper introduces a "simulation-to-real" (sim-to-real) framework that bypasses this "data bottleneck" by training models on synthetic, grammar-generated data. By "projecting" messy natural user utterances onto a structured synthetic language space using pretrained embeddings, the authors demonstrate that models can match or outperform supervised counterparts on several benchmarks without a single human-annotated training example.

Introduction: The Data Bottleneck and Distribution Shift

A primary hurdle in specialized NLP—such as building a voice interface for a specific robot or a natural language API for a niche database—is the requirement for large, annotated datasets. While synthetic data generated by rules or grammars is infinitely scalable and "free," it often fails in real-world applications. This failure stems from "distribution shift": models trained on rigid synthetic patterns cannot handle the diverse, often messy ways humans naturally communicate.

This research asks whether the "sim-to-real" logic successful in robotics—where agents learn in a simulator before transferring to the physical world—can be applied to language understanding.

Methodology

The proposed framework consists of a three-step pipeline designed to bridge the gap between synthetic "unnatural" language and natural human speech.

The three-step pipeline for Unnatural Language Processing: (a) synthetic data generation, (b) base model training, (c) representation learning, and (d) the projection bridge.
  1. Synthetic Generation: A high-precision grammar (acting as a "simulator") generates a dataset of synthetic utterances paired with formal semantic representations (e.g., mapping "pick up the blue ball" to a specific action sequence).
  2. Base Model Training: A standard sequence-to-sequence model is trained to achieve perfect performance on this synthetic language.
  3. The Projection Bridge: Rather than feeding natural utterances directly to the model, the system finds the synthetic sentence most semantically similar to the input using pretrained sentence embeddings (e.g., BERT). This "projected" synthetic sentence is then processed by the base model.

To ensure scalability and precision, the authors utilize Locality Sensitive Hashing (LSH) for fast retrieval, hierarchical projection for infinite grammars, and a tunable matching method based on the Hungarian algorithm to preserve fine-grained semantic details.

Experimental Evaluation

The approach was evaluated across two distinct task types:

  • Semantic Parsing (OVERNIGHT): Eight domains (e.g., recipes, calendar) where natural language is mapped to formal database queries.
  • Grounded Instruction Following (BABYAI): An agent navigating a 2D gridworld. The authors also contributed a new benchmark of ~5,000 human-annotated instructions for this environment to test real-world generalization.

Key Insights and Results

The core insight of this work is that sim-to-real transfer in NLP is more effectively treated as a paraphrasing problem rather than a representation problem. Instead of forcing a model to learn representations that ignore the synthetic-natural divide, the system explicitly maps natural text back into the "safe" synthetic zone the model understands.

Key results include:

  • Zero-Shot Performance: On the OVERNIGHT task, the projection approach matched fully supervised models in three out of eight domains using zero natural training examples.
  • Superiority over Fine-Tuning: In the BABYAI task, the projection method outperformed a standard model fine-tuned on over 2,000 human annotations.
  • Robustness: The method consistently outperformed common transfer learning baselines, such as using BERT features directly or training solely on raw synthetic data.

Conclusion and Future Work

While highly effective, the system's performance is bounded by the coverage of the synthetic grammar. If an intent cannot be expressed by the grammar, projection cannot resolve it. Future research directions include "distilling" the projection process into the base model for faster inference and developing methods to automatically expand grammars to cover missing natural language patterns. This work reframes grammar engineering not as an obsolete technique, but as a powerful tool for building training simulators for modern neural models.

Summary updated

Abstract

Large, human-annotated datasets are central to the development of natural language processing models. Collecting these datasets can be the most challenging part of the development process. We address this problem by introducing a general purpose technique for ``simulation-to-real'' transfer in language understanding problems with a delimited set of target behaviors, making it possible to develop models that can interpret natural utterances without natural training data. We begin with a synthetic data generation procedure, and train a model that can accurately interpret utterances produced by the data generator. To generalize to natural utterances, we automatically find projections of natural language utterances onto the support of the synthetic language, using learned sentence embeddings to define a distance metric. With only synthetic training data, our approach matches or outperforms state-of-the-art models trained on natural language data in several domains. These results suggest that simulation-to-real transfer is a practical framework for developing NLP applications, and that improved models for transfer might provide wide-ranging improvements in downstream tasks.
BibTeX
@misc{marzoev2020unnatural,
  author = {Alana Marzoev and Samuel Madden and M. Frans Kaashoek and Michael J. Cafarella and Jacob Andreas},
  title = {{Unnatural Language Processing: Bridging the Gap Between Synthetic and Natural Language Data}},
  year = {2020},
  eprint = {2004.13645},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2004.13645},
}
Figure