CRoFT: 面向OOD泛化和开放集OOD检测的并发优化鲁棒微调
CRoFT: Robust Fine-Tuning with Concurrent Optimization for OOD Generalization and Open-Set OOD Detection
AI总结:
针对视觉语言预训练模型微调时分布偏移问题,提出一种基于能量分数梯度最小化的统一微调框架,同时提升闭集OOD泛化能力和开放集OOD检测性能。
摘要:
最近的视觉语言预训练模型(VL-PTMs)在开放词汇任务中取得了显著成功。然而,下游用例通常涉及对VL-PTMs的进一步微调,这可能会扭曲其通用知识并损害其处理分布偏移的能力。在现实场景中,机器学习系统不可避免地会遇到协变量偏移(例如,图像风格的变化)和语义偏移(例如,测试时未见类别)。这凸显了增强对协变量偏移的分布外(OOD)泛化能力,同时检测语义偏移的未见类别的重要性。因此,一个关键但尚未充分探索的问题出现了:如何在微调期间提高VL-PTMs对闭集OOD数据的泛化能力,同时有效检测开放集未见类别?在本文中,我们提出了一种新颖的OOD检测目标函数,该函数也有助于改进OOD泛化。我们表明,最小化训练数据上能量分数的梯度幅度会导致分类损失的域一致Hessian矩阵,这是理论分析揭示的OOD泛化的强指标。基于这一发现,我们开发了一个统一的微调框架,允许同时优化这两个任务。大量实验证明了我们方法的优越性。代码可在https://github.com/LinLLLL/CRoFT获取。
英文摘要:
Recent vision-language pre-trained models (VL-PTMs) have shown remarkable success in open-vocabulary tasks. However, downstream use cases often involve further fine-tuning of VL-PTMs, which may distort their general knowledge and impair their ability to handle distribution shifts. In real-world scenarios, machine learning systems inevitably encounter both covariate shifts (e.g., changes in image styles) and semantic shifts (e.g., test-time unseen classes). This highlights the importance of enhancing out-of-distribution (OOD) generalization on covariate shifts and simultaneously detecting semantic-shifted unseen classes. Thus a critical but underexplored question arises: How to improve VL-PTMs' generalization ability to closed-set OOD data, while effectively detecting open-set unseen classes during fine-tuning? In this paper, we propose a novel objective function of OOD detection that also serves to improve OOD generalization. We show that minimizing the gradient magnitude of energy scores on training data leads to domain-consistent Hessians of classification loss, a strong indicator for OOD generalization revealed by theoretical analysis. Based on this finding, we have developed a unified fine-tuning framework that allows for concurrent optimization of both tasks. Extensive experiments have demonstrated the superiority of our method. The code is available at https://github.com/LinLLLL/CRoFT.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。