Tail Batch Sampling: Approximating Global Contrastive Losses as Optimization over Batch Assignments

10/23/2022
by   Vin Sachidananda, et al.
0

Contrastive Learning has recently achieved state-of-the-art performance in a wide range of tasks. Many contrastive learning approaches use mined hard negatives to make batches more informative during training but these approaches are inefficient as they increase epoch length proportional to the number of mined negatives and require frequent updates of nearest neighbor indices or mining from recent batches. In this work, we provide an alternative to hard negative mining in supervised contrastive learning, Tail Batch Sampling (TBS), an efficient approximation to the batch assignment problem that upper bounds the gap between the global and training losses, ℒ^Global - ℒ^Train. TBS improves state-of-the-art performance in sentence embedding (+0.37 Spearman) and code-search tasks (+2.2% MRR), is easy to implement - requiring only a few additional lines of code, does not maintain external data structures such as nearest neighbor indices, is more computationally efficient when compared to the most minimal hard negative mining approaches, and makes no changes to the model being trained.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/13/2023

Nearest-Neighbor Inter-Intra Contrastive Learning from Unlabeled Videos

Contrastive learning has recently narrowed the gap between self-supervis...
research
02/24/2022

Provable Stochastic Optimization for Global Contrastive Learning: Small Batch Does Not Harm Performance

In this paper, we study contrastive learning from an optimization perspe...
research
10/17/2022

Watch the Neighbors: A Unified K-Nearest Neighbor Contrastive Learning Framework for OOD Intent Discovery

Discovering out-of-domain (OOD) intent is important for developing new s...
research
10/09/2020

Contrastive Learning with Hard Negative Samples

We consider the question: how can you sample good negative examples for ...
research
04/04/2021

Graph Sampling Based Deep Metric Learning for Generalizable Person Re-Identification

Generalizable person re-identification has recently got increasing atten...
research
06/03/2022

Contrastive learning unifies t-SNE and UMAP

Neighbor embedding methods t-SNE and UMAP are the de facto standard for ...
research
03/21/2023

Data-efficient Large Scale Place Recognition with Graded Similarity Supervision

Visual place recognition (VPR) is a fundamental task of computer vision ...

Please sign up or login with your details

Forgot password? Click here to reset