Incremental Few-shot Text Classification with Multi-round New Classes: Formulation, Dataset and System

Congying Xia, Wenpeng Yin, Yihao Feng, Philip S. Yu

Abstract

Traditional few-shot text classification often assumes a "warm start" with abundant base-class data and a single round of adaptation. However, real-world scenarios frequently require systems to learn new categories sequentially in multiple rounds with very few examples (1-5 per class) and potentially no initial large-scale dataset. This paper formalizes the Incremental Few-shot Text Classification (IFSTC) task and introduces two new benchmarks: IFS-INTENT and IFS-RELATION. We propose an entailment-based framework that treats classification as a logical inference problem, leveraging semantic information from class labels and indirect supervision from large-scale inference datasets. Our results demonstrate that this approach significantly outperforms metric-learning baselines in terms of both initial accuracy and long-term stability.

Introduction

Few-shot learning has seen significant progress, yet a gap remains between academic benchmarks and practical applications. Standard setups typically involve a large "base" dataset used to train a feature extractor, followed by a single-step evaluation on "novel" classes. In reality, new categories—such as emerging user intents in a chatbot—appear sequentially. Moreover, developers often need to deploy systems from scratch without a massive pre-existing labeled corpus.

To address these challenges, we define the Incremental Few-shot Text Classification (IFSTC) task. IFSTC requires models to handle:

  1. Multi-round learning: Continuous streams of new classes.
  2. Cold starts: Learning with minimal data from the outset, without a large base dataset.
  3. Open-world constraints: Identifying "None of the Above" (Out-of-Distribution) inputs.

Methodology

We pivot from traditional metric learning, which relies on vector distances, to a Textual Entailment framework.

Entailment-based Classification

In our ENTAILMENT model, classification is framed as a logic problem: does a Premise (the input text) entail a Hypothesis (a template containing the class name, e.g., "This text is about 'opening a bank account'")? By using a RoBERTa encoder pre-trained on the Multi-Genre Natural Language Inference (MNLI) dataset, the model gains "indirect supervision." It learns the general logic of language, allowing it to reason about the semantics of class names even for categories it has never seen before.

Hybrid and Baseline Models

We also introduce a HYBRID model that combines the entailment approach with example-based matching (similar to the DNNC model). This allows the system to leverage both the semantic meaning of the label and the specific patterns found in the few available labeled examples.

Benchmarks: IFS-INTENT and IFS-RELATION

To evaluate IFSTC, we developed two benchmarks:

  • IFS-INTENT: Based on BANKING77, featuring 77 intent classes split into base groups and five incremental rounds of 10 classes each.
  • IFS-RELATION: Based on FewRel, focusing on complex relationship extraction from diverse sources like Wikipedia and Pubmed.

Crucially, these datasets omit development sets, ensuring a "true" few-shot evaluation where hyperparameter tuning on auxiliary data is impossible.

Experimental Results

Our evaluation focuses on two primary metrics: absolute accuracy in each round and the stability of performance on previously learned classes.

Performance in Low-Resource Settings

The entailment-based approach shows a clear advantage when starting from scratch. On IFS-INTENT, the ENTAILMENT model achieved approximately 65% accuracy in the first round, significantly higher than the 55% achieved by the DNNC baseline. The gap is even more pronounced in the complex IFS-RELATION task, where ENTAILMENT maintained ~67% accuracy while DNNC's performance dropped to ~12%, indicating that simple example-matching is insufficient for complex semantic relations.

Performance on IFS-INTENT and IFS-RELATION benchmarks across multiple rounds.

Stability and Catastrophic Forgetting

A major hurdle in incremental learning is "catastrophic forgetting." We measured the performance decay on old classes as new rounds were added. The ENTAILMENT and HYBRID models demonstrated superior stability compared to Prototypical Networks. Because the entailment model learns a general relationship between text and labels rather than partitioning a specific vector space, it is naturally more robust to the addition of new categories.

Performance decay over five rounds, illustrating the stability of the Entailment and Hybrid models compared to baselines.

Conclusion

The transition to an entailment-based framework for incremental few-shot classification offers significant benefits in terms of semantic reasoning and stability. By treating labels as informative signals rather than arbitrary indices, models can effectively "learn on the fly." Future work will address the sensitivity of these models to class name phrasing and the computational efficiency of scaling to thousands of classes.

Summary updated

BibTeX
@inproceedings{xia2021incremental,
  author = {Congying Xia and Wenpeng Yin and Yihao Feng and Philip S. Yu},
  title = {{Incremental Few-shot Text Classification with Multi-round New Classes: Formulation, Dataset and System}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.naacl-main.106},
}
Figure