Abstract
Data augmentation is a widely used technique to address the problem of text classification when there is a limited amount of training data. Recent work often tackles this problem using large language models (LLMs) like GPT-3 that can generate new examples given already available ones. In this work, we propose a method to generate more helpful augmented data by utilizing the LLM's abilities to follow instructions and perform few-shot classifications. Our specific PromptMix method consists of two steps: 1) generate challenging text augmentations near class boundaries; however, generating borderline examples increases the risk of false positives in the dataset, so we 2) relabel the text augmentations using a prompting-based LLM classifier to enhance the correctness of labels in the generated data. We evaluate the proposed method in challenging 2-shot and zero-shot settings on four text classification datasets: Banking77, TREC6, Subjectivity (SUBJ), and Twitter Complaints. Our experiments show that generating and, crucially, relabeling borderline examples facilitates the transfer of knowledge of a massive LLM like GPT-3.5-turbo into smaller and cheaper classifiers like DistilBERT-base and BERT-base. Furthermore, 2-shot PromptMix outperforms multiple 5-shot data augmentation methods on the four datasets.
Introduction
In the field of machine learning, labeled data is often scarce and expensive to produce, particularly for niche text classification tasks such as identifying specific customer intents or detecting subtle sentiment. While Large Language Models (LLMs) can be leveraged to generate synthetic training data, traditional augmentation methods often produce "prototypical" examples—sentences that clearly belong to a single category. While helpful, these "easy" examples fail to teach a model the nuances of where one class ends and another begins.
To build robust classifiers, models must learn the "gray areas" or class boundaries. However, generating borderline examples is inherently risky; instructions to create something "between" two classes often result in ambiguous or incorrectly labeled data, which can degrade performance. PromptMix addresses this by intentionally creating borderline cases and then relabeling them with an LLM to ensure high-fidelity training data for small, efficient "student" models.
The PromptMix Methodology
The authors introduce PromptMix, a two-step pipeline designed to create high-quality, challenging synthetic datasets for distillation.
Step 1: Generating Borderline Examples (Mixup Prompting)
Instead of asking the LLM to generate a standard example for a single class, PromptMix uses a "Mixup" instruction. It provides descriptions of two different classes and instructs the LLM to generate an utterance that belongs, for example, 75% to Class A and 25% to Class B. This forces the LLM to generate "hard" examples that sit near the decision boundary.
Step 2: Improving Fidelity (Relabeling)
Because these borderline examples are intentionally confusing, the initial label assigned during generation might be incorrect. PromptMix uses the LLM again, this time as a high-accuracy classifier, to relabel the entire synthetic dataset. This ensures that the "hard" examples have high-quality ground-truth labels before they are used to train the student model.
Conceptual Framework: Learning the Boundaries
The core innovation of PromptMix is its focus on the decision boundary. Traditional augmentation methods like EDA (Easy Data Augmentation) tend to generate examples that cluster tightly around the original seed data. In contrast, PromptMix populates the "no-man's land" between classes.
By training on these borderline examples, smaller models like BERT or DistilBERT (which can be over 1,000 times smaller than the teacher LLM) are forced to learn the subtle distinctions that define class membership. This process effectively distills the reasoning capabilities of a massive model into a much more efficient architecture.
Experimental Evaluation
The researchers evaluated PromptMix on four diverse text classification benchmarks: Banking77 (fine-grained intent detection), TREC6 (question classification), Subjectivity (binary sentiment), and Twitter Complaints (binary complaint detection).
Key Results
- Superior Performance: In a 2-shot setting, PromptMix consistently outperformed standard augmentation techniques like EDA and other LLM-based methods like GPT3Mix and LINDA.
- Efficiency: On the Banking77 dataset, 2-shot PromptMix achieved 80.1% accuracy, nearly matching the performance of much larger models and outperforming several 5-shot specialized models.
- The Necessity of Relabeling: The study shows that simply generating hard examples isn't enough. Without the relabeling step, the noise in synthetic data often outweighed the benefits. Relabeling improved accuracy by as much as 13.5% in some settings.
Conclusion and Limitations
PromptMix demonstrates that teaching small models about "gray areas" is a highly effective strategy for knowledge distillation. By combining mixup-style generation with LLM-based relabeling, the method achieves state-of-the-art results in extremely data-scarce environments.
However, the method's success depends on the teacher LLM's accuracy during the relabeling phase. Domain-specific biases in the LLM can propagate to the student model. Future work may explore incorporating human-in-the-loop verification for the most ambiguous generated labels to further refine dataset quality while minimizing labor costs.
Summary updated