arXiv:2508.08547cs.CV2025-08被引 1

让视觉Transformer自己学会判断可信度,提升模型不确定性估计可靠性。

Calibration Attention: Learning Reliability-Aware Representations for Vision Transformers

  • 基于[CLS] token动态生成温度系数,将校准融入特征表示学习。
  • 在多个数据集上实现3.7%至77.7%的ECE相对降低,精度不下降。
  • 适合需要可靠置信度输出的高风险场景,如医疗诊断、自动驾驶。

现有校准方法多在logit层操作,隐含假设无需改变表征即可修正偏差。本文挑战该假设,提出面向视觉Transformer的表征感知校准模块——校准注意力(CalAttn),在合理评分目标下将实例级温度缩放与变压器标记几何结构相耦合。CalAttn从[CLS]标记预测样本专属温度,并反向传播校准梯度至主干网络,从而重塑表征的不确定性结构,而非事后调整置信度。该方法实现令牌条件的不确定性调制,额外参数增加不足0.1%。在多种数据集上使用ViT/DeiT/Swin主干时,CalAttn始终改善校准效果,相对于强基线实现3.7%至77.7%的相对ECE下降,且保持原有精度。结果表明,将校准视为表征层面问题,是提升Transformer可信不确定性估计的有效路径。

原文摘要 · Abstract (English)

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-)

视觉模型不确定性估计自适应校准

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。