Skip to main content
QUICK REVIEW

[Paper Review] Generation-driven Contrastive Self-training for Zero-shot Text Classification with Instruction-following LLM

Ruohong Zhang, Yau-Shian Wang|arXiv (Cornell University)|Apr 24, 2023
Topic ModelingComputer Science3 citations
TL;DR

GenCo proposes a generation-driven contrastive self-training framework that leverages an instruction-tuned GPT model to enhance a smaller, efficient sentence encoder for zero-shot text classification. By generating semantically enriched text augmentations and label-conditioned training data, GenCo improves alignment with decision boundaries, achieving state-of-the-art performance on benchmark datasets even with limited in-domain data.

ABSTRACT

The remarkable performance of large language models (LLMs) in zero-shot language understanding has garnered significant attention. However, employing LLMs for large-scale inference or domain-specific fine-tuning requires immense computational resources due to their substantial model size. To overcome these limitations, we introduce a novel method, namely GenCo, which leverages the strong generative power of LLMs to assist in training a smaller and more adaptable language model. In our method, an LLM plays an important role in the self-training loop of a smaller model in two important ways. Firstly, the LLM is used to augment each input instance with a variety of possible continuations, enriching its semantic context for better understanding. Secondly, it helps crafting additional high-quality training pairs, by rewriting input texts conditioned on predicted labels. This ensures the generated texts are highly relevant to the predicted labels, alleviating the prediction error during pseudo-labeling, while reducing the dependency on large volumes of unlabeled text. In our experiments, GenCo outperforms previous state-of-the-art methods when only limited ($<5\%$ of original) in-domain text data is available. Notably, our approach surpasses the performance of Alpaca-7B with human prompts, highlighting the potential of leveraging LLM for self-training.

Motivation & Objective

  • To address the inefficiency and high computational cost of directly using large GPT models for zero-shot text classification.
  • To overcome the limitation of independent predictions in GPT-based models by leveraging instance correlations and decision boundaries in the target space.
  • To improve the performance of smaller, efficient sentence encoder classifiers through high-quality, GPT-generated training data.
  • To enhance data efficiency in zero-shot learning by using GPT to generate diverse, semantically relevant training examples grounded in the input distribution.

Proposed method

  • GenCo uses a GPT model to generate multiple augmented texts for each input by conditioning on the input and a prompt, which are then concatenated and encoded to produce a merged embedding.
  • The method applies contrastive self-training by optimizing the sentence encoder to pull embeddings of input-augmented text pairs closer and push them apart from negative pairs.
  • During self-training, GPT generates new augmented texts conditioned on the model’s predicted pseudo-labels, aligning the training data with the decision boundaries in the target space.
  • The framework iteratively refines the sentence encoder using these GPT-generated, label-conditioned training pairs, improving generalization and robustness.
  • A temperature-scaled contrastive loss is used to stabilize training and emphasize hard negatives, with the temperature tuned to enhance decision boundary learning.
  • The sentence encoder (e.g., RoBERTa-SimCSE) is fine-tuned using the GPT-augmented data, with predictions used to generate new pseudo-labeled training instances in subsequent iterations.

Experimental results

Research questions

  • RQ1Can GPT-generated text augmentations improve the semantic alignment between input texts and relevant class labels in zero-shot text classification?
  • RQ2Can conditioning GPT generation on predicted pseudo-labels enhance decision boundary learning and improve model generalization?
  • RQ3Does contrastive self-training with GPT-generated, label-conditioned data lead to better performance than standard self-training or direct GPT inference?
  • RQ4How effective is GenCo in low-data regimes where in-domain labeled data is scarce?

Key findings

  • GenCo outperforms previous state-of-the-art methods on four benchmark datasets, including HellaSwag, HCN, and others, under zero-shot evaluation settings.
  • The model achieves significant performance gains even when only limited in-domain text data is available, demonstrating strong data efficiency.
  • Visualization results show that GPT-generated texts conditioned on the correct pseudo-label are closer to the corresponding label embedding in the semantic space, confirming alignment with decision boundaries.
  • The method reduces ambiguity in training pairs by generating texts that are semantically distinct from other classes, as evidenced by t-SNE projections showing clearer cluster separation.
  • GenCo achieves higher accuracy than baselines such as InstructGPT and Alpaca when used directly for inference, highlighting the benefit of iterative self-training with GPT-augmented data.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.