Most calibration methods operate at the logit level, implicitly assuming that miscalibration can be corrected without changing the underlying representation. We challenge this assumption and propose \textbf{Calibration Attention (CalAttn)}, a \emph{representation-aware} calibration module for vision transformers that couples instance-wise temperature scaling to transformer token geometry under a proper scoring objective. CalAttn predicts a sample-specific temperature from the \texttt{[CLS]} token and backpropagates calibration gradients into the backbone, thereby reshaping the uncertainty structure of the representation rather than post-hoc adjusting confidence. This yields \emph{token-conditioned uncertainty modulation} with negligible overhead (\(<0.1\%\) additional parameters). Across multiple datasets with ViT/DeiT/Swin backbones, CalAttn consistently improves calibration while preserving accuracy, achieving relative ECE reductions of \(3.7\%\) to \(77.7\%\) over strong baselines across diverse training objectives. Our results indicate that treating calibration as a representation-level problem is a practical and effective direction for trustworthy uncertainty estimation in transformers. Code: [https://github.com/EagleAdelaide/CalibrationAttention-CalAttn-](https://github.com/EagleAdelaide/CalibrationAttention-CalAttn-)


翻译:大多数校准方法在逻辑层面进行操作,隐式地假设可以在不改变底层表征的情况下校正失准。我们挑战这一假设,并提出**校准注意力(CalAttn)**,一种用于视觉Transformer的**表征感知**校准模块,它在适当的评分目标下将实例级温度缩放与Transformer令牌几何结构耦合。CalAttn从`[CLS]`令牌预测样本特定的温度,并将校准梯度反向传播到骨干网络中,从而重塑表征的不确定性结构,而非事后调整置信度。这实现了**令牌条件化的不确定性调制**,且开销可忽略(额外参数<0.1%)。在采用ViT/DeiT/Swin骨干网络的多个数据集上,CalAttn在保持准确性的同时持续改善校准效果,相较于强基线方法,在不同训练目标下实现了3.7%至77.7%的相对ECE降低。我们的结果表明,将校准视为表征层面的问题是实现Transformer可信不确定性估计的一个实用且有效的方向。代码:[https://github.com/EagleAdelaide/CalibrationAttention-CalAttn-](https://github.com/EagleAdelaide/CalibrationAttention-CalAttn-)

0
下载
关闭预览

相关内容

【NeurIPS2024】注意力迁移对视觉Transformer的惊人有效性研究
用于识别任务的视觉 Transformer 综述
专知会员服务
75+阅读 · 2023年2月25日
【NeurIPS 2021】流形上的注意力机制:规范等变的Transformer
【Tutorial】计算机视觉中的Transformer,98页ppt
专知
21+阅读 · 2021年10月25日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
深度学习中的注意力机制
CSDN大数据
24+阅读 · 2017年11月2日
国家自然科学基金
3+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
VIP会员
相关基金
国家自然科学基金
3+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员