Abstract
Few-shot text classification remains a significant challenge in Natural Language Processing (NLP) due to the data-hungry nature of deep learning models. This paper proposes MTM (Meta-pretraining Then Meta-learning), a framework that integrates large-scale unsupervised language model pretraining with episodic meta-learning. By disentangling general linguistic feature extraction from task-specific adaptation, MTM achieves a state-of-the-art accuracy of 90.01% on the Amazon Review Sentiment Classification (ARSC) benchmark, significantly outperforming existing meta-learning baselines.
Introduction
Standard deep learning models typically require thousands of labeled examples to achieve high performance. However, in many real-world scenarios, only a handful of labeled examples are available for new tasks—a problem known as few-shot learning. While meta-learning ("learning to learn") has emerged as a promising solution, existing methods often fail to distinguish between general linguistic features and task-specific classification goals. Furthermore, they frequently underutilize the vast amounts of unlabeled text data available for pretraining.
Methodology
The proposed MTM framework addresses these limitations through a two-stage pipeline:
- Task-agnostic Meta Pretraining: The model utilizes an unsupervised language model (BERT) to learn contextualized features. This stage captures fundamental linguistic properties such as grammar and semantics, providing a robust task-independent foundation.
- Meta-learning Text Classification: Following pretraining, the model undergoes episodic training. In each episode, the model is presented with a small support set and a test example. It performs gradient-based updates to its parameters, optimizing for rapid adaptation to new classes with minimal supervision.
By using BERT as an initializer, the meta-learning phase can focus exclusively on category discrimination rather than basic language understanding. The formal procedure for this integrated approach is detailed in the algorithm below.
Experimental Setup
The framework was evaluated on the Amazon Review Sentiment Classification (ARSC) dataset, which consists of 23 product domains with three binary classification tasks each (69 tasks total). The experiments were conducted in a 5-shot setting, where the model is provided with only five labeled examples per class for new tasks. Twelve tasks from four domains were reserved for testing.
Results
MTM demonstrates superior performance compared to several established few-shot learning baselines, including Matching Networks, Prototypical Networks, and MAML.
As shown in the results table, MTM achieves a mean accuracy of 90.01%, representing a substantial improvement over the previous state-of-the-art (Induction-Network-Routing at 85.47%). This performance gain underscores the synergy between unsupervised pretraining and meta-learning adaptation.
Discussion and Conclusion
The success of MTM highlights two critical pillars for few-shot NLP: high-quality generic initialization and an effective adaptation strategy. Unlike standard multi-task learning, which may average out task-specific nuances, the meta-learning component of MTM provides a superior starting point for new tasks.
While the current evaluation is focused on sentiment classification, the task-agnostic nature of the underlying features suggests broad applicability. Future work will explore the framework's performance on more complex NLP tasks such as Named Entity Recognition (NER) and Natural Language Inference (NLI), as well as investigate the computational trade-offs associated with the meta-learning optimization loop.
Summary updated