探究CLIP模型插值中的陡度作用,发现局部层陡度决定泛化性能。
In Search of the Successful Interpolation: On the Role of Sharpness in CLIP Generalization
- 通过分析各层陡度,发现局部层陡度比整体陡度更可靠
- 实验表明层间陡度与跨域准确率高度相关
- 稀疏化异常层可缓解插值失败问题,适合模型优化研究者
零样本模型如CLIP常在目标数据集上微调以提升精度,但可能损害分布外(OOD)鲁棒性。稳健微调(RFT)通过在零样本与微调模型间插值来缓解此问题,但其在何种情况下能有效降低OOD误差尚不明确。本文实证研究了CLIP模型在插值过程中的鲁棒性,聚焦于模型陡度的作用。结果表明,尽管整体陡度无法可靠预测现代架构如CLIP在OOD数据上的泛化能力,挑战了平坦极小值有益泛化的传统认知;然而,通过分析‘滞留层’现象,我们发现滞留层的逐层陡度能可靠捕捉插值后模型在OOD上的泛化表现。大量实验验证了逐层陡度与RFT的OOD准确率之间存在显著相关性。此外,通过对滞留层引入稀疏性,可有效缓解RFT中的失败模式。据我们所知,这是首个系统研究CLIP基础模型权重空间中插值成功性的陡度作用的工作。代码已开源。
原文摘要 · Abstract (English)
\textit{Zero-shot} models like CLIP are often fine-tuned on a target dataset to improve its accuracy further, but this can compromise out-of-distribution (OOD) robustness. Robust Fine-Tuning (\texttt{RFT} )~\citep{wortsman2021robust}, which interpolates between the \textit{zero-shot} and \textit{fine-tuned} models, has been proposed to address this issue. However, understanding when \texttt{RFT} actually improves OOD error remains limited. In this work, we empirically investigate the robustness of \texttt{RFT} in CLIP models, with a focus on the \textit{sharpness} of the CLIP model during interpolation. First, we demonstrate that while sharpness may not serve as a reliable indicator for predicting the generalization of modern architectures like CLIP on OOD data, this challenges the conventional belief in the generalization benefits of flat minima in foundation models. However, by examining the role of the \textit{straggler layer} phenomenon, we show that, unlike overall sharpness, the \textit{layer-wise} sharpness of \textit{straggler} layers can reliably capture the generalization performance of interpolated CLIP models on OOD data. Our extensive experiments reveal that \textit{layer-wise} sharpness correlates with generalization in OOD accuracy for \texttt{RFT}. Furthermore, we demonstrate that by inducing sparsity in the \textit{straggler} layers, we can mitigate the \textit{failure mode} phenomenon in \texttt{RFT}. To the best of our knowledge, this is the first work to study the role of sharpness in the \textit{success} of interpolation in the weight space of CLIP foundation models. Our code is available at \url{https://github.com/alirezaabdollahpour/CLIP_Mode_Connectivity}.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。