Temperature as Uncertainty in Contrastive Learning

10/08/2021
by   Oliver Zhang, et al.
3

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.

READ FULL TEXT
research
10/05/2020

A Simple Framework for Uncertainty in Contrastive Learning

Contrastive approaches to representation learning have recently shown gr...
research
12/02/2021

Probabilistic Contrastive Loss for Self-Supervised Learning

This paper proposes a probabilistic contrastive loss function for self-s...
research
06/23/2022

A Geometric Method for Improved Uncertainty Estimation in Real-time

Machine learning classifiers are probabilistic in nature, and thus inevi...
research
07/13/2022

Sample-dependent Adaptive Temperature Scaling for Improved Calibration

It is now well known that neural networks can be wrong with high confide...
research
12/15/2020

Understanding the Behaviour of Contrastive Loss

Unsupervised contrastive learning has achieved outstanding success, whil...
research
09/11/2023

OpenFashionCLIP: Vision-and-Language Contrastive Learning with Open-Source Fashion Data

The inexorable growth of online shopping and e-commerce demands scalable...
research
02/07/2023

Long Horizon Temperature Scaling

Temperature scaling is a popular technique for tuning the sharpness of a...

Please sign up or login with your details

Forgot password? Click here to reset