Incubating Text Classifiers Following User Instruction with Nothing but LLM

Letian Peng, Zilong Wang, Jingbo Shang

Introduction

Building text classifiers for niche domains often encounters the "cold start" problem: a lack of labeled data and the absence of a relevant raw corpus for mining. While Large Language Models (LLMs) have advanced zero-shot classification, they frequently struggle with complex, overlapping, or custom user-defined categories. Researchers from UC San Diego have introduced Incubator, a framework that treats LLMs as autonomous data factories capable of understanding label interdependencies to generate high-quality synthetic training data.

The Challenge of Zero-Shot Classification

Traditional zero-shot approaches typically rely on two methods:

  1. Raw Text Mining: Searching large datasets for matches to a label. This often fails for specific or rare labels.
  2. Label-wise Generation: Prompting an LLM to generate examples for one class at a time.

The primary drawback of label-wise generation is its neglect of label interdependency. For instance, the definition of a "Miscellaneous" or "Other" category depends entirely on the boundaries of the primary categories (e.g., "Love" vs. "Joy"). Generating data in isolation ignores these boundaries and often results in repetitive, biased samples.

Comparison of data generation methods: Raw Text Mining, Prompt per class, and the proposed Incubator approach.

The Incubator Framework

Incubator utilizes a two-stage process to fine-tune a smaller, efficient classifier (such as RoBERTa) using a larger LLM (e.g., LLaMA-2-7b).

1. Instruction-Tuning for Joint Generation

Instead of training the model to classify, the authors teach it to generate entire datasets. By training on a curated set of 12,000 samples derived from 25 existing Hugging Face datasets, the model learns a "dictionary-like" output format. Given an instruction containing $N$ classes, it generates a JSON-like dictionary with one synthetic example for each class simultaneously. This joint generation allows the model to capture the "contrast" between labels.

2. Self-Diversification

To mitigate the risk of generating repetitive or "typical" examples, Incubator employs a self-diversification technique. The model generates a large pool of candidate samples, which are then converted into semantic embeddings. K-means clustering identifies the most semantically distinct examples, and the model is further refined on these "cluster center" samples to ensure linguistic and topical variety.

Experimental Evaluation

The framework was evaluated across three scenarios: traditional benchmarks (e.g., SST-2, AG News, TREC), revised datasets with an "Other" category to test boundary understanding, and complex custom tasks like TED Talk summary classification.

Key Results

Incubator demonstrated significant performance gains over existing methods. It achieved an average accuracy of 70.78% across eight benchmarks, outperforming direct prompting (61.66%) and state-of-the-art generation methods like ProGen++ (65.79%).

Performance comparison of Incubator against various baselines across multiple text classification benchmarks.

Notably, Incubator excelled in handling the "Other" class, outperforming label-wise methods by nearly 15% on the NYT-LOC dataset. In high-precision mining tasks, such as identifying TED talks by specific speaker types, Incubator-trained models achieved up to 100% Precision@100 in certain categories.

Conclusion and Future Directions

Incubator proves that joint label generation and self-diversification can effectively "incubate" specialized classifiers from LLMs without external data. While the current framework requires manual label listing, future work aims to integrate automated label discovery and expand the pipeline to more complex tasks like question answering and summarization. By treating LLMs as data factories rather than just inference engines, Incubator provides a robust solution to the cold-start problem in text classification.

Summary updated

BibTeX
@inproceedings{peng2024incubating,
  author = {Letian Peng and Zilong Wang and Jingbo Shang},
  title = {{Incubating Text Classifiers Following User Instruction with Nothing but LLM}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.220},
}
Figure