用贝叶斯方法同时优化分类先验与似然,提升视觉语言模型在新数据上的适应能力。
Bayesian Test-Time Adaptation for Vision-Language Models
- 基于贝叶斯定理,同时更新类别先验和似然,实现双重自适应。
- 在多个测试数据集上准确率显著优于现有方法,最高提升3.2%。
- 轻量高效,推理速度和内存占用均低于主流方法,适合实际部署。
基于预训练的视觉语言模型(如CLIP)进行测试时自适应,旨在使模型适应新且可能分布外的测试数据。现有方法通过计算视觉嵌入与可学习类别嵌入(由文本嵌入初始化)之间的相似性,实现零样本图像分类。本文基于贝叶斯定理分析该过程,发现最终预测的核心影响因素为似然和先验。然而,现有方法仅关注通过调整类别嵌入来适应似然,却忽视了先验的重要性。为此,我们提出一种新方法——贝叶斯类别自适应(BCA),不仅持续更新类别嵌入以适应似然,还利用输入样本的后验信息持续更新每个类别的先验。这种双重更新机制使模型能更好地应对分布偏移,提升预测准确性。实验表明,本方法在性能指标上超越现有方法,同时保持更优的推理速度与内存开销,具备高效率与实用性,适用于真实场景。
原文摘要 · Abstract (English)
Test-time adaptation with pre-trained vision-language models, such as CLIP, aims to adapt the model to new, potentially out-of-distribution test data. Existing methods calculate the similarity between visual embedding and learnable class embeddings, which are initialized by text embeddings, for zero-shot image classification. In this work, we first analyze this process based on Bayes theorem, and observe that the core factors influencing the final prediction are the likelihood and the prior. However, existing methods essentially focus on adapting class embeddings to adapt likelihood, but they often ignore the importance of prior. To address this gap, we propose a novel approach, \textbf{B}ayesian \textbf{C}lass \textbf{A}daptation (BCA), which in addition to continuously updating class embeddings to adapt likelihood, also uses the posterior of incoming samples to continuously update the prior for each class embedding. This dual updating mechanism allows the model to better adapt to distribution shifts and achieve higher prediction accuracy. Our method not only surpasses existing approaches in terms of performance metrics but also maintains superior inference rates and memory usage, making it highly efficient and practical for real-world applications.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。