Domain Aligned CLIP for Few-shot Classification

📄 arXiv: 2311.09191v1 📥 PDF

作者: Muhammad Waleed Gondal, Jochen Gast, Inigo Alonso Ruiz, Richard Droste, Tommaso Macri, Suren Kumar, Luitpold Staudigl

分类: cs.CV

发布日期: 2023-11-15

备注: To appear at WACV 2024


💡 一句话要点

提出Domain Aligned CLIP以解决少样本分类问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 少样本分类 领域适应 视觉-语言模型 对比学习 多模态对齐

📋 核心要点

  1. 现有方法在进行全规模微调时计算成本高,且对分布外数据的鲁棒性较差。
  2. 本文提出的DAC通过引入轻量级适配器和调制类文本嵌入,改善了图像-图像和图像-文本的对齐,且无需微调主模型。
  3. DAC在11个图像分类任务上表现优异,16-shot分类性能提升约2.3%,并在分布外鲁棒性基准上具有竞争力。

📝 摘要(中文)

大型视觉-语言表示学习模型如CLIP在零样本迁移到下游任务中表现出色,但全规模微调往往计算密集、需要大量标注数据,并可能降低模型的分布外鲁棒性。本文提出了一种样本高效的领域适应策略Domain Aligned CLIP(DAC),在不微调主模型的情况下,改善了目标分布上的图像-图像和图像-文本的对齐。通过引入轻量级适配器和调制预计算类文本嵌入的方法,DAC在11个广泛使用的图像分类任务上取得了显著提升,16-shot分类性能提高约2.3%,并在4个分布外鲁棒性基准上表现出竞争力。

🔬 方法详解

问题定义:本文旨在解决现有CLIP模型在少样本分类任务中的计算成本高和对分布外数据鲁棒性不足的问题。全规模微调虽然能提升性能,但往往需要大量标注数据和计算资源。

核心思路:提出Domain Aligned CLIP(DAC)策略,通过增强图像-图像和图像-文本的对齐,来提高模型在目标分布上的表现,而无需对主模型进行微调。

技术框架:DAC的整体架构包括两个主要模块:一是轻量级适配器,用于实现图像-图像的对齐;二是调制预计算类文本嵌入的框架,用于增强图像-文本的对齐。

关键创新:DAC的核心创新在于引入了轻量级适配器和调制机制,这与传统的微调方法不同,避免了对主模型参数的修改,从而保持了模型的原始特性。

关键设计:在设计中,适配器通过特定的对比损失进行训练,以实现图像-图像的对齐;同时,文本嵌入的调制通过简单的框架实现,确保了计算效率和鲁棒性。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

DAC在11个图像分类任务上表现出色,16-shot分类的性能提升约2.3%,相较于强基线有显著改善。此外,在4个分布外鲁棒性基准上,DAC也展现了竞争力,证明了其在实际应用中的有效性。

🎯 应用场景

该研究的潜在应用领域包括图像分类、视觉搜索和多模态学习等。通过提高少样本分类的性能,DAC能够在数据稀缺的场景中发挥重要作用,推动相关领域的研究和应用发展,尤其是在医疗影像、自动驾驶等对数据依赖较高的领域。

📄 摘要(原文)

Large vision-language representation learning models like CLIP have demonstrated impressive performance for zero-shot transfer to downstream tasks while largely benefiting from inter-modal (image-text) alignment via contrastive objectives. This downstream performance can further be enhanced by full-scale fine-tuning which is often compute intensive, requires large labelled data, and can reduce out-of-distribution (OOD) robustness. Furthermore, sole reliance on inter-modal alignment might overlook the rich information embedded within each individual modality. In this work, we introduce a sample-efficient domain adaptation strategy for CLIP, termed Domain Aligned CLIP (DAC), which improves both intra-modal (image-image) and inter-modal alignment on target distributions without fine-tuning the main model. For intra-modal alignment, we introduce a lightweight adapter that is specifically trained with an intra-modal contrastive objective. To improve inter-modal alignment, we introduce a simple framework to modulate the precomputed class text embeddings. The proposed few-shot fine-tuning framework is computationally efficient, robust to distribution shifts, and does not alter CLIP's parameters. We study the effectiveness of DAC by benchmarking on 11 widely used image classification tasks with consistent improvements in 16-shot classification upon strong baselines by about 2.3% and demonstrate competitive performance on 4 OOD robustness benchmarks.