arXiv:2411.06966cs.CV2024-11NeurIPS被引 9

提出VRF方法,让零样本模型在分布内和分布外都表现更好。

Robust Fine-tuning of Zero-shot Models via Variance Reduction

  • 按样本到失败集的距离动态加权集成,减少预测方差。
  • 在ImageNet等数据集上,分布外准确率提升1.5-2.0个百分点。
  • 适合追求鲁棒性与高精度兼得的视觉模型微调场景。

微调零样本模型如CLIP时,理想目标是同时在分布内(ID)和分布外(OOD)取得优异性能。尽管基于集成的模型(ESM)已被证明可显著提升鲁棒性并保持高ID准确率,但本研究发现其仍存在ID-OOD权衡:在不同混合系数下,ID与OOD准确率分别达到峰值。当优化为最大化OOD准确率时,ID准确率明显下降。为此,我们提出样本级集成方法VRF,通过构建零样本失败集(ZSF),计算测试样本与该集的距离,并据此动态分配权重——距离越近,越倾向使用微调模型。该方法有效降低集成预测方差,从而减少残差误差。在ImageNet及五个分布偏移数据集上,相比基线集成模型,VRF将OOD准确率进一步提升1.5-2.0个百分点,同时维持或提升ID准确率;在其他分布偏移基准上也取得0.9-3.1个百分点的鲁棒性增益。代码已开源。

原文摘要 · Abstract (English)

When fine-tuning zero-shot models like CLIP, our desideratum is for the fine-tuned model to excel in both in-distribution (ID) and out-of-distribution (OOD). Recently, ensemble-based models (ESM) have been shown to offer significant robustness improvement, while preserving high ID accuracy. However, our study finds that ESMs do not solve the ID-OOD trade-offs: they achieve peak performance for ID and OOD accuracy at different mixing coefficients. When optimized for OOD accuracy, the ensemble model exhibits a noticeable decline in ID accuracy, and vice versa. In contrast, we propose a sample-wise ensembling technique that can simultaneously attain the best ID and OOD accuracy without the trade-offs. Specifically, we construct a Zero-Shot Failure (ZSF) set containing training samples incorrectly predicted by the zero-shot model. For each test sample, we calculate its distance to the ZSF set and assign a higher weight to the fine-tuned model in the ensemble if the distance is small. We term our method Variance Reduction Fine-tuning (VRF), as it effectively reduces the variance in ensemble predictions, thereby decreasing residual error. On ImageNet and five derived distribution shifts, our VRF further improves the OOD accuracy by 1.5 - 2.0 pp over the ensemble baselines while maintaining or increasing ID accuracy. VRF achieves similar large robustness gains (0.9 - 3.1 pp) on other distribution shifts benchmarks. Codes are available in https://github.com/BeierZhu/VRF.

模型微调鲁棒性集成学习零样本

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