Robust Contrastive Learning Using Negative Samples with Diminished Semantics

Songwei Ge, Shlok Mishra, Haohan Wang, Chun-Liang Li, David Jacobs
10/27/2021
cs.CVcs.LG
contrastive-ssl

Official code: songweige/Contrastive-Learning-with-Non-Semantic-Negatives (40 stars, Python, MIT, PyTorch, last commit 2021-12-06).

Abstract

Unsupervised learning has recently made exceptional progress because of the development of more effective contrastive learning methods. However, CNNs are prone to depend on low-level features that humans deem non-semantic.

Show full abstract

This dependency has been conjectured to induce a lack of robustness to image perturbations or domain shift. In this paper, we show that by generating carefully designed negative samples, contrastive learning can learn more robust representations with less dependence on such features. Contrastive learning utilizes positive pairs that preserve semantic information while perturbing superficial features in the training images. Similarly, we propose to generate negative samples in a reversed way, where only the superfluous instead of the semantic features are preserved. We develop two methods, texture-based and patch-based augmentations, to generate negative samples. These samples achieve better generalization, especially under out-of-domain settings. We also analyze our method and the generated texture-based samples, showing that texture features are indispensable in classifying particular ImageNet classes and especially finer classes. We also show that model bias favors texture and shape features differently under different test settings. Our code, trained models, and ImageNet-Texture dataset can be found at https://github.com/SongweiGe/Contrastive-Learning-with-Non-Semantic-Negatives.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

Robust Contrastive Learning Using Negative Samples with Diminished Semantics (NeurIPS 2021)

407PythonOct 15, 20214 years agoMIT
contrastive-learningdeep-learninghard-negative-miningneurips-2021pytorch+1 more

Similar Papers

Cite this paper

@article{ge2021robust,
  title  = {Robust Contrastive Learning Using Negative Samples with Diminished Semantics},
  author = {Songwei Ge and Shlok Mishra and Haohan Wang and Chun-Liang Li and David Jacobs},
  year   = {2021},
  eprint = {2110.14189},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.14189}
}

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/2110.14189.svg)](https://codeofpaper.com/paper/2110.14189)

Discussion