Abstract
Zero-shot learning via prompting large pre-trained language models (PLMs) has shown remarkable capabilities but suffers from significant inference latency and high computational costs. We present ZeroGen, a framework that decouples the knowledge of a large PLM from the inference process. ZeroGen uses the PLM to generate a massive synthetic dataset, which is then used to train a "tiny" task-specific model (TAM). Our experiments across text classification, natural language inference, and question answering show that ZeroGen not only provides orders of magnitude faster inference but also frequently outperforms the massive models that generated the data.
Introduction
Large PLMs like GPT-3 have revolutionized Natural Language Processing (NLP) by enabling zero-shot task performance through prompting. However, two primary challenges remain:
- Efficiency: Billion-parameter models are computationally expensive and slow, making them impractical for real-time applications or edge deployment.
- Flexibility: General-purpose generative models lack task-specific inductive biases, such as the pointer mechanisms required for extractive Question Answering (QA).
ZeroGen addresses these issues by moving the heavy lifting from the inference stage to a one-time data generation stage.
Methodology
The ZeroGen framework consists of three main stages:
- Pseudo-dataset Generation: A large PLM is prompted to generate $(x, y)$ pairs. For classification, prompts like "The movie review in positive sentiment is: " are used. For complex tasks like NLI or QA, a multi-step generation process creates contexts and corresponding hypotheses or questions based on target labels.
- Pseudo-supervised Training: A Tiny Task Model (TAM), such as a BiLSTM or DistilBERT, is trained from scratch using only the synthetic data. No human-annotated "gold" data is required.
- Efficient Inference: The trained TAM is deployed for the target task.
This process can be viewed as data-free knowledge distillation, where synthetic text serves as the medium for transferring knowledge from the large "teacher" PLM to the small "student" TAM.
Experimental Setup
ZeroGen was evaluated on six benchmarks across three categories:
- Text Classification: IMDb and SST-2.
- Natural Language Inference (NLI): QNLI and RTE.
- Question Answering (QA): SQuAD 1.1 and AdversarialQA.
The framework was compared against direct Prompting (zero-shot with the PLM) and Supervised learning (TAM trained on human-annotated data).
Results and Key Insights
ZeroGen demonstrates that specialized architectures can often outperform general-purpose generators when trained on sufficient data. Using DistilBERT as the TAM, ZeroGen outperformed direct prompting of the GPT2-XL teacher in 15 out of 18 experimental setups.
Scaling and Data Volume
Performance generally scales with the size of the synthetic dataset, typically plateauing between 100k and 200k samples. As shown in the scaling plots, ZeroGen often approaches or exceeds the performance of prompting as the pseudo-dataset size increases.
Efficiency Gains
The TAMs used are significantly smaller than the teacher models. For instance, a 7M parameter LSTM is roughly 0.4% the size of GPT2-XL (1.5B parameters), resulting in inference speeds 20x to 200x faster.
The Diversity-Correctness Tradeoff
The quality of synthetic data depends heavily on the decoding strategy. While "Nucleus" sampling increases linguistic diversity, "Greedy" decoding often yields higher correctness (label-text alignment). For ZeroGen, maintaining label correctness is generally more critical for student performance than maximizing diversity.
Conclusion and Future Work
ZeroGen provides a path toward efficient, high-performance zero-shot learning by leveraging the generative power of large PLMs to create task-specific students. While effective, the framework remains sensitive to prompt wording and can struggle with logical noise in complex tasks like NLI. Future research will focus on improving prompt robustness and developing filtering mechanisms to enhance the quality of synthetic training signals.
Summary updated