Skip to main content
QUICK REVIEW

[Paper Review] Few-shot Classification via Adaptive Attention

Zihang Jiang, Bingyi Kang|arXiv (Cornell University)|Aug 6, 2020
Domain Adaptation and Few-Shot LearningComputer Science35 references13 citations
TL;DR

This paper proposes a novel few-shot classification method using adaptive attention via a meta-reweighting strategy that refines query representations by dynamically emphasizing relevant features from support samples. By generating spatial attention maps that localize discriminative regions, the model achieves state-of-the-art performance on miniImageNet and fine-grained datasets, outperforming prior methods by significant margins while remaining lightweight and interpretable.

ABSTRACT

Training a neural network model that can quickly adapt to a new task is highly desirable yet challenging for few-shot learning problems. Recent few-shot learning methods mostly concentrate on developing various meta-learning strategies from two aspects, namely optimizing an initial model or learning a distance metric. In this work, we propose a novel few-shot learning method via optimizing and fast adapting the query sample representation based on very few reference samples. To be specific, we devise a simple and efficient meta-reweighting strategy to adapt the sample representations and generate soft attention to refine the representation such that the relevant features from the query and support samples can be extracted for a better few-shot classification. Such an adaptive attention model is also able to explain what the classification model is looking for as the evidence for classification to some extent. As demonstrated experimentally, the proposed model achieves state-of-the-art classification results on various benchmark few-shot classification and fine-grained recognition datasets.

Motivation & Objective

  • To address the challenge of few-shot classification where models must generalize to novel classes with only a few support examples.
  • To overcome limitations of existing meta-learning and metric-based methods, which either suffer from high optimization complexity or lack adaptability to support-query relationships.
  • To develop a lightweight, efficient framework that enhances query representation by dynamically attending to relevant features from few support samples.
  • To improve model interpretability by generating attention maps that highlight discriminative regions in query images corresponding to support classes.

Proposed method

  • A meta-reweighting strategy generates channel-wise attention coefficients from support features using a small neural network, which are applied via element-wise multiplication to refine query features.
  • The refined query and support features are concatenated and passed through an attention module to produce a spatial attention map that highlights relevant regions in the query image.
  • The attention map is used to filter out irrelevant features from the query representation, focusing on parts that are semantically aligned with the support samples.
  • The final refined representation is fed into a classifier to predict the query label, with the attention mechanism enabling both performance gains and interpretability.
  • Test data augmentation is applied during inference to stabilize the weight generation process and improve robustness.
  • The entire framework is end-to-end trainable and does not require iterative optimization, making it computationally efficient compared to MAML-style methods.

Experimental results

Research questions

  • RQ1Can a meta-reweighting strategy effectively adapt query representations using only a few support samples to improve few-shot classification?
  • RQ2How can attention mechanisms be made adaptive to support samples rather than fixed or global, to enhance localization and classification accuracy?
  • RQ3Does the proposed method achieve better performance and generalization than existing metric-based and meta-learning methods on standard few-shot benchmarks?
  • RQ4To what extent can the attention maps generated by the model provide interpretable evidence for classification decisions?
  • RQ5Is the proposed method more efficient and easier to train than optimization-based meta-learning approaches like MAML?

Key findings

  • The proposed method achieves state-of-the-art accuracy of 64.51% ± 0.95 on the 5-way 1-shot miniImageNet benchmark, significantly outperforming prior SOTA methods.
  • On fine-grained datasets, the model achieves 70.73% ± 0.97 accuracy in 5-way 1-shot and 87.72% ± 0.53 in 5-way 5-shot, demonstrating strong generalization across diverse few-shot tasks.
  • Abllation studies show that replacing meta-reweighting with feature concatenation degrades performance to 51.31% in 1-shot, highlighting the importance of preserving spatial structure.
  • The use of test data augmentation improves accuracy from 56.12% to 56.33% in 1-shot, indicating enhanced stability in weight generation.
  • The attention maps generated by the model clearly localize the object of interest (e.g., a dog), while concatenation-based baselines produce confusing, non-discriminative maps.
  • The classifier component is essential—removing it and relying solely on the attention map for classification yields lower accuracy, confirming the benefit of dedicated classification head.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.