[论文解读] Three Towers: Flexible Contrastive Learning with Pretrained Image Models
Three Towers (3T) 提出了一种灵活的对比学习框架,通过引入一个由冻结的预训练图像分类器嵌入构成的第三塔,增强了视觉-语言模型,同时允许主图像塔和文本塔通过对比损失联合训练。该方法在检索和分类任务中持续优于 LiT 和从零开始训练的基线模型,尤其在 ImageNet-21k 和 Places365 等多样化预训练数据集上表现更优。
We introduce Three Towers (3T), a flexible method to improve the contrastive learning of vision-language models by incorporating pretrained image classifiers. While contrastive models are usually trained from scratch, LiT (Zhai et al., 2022) has recently shown performance gains from using pretrained classifier embeddings. However, LiT directly replaces the image tower with the frozen embeddings, excluding any potential benefits from training the image tower contrastively. With 3T, we propose a more flexible strategy that allows the image tower to benefit from both pretrained embeddings and contrastive training. To achieve this, we introduce a third tower that contains the frozen pretrained embeddings, and we encourage alignment between this third tower and the main image-text towers. Empirically, 3T consistently improves over LiT and the CLIP-style from-scratch baseline for retrieval tasks. For classification, 3T reliably improves over the from-scratch baseline, and while it underperforms relative to LiT for JFT-pretrained models, it outperforms LiT for ImageNet-21k and Places365 pretraining.
研究动机与目标
- 为了解决 LiT 的局限性,即冻结预训练图像嵌入导致图像塔无法从对比学习中获益。
- 开发一种灵活的方法,使视觉-语言模型能够同时从预训练图像表示和对比信号中联合学习。
- 在下游任务中提升鲁棒性和性能,特别是在预训练模型性能不佳或与下游数据不匹配的情况下。
- 通过模块化的三塔架构,实现预训练知识与对比学习归纳偏置之间的权衡。
- 通过实证验证,结合预训练嵌入与对比训练可实现比仅使用冻结嵌入或从零开始训练更好的泛化能力。
提出的方法
- 引入一个包含冻结的、来自分类器(如 ImageNet-21k 或 Places365)的预训练图像嵌入的第三塔,与主图像塔和文本塔相区分。
- 使用网络爬取的图像-字幕对,从零开始训练主图像塔和文本塔,采用对比学习方法。
- 应用额外的对比损失项,将主图像塔与第三塔(预训练嵌入)对齐,实现知识迁移。
- 使用多头注意力池化,将补丁嵌入聚合为单个表示,适用于主图像塔和第三塔。
- 使用 Adafactor 优化整个模型,配合学习率预热和余弦衰减、梯度裁剪以及权重衰减。
- 在推理时丢弃第三塔,仅使用主图像塔和文本塔进行下游任务,以保持高效性。
实验结果
研究问题
- RQ1我们能否通过结合冻结的预训练图像嵌入与可训练图像塔,改进对比视觉-语言学习?
- RQ2所提出的 Three Towers 框架是否在检索和零样本分类任务中优于 LiT 和从零开始训练的基线?
- RQ3当预训练模型与下游任务不匹配时(如使用 Places365 预训练),3T 的表现如何?
- RQ4当预训练模型缺乏某些图像类别或领域覆盖时,该方法是否仍保持鲁棒性?
- RQ5在 ImageNet-21k 和 JFT 等多样化预训练数据集上,3T 是否能超越 LiT 实现更优性能?
主要发现
- 在 Flickr30k 和 COCO 检索基准上,3T 在 top-1 召回率方面优于 LiT 和从零开始训练的基线,分别达到 87.3%(img2txt)和 48.5%(txt2img)。
- 在 ImageNet-1k 零样本分类任务中,3T 超过从零开始训练的基线,并在使用 ImageNet-21k 预训练模型时与 LiT 表现相当或更优。
- 在使用 Places365 预训练模型时,3T 显著优于 LiT,后者在 ImageNet-1k 和 CIFAR-100 等下游任务上无法泛化。
- 3T 展现出对预训练数据集局限性的更强鲁棒性,尤其在预训练模型标签或分布与下游任务不匹配时表现更优。
- 该方法在更大模型规模和更长训练周期下收益更明显,L-scale 模型在 256 个 TPU 芯片上约 3 天内收敛。
- 对于 g-scale 模型,3T 在 512 个 TPU 芯片上约 5 天内收敛,通过将 $eta_2$ 调整为 0.95,训练稳定性得到提升。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。