TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Negative Margin Matters: Understanding Margin in Few-shot ...

Negative Margin Matters: Understanding Margin in Few-shot Classification

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

2020-03-26ECCV 2020 8Few-Shot LearningMetric LearningFew-Shot Image ClassificationGeneral ClassificationClassification
PaperPDFCode(official)

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.

Results

TaskDatasetMetricValueModel
Image ClassificationCUB 200 5-way 5-shotAccuracy89.4Neg-Margin
Image ClassificationCUB 200 5-way 1-shotAccuracy72.66Neg-Margin
Image ClassificationMini-ImageNet to CUB - 5 shot learningAccuracy69.3Neg-Margin
Image ClassificationMini-ImageNet - 1-Shot LearningAccuracy63.85Neg-Margin
Few-Shot Image ClassificationCUB 200 5-way 5-shotAccuracy89.4Neg-Margin
Few-Shot Image ClassificationCUB 200 5-way 1-shotAccuracy72.66Neg-Margin
Few-Shot Image ClassificationMini-ImageNet to CUB - 5 shot learningAccuracy69.3Neg-Margin
Few-Shot Image ClassificationMini-ImageNet - 1-Shot LearningAccuracy63.85Neg-Margin

Related Papers

GLAD: Generalizable Tuning for Vision-Language Models2025-07-17Unsupervised Ground Metric Learning2025-07-17Adversarial attacks to image classification systems using evolutionary algorithms2025-07-17Are encoders able to learn landmarkers for warm-starting of Hyperparameter Optimization?2025-07-16Efficient Calisthenics Skills Classification through Foreground Instance Selection and Depth Estimation2025-07-16Safeguarding Federated Learning-based Road Condition Classification2025-07-16AI-Enhanced Pediatric Pneumonia Detection: A CNN-Based Approach Using Data Augmentation and Generative Adversarial Networks (GANs)2025-07-13ViT-ProtoNet for Few-Shot Image Classification: A Multi-Benchmark Evaluation2025-07-12