[论文解读] Test-Time Adaptation with CLIP Reward for Zero-Shot Generalization in Vision-Language Models
本文提出强化学习结合CLIP反馈(RLCF),一种测试时适应(TTA)方法,利用CLIP作为奖励模型,将视觉-语言模型与任务目标对齐,避免因熵最小化导致的过拟合。通过在推理过程中使用动态基线最大化CLIP得分,RLCF在图像分类、检索和字幕生成等任务中实现了显著的零样本泛化性能提升,且监督信息极少。
One fascinating aspect of pre-trained vision-language models~(VLMs) learning under language supervision is their impressive zero-shot generalization capability. However, this ability is hindered by distribution shifts between the training and testing data. Previous test time adaptation~(TTA) methods for VLMs in zero-shot classification rely on minimizing the entropy of model outputs, tending to be stuck in incorrect model predictions. In this work, we propose TTA with feedback to rectify the model output and prevent the model from becoming blindly confident. Specifically, a CLIP model is adopted as the reward model during TTA and provides feedback for the VLM. Given a single test sample, the VLM is forced to maximize the CLIP reward between the input and sampled results from the VLM output distribution. The proposed extit{reinforcement learning with CLIP feedback~(RLCF)} framework is highly flexible and universal. Beyond the classification task, with task-specific sampling strategies and a proper reward baseline choice, RLCF can be easily extended to not only discrimination tasks like retrieval but also generalization tasks like image captioning, improving the zero-shot generalization capacity of VLMs. According to the characteristics of these VL tasks, we build different fully TTA pipelines with RLCF to improve the zero-shot generalization ability of various VLMs. Extensive experiments along with promising empirical results demonstrate the effectiveness of RLCF. The code is available at https://github.com/mzhaoshuai/RLCF.
研究动机与目标
- 解决视觉-语言模型在完全测试时适应(TTA)中因熵最小化导致的过拟合问题。
- 在推理阶段实现模型输出与任务目标的对齐,且无需访问训练数据或人工标注。
- 开发一种灵活、可扩展的反馈机制,利用CLIP作为奖励模型,适用于多模态任务。
- 提升视觉-语言任务(如图像分类、检索和字幕生成)中的零样本和跨域性能。
- 证明一种简单、基于CLIP的奖励设计结合动态基线,可在TTA中超越标准的熵最小化方法。
提出的方法
- 使用CLIP作为奖励模型,在测试时适应过程中提供反馈,基于图像-文本对的相似度分配得分。
- 采用动态基线:对采样候选结果的CLIP得分取平均值,以稳定学习过程并提升对齐效果。
- 应用REINFORCE算法,通过策略梯度更新最大化推理过程中的期望CLIP奖励。
- 采用任务特定的采样策略:分类和检索任务使用top-K采样,字幕生成任务使用束搜索(beam search)。
- 引入动量缓冲区,保留多个测试样本的知识,从而在时间上提升泛化能力。
- 支持集成多个CLIP模型,形成更鲁棒的奖励集成。
实验结果
研究问题
- RQ1CLIP能否作为视觉-语言模型测试时适应中的有效、自监督奖励模型?
- RQ2与熵最小化相比,使用CLIP得分作为奖励信号是否能有效防止TTA中的过拟合?
- RQ3RLCF在提升多样化的视觉-语言任务(如图像分类、检索和字幕生成)中的零样本和跨域性能方面效果如何?
- RQ4基于平均CLIP得分的简单可学习基线是否能超越固定或复杂奖励基线?
- RQ5动量缓冲区在连续测试时适应过程中在多大程度上提升了泛化能力?
主要发现
- RLCF在ImageNet-A、ImageNet-V2和ImageNet-R等分布外(OOD)基准上显著提升了图像分类准确率,优于基于熵最小化的TTA方法。
- 在零样本图像-文本检索任务中,RLCF在MS-COCO到Flickr30K的迁移任务中CIDEr得分最高提升5.7%,展现出强大的零样本泛化能力。
- 在跨域图像字幕生成任务中,RLCF在NoCaps数据集上CIDEar得分提升最高达9.2分,在Flickr30K上提升8.5分,表明其在单个测试样本下仍具强大性能。
- CLIPCap结合RLCF相比基线模型CIDEr得分提升7.8分,凸显该方法在高质量字幕生成模型中的有效性。
- 动量缓冲区在各类任务中均持续提升性能,表明其在多轮测试样本中有效保留知识。
- RLCF-S(采用更简单采样策略)在大多数情况下与RLCF性能相当,显示出方法的鲁棒性与实用性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。