Abstract
This paper introduces a novel approach to zero-shot text classification by reframing it as a generative multiple-choice question-answering task. By leveraging a pretrained GPT-2 model and finetuning it on a title prediction task, the authors demonstrate that natural language descriptions can serve as a flexible interface for adapting to new classification tasks without additional training data. The proposed method shows significant improvements over baseline models across several standard benchmarks.
Introduction
Traditional text classification models are inherently rigid, typically requiring a fixed "classification head" for a specific set of categories. Adding a new category or switching tasks (e.g., from news classification to sentiment analysis) usually necessitates architectural changes and retraining on labeled data. This research addresses the challenge of zero-shot adaptation: enabling a model to perform tasks it wasn't explicitly trained for, without seeing any new training examples.
The authors propose using natural language itself as the interface to define tasks. Instead of mapping inputs to integer labels, the model "reads" a description of the classes and selects the most appropriate one, treating classification as a meta-learning problem driven by language.
Methodology
The core innovation is the reformulation of classification as generative multiple-choice QA. The architecture utilizes a pretrained GPT-2 transformer. Unlike standard classifiers, this model generates text outputs based on a structured input: [Question] + [Reference Text] + [Answer Prompt].
To teach the model the logic of selection, it was finetuned on a "title prediction" proxy task using the OpenWebText dataset. In this task, the model is presented with an article and a list of 2 to 15 possible titles, and it must generate the correct one. This process forces the model to learn how to match a summary (the label) to a body of text. Technical refinements included the use of "type tokens" to distinguish input segments and resetting positional embeddings at the start of the answer segment to help the model focus on the relationship between the question's choices and the generated output.
Results and Evaluation
The model was evaluated on six standard benchmarks, including sentiment analysis (SST-2, Amazon-2, Yelp-2) and topic classification (AGNews, DBPedia, Yahoo Answers). The results demonstrated significant zero-shot capabilities, with performance scaling alongside model size.
Key findings include:
- Significant Gains: On the DBPedia dataset, the model achieved a 45.2% absolute improvement over random guessing.
- Average Performance: The 355M parameter model averaged 62.9% accuracy across all tasks, nearly double the random baseline of 33.1%.
- Scale and Discipline: Larger models were more effective at following instructions and less likely to "hallucinate" answers outside of the provided multiple-choice list.
Discussion and Limitations
While the results are promising, the model still lags behind supervised state-of-the-art (SOTA) performance. For example, on AGNews, the zero-shot model reached ~65% accuracy compared to ~95% for a finetuned version.
The model also exhibits sensitivity to "prompt engineering"; the exact phrasing of questions and labels (e.g., using "Positive Sentiment" vs. "positive") significantly impacts performance. Furthermore, the model can be brittle when faced with obscure labels or similar classes that require fine-grained reasoning. Future work may explore combining this generative approach with "K-shot" learning, where a few examples are provided within the prompt to further refine the model's task understanding.
Summary updated