Cross-Batch Memory for Embedding Learning

12/14/2019
by   Xun Wang, et al.
11

Mining informative negative instances are of central importance to deep metric learning (DML). However, the hard-mining ability of existing DML methods is intrinsically limited by mini-batch training, where only a mini-batch of instances are accessible at each iteration. In this paper, we identify a "slow drift" phenomena by observing that the embedding features drift exceptionally slow even as the model parameters are updating throughout the training process. It suggests that the features of instances computed at preceding iterations can considerably approximate to their features extracted by current model. We propose a cross-batch memory (XBM) mechanism that memorizes the embeddings of past iterations, allowing the model to collect sufficient hard negative pairs across multiple mini-batches - even over the whole dataset. Our XBM can be directly integrated into general pair-based DML framework. We demonstrate that, without bells and whistles, XBM augmented DML can boost the performance considerably on image retrieval. In particular, with XBM, a simple contrastive loss can have large R@1 improvements of 12%-22.5% on three large-scale datasets, easily surpassing the most sophisticated state-of-the-art methods by a large margin. Our XBM is conceptually simple, easy to implement - using several lines of codes, and is memory efficient - with a negligible 0.2 GB extra GPU memory.

READ FULL TEXT

page 6

page 8

page 15

page 16

page 17

page 18

research
06/06/2023

BatchSampler: Sampling Mini-Batches for Contrastive Learning in Vision, Language, and Graphs

In-Batch contrastive learning is a state-of-the-art self-supervised meth...
research
03/30/2023

Adaptive Cross Batch Normalization for Metric Learning

Metric learning is a fundamental problem in computer vision whereby a mo...
research
10/28/2021

Cross-Batch Negative Sampling for Training Two-Tower Recommenders

The two-tower architecture has been widely applied for learning item and...
research
03/25/2021

Rethinking Deep Contrastive Learning with Embedding Memory

Pair-wise loss functions have been extensively studied and shown to cont...
research
07/10/2022

NGAME: Negative Mining-aware Mini-batching for Extreme Classification

Extreme Classification (XC) seeks to tag data points with the most relev...
research
02/28/2023

Global Proxy-based Hard Mining for Visual Place Recognition

Learning deep representations for visual place recognition is commonly p...
research
02/08/2021

Improving memory banks for unsupervised learning with large mini-batch, consistency and hard negative mining

An important component of unsupervised learning by instance-based discri...

Please sign up or login with your details

Forgot password? Click here to reset