Cross-Batch Memory for Embedding Learning

被引:163
作者
Wang, Xun [1 ]
Zhang, Haozhi [1 ]
Huang, Weilin [1 ]
Scott, Matthew R. [1 ]
机构
[1] Malong Technol, Shenzhen, Peoples R China
来源
2020 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR) | 2020年
关键词
D O I
10.1109/CVPR42600.2020.00642
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
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 pair-based 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 is available at: https://github.com/MalongTech/research-xbm.
引用
收藏
页码:6387 / 6396
页数:10
相关论文
共 48 条
[1]  
[Anonymous], 2006, Dimensionality reduction by learning an invariant mapping
[2]  
[Anonymous], 2015, P INT C LEARN REPR
[3]  
[Anonymous], 2015, CVPR
[4]  
[Anonymous], 2019, CVPR
[5]  
Bai Y, 2017, IEEE INT CON MULTI, P1452, DOI 10.1109/ICME.2017.8019371
[6]   Improving Semantic Embedding Consistency by Metric Learning for Zero-Shot Classiffication [J].
Bucher, Maxime ;
Herbin, Stephane ;
Jurie, Frederic .
COMPUTER VISION - ECCV 2016, PT V, 2016, 9909 :730-746
[7]   Deep Metric Learning to Rank [J].
Cakir, Fatih ;
He, Kun ;
Xia, Xide ;
Kulis, Brian ;
Sclaroff, Stan .
2019 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR 2019), 2019, :1861-1870
[8]   Learning a similarity metric discriminatively, with application to face verification [J].
Chopra, S ;
Hadsell, R ;
LeCun, Y .
2005 IEEE COMPUTER SOCIETY CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION, VOL 1, PROCEEDINGS, 2005, :539-546
[9]   Vehicle Re-identification with Viewpoint-aware Metric Learning [J].
Chu, Ruihang ;
Sun, Yifan ;
Li, Yadong ;
Liu, Zheng ;
Zhang, Chi ;
Wei, Yichen .
2019 IEEE/CVF INTERNATIONAL CONFERENCE ON COMPUTER VISION (ICCV 2019), 2019, :8281-8290
[10]   Deep Metric Learning with Hierarchical Triplet Loss [J].
Ge, Weifeng ;
Huang, Weilin ;
Dong, Dengke ;
Scott, Matthew R. .
COMPUTER VISION - ECCV 2018, PT VI, 2018, 11210 :272-288