Make Templates Smarter: A Template Based Data2Text System Powered by Text Stitch Model

Bingfeng Luo, Zuo Bai, Kunfeng Lai, Jianping ShenEMNLP 2020

Introduction

Generating natural language descriptions from structured data (Data2Text) often forces a choice between two suboptimal paths: the high fluency but low reliability of neural networks, or the perfect accuracy but high manual cost of template-based systems. Neural models frequently "hallucinate" or omit data, while traditional templates require exhaustive manual effort to craft every possible transition phrase.

The Text Stitch Powered Template System (TS2), presented at EMNLP 2020, bridges this gap. It uses a neural "stitch" model to automatically generate connecting phrases between predefined template units, ensuring 100% data fidelity while significantly reducing the labor required for natural-sounding output.

Methods: The Text Stitch Model

The TS2 approach decomposes the generation process into two distinct components: Template Units (TUs) and the Text Stitch Model.

TUs are simple, reusable snippets representing specific data points (e.g., [Name] is a [EatType]). The Text Stitch Model acts as the "neural glue." Based on a modified Levenshtein Transformer (LevT), it takes a sequence of these snippets and predicts the necessary insertions to create a fluent sentence.

Comparison of traditional template units vs. TS2 template units and the text stitching process.

Key Innovations

  • Insertion-only Architecture: Unlike standard transformers, the model focuses solely on "placeholder prediction" and "token prediction" between snippets.
  • Self-Supervised Training: The model was trained using a "drop-and-restore" strategy on 3 million sentences from open-domain corpora (Wikipedia, Newscrawl). By deleting common connectors and training the model to restore them, the authors enabled the system to learn the "glue" of language without expensive paired data.

Key Insights

The core philosophy of TS2 is that the "glue" of language—prepositions, conjunctions, and common transitions—is finite and much smaller than the vocabulary of the data itself. By restricting the neural model to generating only these "stitches," the risk of data hallucination is virtually eliminated. This design also allows for Zero-Shot Potential, where a model trained on general web text can connect domain-specific snippets (like restaurant attributes) effectively.

Key Results

The evaluation on the E2E dataset demonstrated that TS2 achieves the best of both worlds. In human evaluations, TS2 maintained perfect fidelity, recording zero dropped or modified slots—a feat that state-of-the-art (SOTA) neural models like TGen and Prag failed to achieve.

Error analysis comparing TS2 variants against SOTA neural models and template systems.

Furthermore, TS2 drastically reduced human effort. While a comparable SOTA template system (TUDA) required 24 complex logic blocks for transitions, TS2 achieved superior results with only 3. The system also proved robust; even when template units were randomly reordered, the stitch model produced fluent output in over 91% of cases.

Limitations and Future Work

While TS2 offers a significant leap in template efficiency, it remains less diverse than pure neural models because the core content is anchored to specific snippets. Some "stuttering" was observed in open-domain models, likely due to patterns in the training data. Future research may explore more sophisticated automated selection of template units to further enhance variety and logic.

Summary updated

BibTeX
@inproceedings{luo2020make,
  author = {Bingfeng Luo and Zuo Bai and Kunfeng Lai and Jianping Shen},
  title = {{Make Templates Smarter: A Template Based Data2Text System Powered by Text Stitch Model}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.findings-emnlp.94},
}
Figure