Hard negative mining, also referred to as hard negative sampling, is a family of techniques in machine learning for selecting or constructing negative samples more difficult to distinguish from a corresponding positive example with respect to uniformly-sampled negatives, leading to a more informative training signal for discriminative classifiers and similarity models.[1]

The technique is used when the pool of possible negative examples is far larger than the set of positives and most randomly chosen negatives are easy to classify by the model, contributing little to learning.[2][3] Concentrating training on the small fraction of difficult negatives is intended to provide stronger gradient signal and faster convergence than uniform sampling.[1][4]
Hard negative mining originated in object detection in the 1990s, where it was referred to as bootstrapping (not to be confused with statistical bootstrap resampling), and was later formalized for support vector machine models.[5][2][6] Closely related ideas appear in deep metric learning, information retrieval, recommender systems, self-supervised contrastive learning, and vision-language models. Surveys distinguish hard negative mining from the broader practice of negative sampling, in which negatives are drawn at random or in proportion to frequency rather than by difficulty.[1][7]
Background
editIn many learning problems the number of negative examples vastly exceeds the number of positives. In sliding-window object detection, a single image yields on the order of 105 candidate windows, almost all of which are background.[2][6][8] Online hard example mining work reports that the imbalance can reach roughly 100,000 background regions per object for sliding-window detectors and remain about 70:1 even for proposal-based detectors.[9] Using all negative examples is both computationally infeasible and statistically harmful, because the large number of easy negatives dominates the loss and gradient.[6][10]
A parallel motivation arises in similarity learning. When training examples are grouped into pairs or triplets, the number of candidate tuples grows quadratically or cubically with the number of images, and once a model has converged most such tuples already satisfy the training objective and produce little or no gradient.[4][11][12] In high-dimensional embedding spaces, randomly drawn negatives also tend to be uninformative because a significant percentage of them might already be distant from positive samples in the latent space.[13] Selecting the most informative ("hard") examples is therefore presented as a way to keep the training signal steadier and informative throughout the whole training process.[5][14][15]
Definition and terminology
editAcross application areas, a hard negative is consistently defined relative to the model being trained: it is a negative (an example whose label differs from that of the anchor or query), that the current model nonetheless classifies as a positive.[16][1] For instance, in a margin-based detector, like a SVM a hard negative is a background example that is misclassified or that falls within the classifier's margin.[2] In embedding-based methods, it is a differently-labelled example that lies close to the anchor in the learned feature space.[17][18]
Several finer distinctions are commonly utilized:
- Hard, semi-hard and easy negatives. In triplet loss training, a hard negative is the differently-labelled example closest to the anchor; an easy negative is the most distant one (and gives little useful gradient); and a semi-hard negative is one that is farther from the anchor than the matching positive yet still inside the loss margin.[3][18][15] The term semi-hard was introduced in the FaceNet system.[3]
- Hardness relative to model capacity. Whether an example counts as hard depends on the model complexity: a high-complexity model treats most examples as easy, while a low-complexity model treats most as hard.[12]
- Hard negative mining versus hard example mining. Some authors generalize the term preferring hard example mining to extend this techniques to also focus on positive samples that the model finds harder to classify correctly.[9]
Techniques
editObject detection
editIn classical detectors, hard negative mining is an iterative, cache-based procedure layered on top of an SVM or other classifier: the model is trained on the positives and a small set of negatives, the trained model is run over background data to collect new false positives, easy examples are discarded, and the model is retrained, repeating a few times.[2][19][14] A negative is treated as hard when its margin score indicates misclassification or a within-margin position.[2]
Online hard example mining (OHEM) adapts this idea to the training of deep region-based detectors. Rather than alternating offline mining and retraining, OHEM forms each SGD mini-batch by scoring all candidate regions of interest with a read-only forward pass, and then back-propagating only through the highest-loss regions.[9][8] An efficient implementation keeps two copies of the region network: one read-only copy that scores all regions and one trainable copy that processes only the selected hard examples.[9] Hard negative mining has likewise been applied to convolutional face detectors by harvesting false positives from a first-round Faster R-CNN face detector and retraining on them, labelling a detected region a hard negative when its maximum intersection-over-union with any ground-truth face falls below a certain treshold.[20]
Deep metric learning
edit
In deep metric learning, models are trained with pairwise or triplet losses so that examples of the same class map to nearby points and examples of different classes map to distant points. Because most randomly sampled triplets quickly satisfy the loss margin and stop contributing gradient, the selection of hard pairs or triplets is widely regarded as essential.[11][4] The triplet loss, in fact, penalizes triplets in which the anchor–positive distance is not smaller than the anchor–negative distance by at least a margin .[3][21]
The FaceNet system introduced semi-hard negative mining, in which the chosen negative is farther from the anchor than the matching positive yet still falls within the margin, after finding that always selecting the hardest negatives could drive the embedding toward a collapsed (degenerate) solution; FaceNet also computed hard positives and negatives online from within each training batch rather than searching the whole dataset.[3]
An early example of in-batch top-K selection appears in unsupervised video representation learning, where the negatives incurring the highest triplet loss within a mini-batch are selected.[22] A widely cited variant is batch-hard mining, where a batch is built by sampling a fixed number of classes and a fixed number of examples per class, and for each anchor only the hardest positive and hardest negative within that batch are used; because these are the hardest within a small random subset rather than the whole dataset, the authors argued they act as "moderate" triplets and avoid the cost and instability of offline mining.[21]
Several methods reduce the cost of mining or change what is mined:
- The multi-class N-pair loss: a single update contrasts the anchor with many negative classes at once; for datasets with very many classes its author additionally proposed a greedy hard negative class mining scheme that selects whole negative classes rather than individual samples.[23]
- Lifted structured embedding mines hard negatives relative to both endpoints of a positive pair and, observing that selecting only the single hardest negative can drive the network to a poor local optimum, optimizes a smoothed log-sum-exp objective aggregating all negatives within the margin.[24]
- Smart mining frames hard negative mining as an approximate nearest neighbour search over the embeddings, building a neighbour graph once per epoch and selecting negatives outside a per-anchor exclusion radius.[4]
- Hard-aware deeply cascaded embedding (HDC) selects hard examples by ranking per-sample losses within each mini-batch and routes samples of different difficulty to cascaded sub-networks of increasing complexity, motivated by the observation that hardness is relative to model capacity.[12]
- Stochastic class-based mining reduces the cost of searching for hard negatives by first identifying a small set of neighbouring classes and searching for hard instances only within them, while stochastically varying the candidate pool across iterations.[17]
Information retrieval and recommendation
editIn recommender systems and neural information retrieval, training pairs each observed (relevant) item against non-observed items as implicit negatives. Bayesian Personalized Ranking constructs training triples in which an observed item is treated as a positive and a non-observed item as an implicit negative, and trains a pairwise objective by drawing such triples uniformly at random; it does not use hard or dynamic negative selection, and reviews describe it as the uniform-sampling baseline that later hard-negative methods improved upon.[25][1] In neural dense retrieval, a dual encoder is trained so that relevant query-document pairs have higher similarity than irrelevant ones, and the choice of negatives is decisive.[26]
Several strategies are in common use:
- In-batch negatives plus a lexical hard negative. Dense passage retrieval (DPR) trains using the other questions' passages in the same mini-batch as negatives, together with a single hard negative selected by BM25, a passage that scores highly for the question lexically but does not contain the answer.[27]
- Global, dynamically refreshed hard negatives. Approximate Nearest Neighbor Negative Contrastive Estimation (ANCE) mines hard negatives from the whole corpus using an approximate nearest neighbour index over the model's own embeddings that is rebuilt periodically from a recent checkpoint, so the mined negatives stay aligned with the evolving model.[28]
- Denoised hard negatives. RocketQA noted that treating top-ranked passages as negatives can introduce relevant but unlabelled passages as "false negatives," and used a stronger cross-encoder to score mined candidates, keeping only those confidently predicted to be negatives.[29]
- Static versus dynamic hard negatives. Zhan and colleagues drew an explicit distinction between static hard negatives, pre-retrieved once and held fixed during training, and dynamic hard negatives, recomputed from the current model, and analyzed the two as optimizing different objectives, arguing that hard negative sampling emphasizes top-ranking performance.[30]
Contrastive self-supervised learning
editContrastive self-supervised learning methods learn representations by pulling together different views of the same instance (positives) and pushing apart unrelated ones (negatives).[31] The widely used InfoNCE objective, introduced in contrastive predictive coding, scores one positive against negatives drawn from a proposal distribution:
In its original form, contrastive predictive coding draws its negatives at random and recommends using more negatives because the objective bounds a mutual information quantity that tightens as grows.[32] Several influential methods similarly increase the supply of negatives rather than their difficulty: SimCLR treats all other augmented examples in a large training batch as negatives and argues that its temperature-scaled cross-entropy loss implicitly weights negatives by hardness, whereas margin- and triplet-style losses require explicit semi-hard mining to remain competitive;[33] and Momentum Contrast (MoCo) maintains negatives in a queue decoupled from the batch size, encoded by a slowly updated momentum encoder to keep them consistent.[34]
Explicit hard-negative methods have nonetheless been adapted to the unsupervised setting.
- Importance weighting. A tunable sampling distribution that up-weights negatives the current embedding maps close to the anchor while approximately discarding likely false negatives, implemented as a reweighting of the contrastive loss; a hardness parameter interpolates between uniform sampling and an adversarial worst-case distribution.[16]
- Synthetic embeddings. Rather than selecting difficult examples, MoCHi synthesizes them in the embedding space, forming new negatives as normalized convex combinations of the hardest existing negatives and mixing the query with hard negatives to obtain still-harder examples, after observing that most stored memory negatives contribute little to the loss as training progresses.[35]
- Adversarial perturbations. The CLAE method applies adversarial perturbations computed jointly across the batch, which its authors characterize as performing hard negative mining without labels.[36]
Vision-language models
edit
In CLIP-style vision-language models, hard negatives are used to address the "bag of words" behavior of such models, ignoring word order and object-attribute binding.[37] Methods in this area differ in whether they select, construct, or reweight negatives:
- Constructing hard negative captions. NegCLIP generates negative captions by swapping nouns, adjectives and verb phrases within a correct caption, and adds nearest-neighbor images to each contrastive batch, reporting improved sensitivity to word order and binding.[37] TripletCLIP uses instead generative AI models, generating a fluent hard negative caption with a large language model and a matching image with a text-to-image diffusion model, and training with a triplet contrastive objective.[38]
- Reweighting in-batch negatives. DiHT use a hard-negative-weighted contrastive loss for image-text pretraining that up-weights each in-batch, uniformly-sampled negative in proportion to its similarity to the anchor, extending the importance-weighting approach to cross-modal alignment.[39]
- Pair-level selection. HELIP proposes an algorithm to mine image-text hard negative pairs and adds a margin loss function that keeps mined hard negatives closer to the positive than ordinary negatives.[40]
Theoretical aspects
editFor SVM detectors, hard negative mining has a convergence guarantee. An algorithm which alternately mines margin-violating examples into a cache and discards easy ones converges to the model that training on the entire dataset would produce.[2] A complementary line of analysis treats the choice of negatives as an importance sampling problem in which the optimal negative-sampling distribution is proportional to the per-example gradient norm, so that harder (higher-loss) negatives should be sampled more often; this motivates mining the model's current top-ranked negatives.[28]
At the same time, analyses of deep embedding training caution that the hardest negatives can be counterproductive. As the anchor-negative distance shrinks, the gradient direction becomes dominated by noise, yielding high-variance updates that can collapse the embedding.[13] A 2023 theoretical study modelled hard-negative sampling as tilting the negative distribution toward more anchor-aligned negatives and proved that such hardening never decreases the contrastive loss while leaving the globally optimal representation geometry unchanged in the supervised case, while, in some settings harming the unsupervised case.[41]
Limitations and challenges
editEmbedding collapse from over-hard negatives
editSeveral authors report that mining only the single hardest negative destabilizes embedding training. FaceNet found that always selecting the hardest negatives could drive the embedding to a collapsed solution, and adopted semi-hard mining instead.[3] Lifted structured embedding similarly observed that selecting only the hardest negative converges to a poor local optimum, motivating a smoothed objective over all in-margin negatives.[24] Distance-weighted sampling diagnoses the mechanism as noise-dominated, high-variance gradients,[13] and an empirical comparison in hierarchical-triplet-loss work found naive hardest-negative mining giving little improvement over random sampling, with a semi-hard variant performing better, partly because mining within a mini-batch cannot capture the global data distribution.[11]
False negatives
edit
When labels are unavailable or incomplete, the hardest negatives are also the most likely to be false negatives: examples that are mined as negatives but actually share the anchor's class or relevance.[42][16] The problem has been documented in unsupervised contrastive learning, where it is called sampling bias (not to be confused with sampling bias in statistics),[42] and in dense retrieval, where one study estimated that a large fraction of top-retrieved but unlabelled passages were in fact relevant, so that mining them as negatives without denoising degraded retrieval quality.[29] Proposed remedies include debiasing corrections,[42] cross-encoder denoising,[29] uncertainty- and diversity-aware selection,[43] and, in multi-modal settings, using a third modality to filter likely false negatives before reweighting.[44]
See also
editReferences
edit- 1 2 3 4 5 6 Yang, Zhen; Ding, Ming; Huang, Tinglin; Cen, Yukuo; Song, Junshuai; Xu, Bin; Dong, Yuxiao; Tang, Jie (August 2024). "Does Negative Sampling Matter? a Review With Insights Into its Theory and Applications". IEEE Transactions on Pattern Analysis and Machine Intelligence. 46 (8): 5692–5711. Bibcode:2024ITPAM..46.5692Y. doi:10.1109/TPAMI.2024.3371473. ISSN 1939-3539. PMID 38421844.
- 1 2 3 4 5 6 7 Felzenszwalb, Pedro F.; Girshick, Ross B.; McAllester, David; Ramanan, Deva (2010). "Object Detection with Discriminatively Trained Part Based Models". IEEE Transactions on Pattern Analysis and Machine Intelligence. 32 (9). IEEE: 1627–1645. Bibcode:2010ITPAM..32.1627F. doi:10.1109/TPAMI.2009.167. PMID 20634557.
- 1 2 3 4 5 6 Schroff, Florian; Kalenichenko, Dmitry; Philbin, James (2015). FaceNet: A Unified Embedding for Face Recognition and Clustering. 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). IEEE. pp. 815–823. arXiv:1503.03832. doi:10.1109/CVPR.2015.7298682.
- 1 2 3 4 Harwood, Ben; Kumar B G, Vijay; Carneiro, Gustavo; Reid, Ian; Drummond, Tom (2017). Smart Mining for Deep Metric Learning. 2017 IEEE International Conference on Computer Vision (ICCV). pp. 2821–2829. doi:10.1109/ICCV.2017.307.
- 1 2 Sung, K.-K.; Poggio, T. (January 1998). "Example-based learning for view-based human face detection". IEEE Transactions on Pattern Analysis and Machine Intelligence. 20 (1): 39–51. Bibcode:1998ITPAM..20...39S. doi:10.1109/34.655648. hdl:1721.1/7193. ISSN 1939-3539.
- 1 2 3 Zou, Zhengxia; Chen, Keyan; Shi, Zhenwei; Guo, Yuhong; Ye, Jieping (2023). "Object Detection in 20 Years: A Survey". Proceedings of the IEEE. 111 (3): 257–276. arXiv:1905.05055. doi:10.1109/JPROC.2023.3238524.
- ↑ Desai, Shasvat; Ghose, Debasmita; Chakraborty, Deep (2025). "A Survey on Data Curation for Visual Contrastive Learning: Why Crafting Effective Positive and Negative Pairs Matters". arXiv:2502.08134 [cs.CV].
- 1 2 Oksuz, Kemal; Cam, Baris Can; Kalkan, Sinan; Akbas, Emre (2021). "Imbalance Problems in Object Detection: A Review". IEEE Transactions on Pattern Analysis and Machine Intelligence. 43 (10): 3388–3415. arXiv:1909.00169. Bibcode:2021ITPAM..43.3388O. doi:10.1109/TPAMI.2020.2981890. PMID 32191882.
- 1 2 3 4 Shrivastava, Abhinav; Gupta, Abhinav; Girshick, Ross (2016). Training Region-based Object Detectors with Online Hard Example Mining. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). pp. 761–769. doi:10.1109/CVPR.2016.89.
- ↑ Lin, Tsung-Yi; Goyal, Priya; Girshick, Ross; He, Kaiming; Dollár, Piotr (2017). Focal Loss for Dense Object Detection. 2017 IEEE International Conference on Computer Vision (ICCV). IEEE. pp. 2980–2988. arXiv:1708.02002. doi:10.1109/ICCV.2017.324.
- 1 2 3 Ge, Weifeng; Huang, Weilin; Dong, Dengke; Scott, Matthew R. (2018). Deep Metric Learning with Hierarchical Triplet Loss. European Conference on Computer Vision (ECCV) 2018. Lecture Notes in Computer Science. Vol. 11210. pp. 272–288. doi:10.1007/978-3-030-01231-1_17.
- 1 2 3 Yuan, Yuhui; Yang, Kuiyuan; Zhang, Chao (2017). Hard-Aware Deeply Cascaded Embedding. 2017 IEEE International Conference on Computer Vision (ICCV). IEEE. pp. 814–823. arXiv:1611.05720. doi:10.1109/ICCV.2017.94.
- 1 2 3 Wu, Chao-Yuan; Manmatha, R.; Smola, Alexander J.; Krähenbühl, Philipp (2017). Sampling Matters in Deep Embedding Learning. 2017 IEEE International Conference on Computer Vision (ICCV). IEEE. arXiv:1706.07567. doi:10.1109/ICCV.2017.309.
- 1 2 Kaya, Mahmut; Bilge, Hasan Şakir (2019). "Deep Metric Learning: A Survey". Symmetry. 11 (9). MDPI: 1066. Bibcode:2019Symm...11.1066K. doi:10.3390/sym11091066.
- 1 2 Musgrave, Kevin; Belongie, Serge; Lim, Ser-Nam (2020). "A Metric Learning Reality Check". Computer Vision – ECCV 2020. Lecture Notes in Computer Science. Vol. 12370. Springer. pp. 681–699. arXiv:2003.08505. doi:10.1007/978-3-030-58595-2_41.
- 1 2 3 Robinson, Joshua; Chuang, Ching-Yao; Sra, Suvrit; Jegelka, Stefanie (2020). Contrastive Learning with Hard Negative Samples. International Conference on Learning Representations (ICLR). arXiv:2010.04592.
- 1 2 Suh, Yumin; Han, Bohyung; Kim, Wonsik; Lee, Kyoung Mu (June 2019). "Stochastic Class-Based Hard Example Mining for Deep Metric Learning". 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). pp. 7244–7252. Bibcode:2019cvpr.conf..742S. doi:10.1109/CVPR.2019.00742. ISBN 978-1-7281-3293-8.
- 1 2 Xuan, Hong; Stylianou, Abby; Pless, Robert (March 2020). "Improved Embeddings with Easy Positive Triplet Mining". 2020 IEEE Winter Conference on Applications of Computer Vision (WACV). pp. 2463–2471. Bibcode:2020wacv.conf..260X. doi:10.1109/WACV45572.2020.9093432. ISBN 978-1-7281-6553-0.
- ↑ Girshick, Ross; Donahue, Jeff; Darrell, Trevor; Malik, Jitendra (June 2014). "Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation". 2014 IEEE Conference on Computer Vision and Pattern Recognition. pp. 580–587. Bibcode:2014cvpr.conf...82G. doi:10.1109/CVPR.2014.81. ISBN 978-1-4799-5118-5.
- ↑ Wan, Shaohua; Chen, Zhijun; Zhang, Tao; Zhang, Bo; Wong, Kong-kat (2016). "Bootstrapping Face Detection with Hard Negative Examples". arXiv:1608.02236 [cs.CV].
- 1 2 Hermans, Alexander; Beyer, Lucas; Leibe, Bastian (21 November 2017), In Defense of the Triplet Loss for Person Re-Identification, arXiv:1703.07737
- ↑ Wang, Xiaolong; Gupta, Abhinav (December 2015). "Unsupervised Learning of Visual Representations Using Videos". 2015 IEEE International Conference on Computer Vision (ICCV). pp. 2794–2802. Bibcode:2015iccv.conf..321W. doi:10.1109/ICCV.2015.320. ISBN 978-1-4673-8391-2.
- ↑ Sohn, Kihyuk (2016). "Improved Deep Metric Learning with Multi-class N-pair Loss Objective". Advances in Neural Information Processing Systems. Vol. 29. Barcelona, Spain: Curran Associates, Inc. pp. 1857–1865.
- 1 2 Song, Hyun Oh; Xiang, Yu; Jegelka, Stefanie; Savarese, Silvio (June 2016). "Deep Metric Learning via Lifted Structured Feature Embedding". 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). pp. 4004–4012. arXiv:1511.06452. Bibcode:2016cvpr.conf..434S. doi:10.1109/CVPR.2016.434. ISBN 978-1-4673-8851-1.
- ↑ Rendle, Steffen; Freudenthaler, Christoph; Gantner, Zeno; Schmidt-Thieme, Lars (2009). "BPR: Bayesian Personalized Ranking from Implicit Feedback". Proceedings of the Twenty-Fifth Conference on Uncertainty in Artificial Intelligence (UAI 2009). AUAI Press. pp. 452–461. arXiv:1205.2618.
- ↑ Zhao, Wayne Xin; Liu, Jing; Ren, Ruiyang; Wen, Ji-Rong (2024). "Dense Text Retrieval Based on Pretrained Language Models: A Survey". ACM Transactions on Information Systems. 42 (4): 1–60. arXiv:2211.14876. doi:10.1145/3637870.
- ↑ Karpukhin, Vladimir; Oğuz, Barlas; Min, Sewon; Lewis, Patrick; Wu, Ledell; Edunov, Sergey; Chen, Danqi; Yih, Wen-tau (2020). "Dense Passage Retrieval for Open-Domain Question Answering". Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP). Association for Computational Linguistics. pp. 6769–6781. arXiv:2004.04906. doi:10.18653/v1/2020.emnlp-main.550.
- 1 2 Xiong, Lee; Xiong, Chenyan; Li, Ye; Tang, Kwok-Fung; Liu, Jialin; Bennett, Paul; Ahmed, Junaid; Overwijk, Arnold (2021). Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval. International Conference on Learning Representations (ICLR). arXiv:2007.00808.
- 1 2 3 Qu, Yingqi; Ding, Yuchen; Liu, Jing; Liu, Kai; Ren, Ruiyang; Zhao, Wayne Xin; Dong, Daxiang; Wu, Hua; Wang, Haifeng (2021). "RocketQA: An Optimized Training Approach to Dense Passage Retrieval for Open-Domain Question Answering". Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Association for Computational Linguistics. pp. 5835–5847. arXiv:2010.08191. doi:10.18653/v1/2021.naacl-main.466.
- ↑ Zhan, Jingtao; Mao, Jiaxin; Liu, Yiqun; Guo, Jiafeng; Zhang, Min; Ma, Shaoping (2021). Optimizing Dense Retrieval Model Training with Hard Negatives. Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR '21). Association for Computing Machinery. arXiv:2104.08051.
- ↑ Le-Khac, Phuc H.; Healy, Graham; Smeaton, Alan F. (2020). "Contrastive Representation Learning: A Framework and Review". IEEE Access. 8: 193907–193934. arXiv:2010.05113. Bibcode:2020IEEEA...8s3907L. doi:10.1109/ACCESS.2020.3031549.
- ↑ van den Oord, Aaron; Li, Yazhe; Vinyals, Oriol (2018). "Representation Learning with Contrastive Predictive Coding". arXiv:1807.03748 [cs.LG].
- ↑ Chen, Ting; Kornblith, Simon; Norouzi, Mohammad; Hinton, Geoffrey (2020). A Simple Framework for Contrastive Learning of Visual Representations. Proceedings of the 37th International Conference on Machine Learning (ICML). Vol. 119. PMLR. pp. 1597–1607. arXiv:2002.05709.
- ↑ He, Kaiming; Fan, Haoqi; Wu, Yuxin; Xie, Saining; Girshick, Ross (2020). Momentum Contrast for Unsupervised Visual Representation Learning. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). IEEE. pp. 9726–9735. arXiv:1911.05722. doi:10.1109/CVPR42600.2020.00975.
- ↑ Kalantidis, Yannis; Sariyildiz, Mert Bulent; Pion, Noe; Weinzaepfel, Philippe; Larlus, Diane (2020). "Hard Negative Mixing for Contrastive Learning". Advances in Neural Information Processing Systems 33 (NeurIPS 2020). Curran Associates, Inc. arXiv:2010.01028.
- ↑ Ho, Chih-Hui; Vasconcelos, Nuno (2020). "Contrastive Learning with Adversarial Examples". Advances in Neural Information Processing Systems 33 (NeurIPS 2020). arXiv:2010.12050.
- 1 2 3 Yuksekgonul, Mert; Bianchi, Federico; Kalluri, Pratyusha; Jurafsky, Dan; Zou, James (2023). When and Why Vision-Language Models Behave like Bags-of-Words, and What to Do About It?. International Conference on Learning Representations (ICLR). arXiv:2210.01936.
- ↑ Patel, Maitreya; Kusumba, Abhiram; Cheng, Sheng; Kim, Changhoon; Gokhale, Tejas; Baral, Chitta; Yang, Yezhou (2024). TripletCLIP: Improving Compositional Reasoning of CLIP via Synthetic Vision-Language Negatives. Advances in Neural Information Processing Systems 37 (NeurIPS 2024). arXiv:2411.02545.
- ↑ Radenovic, Filip; Dubey, Abhimanyu; Kadian, Abhishek; Mihaylov, Todor; Vandenhende, Simon; Patel, Yash; Wen, Yi; Ramanathan, Vignesh; Mahajan, Dhruv (2023). Filtering, Distillation, and Hard Negatives for Vision-Language Pre-Training. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). pp. 6967–6977. arXiv:2301.02280.
- ↑ Wang, Haonan; Huang, Minbin; Huang, Runhui; Hong, Lanqing; Xu, Hang; Hu, Tianyang; Liang, Xiaodan; Li, Zhenguo; Cheng, Hong; Kawaguchi, Kenji (April 2025). "Getting More Juice Out of Your Data: Hard Pair Refinement Enhances Visual-Language Models Without Extra Data". In Chiruzzo, Luis; Ritter, Alan; Wang, Lu (eds.). Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers). Albuquerque, New Mexico: Association for Computational Linguistics. pp. 7854–7873. doi:10.18653/v1/2025.naacl-long.399. ISBN 979-8-89176-189-6.
- ↑ Jiang, Ruijie; Nguyen, Thuan; Aeron, Shuchin; Ishwar, Prakash (2025). "Hard-Negative Sampling for Contrastive Learning: Optimal Representation Geometry and Neural- vs Dimensional-Collapse". arXiv:2311.05139 [cs.LG].
- 1 2 3 Chuang, Ching-Yao; Robinson, Joshua; Lin, Yen-Chen; Torralba, Antonio; Jegelka, Stefanie (2020). "Debiased Contrastive Learning". Advances in Neural Information Processing Systems 33 (NeurIPS 2020). arXiv:2007.00224.
- ↑ Tabassum, Afrina; Wahed, Muntasir; Eldardiry, Hoda; Lourentzou, Ismini (2022). "Hard Negative Sampling Strategies for Contrastive Representation Learning". arXiv:2206.01197 [cs.LG].
- ↑ Li, Guangping; Gao, Yanan; Huang, Xianhui; Ling, Bingo Wing-Kuen (2025). "A Hard Negatives Mining and Enhancing Method for Multi-Modal Contrastive Learning". Electronics. 14 (4). MDPI: 767. doi:10.3390/electronics14040767.
External links
edit- PyTorch Metric Learning documentation - open-source library providing configurable "miners" for hard and semi-hard negative selection in pair- and triplet-based training.
- Sentence Transformers: hard negatives mining utility - documentation and code for the
mine_hard_negatives()function used to build hard-negative training sets for dense retrieval and semantic similarity models. - Contrastive Representation Learning - expository overview by Lilian Weng covering contrastive objectives and the role of hard negative sampling.
- TripletCLIP project page – illustrated overview of using synthetic hard negative captions and images to improve the compositional reasoning of CLIP-style vision-language models.