Abstract
Optimization-based meta-learning, such as Model-Agnostic Meta-Learning (MAML), is a powerful paradigm for low-resource NLP tasks. However, these models often suffer from "memorization overfitting," where the model learns to solve tasks by memorizing global patterns across the training set rather than learning to adapt based on the provided support examples. We introduce MemIML (Memory Imitation Meta-Learning), a framework designed to break this trap. MemIML incorporates a task-specific memory module and an imitation mechanism that forces the model to actively utilize support data during inference. Our experiments on sentiment classification (ARSC) and dialogue generation (Persona-Chat) demonstrate that MemIML significantly outperforms standard meta-learning approaches, achieving superior generalization and task consistency.
Introduction
In low-resource natural language processing, the goal is often to adapt a model to a new task using only a handful of examples, known as the "support set." Meta-learning addresses this by finding a global initialization that can be quickly fine-tuned. Despite its theoretical appeal, meta-learning frequently falls into the memorization trap. Instead of acquiring the ability to learn from the support set, the model relies on its internal weights to predict outcomes based on commonalities across all training tasks.
When faced with a novel task at test time, a memorized model ignores the specific context of the support examples. For instance, in a personalized dialogue system, the model might provide generic responses rather than adapting to the specific user persona provided in the support set. MemIML addresses this by making support-set reliance an architectural requirement rather than an optional strategy.
Methodology
MemIML enhances the standard meta-learning framework through two primary components: a task-specific memory module and an imitation-based value predictor.
1. Task-Specific Memory Module
For every new task, MemIML constructs a memory bank by identifying representative samples from the support set. These are stored as key-value pairs:
- Keys: High-dimensional sentence representations generated by a frozen BERT encoder.
- Values: The corresponding ground truth, such as a sentiment label for classification or a sentence embedding for text generation.
To ensure the memory is efficient and non-redundant, the framework employs a diversity-based selection criterion, creating a concise "sketch" of the task rather than storing every noisy support sample.
2. The Imitation Module and Local Adaptation
To predict a query sample, the model retrieves the $N$ most similar examples from its memory. Rather than simply averaging these neighbors, MemIML performs local adaptation. It briefly fine-tunes a small "value predictor" network on these retrieved neighbors to estimate the target output based strictly on the memory content.
The final output is an interpolation of the base model’s prediction and the memory-driven prediction. This mechanism forces the model to "imitate" the patterns found in the support set, effectively preventing it from solving the task through global memorization alone.
Experimental Setup
We evaluated MemIML on two distinct low-resource NLP challenges:
- ARSC (Amazon Review Sentiment Classification): A multi-domain dataset requiring the model to classify sentiment across diverse product categories (e.g., Books, Electronics) in a 2-way 5-shot setting.
- Persona-Chat: A dialogue generation task where the model must generate responses consistent with a specific persona using limited conversation snippets.
Results and Discussion
MemIML demonstrated substantial performance gains over standard MAML and other regularization techniques like MetaMix.
Quantitative Performance
In the ARSC sentiment classification task, MemIML achieved an accuracy of 85.69%, outperforming standard MAML (82.17%) and MetaMix (83.63%).
In Persona-Chat, the model showed improvements across all automatic metrics, including BLEU, ROUGE, and CIDEr. Most significantly, it achieved a Consistency score (C-score) of 0.241, nearly doubling the 0.132 achieved by MR-MAML. This indicates that MemIML is far more effective at incorporating the specific persona traits provided in the support set into its generated responses.
Qualitative Insights
Case studies revealed that MemIML successfully integrated specific persona details—such as a character's profession or hobbies—into dialogue, whereas baseline models tended to produce generic, safe responses. The ablation studies further highlighted that local adaptation of the value predictor is the most critical component for maintaining task consistency.
Conclusion and Future Work
MemIML shifts meta-learning from "passive" regularization (like noise injection) to "active" regularization by changing the model architecture to mandate support-set usage. While highly effective, the model's performance is currently tied to the quality of the frozen BERT keys and can be sensitive to outliers in the support set (as seen in the performance drop when the store ratio reaches 100%). Future research will explore dynamic attention mechanisms to weight memory slots and more sophisticated integration methods for the memory and base model outputs.
Summary updated