HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

Recall@k Surrogate Loss with Large Batches and Similarity Mixup

Yash Patel Giorgos Tolias Jiri Matas

Recall@k Surrogate Loss with Large Batches and Similarity Mixup

Abstract

This work focuses on learning deep visual representation models for retrieval by exploring the interplay between a new loss function, the batch size, and a new regularization approach. Direct optimization, by gradient descent, of an evaluation metric, is not possible when it is non-differentiable, which is the case for recall in retrieval. A differentiable surrogate loss for the recall is proposed in this work. Using an implementation that sidesteps the hardware constraints of the GPU memory, the method trains with a very large batch size, which is essential for metrics computed on the entire retrieval database. It is assisted by an efficient mixup regularization approach that operates on pairwise scalar similarities and virtually increases the batch size further. The suggested method achieves state-of-the-art performance in several image retrieval benchmarks when used for deep metric learning. For instance-level recognition, the method outperforms similar approaches that train using an approximation of average precision.

Code Repositories

yash0307/recallatk
Official
pytorch
Mentioned in GitHub
yash0307/RecallatK_surrogate
Official
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
image-retrieval-on-inaturalistRecall@k Surrogate loss (ResNet-50)
R@1: 71.8
R@16: 91.9
R@32: 94.3
R@5: 84.7
image-retrieval-on-inaturalistRecall@k Surrogate loss (ViT-B/16)
R@1: 83.0
R@16: 95.9
R@32: 97.2
R@5: 92.1
metric-learning-on-cars196Recall@k Surrogate loss (ResNet-50)
R@1: 88.3
metric-learning-on-cars196Recall@k Surrogate loss (ViT-B/16)
R@1: 89.5
metric-learning-on-stanford-online-products-1Recall@k Surrogate Loss (ViT-B/16)
R@1: 88.0
metric-learning-on-stanford-online-products-1Recall@k Surrogate Loss (ResNet-50)
R@1: 82.7
metric-learning-on-stanford-online-products-1Recall@k Surrogate Loss (ViT-B/32)
R@1: 85.1
vehicle-re-identification-on-vehicleid-largeRecall@k Surrogate loss (ViT-B/16)
Rank-1: 94.7
Rank-5: 97.1
vehicle-re-identification-on-vehicleid-largeRecall@k Surrogate loss (ResNet-50)
Rank-1: 93.8
Rank-5: 96.6
vehicle-re-identification-on-vehicleid-mediumRecall@k Surrogate loss (ResNet-50)
Rank-1: 94.6
Rank-5: 96.9
vehicle-re-identification-on-vehicleid-mediumRecall@k Surrogate loss (ViT-B/16)
Rank-1: 95.2
Rank-5: 97.2
vehicle-re-identification-on-vehicleid-smallRecall@k Surrogate loss (ResNet-50)
Rank-1: 95.7
Rank-5: 97.9
vehicle-re-identification-on-vehicleid-smallRecall@k Surrogate loss (ViT-B/16)
Rank-1: 96.2
Rank-5: 98.0

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