Negative Margin Matters: Understanding Margin in Few-shot Classification
arXiv:2003.12060
Abstract
This paper introduces a negative margin loss to metric learning based few-shot learning methods. The negative margin loss significantly outperforms regular softmax loss, and achieves state-of-the-art accuracy on three standard few-shot classification benchmarks with few bells and whistles. These results are contrary to the common practice in the metric learning field, that the margin is zero or positive. To understand why the negative margin loss performs well for the few-shot classification, we analyze the discriminability of learned features w.r.t different margins for training and novel classes, both empirically and theoretically. We find that although negative margin reduces the feature discriminability for training classes, it may also avoid falsely mapping samples of the same novel class to multiple peaks or clusters, and thus benefit the discrimination of novel classes. Code is available at https://github.com/bl0/negative-margin.few-shot.
Code is available at https://github.com/bl0/negative-margin.few-shot
References in corpus (12)
- Adam: A Method for Stochastic Optimization
- Very Deep Convolutional Networks for Large-Scale Image Recognition
- Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
- Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks
- Prototypical Networks for Few-shot Learning
- DeCAF: A Deep Convolutional Activation Feature for Generic Visual Recognition
- SGDR: Stochastic Gradient Descent with Warm Restarts
- A Simple Neural Attentive Meta-Learner
- On First-Order Meta-Learning Algorithms
- Large-Margin Softmax Loss for Convolutional Neural Networks
- Few-Shot Learning with Graph Neural Networks
- Few-Shot Learning with Metric-Agnostic Conditional Embeddings