mlsanityData to 14 Oct 2026

Improving Domain Generalization in Contrastive Learning using Adaptive Temperature Control

arXiv 2601.07748 ↗First posted 12 Jan 2026cs.LG cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

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, encouraging the model to discriminate samples based on domain-invariant attributes. Through experiments on a variant of the MNIST dataset, we demonstrate that our method yields better out-of-distribution performance than domain generalization baselines. Furthermore, our method maintains strong in-distribution task performance, substantially outperforming baselines on this measure.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 18 of its 20 references that are in the map. First posted on arXiv 12 Jan 2026.

Builds on

18 of 20 references.

References · 18

  1. 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 12,049
  2. 2018Representation Learning with Contrastive Predictive Codingcited by 7,777
  3. 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,513
  4. 2015Domain-Adversarial Training of Neural Networkscited by 3,044
  5. 2020Supervised Contrastive Learningcited by 2,829
  6. 2020In Search of Lost Domain Generalizationcited by 1,054
  7. 2021Domain Generalization: A Surveycited by 764
  8. 2020Understanding the Behaviour of Contrastive Losscited by 398
  9. 2023A Cookbook of Self-Supervised Learningcited by 250
  10. 2021A Fine-Grained Analysis on Distribution Shiftcited by 171
  11. 2020Subject-Aware Contrastive Learning for Biosignalscited by 76
  12. 2022Connect, Not Collapse: Explaining Contrastive Learning for Unsupervised Domain Adaptationcited by 67
6 more
  1. 2023Temperature Schedules for Self-Supervised Contrastive Methods on Long-Tail Datacited by 44
  2. 2021Towards Unsupervised Domain Generalizationcited by 40
  3. 2021Unsupervised Domain Generalization by Learning a Bridge Across Domainscited by 33
  4. 2023Not All Semantics are Created Equal: Contrastive Self-supervised Learning with Automatic Temperature Individualizationcited by 25
  5. 2022Localized Adversarial Domain Generalizationcited by 19
  6. 2022Model-Aware Contrastive Learning: Towards Escaping the Dilemmascited by 11

Built on by

Not cited yet.