arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.21728cs.CVcs.LG
收藏

Ramen: 通过主动样本选择实现视觉语言模型的鲁棒性测试时适应

Ramen: Robust Test-Time Adaptation of Vision-Language Models with Active Sample Selection

University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)

Wenxuan Bao, Yanjun Zhao, Xiyuan Yang, Jingrui He

AI总结:

本文提出Ramen框架,通过主动样本选择实现视觉语言模型在混合域下的鲁棒测试时适应,通过领域一致性与预测平衡准则提升适应性能,实验表明其在多种图像退化和领域偏移基准上表现优异。

摘要:

预训练的视觉语言模型如CLIP表现出强大的零样本泛化能力,但对分布偏移敏感。测试时适应在推理时无需源数据或目标标签,提供处理此类偏移的实用方法。然而,现有方法通常假设测试样本来自单一一致领域,而实际测试数据常包含来自混合领域且特征各异的样本。因此,在混合领域设置下其性能下降。为解决此问题,我们提出了Ramen,一种通过主动样本选择实现鲁棒测试时适应的框架。对于每个输入测试样本,Ramen根据两个标准从之前见过的数据中检索定制化的相关样本:领域一致性,确保适应专注于相似领域的数据,以及预测平衡,缓解由预测偏差引起的适应偏差。为提高效率,Ramen采用嵌入梯度缓存,存储过去测试图像的嵌入和样本级梯度。存储的嵌入用于检索相关样本,对应的梯度用于模型更新,消除了任何额外的前向或反向传递的需要。我们的理论分析提供了为什么所提出的适应机制在混合领域偏移下有效的见解。在多个图像退化和领域偏移基准上的实验表明,Ramen实现了强大且一致的性能,提供了在复杂混合领域场景中的鲁棒且高效的适应。我们的代码可在https://github.com/baowenxuan/Ramen获取。

英文摘要:

Pretrained vision-language models such as CLIP exhibit strong zero-shot generalization but remain sensitive to distribution shifts. Test-time adaptation adapts models during inference without access to source data or target labels, offering a practical way to handle such shifts. However, existing methods typically assume that test samples come from a single, consistent domain, while in practice, test data often include samples from mixed domains with distinct characteristics. Consequently, their performance degrades under mixed-domain settings. To address this, we present Ramen, a framework for robust test-time adaptation through active sample selection. For each incoming test sample, Ramen retrieves a customized batch of relevant samples from previously seen data based on two criteria: domain consistency, which ensures that adaptation focuses on data from similar domains, and prediction balance, which mitigates adaptation bias caused by skewed predictions. To improve efficiency, Ramen employs an embedding-gradient cache that stores the embeddings and sample-level gradients of past test images. The stored embeddings are used to retrieve relevant samples, and the corresponding gradients are aggregated for model updates, eliminating the need for any additional forward or backward passes. Our theoretical analysis provides insight into why the proposed adaptation mechanism is effective under mixed-domain shifts. Experiments on multiple image corruption and domain-shift benchmarks demonstrate that Ramen achieves strong and consistent performance, offering robust and efficient adaptation in complex mixed-domain scenarios. Our code is available at https://github.com/baowenxuan/Ramen .

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑