On the Importance of Distractors for Few-Shot Classification

Rajshekhar Das, Yu-Xiong Wang, JoséM. F. Moura
9/20/2021
cs.CV

Official code: quantacode/Contrastive-Finetuning (12 stars, Python, last commit 2021-09-22).

Abstract

Few-shot classification aims at classifying categories of a novel task by learning from just a few (typically, 1 to 5) labelled examples. An effective approach to few-shot classification involves a prior model trained on a large-sample base domain, which is then finetuned over the novel few-shot task to yield generalizable representations.

Show full abstract

However, task-specific finetuning is prone to overfitting due to the lack of enough training examples. To alleviate this issue, we propose a new finetuning approach based on contrastive learning that reuses unlabelled examples from the base domain in the form of distractors. Unlike the nature of unlabelled data used in prior works, distractors belong to classes that do not overlap with the novel categories. We demonstrate for the first time that inclusion of such distractors can significantly boost few-shot generalization. Our technical novelty includes a stochastic pairing of examples sharing the same category in the few-shot task and a weighting term that controls the relative influence of task-specific negatives and distractors. An important aspect of our finetuning objective is that it is agnostic to distractor labels and hence applicable to various base domain settings. Compared to state-of-the-art approaches, our method shows accuracy gains of up to $12\%$ in cross-domain and up to $5\%$ in unsupervised prior-learning settings.

View on arXivView PDF

Code Implementations(1)

121Python, ShellAug 17, 20215 years ago

Similar Papers

Cite this paper

@article{das2021importance,
  title  = {On the Importance of Distractors for Few-Shot Classification},
  author = {Rajshekhar Das and Yu-Xiong Wang and JoséM. F. Moura},
  year   = {2021},
  eprint = {2109.09883},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2109.09883}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2109.09883.svg)](https://codeofpaper.com/paper/2109.09883)

Discussion