Zero-Shot Text Classification via Self-Supervised Tuning

Chaoqun Liu, Wenxuan Zhang, Guizhen Chen, Xiaobao Wu, Anh Tuan Luu, Chip-Hong Chang, Lidong Bing

Abstract

Zero-shot text classification—the ability to categorize text into unseen classes without task-specific training data—remains a significant challenge in NLP. Existing approaches typically rely on brittle prompting techniques or expensive meta-tuning on large-scale labeled datasets. We present Self-Supervised Tuning (SSTuning), a new paradigm that bridges this gap by training on massive amounts of unlabeled text. By employing a First Sentence Prediction (FSP) objective, the model learns to associate concise summaries (first sentences) with their context. Our results show that SSTuning outperforms state-of-the-art meta-tuning methods on 7 out of 10 benchmark tasks while offering superior stability.

Introduction: The Challenge of Zero-Shot Classification

The "holy grail" of NLP is a model that can perform new tasks without requiring human-annotated data. Currently, researchers use two primary strategies:

  1. Prompting: Utilizing pre-trained language models (PLMs) with specific templates (e.g., "This text is about [MASK]"). While flexible, prompting is notoriously sensitive to phrasing; a minor change in the prompt can lead to drastic performance drops.
  2. Meta-tuning: Training models on a diverse collection of existing labeled datasets. This approach is effective but limited by the availability and cost of high-quality annotated data.

SSTuning introduces a third way: leveraging the inherent structure of unlabeled web text to provide a "natural" supervision signal.

Comparison of zero-shot learning paradigms: Prompting, Meta-tuning, and the proposed Self-Supervised Tuning (SSTuning).

Methodology: Self-Supervised Tuning (SSTuning)

The core of SSTuning is the First Sentence Prediction (FSP) task. In most well-structured writing, the first sentence of a paragraph serves as a summary or a "label" for the following text.

The FSP Objective

To transform raw text into a training signal, the authors construct multiple-choice questions:

  • Input Text: The body of a paragraph (excluding the first sentence).
  • Positive Option: The actual first sentence of that paragraph.
  • Negative Options: First sentences sampled from other paragraphs.
  • Hard Negatives: To prevent the model from relying on shallow keyword matching, "hard negatives" are selected from the same article as the input text. This forces the model to understand deeper semantic nuances to identify the correct summary.
The SSTuning framework during training (top) and zero-shot inference (bottom).

Inference

During zero-shot inference, the model treats the class labels (e.g., "Politics," "Sports") as the options in the multiple-choice format it learned during tuning. This allows the model to generalize its understanding of "summary-context" relationships to arbitrary classification tasks.

Experimental Setup

The models (based on RoBERTa and ALBERT) were tuned on 5.12 million samples from a mix of English Wikipedia (formal) and Amazon Reviews (informal). Evaluation was conducted across 10 diverse benchmarks covering topic classification (e.g., AG News, Yahoo Topics) and sentiment analysis (e.g., IMDb, Yelp).

Key Results and Insights

  • State-of-the-Art Performance: SSTuning-ALBERT achieved the highest accuracy on 7 of the 10 datasets. Notably, it outperformed UniMC—a leading meta-tuning approach—by an average of 3.4%, despite UniMC having the advantage of labeled data during its tuning phase.
  • Remarkable Stability: One of the biggest advantages of SSTuning is its robustness. While traditional prompting methods show high variance (5.3–7.4% standard deviation) based on label phrasing, SSTuning remains stable (1.5–1.9% deviation).
  • Cross-Domain Synergy: Combining Wikipedia and Amazon data yielded better results than using either alone, suggesting that exposure to varied writing styles enhances generalization.
  • The Role of Hard Negatives: Ablation studies confirmed that hard negatives are essential. Without them, the model often defaults to simple word-overlap heuristics rather than true semantic understanding.

Limitations and Future Work

While highly effective for topic classification and general sentiment, SSTuning struggled with fine-grained sentiment tasks like SST-5 (5-class sentiment). The authors hypothesize that first sentences in reviews may lack the nuance required to distinguish between "Negative" and "Very Negative." Future research will explore scaling SSTuning to larger generative models and developing more sophisticated self-supervised objectives to capture a broader range of textual relationships.

Summary updated

BibTeX
@inproceedings{liu2023zero,
  author = {Chaoqun Liu and Wenxuan Zhang and Guizhen Chen and Xiaobao Wu and Anh Tuan Luu and Chip-Hong Chang and Lidong Bing},
  title = {{Zero-Shot Text Classification via Self-Supervised Tuning}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.110},
}
Figure