Temperature as Uncertainty in Contrastive Learning
Not on the map. Why?
Abstract (arXiv)
Contrastive learning has demonstrated great capability to learn representations without annotations, even outperforming supervised baselines. However, it still lacks important properties useful for real-world application, one of which is uncertainty. In this paper, we propose a simple way to generate uncertainty scores for many contrastive methods by re-purposing temperature, a mysterious hyperparameter used for scaling. By observing that temperature controls how sensitive the objective is to specific embedding locations, we aim to learn temperature as an input-dependent variable, treating it as a measure of embedding confidence. We call this approach "Temperature as Uncertainty", or TaU. Through experiments, we demonstrate that TaU is useful for out-of-distribution detection, while remaining competitive with benchmarks on linear evaluation. Moreover, we show that TaU can be learned on top of pretrained models, enabling uncertainty scores to be generated post-hoc with popular off-the-shelf models. In summary, TaU is a simple yet versatile method for generating uncertainties for contrastive learning. Open source code can be found at: https://github.com/mhw32/temperature-as-uncertainty-public.
Key facts. Cited by 25 papers in the map (data through 7 Oct 2026). Builds on 40 of its 42 references that are in the map. First posted on arXiv 8 Oct 2021.
Builds on
40 of 42 references.
References · 40
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 11,979
- 2018Representation Learning with Contrastive Predictive Codingcited by 7,662
- 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,482
- 2017On Calibration of Modern Neural Networkscited by 4,860
- 2020Bootstrap your own latent: A new approach to self-supervised Learningcited by 4,712
- 2015Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learningcited by 4,416
- 2020Exploring Simple Siamese Representation Learningcited by 2,853
- 2016A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networkscited by 2,362
- 2020Improved Baselines with Momentum Contrastive Learningcited by 2,282
28 more
- 2018Unsupervised Feature Learning via Non-Parametric Instance-level Discriminationcited by 1,838
- 2021Barlow Twins: Self-Supervised Learning via Redundancy Reductioncited by 1,818
- 2017Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networkscited by 1,325
- 2019Contrastive Multiview Codingcited by 1,297
- 2018Learning deep representations by mutual information estimation and maximizationcited by 1,265
- 2020What Makes for Good Views for Contrastive Learning?cited by 843
- 2020A Review of Uncertainty Quantification in Deep Learning: Techniques, Applications and Challengescited by 813
- 2019Self-Supervised Learning of Pretext-Invariant Representationscited by 806
- 2019Learning Representations by Maximizing Mutual Information Across Viewscited by 733
- 2021A Survey of Uncertainty in Deep Neural Networkscited by 675
- 2019On Variational Bounds of Mutual Informationcited by 550
- 2017Large Batch Training of Convolutional Networkscited by 529
- 2018TADAM: Task dependent adaptive metric for improved few-shot learningcited by 408
- 2020Understanding the Behaviour of Contrastive Losscited by 397
- 2019Local Aggregation for Unsupervised Learning of Visual Embeddingscited by 204
- 2020Bayesian Neural Networks: An Introduction and Surveycited by 130
- 2020Conditional Negative Sampling for Contrastive Learning of Visual Representationscited by 57
- 2020On Mutual Information in Contrastive Learning for Visual Representationscited by 54
- 2018Modeling Uncertainty with Hedged Instance Embeddingcited by 52
- 2020Viewmaker Networks: Learning Views for Unsupervised Representation Learningcited by 48
- 2020Self-supervised Knowledge Distillation for Few-shot Learningcited by 41
- 2020Delving into Inter-Image Invariance for Unsupervised Visual Representationscited by 37
- 2019Detecting Out-of-Distribution Examples with In-distribution Examples and Gram Matricescited by 32
- 2020Temperature check: theory and practice for training models with softmax-cross-entropy lossescited by 31
- 2019Deep Neural Network Ensembles against Deception: Ensemble Diversity, Accuracy and Robustnesscited by 18
- 2018Heated-Up Softmax Embeddingcited by 15
- 2019Deep Neural Network Ensemblescited by 10
- 2020Toward Adversarial Robustness by Diversity in an Ensemble of Specialized Deep Neural Networkscited by 7
Built on by
Citing papers per year: 2022: 5; 2023: 10; 2024: 4; 2025: 4; 2026: 2.
25 papers.
Sort:
By area:
- 2022Federated Learning from Pre-Trained Models: A Contrastive Learning Approachcited by 141
- 2024β-DPO: Direct Preference Optimization with Dynamic βcited by 89
- 2022Dual Temperature Helps Contrastive Learning Without Many Negative Samples: Towards Understanding and Simplifying MoCocited by 52
- 2023Temperature Schedules for Self-Supervised Contrastive Methods on Long-Tail Datacited by 44
- 2023Not All Semantics are Created Equal: Contrastive Self-supervised Learning with Automatic Temperature Individualizationcited by 25
- 2022Model-Aware Contrastive Learning: Towards Escaping the Dilemmascited by 11
- 2024To Cool or not to Cool? Temperature Network Meets Large Foundation Models via DROcited by 11
- 2023A Unified Arbitrary Style Transfer Framework via Adaptive Contrastive Learningcited by 10
- 2023Adaptive Multi-head Contrastive Learningcited by 8
- 2022Uncertainty in Contrastive Learning: On the Predictability of Downstream Performancecited by 7
- 2024Analysis of Using Sigmoid Loss for Contrastive Learningcited by 6
- 2023Dynamically Scaled Temperature in Self-Supervised Contrastive Learningcited by 4
13 more
- 2022Establishing a stronger baseline for lightweight contrastive modelscited by 3
- 2023Learning to Scale Temperature in Masked Self-Attention for Image Inpaintingcited by 3
- 2023Hyp-UML: Hyperbolic Image Retrieval with Uncertainty-aware Metric Learningcited by 3
- 2023Multi-Similarity Contrastive Learningcited by 2
- 2025Difficult Examples Hurt Unsupervised Contrastive Learning: A Theoretical Perspectivecited by 2
- 2026MM-TS: Multi-Modal Temperature and Margin Schedules for Contrastive Learning with Long-Tail Datacited by 1
- 2023Towards Visual Taxonomy Expansioncited by 0
- 2023Uncertainty in Graph Contrastive Learning with Bayesian Neural Networkscited by 0
- 2024Automatic Alignment of Discourse Relations of Different Discourse Annotation Frameworkscited by 0
- 2025Boosting Open Set Recognition Performance through Modulated Representation Learningcited by 0
- 2025Divergence-Based Similarity Function for Multi-View Contrastive Learningcited by 0
- 2025Denoising-While-Completing Network (DWCNet): Robust Point Cloud Completion Under Corruptioncited by 0
- 2026TeMo: Temperature Modulation for Multimodal Contrastive Learningcited by 0
- 2026TeMo: Temperature Modulation for Multimodal Contrastive Learning7 Sep 2026
- 2026MM-TS: Multi-Modal Temperature and Margin Schedules for Contrastive Learning with Long-Tail Data9 Mar 2026
- 2025Denoising-While-Completing Network (DWCNet): Robust Point Cloud Completion Under Corruption22 Jul 2025
- 2025Divergence-Based Similarity Function for Multi-View Contrastive Learning9 Jul 2025
- 2025Boosting Open Set Recognition Performance through Modulated Representation Learning23 May 2025
- 2025Difficult Examples Hurt Unsupervised Contrastive Learning: A Theoretical Perspective2 Jan 2025
- 2024β-DPO: Direct Preference Optimization with Dynamic β11 Jul 2024
- 2024To Cool or not to Cool? Temperature Network Meets Large Foundation Models via DRO6 Apr 2024
- 2024Automatic Alignment of Discourse Relations of Different Discourse Annotation Frameworks29 Mar 2024
- 2024Analysis of Using Sigmoid Loss for Contrastive Learning20 Feb 2024
- 2023Uncertainty in Graph Contrastive Learning with Bayesian Neural Networks30 Nov 2023
- 2023Hyp-UML: Hyperbolic Image Retrieval with Uncertainty-aware Metric Learning12 Oct 2023
13 more
- 2023Adaptive Multi-head Contrastive Learning9 Oct 2023
- 2023Towards Visual Taxonomy Expansion12 Sep 2023
- 2023Dynamically Scaled Temperature in Self-Supervised Contrastive Learning2 Aug 2023
- 2023Multi-Similarity Contrastive Learning6 Jul 2023
- 2023Not All Semantics are Created Equal: Contrastive Self-supervised Learning with Automatic Temperature Individualization19 May 2023
- 2023Temperature Schedules for Self-Supervised Contrastive Methods on Long-Tail Data23 Mar 2023
- 2023A Unified Arbitrary Style Transfer Framework via Adaptive Contrastive Learning9 Mar 2023
- 2023Learning to Scale Temperature in Masked Self-Attention for Image Inpainting13 Feb 2023
- 2022Establishing a stronger baseline for lightweight contrastive models14 Dec 2022
- 2022Federated Learning from Pre-Trained Models: A Contrastive Learning Approach21 Sep 2022
- 2022Uncertainty in Contrastive Learning: On the Predictability of Downstream Performance19 Jul 2022
- 2022Model-Aware Contrastive Learning: Towards Escaping the Dilemmas16 Jul 2022
- 2022Dual Temperature Helps Contrastive Learning Without Many Negative Samples: Towards Understanding and Simplifying MoCo30 Mar 2022
- 2024β-DPO: Direct Preference Optimization with Dynamic βcited by 89
- 2024β-DPO: Direct Preference Optimization with Dynamic β11 Jul 2024
- 2022Federated Learning from Pre-Trained Models: A Contrastive Learning Approachcited by 141
- 2022Dual Temperature Helps Contrastive Learning Without Many Negative Samples: Towards Understanding and Simplifying MoCocited by 52
- 2023Temperature Schedules for Self-Supervised Contrastive Methods on Long-Tail Datacited by 44
- 2023Not All Semantics are Created Equal: Contrastive Self-supervised Learning with Automatic Temperature Individualizationcited by 25
- 2022Model-Aware Contrastive Learning: Towards Escaping the Dilemmascited by 11
- 2024To Cool or not to Cool? Temperature Network Meets Large Foundation Models via DROcited by 11
- 2023A Unified Arbitrary Style Transfer Framework via Adaptive Contrastive Learningcited by 10
- 2023Adaptive Multi-head Contrastive Learningcited by 8
- 2022Uncertainty in Contrastive Learning: On the Predictability of Downstream Performancecited by 7
- 2024Analysis of Using Sigmoid Loss for Contrastive Learningcited by 6
- 2023Dynamically Scaled Temperature in Self-Supervised Contrastive Learningcited by 4
- 2022Establishing a stronger baseline for lightweight contrastive modelscited by 3
12 most cited of 24 All 24 (JSON)
- 2026TeMo: Temperature Modulation for Multimodal Contrastive Learning7 Sep 2026
- 2026MM-TS: Multi-Modal Temperature and Margin Schedules for Contrastive Learning with Long-Tail Data9 Mar 2026
- 2025Denoising-While-Completing Network (DWCNet): Robust Point Cloud Completion Under Corruption22 Jul 2025
- 2025Divergence-Based Similarity Function for Multi-View Contrastive Learning9 Jul 2025
- 2025Boosting Open Set Recognition Performance through Modulated Representation Learning23 May 2025
- 2025Difficult Examples Hurt Unsupervised Contrastive Learning: A Theoretical Perspective2 Jan 2025
- 2024To Cool or not to Cool? Temperature Network Meets Large Foundation Models via DRO6 Apr 2024
- 2024Automatic Alignment of Discourse Relations of Different Discourse Annotation Frameworks29 Mar 2024
- 2024Analysis of Using Sigmoid Loss for Contrastive Learning20 Feb 2024
- 2023Uncertainty in Graph Contrastive Learning with Bayesian Neural Networks30 Nov 2023
- 2023Hyp-UML: Hyperbolic Image Retrieval with Uncertainty-aware Metric Learning12 Oct 2023
- 2023Adaptive Multi-head Contrastive Learning9 Oct 2023
12 newest of 24 All 24 (JSON)