Skip to main content
QUICK REVIEW

[Paper Review] BaseTransformers: Attention over base data-points for One Shot Learning

Mayug Maniparambil, Kevin McGuinness|arXiv (Cornell University)|Oct 5, 2022
Domain Adaptation and Few-Shot LearningComputer Science6 citations
TL;DR

This paper proposes BaseTransformers, a novel few-shot learning method that improves one-shot classification by attending to semantically similar, well-represented regions in a base dataset's feature space to construct more robust prototypes for novel classes. By using cross-attention over base data points and leveraging pre-trained, low-noise features, it achieves state-of-the-art performance on mini-ImageNet (70.88%), tiered-ImageNet (72.46%), and CUB (82.27%) in the inductive one-shot setting.

ABSTRACT

Few shot classification aims to learn to recognize novel categories using only limited samples per category. Most current few shot methods use a base dataset rich in labeled examples to train an encoder that is used for obtaining representations of support instances for novel classes. Since the test instances are from a distribution different to the base distribution, their feature representations are of poor quality, degrading performance. In this paper we propose to make use of the well-trained feature representations of the base dataset that are closest to each support instance to improve its representation during meta-test time. To this end, we propose BaseTransformers, that attends to the most relevant regions of the base dataset feature space and improves support instance representations. Experiments on three benchmark data sets show that our method works well for several backbones and achieves state-of-the-art results in the inductive one shot setting. Code is available at github.com/mayug/BaseTransformers

Motivation & Objective

  • To address the poor prototype estimation in one-shot learning due to noisy, single-sample representations of novel classes.
  • To improve few-shot classification by leveraging well-trained, low-noise feature representations from a large base dataset.
  • To enable part-based composition of prototypes by learning local, semantic correspondences between support instances and semantically similar base instances.
  • To eliminate assumptions about Gaussian distributions or global transferability of features, instead focusing on local, spatially meaningful feature alignment.

Proposed method

  • BaseTransformers uses a cross-attention mechanism where the support instance's feature map acts as the query, and the features of semantically similar base instances serve as keys and values.
  • The method performs feature-space adaptation in the latent space of a pretrained encoder, avoiding pixel-space operations for better semantic transfer.
  • It identifies the closest base classes using semantic similarity via class label information, enabling targeted querying of relevant base features.
  • The model is trained end-to-end via meta-learning, jointly optimizing the encoder and BaseTransformer to refine novel class prototypes.
  • Pretraining uses contrastive losses (e.g., SimCLR and InfoNCE) to prevent supervision collapse and produce robust base features.
  • Attention maps are visualized to confirm that the model learns to attend to semantically meaningful, part-level regions in base images.

Experimental results

Research questions

  • RQ1Can prototype estimation in one-shot learning be improved by leveraging well-represented features from a base dataset rather than relying on a single, noisy support sample?
  • RQ2Does learning local, part-based correspondences between novel support instances and semantically similar base instances lead to more robust prototype representations?
  • RQ3Can a cross-attention mechanism effectively attend to and aggregate relevant regions from the base feature space to compose a better prototype for a novel class?
  • RQ4How does the choice of querying function (visual, semantic, oracle) affect the performance of the proposed method?
  • RQ5To what extent does the method generalize across different backbones and few-shot benchmarks?

Key findings

  • BaseTransformers achieves state-of-the-art performance on mini-ImageNet with a 1-shot accuracy of 70.88%, surpassing prior methods.
  • On tiered-ImageNet, the method reaches 72.46% accuracy in the 1-shot setting, demonstrating strong generalization across diverse few-shot benchmarks.
  • On the CUB dataset, the method achieves 82.27% 1-shot accuracy, highlighting its effectiveness on fine-grained classification tasks.
  • Ablation studies show that combining SimCLR pretraining with semantic querying boosts performance by nearly 2% over baseline Prototypical Networks.
  • The model’s performance is limited by the querying function, as oracle querying (using true class prototypes) increases accuracy to 76.55% on tiered-ImageNet, indicating room for improvement in query strategy.

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.