Retrieval-Augmented Meta Learning for Low-Resource Text Classification

Rongsheng Li, Yangning Li, Yinghui Li, Chaiyut Luoyiching, Nannan Zhou, Hanjing Su, Hai-Tao Zheng

TL;DR

Retrieval-Augmented Meta Learning (RAML) addresses the "generalization gap" in few-shot text classification by combining standard neural network parameters with non-parametric knowledge retrieved from Wikipedia. By looking up relevant external context for every query, the model significantly outperforms existing state-of-the-art methods, proving that a "knowledge base" is just as important as a "learning algorithm" for low-resource tasks.

What Problem Does This Paper Address?

In low-resource (or "few-shot") text classification, a model must learn to categorize text after seeing only a handful of examples (e.g., 1 or 5 samples per class). While meta-learning has been the go-to strategy for this, it suffers from a major flaw: poor generalization.

Because the training data is so sparse, parameterized neural networks tend to "memorize" shallow features of the training set rather than learning deep conceptual relationships. When a new concept appears during testing that wasn't in the training data, the model often fails. Previous attempts to fix this by injecting external knowledge used rigid methods like exact string matching or entity embeddings, which often failed to capture the full semantic context needed for accurate classification.

Methods

The authors introduce RAML, which treats external text as a "latent variable" to help make inferences. The architecture consists of three main components:

  1. Sentence Embedding Network: Uses a pre-trained ALBERT encoder to create vector representations of both the support set (the few labeled examples) and the query.
  2. Knowledge Retrieval: For every query sentence, the model uses Sentence-BERT and FAISS to retrieve the top $m$ (default is 5) most relevant passages from a massive corpus (a 2018 Wikipedia dump containing over 21 million passages).
  3. Multi-view Passages Fusion Network: This is the core innovation. Instead of just looking at the query, the model creates "multi-view" scores. It concatenates the query with each retrieved passage and uses a cross-attention mechanism to compare these "views" against the class prototypes. This allows the model to "preserve semantics"—essentially using the Wikipedia text to explain why a query might belong to a certain category.

Finally, the scores from these multiple views are aggregated (using MEAN pooling) to produce the final classification.

Datasets

The model was evaluated on two standard benchmarks for few-shot text classification:

  • Amazon Review: Categorizing product reviews into different departments.
  • Huffpost: Categorizing news headlines into various sections (e.g., politics, entertainment).

The authors used the conventional C-way N-shot setup, specifically testing 5-way 1-shot and 5-way 5-shot scenarios.

Key Insights and Ideas

  • Parametric vs. Non-parametric Balance: The paper argues that neural weights (parametric) aren't enough for low-resource tasks. By adding a retrieval step (non-parametric), the model can "bridge the gap" between what it knows from training and the novel concepts it sees at test time.
  • The Power of Context: The "Aha!" moment is that a query like "Live It Up" is hard to classify on its own. However, if the model retrieves a Wikipedia passage explaining it's a song by Nicky Jam and Will Smith, the "Entertainment" category becomes obvious.
  • Semantic Preservation: The cross-attention mechanism ensures that the model doesn't just get "distracted" by the retrieved text; instead, it uses the text to highlight relevant features in the query that match the class prototypes.
  • Parallelism is Key: To keep the model efficient, RAML processes retrieved passages in parallel. The authors show that while retrieval adds some overhead, it is far more efficient than trying to concatenate all passages into one giant string.

Key Results

RAML achieved a new state-of-the-art (SOTA) across the board:

  • Amazon Review (1-shot): RAML hit 63.08% accuracy, a massive jump over the previous best (KGML-ProtoNet) at 58.62%.
  • Huffpost (5-shot): RAML reached 61.53%, outperforming standard ProtoNet (57.53%) and KGML-ProtoNet (58.75%).
  • Ablation Study: The authors found that performance scales with the number of retrieved passages. Accuracy jumps significantly from 0 to 5 passages, though the gains start to plateau after 5, suggesting a "sweet spot" for external knowledge.

Limitations and Future Work

  • Domain Specificity: The current model relies on Wikipedia. While great for general news and products, it might struggle in highly specialized domains like medical or legal text where Wikipedia lacks depth.
  • Retrieval Quality: The model's performance is bottlenecked by the retriever. If Sentence-BERT fails to find relevant passages, the "multi-view" fusion won't help.
  • Future Directions: The authors suggest extending this retrieval-augmented meta-learning framework to other fields, such as computer vision (retrieving similar images) or multimodal tasks, to see if the "external knowledge" boost is universal.

Summary updated

BibTeX
@inproceedings{li2024retrieval,
  author = {Rongsheng Li and Yangning Li and Yinghui Li and Chaiyut Luoyiching and Nannan Zhou and Hanjing Su and Hai-Tao Zheng},
  title = {{Retrieval-Augmented Meta Learning for Low-Resource Text Classification}},
  booktitle = {IJCNN},
  year = {2024},
  url = {https://openreview.net/forum?id=H2wphZNn4z},
}
Figure