[论文解读] Prompt, Generate, then Cache: Cascade of Foundation Models makes Strong Few-shot Learners
CaFo 将四个预训练模型(CLIP、DINO、DALL-E、GPT-3)级联为 Prompt-Generate-Cache 流水线,以提升少样本视觉分类,并在不需要额外标注的前提下达到最先进的结果。
Visual recognition in low-data regimes requires deep neural networks to learn generalized representations from limited training samples. Recently, CLIP-based methods have shown promising few-shot performance benefited from the contrastive language-image pre-training. We then question, if the more diverse pre-training knowledge can be cascaded to further assist few-shot representation learning. In this paper, we propose CaFo, a Cascade of Foundation models that incorporates diverse prior knowledge of various pre-training paradigms for better few-shot learning. Our CaFo incorporates CLIP's language-contrastive knowledge, DINO's vision-contrastive knowledge, DALL-E's vision-generative knowledge, and GPT-3's language-generative knowledge. Specifically, CaFo works by 'Prompt, Generate, then Cache'. Firstly, we leverage GPT-3 to produce textual inputs for prompting CLIP with rich downstream linguistic semantics. Then, we generate synthetic images via DALL-E to expand the few-shot training data without any manpower. At last, we introduce a learnable cache model to adaptively blend the predictions from CLIP and DINO. By such collaboration, CaFo can fully unleash the potential of different pre-training methods and unify them to perform state-of-the-art for few-shot classification. Code is available at https://github.com/ZrrSkywalker/CaFo.
研究动机与目标
- 通过利用超越仅限于 CLIP 的多样化预训练范式来提升少样本视觉识别的能力。
- 提出级联框架 CaFo,将语言-对比、视觉-对比、视觉-生成和语言-生成先验结合起来。
- 证明一个轻量级的缓存模型能够自适应地融合来自多个预训练模型的预测,从而提升准确性。
提出的方法
- Prompt: 使用 GPT-3 为 CLIP 的文本编码器生成丰富的语言提示。
- Generate: 使用 DALL-E 合成类别特定的训练图像以扩增少样本数据。
- Cache: 构建一个可学习的缓存,具有两个键(CLIP 和 DINO),在推断阶段基于分布相似性对其预测进行自适应融合,以接近零-shot 的 CLIP 基线。
- Adaptive Inference: 先从 CLIP 计算 p_ZS,然后根据与 p_ZS 的相似性对 p_CLIP 和 p_DINO 进行加权,并集成为 p_en。
- Training: 仅优化两个缓存键,同时保持主干模型冻结,使用扩增数据和 Tip-Adapter 风格的训练。
实验结果
研究问题
- RQ1级联多种预训练范式(语言-视觉与视觉-语言)是否能在少样本分类中超越基于 CLIP 的方法?
- RQ2如何将 DALL-E 生成的数据与 GPT-3 的语义丰富提示有效地整合到基于缓存的集成中,以最大化性能?
- RQ3在少样本设置中,基于相似性的自适应集成 CLIP 和 DINO 的预测是否优于朴素的集成?
主要发现
- CaFo 在 11 个数据集上,在 1、2、4、8、16-shot 设置下达到最先进的性能。
- 零样本 CaFo 的表现超越 CLIP 和 CALIP,展示了 DALL-E 生成的数据的好处。
- 用 GPT-3 给 CLIP 提示可获得更丰富的语义提示,提升 CLIP 的表现。
- 通过 CLIP 筛选的 DALL-E 生成图像有效扩展少样本训练集且无需人工标注。
- 一个具有两个键的缓存模型实现对 CLIP 与 DINO 预测的自适应融合,优于基线。
- CaFo 在多样数据集和 CLIP backbone 上表现出鲁棒性。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。