HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

Negative Margin Matters: Understanding Margin in Few-shot Classification

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

Negative Margin Matters: Understanding Margin in Few-shot Classification

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 Repositories

bl0/negative-margin.few-shot
Official
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
few-shot-image-classification-on-cub-200-5Neg-Margin
Accuracy: 89.40
few-shot-image-classification-on-cub-200-5-1Neg-Margin
Accuracy: 72.66
few-shot-image-classification-on-mini-1Neg-Margin
Accuracy: 63.85
few-shot-image-classification-on-mini-10Neg-Margin
Accuracy: 69.30

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
Negative Margin Matters: Understanding Margin in Few-shot Classification | Papers | HyperAI