On Training Instance Selection for Few-Shot Neural Text Generation

Ernie Chang, Xiaoyu Shen, Hui-Syuan Yeh, Vera Demberg

Introduction

Large-scale pretrained language models, such as BART and GPT, have revolutionized natural language processing by enabling effective "few-shot" learning. In these scenarios, models are fine-tuned on a very small number of examples ($K$) to perform specific tasks. However, a critical yet often overlooked aspect of this paradigm is the selection of the training instances themselves.

Currently, the standard practice in few-shot research is to select $K$ instances at random from a larger dataset. This paper identifies two fundamental flaws with this approach. First, random sampling introduces high performance variance; a model's success may depend more on a "lucky" draw of easy or diverse samples than on the architecture itself. Second, in real-world applications where annotation budgets are limited, random sampling is inefficient. If a practitioner can only afford to label 50 documents, those documents should be chosen strategically to maximize the model's learning potential.

Methodology: Representative Sampling

The authors propose a strategy based on representative sampling, a form of active learning that identifies a diverse and prototypical subset of data without requiring prior access to labels. The workflow involves three primary steps:

  1. Embedding: The unlabeled input data (e.g., source documents or data tables) is converted into a vector space. The authors utilized a BART encoder, applying mean pooling to the hidden states to create a fixed-length representation.
  2. Clustering: The K-means++ algorithm is used to partition the entire unlabeled dataset into $K$ distinct clusters, where $K$ corresponds to the total annotation budget.
  3. Selection: From each cluster, the single data point closest to the centroid is selected for annotation.
The process of selecting $k$ representative samples from an unlabeled pool $U$ to create a labeled training set $L$.

This approach ensures that the selected instances cover the entire data distribution while avoiding outliers that might introduce noise during the sensitive few-shot fine-tuning process.

Experimental Evaluation

The proposed K-means selection method was evaluated against random sampling across three diverse text generation tasks:

  • E2E: A data-to-text task focused on the restaurant domain.
  • CNN/Dailymail: A long-form document summarization benchmark.
  • SQuAD: Repurposed for question generation based on provided passages.

Experiments were conducted across various shot counts ($K=10, 50, 100$) to test the robustness of the selection strategy.

Key Results and Insights

The K-means strategy consistently outperformed random sampling across all tasks and shot counts. As shown in the results table, the performance gains are particularly notable as the number of shots increases. For instance, on the SQuAD dataset with $K=100$, K-means achieved a BLEU-4 score of 9.33, significantly higher than the 7.65 achieved by random sampling.

Performance comparison (BLEU-4) between random sampling and K-means selection across three text generation tasks.

Beyond raw performance, several key insights emerged from the study:

  • Stability and Variance: Random sampling exhibited massive variance (up to 7.12 on E2E), making benchmarks unreliable. K-means selection provided a much more stable and repeatable platform for model comparison.
  • The Importance of Prototypicality: An ablation study comparing the selection of centroids versus outliers (points farthest from the centroid) revealed that outliers led to the worst performance. For few-shot learners, prototypical examples are far more effective than edge cases.
  • Diversity is Essential: The authors tested "Within-cluster random" sampling (labeled as IC-Random in the results), where samples are picked from a limited area of the distribution. This performed poorly, confirming that a few-shot training set must be diverse to be effective.
  • Human Preference: Human evaluation corroborated the automated metrics, with evaluators rating K-means-trained models as more "adequate," meaning they were better at capturing relevant information from the source text.

Conclusion

This research demonstrates that how we choose few-shot training data is just as important as the models we use to process it. By moving from random sampling to a deterministic, K-means-based representative selection, researchers can achieve higher performance, lower variance, and more realistic benchmarks. While the method's success is tied to the quality of the initial embeddings, it provides a powerful and simple heuristic for maximizing the utility of limited human annotation budgets in text generation tasks.

Summary updated

BibTeX
@inproceedings{chang2021training,
  author = {Ernie Chang and Xiaoyu Shen and Hui-Syuan Yeh and Vera Demberg},
  title = {{On Training Instance Selection for Few-Shot Neural Text Generation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.acl-short.2},
}
Figure