Contextual Gradient Scaling for Few-Shot Learning

Sanghyuk Lee, Seunghyun Lee, Byung Cheol Song
10/20/2021
cs.CV

Official code: shlee625/CxGrad (3 stars, Python, last commit 2022-10-07).

Abstract

Model-agnostic meta-learning (MAML) is a well-known optimization-based meta-learning algorithm that works well in various computer vision tasks, e.g., few-shot classification. MAML is to learn an initialization so that a model can adapt to a new task in a few steps.

Show full abstract

However, since the gradient norm of a classifier (head) is much bigger than those of backbone layers, the model focuses on learning the decision boundary of the classifier with similar representations. Furthermore, gradient norms of high-level layers are small than those of the other layers. So, the backbone of MAML usually learns task-generic features, which results in deteriorated adaptation performance in the inner-loop. To resolve or mitigate this problem, we propose contextual gradient scaling (CxGrad), which scales gradient norms of the backbone to facilitate learning task-specific knowledge in the inner-loop. Since the scaling factors are generated from task-conditioned parameters, gradient norms of the backbone can be scaled in a task-wise fashion. Experimental results show that CxGrad effectively encourages the backbone to learn task-specific knowledge in the inner-loop and improves the performance of MAML up to a significant margin in both same- and cross-domain few-shot classification.

View on arXivView PDF

Code Implementations(1)

shlee625/CxGradOfficial100%

[WACV 2022] Contextual Gradient Scaling for Few-Shot Learning

31Python, ShellAug 12, 20214 years agoNOASSERTION

Similar Papers

Cite this paper

@article{lee2021contextual,
  title  = {Contextual Gradient Scaling for Few-Shot Learning},
  author = {Sanghyuk Lee and Seunghyun Lee and Byung Cheol Song},
  year   = {2021},
  eprint = {2110.10353},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.10353}
}

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/2110.10353.svg)](https://codeofpaper.com/paper/2110.10353)

Discussion