Cross-Batch Memory for Embedding Learning
Xun Wang, Haozhi Zhang, Weilin Huang, Matthew R. Scott
Abstract
Mining informative negative instances are of central importance to deep metric learning (DML), however this task is intrinsically limited by mini-batch training, where only a mini-batch of instances is 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. This suggests that the features of instances computed at preceding iterations can be used to considerably approximate their features extracted by the 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 a general pairbased DML framework, where the XBM augmented DML can boost performance considerably. In particular, without bells and whistles, a simple contrastive loss with our XBM can have large R@1 improvements of 12%-22.5% on three large-scale image retrieval datasets, surpassing the most sophisticated state-of-the-art methods [37, 26, 2] , 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. Code
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
73 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Learning Memory-Augmented Unidirectional Metrics for Cross-modality Person Re-identification cites Momentum Contrast for Unsupervised Visual Representation Learning
- Cross-Image Relational Knowledge Distillation for Semantic Segmentation cites Exploring Cross-Image Pixel Contrast for Semantic Segmentation
- Cross-Image Relational Knowledge Distillation for Semantic Segmentation cites Momentum Contrast for Unsupervised Visual Representation Learning
- Exploring Cross-Image Pixel Contrast for Semantic Segmentation cites Momentum Contrast for Unsupervised Visual Representation Learning
- Regional Semantic Contrast and Aggregation for Weakly Supervised Semantic Segmentation cites Exploring Cross-Image Pixel Contrast for Semantic Segmentation
- Regional Semantic Contrast and Aggregation for Weakly Supervised Semantic Segmentation cites Momentum Contrast for Unsupervised Visual Representation Learning
Cited by top-tier papers73
- Exploring Cross-Image Pixel Contrast for Semantic SegmentationWenguan Wang, Tianfei Zhou, Fisher Yu, Jifeng Dai et al.ICCV 2021 · 568 citations
- Memorizing TransformersYuhuai Wu, Markus Norman Rabe, DeLesley Hutchins, Christian SzegedyICLR 2022 · 231 citations
- Cross-Image Relational Knowledge Distillation for Semantic SegmentationChuanguang Yang, Helong Zhou, Zhulin An, Xue Jiang et al.CVPR 2022 · 228 citations
- Learning Memory-Augmented Unidirectional Metrics for Cross-modality Person Re-identificationJialun Liu, Yifan Sun, Feng Zhu, Hongbin Pei et al.CVPR 2022 · 196 citations
- Regional Semantic Contrast and Aggregation for Weakly Supervised Semantic SegmentationTianfei Zhou, Meijie Zhang, Fang Zhao, Jianwu LiCVPR 2022 · 190 citations
Builds on5
- SoftTriple Loss: Deep Metric Learning Without Triplet SamplingQi Qian, Lei Shang, Baigui Sun, Juhua Hu et al.ICCV 2019 · 419 citations
- Vehicle Re-Identification With Viewpoint-Aware Metric LearningRuihang Chu, Yifan Sun, Yadong Li, Zheng Liu et al.ICCV 2019 · 187 citations
- MIC: Mining Interclass Characteristics for Improved Metric LearningBiagio Brattoli, Karsten Roth, Björn OmmerICCV 2019 · 100 citations
- Memory-Based Neighbourhood Embedding for Visual RecognitionSuichan Li, Dapeng Chen, Bin Liu, Nenghai Yu et al.ICCV 2019 · 41 citations
- Momentum Contrast for Unsupervised Visual Representation LearningKaiming He, Haoqi Fan, Yuxin Wu, Saining Xie et al.CVPR 2020
Related papers
- Deep Relational Metric LearningWenzhao Zheng, Borui Zhang, Jiwen Lu, Jie ZhouICCV 2021 · 53 citations
- LoOp: Looking for Optimal Hard Negative Embeddings for Deep Metric LearningBhavya Vasudeva, Puneesh Deora, Saumik Bhattacharya, Umapada Pal et al.ICCV 2021 · 16 citations
- Noise-Resistant Deep Metric Learning With Ranking-Based Instance SelectionChang Liu, Han Yu, Boyang Li, Zhiqi Shen et al.CVPR 2021
- Recall@k Surrogate Loss with Large Batches and Similarity MixupYash Patel, Giorgos Tolias, Jirí MatasCVPR 2022 · 40 citations
- Cross-Image-Attention for Conditional Embeddings in Deep Metric LearningDmytro Kotovenko, Pingchuan Ma, Timo Milbich, Björn OmmerCVPR 2023
