English

Negative Margin Matters: Understanding Margin in Few-shot Classification

Computer Vision and Pattern Recognition 2020-03-27 v1 Machine Learning Machine Learning

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.

Keywords

Cite

@article{arxiv.2003.12060,
  title  = {Negative Margin Matters: Understanding Margin in Few-shot Classification},
  author = {Bin Liu and Yue Cao and Yutong Lin and Qi Li and Zheng Zhang and Mingsheng Long and Han Hu},
  journal= {arXiv preprint arXiv:2003.12060},
  year   = {2020}
}

Comments

Code is available at https://github.com/bl0/negative-margin.few-shot

R2 v1 2026-06-23T14:28:28.320Z