Towards Calibrated Robust Fine-Tuning of Vision-Language Models

📄 arXiv: 2311.01723v7 📥 PDF

作者: Changdae Oh, Hyesu Lim, Mijoo Kim, Dongyoon Han, Sangdoo Yun, Jaegul Choo, Alexander Hauptmann, Zhi-Qi Cheng, Kyungwoo Song

分类: cs.CV, cs.AI

发布日期: 2023-11-03 (更新: 2024-11-07)

备注: NeurIPS 2024 (a short version was presented at the NeurIPS 2023 Workshop on Distribution Shifts); Major modification of (v7): Fixing the x-axis of Figure 3 and Pearson correlation, accordingly


💡 一句话要点

提出一种新方法以同时提升视觉语言模型的OOD准确性与置信度校准

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 视觉语言模型 鲁棒微调 置信度校准 多模态对比损失 自蒸馏 分布外泛化 模型优化

📋 核心要点

  1. 现有的鲁棒微调方法在提高OOD泛化能力方面存在不足,特别是在置信度校准方面未能得到有效解决。
  2. 本文提出了一种新颖的鲁棒微调框架,通过约束的多模态对比损失和自蒸馏方法来同时提升OOD准确性和置信度校准。
  3. 实验结果显示,该方法在ImageNet分布转移基准上显著提升了模型的OOD性能和置信度校准效果。

📝 摘要(中文)

在零-shot模型的鲁棒微调中,提高分布外(OOD)泛化能力是关键目标。然而,尽管现有的鲁棒微调方法在OOD泛化性能上表现良好,但置信度校准问题尚未得到充分解决。本文提出了一种鲁棒微调方法,旨在同时改善视觉语言模型的OOD准确性和置信度校准。我们展示了OOD分类和OOD校准误差之间存在共享的上界,并设计了一个新的框架,通过约束的多模态对比损失来进行微调,进一步通过自蒸馏方法实现校准预测。实验结果表明,该方法在ImageNet分布转移基准上表现出色,验证了我们的理论和实际应用效果。

🔬 方法详解

问题定义:本文旨在解决视觉语言模型在分布外(OOD)环境下的泛化能力不足及置信度校准问题。现有方法在OOD准确性上表现良好,但缺乏有效的置信度校准,导致模型输出不可靠。

核心思路:论文提出的核心思路是通过约束的多模态对比损失来提升OOD准确性,同时利用自蒸馏方法进行置信度校准。这一设计基于OOD分类和校准误差之间的共享上界理论。

技术框架:整体框架包括两个主要模块:首先,通过约束的多模态对比损失进行模型微调,确保ID输入协方差矩阵的最小奇异值增大;其次,利用移动平均模型进行自蒸馏,以实现更好的置信度校准。

关键创新:最重要的技术创新在于提出了一个新的约束机制,通过控制最小奇异值来提升模型的OOD性能和置信度校准,这与现有方法的设计思路有本质区别。

关键设计:在损失函数设计上,采用了多模态对比损失,并引入了自蒸馏机制。模型的训练过程中,特别关注ID校准误差和协方差矩阵的特征,以确保模型输出的可靠性。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,所提出的方法在ImageNet分布转移基准上实现了显著提升,OOD准确性提高了X%,置信度校准误差降低了Y%。与基线方法相比,模型在多个测试集上的表现均有明显改善,验证了理论的有效性。

🎯 应用场景

该研究的潜在应用领域包括视觉问答、图像描述生成和多模态检索等。通过提升模型在OOD环境下的表现和置信度校准能力,能够显著增强这些应用的可靠性和用户体验,未来可能推动更广泛的实际应用和研究进展。

📄 摘要(原文)

Improving out-of-distribution (OOD) generalization during in-distribution (ID) adaptation is a primary goal of robust fine-tuning of zero-shot models beyond naive fine-tuning. However, despite decent OOD generalization performance from recent robust fine-tuning methods, confidence calibration for reliable model output has not been fully addressed. This work proposes a robust fine-tuning method that improves both OOD accuracy and confidence calibration simultaneously in vision language models. Firstly, we show that both OOD classification and OOD calibration errors have a shared upper bound consisting of two terms of ID data: 1) ID calibration error and 2) the smallest singular value of the ID input covariance matrix. Based on this insight, we design a novel framework that conducts fine-tuning with a constrained multimodal contrastive loss enforcing a larger smallest singular value, which is further guided by the self-distillation of a moving-averaged model to achieve calibrated prediction as well. Starting from empirical evidence supporting our theoretical statements, we provide extensive experimental results on ImageNet distribution shift benchmarks that demonstrate the effectiveness of our theorem and its practical implementation.