Introduction
Few-shot text classification aims to categorize text documents based on a very limited number of labeled examples, known as the support set. While meta-learning approaches have significantly advanced this field, they often struggle with high inter-class variance. Specifically, when classes within a single task are semantically similar—such as distinguishing between "Science" and "Technology" versus "Sports" and "Cooking"—standard models often fail to adapt their internal feature space to the specific nuances of the task. This paper introduces the Task-Adaptive Reference Transformation (TART) framework, which addresses this limitation by projecting class prototypes into task-specific metric spaces.
Methodology
The TART framework introduces two primary innovations designed to enhance the discriminative power of few-shot models without the need for massive parameter counts or complex prompt engineering.
1. Task-Adaptive Reference Transfer Module
In traditional metric-based meta-learning, a query text is compared directly to a class prototype (the mean embedding of support samples). TART improves upon this by calculating a unique linear transformation matrix ($W$) for every task.
This is achieved by mapping the current task's prototypes ($P$) toward a set of fixed, per-class reference points ($R$). By utilizing the generalized inverse of the prototype matrix ($W = P^+R$), the model generates a custom projection that "stretches" the distance between classes. This transformation effectively reconfigures the feature space to be as discriminative as possible for the specific set of classes at hand.
2. Discriminative Reference Regularization (DRR)
To prevent the model from collapsing different classes into the same region of the feature space, the authors implement Discriminative Reference Regularization. This regularization loss is applied during training to ensure that the reference points themselves remain distinct. By pushing the transformed prototypes away from each other in the new task-specific space, the model maintains high separation even between semantically overlapping categories.
Experimental Setup
The authors evaluated TART using a BiLSTM feature extractor to demonstrate that architectural efficiency can still yield state-of-the-art results. The model was tested across four diverse benchmark datasets:
- HuffPost Headlines: Short, informal news snippets.
- Amazon Product Data: Customer reviews spanning 24 categories.
- Reuters-21578: Formal news articles.
- 20 Newsgroups: Long-form documents across 20 categories.
These datasets represent a wide spectrum of linguistic styles, from short and informal to long and formal, providing a robust test of the model's generalization capabilities.
Key Insights
The "Fixed Point" Strategy
Unlike models that allow the metric space to emerge organically, TART utilizes a "fixed point" strategy. By defining where classes should reside to be distinct and then finding the transformation to put them there, the model bypasses the ambiguity often found in standard embedding spaces.
Task-Specific Attention
Analysis of the model's internal mechanisms reveals that TART dynamically shifts its focus based on the task context. For instance, when the class "World News" is paired with "Taste," the model prioritizes political keywords; however, when paired with "Science," it shifts its focus to different discriminative features. This adaptability is key to its success in high-overlap scenarios.
Linear Efficiency
By employing a linear transformation with a closed-form solution (the generalized inverse), TART avoids the overfitting common in complex non-linear adapters. This allows the model to remain lightweight and efficient while outperforming much larger, prompt-based models.
Results and Discussion
TART achieved state-of-the-art (SOTA) results across nearly all tested benchmarks. On the 20 Newsgroups dataset, it outperformed the previous SOTA (MLADA) by 7.4% in 1-shot and 5.4% in 5-shot classification. On the Reuters dataset, the model achieved a significant 9.9% improvement in 1-shot classification.
Visual analysis via t-SNE confirms these metrics: while baseline models often produce overlapping "hairballs" of data points for similar classes, TART successfully pulls these points into distinct, well-separated clusters. This demonstrates that the task-adaptive transformation effectively resolves inter-class confusion.
Conclusion and Future Work
TART represents a significant step forward in making few-shot text classification more robust to semantic similarity. While the current model is strictly for classification and relies on BiLSTM encoders, future research could explore integrating TART with Transformer-based architectures to further enhance feature extraction. Additionally, exploring how this reference transformation scales to tasks involving hundreds of simultaneous classes remains an open area for investigation.
Summary updated