arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.08895cs.CV
收藏

用于少样本视觉-语言模型适应的校准缓存模型

Calibrated Cache Model for Few-Shot Vision-Language Model Adaptation

Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所)

Kun Ding, Qiang Yu, Haojian Zhang, Gaofeng Meng, Shiming Xiang

AI总结:

针对视觉-语言模型缓存适应中忽略图像-图像相似度、训练样本关系及logits置信度的问题,提出三种校准模块,在11个少样本分类数据集上达到最先进性能。

摘要:

基于缓存的方法在适应视觉-语言模型(VLMs)方面既有效又高效。然而,现有的缓存模型忽略了三个关键方面。1)预训练的VLMs主要针对图像-文本相似度进行优化,忽略了图像-图像相似度的重要性,导致预训练与适应之间存在差距。2)当前的缓存模型基于Nadaraya-Watson(N-W)估计器,在构建权重函数时忽略了训练样本之间的复杂关系。3)在样本有限的条件下,缓存模型生成的logits具有高不确定性,直接使用这些logits而不考虑置信度可能会产生问题。本工作提出了三个校准模块来解决上述挑战。相似度校准通过使用未标记图像来优化图像-图像相似度。我们在CLIP的预训练图像编码器顶部添加了一个带有残差连接的可学习投影层,并通过最小化自监督对比损失来优化参数。权重校准在权重函数中引入精度矩阵以充分建模训练样本之间的关系,将现有缓存模型转换为高斯过程(GP)回归器,这比N-W估计器更准确。置信度校准利用GP回归计算的预测方差动态重新缩放缓存模型的logits,确保缓存模型的输出根据其置信度水平进行适当调整。此外,为降低GPs的高复杂度,我们进一步提出了一种基于分组的学习策略。整合上述设计,我们提出了无需训练和需要训练的两种变体。在11个少样本分类数据集上的大量实验验证了所提方法能够达到最先进的性能。

英文摘要:

Cache-based approaches stand out as both effective and efficient for adapting vision-language models (VLMs). Nonetheless, the existing cache model overlooks three crucial aspects. 1) Pre-trained VLMs are mainly optimized for image-text similarity, neglecting the importance of image-image similarity, leading to a gap between pre-training and adaptation. 2) The current cache model is based on the Nadaraya-Watson (N-W) estimator, which disregards the intricate relationships among training samples while constructing weight function. 3) Under the condition of limited samples, the logits generated by cache model are of high uncertainty, directly using these logits without accounting for the confidence could be problematic. This work presents three calibration modules aimed at addressing the above challenges. Similarity Calibration refines the image-image similarity by using unlabeled images. We add a learnable projection layer with residual connection on top of the pre-trained image encoder of CLIP and optimize the parameters by minimizing self-supervised contrastive loss. Weight Calibration introduces a precision matrix into the weight function to adequately model the relation between training samples, transforming the existing cache model to a Gaussian Process (GP) regressor, which could be more accurate than N-W estimator. Confidence Calibration leverages the predictive variances computed by GP Regression to dynamically re-scale the logits of cache model, ensuring that the cache model's outputs are appropriately adjusted based on their confidence levels. Besides, to reduce the high complexity of GPs, we further propose a group-based learning strategy. Integrating the above designs, we propose both training-free and training-required variants. Extensive experiments on 11 few-shot classification datasets validate that the proposed methods can achieve state-of-the-art performance.

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

↑