Skip to main content
QUICK REVIEW

[论文解读] SmallCap: Lightweight Image Captioning Prompted with Retrieval Augmentation

Rita Ramos, Bruno Martins|arXiv (Cornell University)|Sep 30, 2022
Multimodal Machine Learning Applications被引用 4
一句话总结

SmallCap 提出了一种轻量级图像字幕生成模型,通过从外部数据存储中检索相关字幕来生成字幕,仅使用 700 万个可训练参数。该模型在 COCO 数据集上表现具有竞争力,并在 nocaps 上实现了最先进的零样本泛化能力,通过检索增强提示(retrieval-augmented prompting)实现,无需微调或重新训练。

ABSTRACT

Recent advances in image captioning have focused on scaling the data and model size, substantially increasing the cost of pre-training and finetuning. As an alternative to large models, we present SmallCap, which generates a caption conditioned on an input image and related captions retrieved from a datastore. Our model is lightweight and fast to train, as the only learned parameters are in newly introduced cross-attention layers between a pre-trained CLIP encoder and GPT-2 decoder. SmallCap can transfer to new domains without additional finetuning and can exploit large-scale data in a training-free fashion since the contents of the datastore can be readily replaced. Our experiments show that SmallCap, trained only on COCO, has competitive performance on this benchmark, and also transfers to other domains without retraining, solely through retrieval from target-domain data. Further improvement is achieved through the training-free exploitation of diverse human-labeled and web data, which proves to be effective for a range of domains, including the nocaps benchmark, designed to test generalization to unseen visual concepts.

研究动机与目标

  • 解决大规模图像字幕生成模型训练带来的高计算成本问题。
  • 在无需微调的情况下实现在图像字幕任务中的领域迁移。
  • 以无需训练的方式利用大规模、多样化的文本数据,以提升泛化能力。
  • 在保持图像字幕基准测试竞争力的同时,减少模型参数量。
  • 探索检索增强作为多模态任务中昂贵预训练和微调的替代方案。

提出的方法

  • SmallCap 使用冻结的 CLIP 视觉编码器和冻结的 GPT-2 语言解码器,仅在两者之间可训练跨注意力层。
  • 该模型基于输入图像和从外部数据存储中检索到的 k 个字幕,生成字幕。
  • 通过使用 CLIP 嵌入进行图像到文本的检索,以找到语义相关的字幕。
  • 检索到的字幕作为提示,引导解码器,使模型能够在不更新参数的情况下适应新的视觉概念。
  • 通过将数据存储替换为特定领域或多样化的网络/人工标注字幕集合,实现无需训练的适应。
  • 性能通过标准指标(如 CIDEr、BLEU 和 METEOR)在 COCO、nocaps、VizWiz 和 Flickr30k 上进行评估。
Figure 1 : SmallCap ’s performance on the COCO dataset and on the out-of-domain split of the nocaps dataset, compared to other approaches in terms of number of trainable parameters. We can control the number of trainable parameters through the dimensionality of the cross-attention ( $d=d_{v}=d_{k}$
Figure 1 : SmallCap ’s performance on the COCO dataset and on the out-of-domain split of the nocaps dataset, compared to other approaches in terms of number of trainable parameters. We can control the number of trainable parameters through the dimensionality of the cross-attention ( $d=d_{v}=d_{k}$

实验结果

研究问题

  • RQ1轻量级图像字幕模型是否能以显著更少的可训练参数实现具有竞争力的性能?
  • RQ2检索增强提示是否能实现无需微调的有效零样本领域迁移?
  • RQ3访问多样化、非图像字幕数据(如音频、视频字幕)是否能提升对未见视觉概念的泛化能力?
  • RQ4检索增强对不同模型规模和数据源的性能影响如何?
  • RQ5仅在 COCO 上训练的模型是否能有效泛化到如 nocaps 和 VizWiz 等域外基准?

主要发现

  • SmallCap 在 COCO 测试集上达到 122.7 的 CIDEr 分数,仅使用 700 万个可训练参数,且在域外基准上优于更大模型。
  • 在 nocaps 基准上,SmallCap 表现优于许多更大的模型,证明其在未见视觉概念上的强大零样本泛化能力。
  • 当使用检索时,性能在模型规模(180 万至 2800 万参数)之间保持稳定,表明参数与性能之间接近最优权衡。
  • 若移除检索,小模型与大模型之间的性能差距增加 4.3 个 CIDEr 分数,表明检索在稳定性与性能中起关键作用。
  • SmallCap 受益于多样化数据源,包括人工标注和网络爬取的字幕,提升了在 VizWiz 和其他域外数据集上的表现。
  • 使用空白图像(无视觉输入)的消融实验得到 90.1 的 CIDEr 分数,证实模型主动利用视觉特征,而非仅对检索到的字幕进行改写。
Figure 2 : The SmallCap approach to image captioning. (a) SmallCap generates a caption conditioned on the encoded input image, as well as on a set of $k$ retrieved captions which are used as a task demonstration, input to the decoder as a prompt. (b) The $k$ captions are retrieved from a datastore o
Figure 2 : The SmallCap approach to image captioning. (a) SmallCap generates a caption conditioned on the encoded input image, as well as on a set of $k$ retrieved captions which are used as a task demonstration, input to the decoder as a prompt. (b) The $k$ captions are retrieved from a datastore o

更好的研究,从现在开始

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

无需绑定信用卡

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