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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 900239f8-4cd1-4a3c-8608-500e9b9afd5cCited 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
- 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
- Deep Relational Metric LearningWenzhao Zheng, Borui Zhang, Jiwen Lu, Jie ZhouICCV 2021 · 53 citations
- 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
