Papers › Negative Margin Matters: Understanding Margin in Few-shot Classification

Negative Margin Matters: Understanding Margin in Few-shot Classification

26 Mar 2020ECCV 2020 8arXiv:2003.12060archive 2025-07-28

Bin Liu, Yue Cao, Yutong Lin, Qi Li, Zheng Zhang, Mingsheng Long, Han Hu

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.

PaperPDFConference PDFCode

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Code

bl0/negative-margin.few-shot officialmentioned in papermentioned on GitHubpytorchNOASSERTION report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

ClassificationFew-Shot Image ClassificationFew-Shot LearningGeneral ClassificationMetric Learning

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Few-Shot Image Classification CUB 200 5-way 1-shot Neg-Margin Accuracy 72.66 #26 of 36 Archive leaderboard report
Few-Shot Image Classification CUB 200 5-way 5-shot Neg-Margin Accuracy 89.40 #20 of 32 Archive leaderboard report
Few-Shot Image Classification Mini-ImageNet - 1-Shot Learning Neg-Margin Accuracy 63.85 #12 of 16 Archive leaderboard report
Few-Shot Image Classification Mini-ImageNet to CUB - 5 shot learning Neg-Margin Accuracy 69.30 #2 of 2 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Softmax

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections