Neural Data Augmentation via Example Extrapolation

Kenton Lee, Kelvin Guu, Luheng He, Tim Dozat, Hyung Won ChungarXiv 2021

Introduction

Machine learning models often struggle with "few-shot" categories that are severely underrepresented in training data. This paper introduces Example Extrapolation (Ex2), a neural data augmentation technique that leverages large pre-trained language models to synthesize new, diverse examples for these rare categories based on just a handful of exemplars. By simulating this generation process on data-rich slices, Ex2 significantly boosts downstream performance on text classification, slot filling, and relation extraction tasks.

The Challenge of Imbalanced Data

Real-world data collection is inherently messy and imbalanced. In many NLP applications—such as conversational agents—certain categories may have thousands of examples, while new or niche "intents" might only have a few. Standard supervised models perform poorly on these few-shot slices because they develop a strong prior against predicting them.

Traditional remedies like upsampling (duplicating rare examples) or heuristic data augmentation (e.g., synonym replacement) often fail to capture the linguistic diversity of real-world data. These methods frequently lead to models that memorize specific examples rather than learning the underlying semantic patterns.

The Ex2 Framework

The authors propose Example Extrapolation (Ex2), which frames data augmentation as a sequence-to-sequence (seq2seq) generation task. The process follows a teacher-student paradigm:

  1. Slicing: Training data is grouped into "slices" based on shared labels (e.g., intent).
  2. Training the Extrapolator (Teacher): Using data-rich slices, a large pre-trained language model (such as T5) is trained to take $K$ examples from a slice as input and generate a new, unseen example from that same slice as output.
  3. Generation: During inference, the extrapolator is fed the few available examples from an underrepresented slice. It uses cross-exemplar reasoning to "hallucinate" entirely new synthetic examples.
  4. Training the Downstream Model (Student): A final model is trained on the combined set of original and synthesized data.
Overview of the Ex2 framework using an emoji analogy.

A critical design choice is anonymization. The authors hide actual label names from the extrapolator. Instead of asking for a "PlayMusic" query, the model is given five examples of music queries. This forces the model to learn category boundaries from the text itself, rather than relying on label semantics.

Key Insights: The Power of Multiple Exemplars

A major finding of the study is that paraphrasing is insufficient. When the extrapolator is fed only one example ($K=1$), it acts as a simple paraphraser, yielding minimal performance gains. However, providing multiple exemplars ($K \ge 2$) allows the model to triangulate the "boundaries" and variance of the category.

Performance on CLINC150 as a function of the number of input exemplars.

Furthermore, the authors highlight that:

  • World Knowledge is Essential: The extrapolator must be a massive pre-trained model (like T5-XL) to effectively reason by analogy (e.g., knowing that "Tokyo" is a valid substitute for "London").
  • Hallucinations as a Feature: While Ex2 may generate factually incorrect statements, these "hallucinations" are beneficial for language understanding tasks as they force the model to learn linguistic structure rather than memorizing facts.
  • Practicality: Ex2 allows for offline data generation using massive models, which can then be used to train smaller, more efficient "student" models for deployment.

Experimental Results

Ex2 was evaluated across three major benchmarks:

  • CLINC150 (Intent Detection): Improved few-shot macro F1 by +15.9 points (80.4 vs 64.5) over upsampled baselines.
  • SNIPS (Intent & Slot Filling): Achieved gains of +14.0 points in few-shot intent accuracy and +5.8 points in slot F1.
  • FewRel-Open (Relation Extraction): Set a new state-of-the-art, improving few-shot accuracy by +7.2 points over a strong T5 baseline.

Conclusion and Future Work

While Ex2 significantly improves few-shot performance, it has limitations. Factual hallucinations may be undesirable in high-stakes production environments, and the quality of synthetic data can drop if the training set lacks diverse slices. Future research may expand the definition of "slices" to include language or syntactic structure, and explore Ex2 in other modalities like image or speech augmentation.

Summary updated

BibTeX
@misc{lee2021neural,
  author = {Kenton Lee and Kelvin Guu and Luheng He and Tim Dozat and Hyung Won Chung},
  title = {{Neural Data Augmentation via Example Extrapolation}},
  year = {2021},
  eprint = {2102.01335},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.01335},
}
Figure