Temperature scaling is a simple method that allows to control the uncertainty of probabilistic models. It is mostly used in two contexts: improving the calibration of classifiers and tuning the stochasticity of large language models (LLMs). In both cases, temperature scaling is the most popular method for the job. Despite its popularity, a rigorous theoretical analysis of the properties of temperature scaling has remained elusive. We investigate here some of these properties. For classification, we show that increasing the temperature increases the uncertainty in the model in a very general sense (and in particular increases its entropy). However, for LLMs, we challenge the common claim that increasing temperature increases diversity. Furthermore, we introduce two new characterisations of temperature scaling. The first one is geometric: the tempered model is shown to be the information projection of the original model onto the set of models with a given entropy. The second characterisation clarifies the role of temperature scaling as a submodel of more general linear scalers such as matrix scaling and Dirichlet calibration: we show that temperature scaling is the only linear scaler that does not change the hard predictions of the model.


翻译:温度缩放是一种控制概率模型不确定性的简单方法。它主要应用于两种场景:改善分类器的校准度,以及调节大型语言模型(LLMs)的随机性。在这两种情况下,温度缩放都是最常用的方法。尽管其应用广泛,但关于温度缩放性质的严格理论分析仍较为缺乏。本文研究了该方法的若干性质。对于分类任务,我们证明提高温度会在非常普遍的意义上增加模型的不确定性(特别是会增加其熵)。然而,对于LLMs,我们质疑了“提高温度会增加多样性”这一普遍观点。此外,我们提出了温度缩放的两种新表征。第一种是几何表征:温度缩放后的模型可视为原始模型在给定熵约束下的信息投影。第二种表征阐明了温度缩放作为更广义线性缩放器(如矩阵缩放和狄利克雷校准)子模型的作用:我们证明温度缩放是唯一不改变模型硬预测结果的线性缩放器。

0
下载
关闭预览

相关内容

神经缩放定律的起源:从随机图到自然语言
专知会员服务
14+阅读 · 1月17日
最新《神经数据压缩导论》综述
专知会员服务
39+阅读 · 2022年7月19日
模型压缩 | 知识蒸馏经典解读
AINLP
11+阅读 · 2020年5月31日
简述多种降维算法
算法与数学之美
11+阅读 · 2018年9月23日
异常检测的阈值,你怎么选?给你整理好了...
机器学习算法与Python学习
10+阅读 · 2018年9月19日
干货——图像分类(下)
计算机视觉战队
14+阅读 · 2018年8月28日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 1月14日
VIP会员
相关VIP内容
神经缩放定律的起源:从随机图到自然语言
专知会员服务
14+阅读 · 1月17日
最新《神经数据压缩导论》综述
专知会员服务
39+阅读 · 2022年7月19日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员