Hard Negative Sampling via Regularized Optimal Transport for Contrastive Representation Learning

Ruijie Jiang, Prakash Ishwar, Shuchin Aeron
11/4/2021
10 citations
cs.LGmath.ST
contrastive-ssl

Official code: rjiang03/HCL-OT (11 stars, Python, last commit 2023-04-10).

Abstract

We study the problem of designing hard negative sampling distributions for unsupervised contrastive representation learning. We propose and analyze a novel min-max framework that seeks a representation which minimizes the maximum (worst-case) generalized contrastive learning loss over all couplings (joint distributions between positive and negative samples subject to marginal constraints) and prove that the resulting min-max optimum representation will be degenerate.

Show full abstract

This provides the first theoretical justification for incorporating additional regularization constraints on the couplings. We re-interpret the min-max problem through the lens of Optimal Transport (OT) theory and utilize regularized transport couplings to control the degree of hardness of negative examples. Through experiments we demonstrate that the negative samples generated from our designed negative distribution are more similar to the anchor than those generated from the baseline negative distribution. We also demonstrate that entropic regularization yields negative sampling distributions with parametric form similar to that in a recent state-of-the-art negative sampling design and has similar performance in multiple datasets. Utilizing the uncovered connection with OT, we propose a new ground cost for designing the negative distribution and show improved performance of the learned representation on downstream tasks compared to the representation learned when using squared Euclidean cost.

View on arXivView PDF

Code Implementations(1)

rjiang03/HCL-OTOfficial100%
110PythonNov 4, 20213 years ago

Similar Papers

Cite this paper

@article{jiang2021hard,
  title  = {Hard Negative Sampling via Regularized Optimal Transport for Contrastive Representation Learning},
  author = {Ruijie Jiang and Prakash Ishwar and Shuchin Aeron},
  year   = {2021},
  eprint = {2111.03169},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2111.03169}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2111.03169.svg)](https://codeofpaper.com/paper/2111.03169)

Discussion