Skip to main content
QUICK REVIEW

[论文解读] CoCa: Contrastive Captioners are Image-Text Foundation Models

Jiahui Yu, Zirui Wang|arXiv (Cornell University)|May 4, 2022
Multimodal Machine Learning Applications被引用 515
一句话总结

CoCa 将对比学习和生成式视觉-语言预训练统一在一个编码器-解码器模型中,在视觉识别、跨模态检索、以及多模态理解等任务上通过单一预训练检查点实现强零-shot和迁移性能。

ABSTRACT

Exploring large-scale pretrained foundation models is of significant interest in computer vision because these models can be quickly transferred to many downstream tasks. This paper presents Contrastive Captioner (CoCa), a minimalist design to pretrain an image-text encoder-decoder foundation model jointly with contrastive loss and captioning loss, thereby subsuming model capabilities from contrastive approaches like CLIP and generative methods like SimVLM. In contrast to standard encoder-decoder transformers where all decoder layers attend to encoder outputs, CoCa omits cross-attention in the first half of decoder layers to encode unimodal text representations, and cascades the remaining decoder layers which cross-attend to the image encoder for multimodal image-text representations. We apply a contrastive loss between unimodal image and text embeddings, in addition to a captioning loss on the multimodal decoder outputs which predicts text tokens autoregressively. By sharing the same computational graph, the two training objectives are computed efficiently with minimal overhead. CoCa is pretrained end-to-end and from scratch on both web-scale alt-text data and annotated images by treating all labels simply as text, seamlessly unifying natural language supervision for representation learning. Empirically, CoCa achieves state-of-the-art performance with zero-shot transfer or minimal task-specific adaptation on a broad range of downstream tasks, spanning visual recognition (ImageNet, Kinetics-400/600/700, Moments-in-Time), crossmodal retrieval (MSCOCO, Flickr30K, MSR-VTT), multimodal understanding (VQA, SNLI-VE, NLVR2), and image captioning (MSCOCO, NoCaps). Notably on ImageNet classification, CoCa obtains 86.3% zero-shot top-1 accuracy, 90.6% with a frozen encoder and learned classification head, and new state-of-the-art 91.0% top-1 accuracy on ImageNet with a finetuned encoder.

研究动机与目标

  • 提出并开发一个能够涵盖单编码器、双编码器和编码器-解码器范式的单一图像文本基础模型。
  • 引入一个解耦的解码器架构,能够产生用于对比学习的单模态文本表示,以及用于字幕生成的多模态表示。
  • 从头开始在网络规模的大规模 alt-text 和带注图像上进行端到端联合训练,结合对比学习和字幕生成损失。
  • 证明该统一模型在广泛的下游任务上实现 state-of-the-art 或具竞争力的性能,具备零-shot 迁移或最少的任务特定微调。

提出的方法

  • 提出对比字幕器(CoCa),具有两部分解码器:单模态文本解码器(无跨注意力)和多模态解码器(对图像编码进行跨注意)。
  • 使用联合目标 L_CoCa = lambda_Con * L_Con + lambda_Cap * L_Cap 进行训练,将单模态图像和文本嵌入之间的对比损失与多模态解码器输出的字幕损失结合。
  • 使用解耦的训练图,允许共享前向传播以适用于两种目标;利用一个包含 CLS 的图像标记进行对比学习,以及用于文本生成的自回归字幕流。
  • 从头开始在网络规模数据上进行预训练(JFT-3B 标签作为文本 + ALIGN 替代文本)采用 65,536 对批量大小和统一的预训练方案。
  • 采用任务特定的注意性池化,以生成全局(对比)和区域级(字幕/多模态)视觉表示。
  • 提供模型变体(CoCa-Base、CoCa-Large、CoCa)并给出详细的编码器/解码器规格和参数数量;评估零-shot、冻结编码器和微调设置。

实验结果

研究问题

  • RQ1一个在对比学习和字幕目标下训练的单一图像文本基础模型,是否能够在视觉识别、跨模态检索和多模态理解任务上达到最先进的性能?
  • RQ2将解码器解耦为单模态和多模态组件,是否能够在不进行多阶段预训练的情况下实现高效的联合训练和灵活的下游迁移?
  • RQ3对于统一的 CoCa 模型,在零-shot 迁移、冻结特征评估和微调方面,在不同基准之间的比较如何?
  • RQ4任务特定的注意性池化对不同下游任务的视觉特征池化有何影响?
  • RQ5在对带注释的图像和噪声图像-文本数据进行训练时,是否能够在没有任务特定预训练阶段的情况下实现稳健的跨模态对齐与生成能力?

主要发现

  • CoCa 在广泛任务上实现了最先进或具竞争力的结果,包括视觉识别、跨模态检索、多模态理解和图像字幕生成。
  • 在 ImageNet 上,CoCa 实现了 86.3% 的零-shot top-1 准确率,冻结编码器为 90.6%,微调后为 91.0%。
  • 在零-shot 跨模态检索中,CoCa 在 MSCOCO 和 Flickr30K 上优于先前方法,检索指标强劲。
  • 对于视频检索与动作识别,CoCa 在零-shot和冻结编码器设置下表现具竞争力或优越,微调后进一步提高。
  • 在多模态理解基准(VQA、SNLI-VE、NLVR2)上,CoCa 超越强大的视觉语言基线。
  • 在图像字幕生成(MSCOCO、NoCaps)上,CoCa 在没有针对 CIDEr 的优化情况下实现了强烈的 BLEU/METEOR/CIDEr/SPICE 分数,且 NoCaps 结果为生成字幕设定了新的最先进水平。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。