Improving Domain Generalization in Contrastive Learning using Adaptive Temperature Control
Robert Lewis, Katie Matton, Rosalind W. Picard, John Guttag

TL;DR
This paper introduces an adaptive temperature control method in contrastive learning that leverages domain labels to enhance domain invariance and improve out-of-distribution generalization, especially under significant covariate shifts.
Contribution
The paper proposes a novel contrastive learning approach that dynamically adjusts the temperature parameter based on domain similarity, improving domain generalization in unseen environments.
Findings
Outperforms baseline methods on out-of-distribution tests.
Maintains strong in-distribution task performance.
Effective in a multi-domain MNIST variant.
Abstract
Self-supervised pre-training with contrastive learning is a powerful method for learning from sparsely labeled data. However, performance can drop considerably when there is a shift in the distribution of data from training to test time. We study this phenomenon in a setting in which the training data come from multiple domains, and the test data come from a domain not seen at training that is subject to significant covariate shift. We present a new method for contrastive learning that incorporates domain labels to increase the domain invariance of learned representations, leading to improved out-of-distribution generalization. Our method adjusts the temperature parameter in the InfoNCE loss -- which controls the relative weighting of negative pairs -- using the probability that a negative sample comes from the same domain as the anchor. This upweights pairs from more similar domains,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsDomain Adaptation and Few-Shot Learning · Face recognition and analysis · Topic Modeling
