Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Contrastive Learning with Hard Negative Samples

About

How can you sample good negative examples for contrastive learning? We argue that, as with metric learning, contrastive learning of representations benefits from hard negative samples (i.e., points that are difficult to distinguish from an anchor point). The key challenge toward using hard negatives is that contrastive methods must remain unsupervised, making it infeasible to adopt existing negative sampling strategies that use true similarity information. In response, we develop a new family of unsupervised sampling methods for selecting hard negative samples where the user can control the hardness. A limiting case of this sampling results in a representation that tightly clusters each class, and pushes different classes as far apart as possible. The proposed method improves downstream performance across multiple modalities, requires only few additional lines of code to implement, and introduces no computational overhead.

Joshua Robinson, Ching-Yao Chuang, Suvrit Sra, Stefanie Jegelka• 2020

Related benchmarks

TaskDatasetResultRank
Graph ClassificationMUTAG
Accuracy87.2
1229
Graph ClassificationIMDB-B
Accuracy72.8
455
Graph ClassificationIMDB-M
Accuracy49.6
434
Graph ClassificationENZYMES
Accuracy50.4
419
Image ClassificationSTL-10 (test)
Accuracy87.42
380
RecommendationGowalla
Recall@200.1754
153
Image ClassificationSTL10
Accuracy67.82
108
Graph ClassificationPTC
Accuracy57.3
50
Semantic segmentationMed JASCL-Disjoint Session 2: BCV
Dice Score6.8
28
Semantic segmentationMed JASCL-Disjoint Session 0: TS
Dice Score70
28
Showing 10 of 16 rows

Other info

Follow for update