PromptMix: A Class Boundary Augmentation Method for Large Language Model Distillation

Gaurav Sahu, Olga Vechtomova, Dzmitry Bahdanau, Issam H. Laradji · DOI

TL;DR

This paper introduces PromptMix, a novel data augmentation technique that leverages large language models (LLMs) to generate more effective training data for text classification, especially in low-data scenarios. By strategically generating examples near class boundaries and then relabeling them, PromptMix significantly improves knowledge transfer from massive LLMs to smaller, more efficient models.

What Problem Does This Paper Address?

Data scarcity is a persistent challenge in many real-world NLP tasks, particularly for text classification. While crowdsourcing is an option, it's expensive. Large Language Models (LLMs) like GPT-3 offer a promising avenue for data augmentation by generating synthetic examples. However, existing LLM-based augmentation methods often struggle with generating diverse examples and can produce incorrect labels, especially when dealing with classes that have subtle semantic differences or when only a few examples are available (few-shot learning). This paper tackles the problem of creating high-quality, diverse augmented data that effectively bridges the knowledge gap between massive LLMs and smaller, more practical classifiers in extreme few-shot settings (2-shot and zero-shot).

Methods

PromptMix is a two-step process designed to generate and refine augmented data:

  1. Generating Borderline Examples: Instead of focusing on a single class, PromptMix instructs an LLM (GPT3.5-turbo in this case) to generate examples that are a mix of two classes. This is achieved by providing class descriptions and a few seed examples for a subset of classes, then prompting the LLM to create utterances that belong to a primary class with a certain percentage and a secondary class with the remaining percentage. This "mixup" strategy encourages the generation of examples that lie near the decision boundaries between classes, making them more informative for training.
  2. Relabeling for Fidelity: Generating borderline examples increases the risk of false positives (incorrectly labeled examples). To address this, PromptMix uses the same LLM (or another) as a classifier. It prompts the LLM to relabel the generated examples, assigning them the most appropriate class. This step is crucial for ensuring the accuracy of the augmented dataset and improving knowledge transfer.

Datasets

The authors evaluated PromptMix on four text classification datasets:

  • Banking77 (B77): A single-domain dataset with 77 banking-related classes, known for its nuanced class distinctions.
  • TREC6: A question classification dataset with six broad question categories.
  • Subjectivity (SUBJ): A dataset containing movie reviews labeled for subjectivity.
  • Twitter Complaints (TC): A dataset of tweets annotated for whether they contain a complaint.

Key Insights and Ideas

  • The Power of Borderlines: Generating examples that straddle class boundaries is more effective for training than simply generating examples that are clearly within a single class. These borderline examples force the model to learn more nuanced decision boundaries.
  • Relabeling is Crucial: While generating mixed-class examples is beneficial, it introduces noise. The relabeling step using an LLM as a classifier is essential for correcting these errors and significantly boosting performance.
  • Knowledge Transfer: PromptMix facilitates the transfer of knowledge from massive LLMs (like GPT3.5-turbo) to much smaller, computationally cheaper models (like DistilBERT and BERT), enabling them to achieve performance closer to the larger models, even with very limited training data.
  • Descriptions Matter: Providing class descriptions in the prompts, in addition to seed examples, significantly improves the quality of generated augmentations, especially in zero-shot settings.

Key Results

  • PromptMix significantly outperforms the baseline 2-shot classifier on all four datasets for both DistilBERTbase and BERTbase models.
  • The relabeling step (A2 accuracy) consistently shows substantial improvements over the non-relabelled augmented data (A1 accuracy), with gains ranging from 5.9% to 13.5% depending on the model and dataset.
  • In 2-shot settings, PromptMix outperforms multiple 5-shot data augmentation methods on the tested datasets.
  • PromptMix achieves performance comparable to or better than NN+GPT3.5 (a nearest-neighbor approach using GPT3.5-turbo for classification) on most datasets, demonstrating its effectiveness.
  • Even with open-source LLMs like Llama-2, PromptMix shows promising results, with larger models yielding better performance.

Limitations and Future Work

  • Reliance on Pseudolabels: The method relies entirely on LLM-generated pseudolabels for correcting false positives. While effective, this could be improved by incorporating human intervention to judge pseudolabels and identify out-of-scope generations.
  • Computational Resources for Open-Source LLMs: While open-source LLMs offer cost advantages, larger models still require significant computational resources, suggesting future work in distilling knowledge from these large open-source models.
  • Ethical Considerations: The authors acknowledge that LLM generations might contain undesirable biases, recommending human monitoring of downstream classifiers to mitigate ethical issues. They also suggest explicit debiasing techniques for language models.

Summary updated

BibTeX
@inproceedings{sahu2023promptmix,
  author = {Gaurav Sahu and Olga Vechtomova and Dzmitry Bahdanau and Issam H. Laradji},
  title = {{PromptMix: A Class Boundary Augmentation Method for Large Language Model Distillation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=gWWjz9NBo9},
}
Figure