Skip to main content
QUICK REVIEW

[论文解读] A Closer Look at the Robustness of Contrastive Language-Image Pre-Training (CLIP)

Weijie Tu, Weijian Deng|arXiv (Cornell University)|Feb 12, 2024
Interpreting and Communication in Healthcare被引用 4
一句话总结

本文对 CLIP 模型在视觉因素变化、分布外(OOD)检测以及预测不确定性校准方面的鲁棒性进行了全面的实证研究。基于 83 个 CLIP 模型和 127 个 ImageNet 分类器,涵盖多种架构和训练来源,研究发现 CLIP 模型在校准性方面并不一定优于 ImageNet 模型,其性能强烈依赖于训练数据分布,并且在经过校准后,能够在分布偏移下保持相对可靠的不确定性估计——这挑战了关于其固有鲁棒性的先前假设。

ABSTRACT

Contrastive Language-Image Pre-training (CLIP) models have demonstrated remarkable generalization capabilities across multiple challenging distribution shifts. However, there is still much to be explored in terms of their robustness to the variations of specific visual factors. In real-world applications, reliable and safe systems must consider other safety objectives beyond classification accuracy, such as predictive uncertainty. Yet, the effectiveness of CLIP models on such safety-related features is less-explored. Driven by the above, this work comprehensively investigates the safety objectives of CLIP models, specifically focusing on three key properties: resilience to visual factor variations, calibrated uncertainty estimations, and the ability to detect anomalous inputs. To this end, we study 83 CLIP models and 127 ImageNet classifiers. They are diverse in architecture, (pre)training distribution and training strategies. We consider 10 visual factors (e.g., shape and pattern), 5 types of out-of-distribution data, and 8 natural and challenging test conditions with different shift types, such as texture, style, and perturbation shifts. Our study has unveiled several previously unknown insights into CLIP models. For instance, they are not consistently more calibrated than other ImageNet models, which contradicts existing findings. Additionally, our analysis underscores the significance of training source design by showcasing its profound influence on the three safety-related properties. We believe our comprehensive study can shed light on and help guide the development of more robust and reliable CLIP models.

研究动机与目标

  • 研究 CLIP 模型在姿态、光照、遮挡等特定视觉因素变化下的鲁棒性。
  • 评估 CLIP 模型在多个 OOD 基准上的分布外输入检测性能。
  • 评估 CLIP 模型在分布偏移下是否提供校准良好的预测不确定性估计。
  • 考察训练数据分布和模型架构对这些关键安全属性的影响。
  • 挑战并澄清关于 CLIP 在校准性和鲁棒性方面优越性的相互矛盾的先前主张。

提出的方法

  • 评估了 83 个具有多样化视觉编码器(如 ResNet、ViT)、训练来源(WIT、LAION)和数据集规模的 CLIP 模型。
  • 与 127 个在 ImageNet 上微调的模型进行对比,以建立性能与可靠性基线。
  • 使用 ImageNet-X 数据集中的 10 个因素(如姿态、光照、背景)评估视觉因素鲁棒性。
  • 在 5 个 OOD 基准(如 SUN、Places-OOD)上测试 OOD 检测性能,以 ImageNet 作为分布内(ID)数据集。
  • 通过典型偏移类型(纹理、风格和扰动偏移)评估预测不确定性。
  • 应用温度缩放进行不确定性校准,并使用稳健线性回归分析提示(prompt)的影响。

实验结果

研究问题

  • RQ1CLIP 模型在不同视觉因素变化下的表现如何变化?其是否始终优于标准的 ImageNet 分类器?
  • RQ2CLIP 模型在多大程度上能泛化到 OOD 输入?这种泛化能力在不同训练来源和模型架构之间如何变化?
  • RQ3CLIP 模型是否比标准的 ImageNet 模型更具校准性?这种差异如何随训练数据分布而变化?
  • RQ4推理时的提示选择如何影响 CLIP 的分类准确率、OOD 检测性能和不确定性校准?
  • RQ5训练数据分布与数量对 CLIP 的安全相关属性的相对影响是什么?

主要发现

  • CLIP 模型在校准性方面并不一定优于标准的 ImageNet 模型,与先前主张相矛盾,凸显了训练分布对校准性的重要影响。
  • CLIP 模型在 10 个视觉因素中的 6 个(如颜色、背景)上表现出更优的鲁棒性,但在姿态变化上表现较弱,表明其性能受架构和数据分布的显著影响。
  • 训练来源的设计对所有三项安全属性均有深远影响:在 WIT 上训练的模型在 OOD 检测和鲁棒性方面强于在 LAION 上训练的模型,即使两者准确率相近。
  • 在使用温度缩放完成分布内校准后,CLIP 模型在分布偏移下仍能保持合理可靠的不确定性估计,其表现优于非 CLIP 模型。
  • 推理时使用更少的提示(如一个或五个)相比使用 80 个提示,可提升 OOD 检测和校准性能,表明提示设计对可靠性至关重要。
  • CLIP 模型中的形状偏差在微调至 ImageNet 后减弱,其表现与标准 ImageNet 模型相当,表明微调可降低归纳偏差。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。