Improve Meta-learning for Few-Shot Text Classification with All You Can Acquire from the Tasks

Xinyue Liu, Yunlong Gao, Linlin Zong, Bo XuEMNLP 2024

Introduction

Few-shot text classification is a critical challenge in Natural Language Processing (NLP), requiring models to categorize novel text samples using only a handful of labeled examples (the "support set"). While Prototypical Networks (PN) have become a standard architecture for this task, they often struggle with high intra-class variance or low inter-class separation. This is particularly evident in 1-shot scenarios, where a single outlier can skew the class prototype, leading to poor generalization.

The Challenge of Sparse Information

The primary limitation in few-shot learning is the scarcity of information. Standard models often treat class labels as arbitrary indices and ignore the potential insights hidden within the unlabeled query set. This leads to "blurry" class definitions where prototypes fail to represent the true center of a category's distribution. Previous attempts to solve this often relied on external data augmentation or massive Large Language Models (LLMs), which are computationally expensive and not always feasible.

Methodology: The LAQDA Framework

To address these issues, researchers have developed LAQDA (Label-Adaptive and Query-Data-Augmentation). This framework maximizes "in-task" information through two primary components designed to sharpen class definitions without external resources.

The LAQDA architecture integrates label semantics and query-set distribution to refine classification.

1. Label-Adapter

Unlike traditional models that ignore the semantic meaning of labels, the Label-Adapter treats label names as informative features. Using a self-attention mechanism, it encodes input sentences alongside the task's label names. This creates a task-adaptive metric space where the model emphasizes features relevant to the specific categories at hand, effectively pulling similar intra-class samples together and pushing different classes apart.

2. Query-Data-Augmenter (QDA)

The QDA module employs a transductive learning approach. It leverages the unlabeled query samples—which collectively describe the class distribution—to refine the prototypes. By applying Optimal Transport (OT) via the Sinkhorn algorithm, LAQDA identifies query samples most likely to belong to a support class and uses them as "pseudo-labeled" data to calculate more stable and accurate prototypes.

Experimental Results

LAQDA was evaluated across 10 benchmark datasets, including news classification and intent detection. It consistently achieved state-of-the-art (SOTA) performance, particularly in 1-shot settings. For instance, on news datasets, it reached a 76.7% average 1-shot accuracy, a significant improvement over previous methods like Way-DE.

t-SNE visualizations demonstrate that LAQDA produces more distinct clusters and more accurate prototypes (stars) compared to baseline models.

Visual analysis using t-SNE confirms that LAQDA’s prototypes (represented by stars in the visualization) are positioned significantly closer to the true centers of data clusters than those of vanilla BERT-PN. The combination of label-aware representations and query-based augmentation results in much tighter, more separable class clusters, even when initial support samples are sparse.

Conclusion

LAQDA demonstrates that significant performance gains in few-shot text classification can be achieved by better utilizing the information already present within a task. By treating labels as semantic guides and query samples as distributional anchors, LAQDA provides a robust, efficient solution for low-resource NLP tasks without the need for external data or massive computational overhead.

Reference: Liu, X., Gao, Y., Zong, L., & Xu, B. (2024). Improve Meta-learning for Few-Shot Text Classification with All You Can Acquire from the Tasks. Findings of the Association for Computational Linguistics: EMNLP 2024.

Summary updated

BibTeX
@inproceedings{liu2024improve,
  author = {Xinyue Liu and Yunlong Gao and Linlin Zong and Bo Xu},
  title = {{Improve Meta-learning for Few-Shot Text Classification with All You Can Acquire from the Tasks}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.12},
}
Figure