Abstract
Zero-shot text classification (0SHOT-TC) aims to categorize text into labels that were never seen during training. This paper standardizes the evaluation of 0SHOT-TC by introducing a unified benchmarking framework across diverse domains like emotion and situational awareness. The authors propose an entailment-based approach, demonstrating that classification can be effectively rephrased as a Natural Language Inference (NLI) task by asking if a text entails a label-based hypothesis.
The Challenge of Zero-shot Text Classification
In traditional supervised learning, classifiers are bound to a fixed set of labels. Introducing a new category typically requires fresh data collection and retraining. Zero-shot text classification (0SHOT-TC) seeks to overcome this by categorizing text into labels unseen during training.
The authors identify three major gaps in existing 0SHOT-TC research:
- Restrictive Vision: Most studies focus solely on topic categorization, neglecting more complex tasks like emotion detection or situational needs.
- The "Seen Label" Crutch: Many models are evaluated on a subset of labels from the same task they were trained on, rather than a truly "wild" setup with no task-specific data.
- Evaluation Chaos: A lack of standardized datasets and metrics makes cross-study comparisons difficult.
Methods: Classification as Entailment
The core innovation of this work is treating text classification as a Textual Entailment problem. Instead of predicting a label index, the model determines if a premise (the input text) entails a hypothesis (a natural language description of the label).
Using a pre-trained Natural Language Inference (NLI) model (specifically BERT), the authors convert classification tasks into premise-hypothesis pairs using specific templates. For example, given the premise "The plague in Mongolia, occurring last week, has caused more than a thousand isolation," the model evaluates hypotheses like "This text is about health" or "The people there need medical assistance."
By leveraging broad linguistic knowledge from NLI datasets (like MNLI), the model "understands" the semantic meaning of labels. The authors also explored using WordNet definitions in the hypothesis to provide additional semantic context, such as defining "sports" as "an active diversion requiring physical exertion and competition."
Standardized Benchmarks
The paper introduces a benchmark across three distinct aspects:
- Topic Detection (Yahoo Answers): 10 classes including "Science & Mathematics" and "Society & Culture."
- Emotion Detection (UnifyEmotion): 9 emotions (e.g., joy, anger, fear) across tweets, events, and fairytales.
- Situation Detection (Situation Typing): Identifying crisis-related needs such as "medical assistance," "water," and "shelter."
Two evaluation setups are defined:
- Label-partially-unseen: Training on some labels of a task and testing on all.
- Label-fully-unseen: The "Wild" setup where the model has never seen the specific task, relying entirely on general NLI pre-training.
Key Insights and Results
- NLI Models Excel: BERT models pre-trained on the Multi-Genre NLI (MNLI) dataset significantly outperformed traditional baselines like Word2Vec or ESA on unseen labels.
- Semantics Matter: Treating labels as natural language strings rather than arbitrary indices allows the model to utilize the inherent meaning of words.
- Ensembling and Task Difficulty: Combining word-only hypotheses with definitions yielded the best results. While topic detection is relatively straightforward, emotion detection remains the most challenging, likely requiring deeper common-sense inference.
Limitations and Future Work
The performance of this approach is sensitive to the quality of the hypothesis template. Additionally, models still struggle with nuanced human experiences not explicitly stated in the text. Future research will focus on more sophisticated hypothesis generation and better handling of the "None" class for cases where no labels apply.
Summary updated