VinVL: Revisiting Visual Representations in Vision-Language Models
VinVL: Revisiting Visual Representations in Vision-Language Models
VinVL:重新审视视觉-语言模型中的视觉表示
♥ Microsoft Corporation ♠ University of Washington † indicates equal contributions.
Abstract
摘要
This paper presents a detailed study of improving visual representations for vision language (VL) tasks and develops an improved object detection model to provide object-centric representations of images. Compared to the most widely used bottom-up and top-down model [2], the new model is bigger, better-designed for VL tasks, and pre-trained on much larger training corpora that combine multiple public annotated object detection datasets. Therefore, it can generate representations of a richer collection of visual objects and concepts. While previous VL research focuses mainly on improving the vision-language fusion model and leaves the object detection model improvement untouched, we show that visual features matter significantly in VL models. In our experiments we feed the visual features generated by the new object detection model into a Transformer-based VL fusion model OSCAR [20], and utilize an improved approach OSCAR+ to pre-train the VL model and fine-tune it on a wide range of downstream VL tasks. Our results show that the new visual features significantly improve the performance across all VL tasks, creating new state-of-the-art results on seven public benchmarks. Code, models and pre-extracted features are released at https://github.com/pzzhang/VinVL.
本文详细研究如何改进视觉-语言(VL)任务中的视觉表示,并给出一个改进的目标检测模型,为图像提供以物体为中心的表示。与当时用得最广的 bottom-up and top-down 模型 [2] 相比,新模型更大、更针对 VL 任务设计,并在合并多个公开标注目标检测数据集的更大规模语料上预训练,因此能表示更丰富的视觉物体和概念。先前的 VL 研究主要改进视觉-语言融合模型,很少改动目标检测器;我们表明,视觉特征在 VL 模型里影响很大。实验中,我们把新检测器给出的视觉特征送进基于 Transformer 的融合模型 OSCAR [20],再用改进后的 OSCAR+ 做预训练,并在多项下游 VL 任务上微调。结果显示,新的视觉特征在全部 VL 任务上都明显提高了成绩,并在七个公开基准上刷新了当时最好结果。代码、模型和预先提取的特征发布在 https://github.com/pzzhang/VinVL。
1. Introduction
1. 引言
Vision language pre-training (VLP) has proved effective for a wide range of vision-language (VL) tasks [25, 35, 4, 33, 19, 18, 44, 20]. VLP typically consists of two stages: (1) an object detection model is pre-trained to encode an image and the visual objects in the image to feature vectors, and (2) a cross-modal fusion model is pre-trained to blend text and visual features. While existing VLP research focuses mainly on improving the cross-modal fusion model, this paper focuses on improving the object-centric visual representations and presents a comprehensive empirical study to demonstrate that visual features matter in VL models.
视觉-语言预训练(VLP)已被证明对多种视觉-语言(VL)任务有效 [25, 35, 4, 33, 19, 18, 44, 20]。VLP 通常分两步:(1)预训练一个目标检测模型,把图像及其视觉物体编成特征向量;(2)预训练一个跨模态融合模型,混合文本和视觉特征。已有 VLP 研究主要改进跨模态融合模型,本文则着眼于改进以物体为中心的视觉表示,并通过系统的实验表明:视觉特征在 VL 模型里很重要。
Among the aforementioned work, a widely-used object detection (OD) model [2] is trained on the Visual Genome dataset [15]. The OD model provides an object-centric representation of images, and has been used in many VL models as a black box. In this work, we pre-train a large-scale object-attribute detection model based on the ResNeXt-152 C4 architecture (short as X152-C4). Compared to the OD model of [2], the new model is better-designed for VL tasks, and is bigger and trained on much larger amounts of data, combining multiple public object detection datasets, including COCO [24], OpenImages (OI) [16], Objects365 [30] and Visual Genome (VG) [15]. As a result, our OD model achieves much better results on a wide range of VL tasks, as shown in Table 1. Compared to other typical OD models, such as X152-FPN trained on OpenImages, our new model can encode a more diverse collection of visual objects and concepts (e.g., producing visual representations for 1848 object categories and 524 attribute categories), as illustrated by an example in Figure 1.
在上述工作里,一个常用的目标检测(OD)模型 [2] 是在 Visual Genome 数据集 [15] 上训练的。它为图像提供以物体为中心的表示,并被许多 VL 模型当作黑盒使用。本文预训练一个大规模的物体-属性检测模型,骨干是 ResNeXt-152 C4 结构(简称 X152-C4)。与 [2] 的检测器相比,新模型更针对 VL 任务,规模更大,训练数据也更多,合并了 COCO [24]、OpenImages(OI)[16]、Objects365 [30] 和 Visual Genome(VG)[15] 等公开目标检测数据集。因此,它在多项 VL 任务上成绩更好,见表 1。与其他常见检测器(例如只在 OpenImages 上训练的 X152-FPN)相比,新模型能编码更多样的视觉物体和概念(例如为 1848 类物体和 524 类属性给出视觉表示),图 1 给出了一个例子。
To validate the effectiveness of the new OD model, we pre-train a Transformer-based cross-modal fusion model OSCAR+ [20] on a public dataset consisting of 8.85 million text-image pairs, where the visual representations of these images are produced by the new OD model and are fixed during OSCAR+ pre-training. We then fine-tune the pre-trained OSCAR+ for a wide range of downstream tasks, including VL understanding tasks such as VQA [8], GQA [12], NLVR2 [34], and COCO text-image retrieval [24], and VL generation tasks such as COCO image captioning [24] and NoCaps [1]. Our results show that the object-centric representations produced by the new OD model significantly improve the performance across all the VL tasks, often by a large margin over strong baselines using the classical OD model [2], creating new state of the arts on all these tasks, including GQA on which none of the published pre-trained models has surpassed the deliberately designed neural state machine (NSM) [11]. We will release the new OD model to the research community.
为了检验新检测器,我们在一个包含 885 万图文对的公开数据上预训练基于 Transformer 的跨模态融合模型 OSCAR+ [20];这些图像的视觉表示由新检测器给出,并在 OSCAR+ 预训练期间保持固定。随后把预训练好的 OSCAR+ 微调到多项下游任务,包括理解任务,如 VQA [8]、GQA [12]、NLVR2 [34] 和 COCO 图文检索 [24],以及生成任务,如 COCO 图像描述 [24] 和 NoCaps [1]。结果表明,新检测器给出的以物体为中心的表示,在全部 VL 任务上都明显提高了成绩,相对使用经典检测器 [2] 的强基线常常高出一截,并在这些任务上刷新了当时最好结果,其中也包括 GQA:此前已发表的预训练模型都未能超过专门为该任务设计的 Neural State Machine(NSM)[11]。我们将向研究社区发布这一新检测器。
The main contributions of this work can be summarized as follows: (i) We present a comprehensive empirical study to demonstrate that visual features matter in VL models. (ii) We have developed a new object detection model that can produce better visual features of images than the classical OD model [2] and substantially uplifts the state-of-the-art results on all major VL tasks across multiple public benchmarks. (iii) We provide a detailed ablation study of our pre-trained object detection model to investigate the relative contribution to the performance improvement due to different design choices regarding diversity of object categories, visual attribute training, training data scale, model size, and model architecture.
本文的主要贡献可归纳如下:(i)通过系统实验表明,视觉特征在 VL 模型里很重要。(ii)我们训练了一个新的目标检测模型,其视觉特征优于经典检测器 [2],并在多项公开基准的主要 VL 任务上明显提高了当时最好结果。(iii)我们对预训练检测器做了详细消融,分别考察物体类别多样性、视觉属性训练、训练数据规模、模型大小和模型结构等设计选择对性能提升的相对贡献。
| Visual feature | VQA test-dev | VQA test-std | GQA test-dev | GQA test-std | Caption B@4 | Caption M | Caption C | Caption S | NoCaps C | NoCaps S | IR R@1 | IR R@5 | IR R@10 | TR R@1 | TR R@5 | TR R@10 | NLVR2 dev | NLVR2 test-P |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Anderson et al. [2] | 73.16 | 73.44 | 61.58 | 61.62 | 40.5 | 29.7 | 137.6 | 22.8 | 86.58 | 12.38 | 54.0 | 80.8 | 88.5 | 70.0 | 91.1 | 95.5 | 78.07 | 78.36 |
| Ours | 75.95 | 76.12 | 65.05 | 64.65 | 40.9 | 30.9 | 140.6 | 25.1 | 92.46 | 13.07 | 58.1 | 83.2 | 90.1 | 74.6 | 92.6 | 96.3 | 82.05 | 83.08 |
| 2.79↑ | 2.68↑ | 3.47↑ | 3.03↑ | 0.4↑ | 1.2↑ | 3.0↑ | 2.3↑ | 5.9↑ | 0.7↑ | 4.1↑ | 2.4↑ | 1.6↑ | 4.6↑ | 1.5↑ | 0.8↑ | 3.98↑ | 4.71↑ |
Table 1: Uniform improvements on seven VL tasks by replacing visual features from Anderson et al. [2] with ours. The NoCaps baseline is from VIVO [9], and our results are obtained by directly replacing the visual features. The baselines for rest tasks are from OSCAR [20], and our results are obtained by replacing the visual features and performing OSCAR+ pre-training. All models are Bert-Base size. As analyzed in Section 4.2, the new visual features contributes 95% of the gain.
| Visual feature | VQA test-dev | VQA test-std | GQA test-dev | GQA test-std | Caption B@4 | Caption M | Caption C | Caption S | NoCaps C | NoCaps S | IR R@1 | IR R@5 | IR R@10 | TR R@1 | TR R@5 | TR R@10 | NLVR2 dev | NLVR2 test-P |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Anderson et al. [2] | 73.16 | 73.44 | 61.58 | 61.62 | 40.5 | 29.7 | 137.6 | 22.8 | 86.58 | 12.38 | 54.0 | 80.8 | 88.5 | 70.0 | 91.1 | 95.5 | 78.07 | 78.36 |
| Ours | 75.95 | 76.12 | 65.05 | 64.65 | 40.9 | 30.9 | 140.6 | 25.1 | 92.46 | 13.07 | 58.1 | 83.2 | 90.1 | 74.6 | 92.6 | 96.3 | 82.05 | 83.08 |
| 2.79↑ | 2.68↑ | 3.47↑ | 3.03↑ | 0.4↑ | 1.2↑ | 3.0↑ | 2.3↑ | 5.9↑ | 0.7↑ | 4.1↑ | 2.4↑ | 1.6↑ | 4.6↑ | 1.5↑ | 0.8↑ | 3.98↑ | 4.71↑ |
表 1:用我们的视觉特征替换 Anderson et al. [2] 的特征后,七项 VL 任务一律提高。NoCaps 基线来自 VIVO [9],我们的结果是直接替换视觉特征得到的。其余任务的基线来自 OSCAR [20],我们的结果是替换视觉特征并做 OSCAR+ 预训练得到的。全部模型都是 BERT-Base 规格。按第 4.2 节的分析,新视觉特征贡献了 95% 的增益。
Figure 1: Predictions from an X152-FPN model trained on OpenImages (Left) and our X152-C4 model trained on four public object detection datasets (Right). Our model contains much richer semantics, such as richer visual concepts and attribute information, and the detected bounding boxes cover nearly all semantically meaningful regions. Compared with those from the common object classes in typical OD models (Left), the rich and diverse region features from our model (Right) are crucial for vision-language tasks. For concepts detected by both models, e.g., “boy”, attributes from our model offer richer information, e.g., “young barefoot shirtless standing surfing smiling little playing looking blond boy”. There are object concepts that are detected by our model but not by the OpenImages model, including fin, wave, foot, shadow, sky, hair, mountain, water, (bare, tan, light, beige) back, (blue, colorful, floral, multi colored, patterned) trunk, sand, beach, ocean, (yellow, gold) bracelet, logo, hill, head, (black, wet) swim trunks, black, wet swim trunks. Compared to the R101-C4 model of [2], our model produces more accurate object-attribute detection results and better visual features for VL applications; see Appendix A for the full pictures and predictions from [2].
图 1:在 OpenImages 上训练的 X152-FPN 模型的预测(左)与我们在四个公开目标检测数据集上训练的 X152-C4 模型的预测(右)。我们的模型语义更丰富,视觉概念和属性信息更多,检测框覆盖了几乎全部有语义的区域。与常见目标检测模型里那些普通物体类别(左)相比,我们模型给出的丰富、多样的区域特征(右)对视觉-语言任务很重要。对两个模型都能检出的概念,例如 “boy”,我们模型给出的属性更细,例如 “young barefoot shirtless standing surfing smiling little playing looking blond boy”。还有一些物体概念只被我们的模型检出、未被 OpenImages 模型检出,包括 fin、wave、foot、shadow、sky、hair、mountain、water,(bare、tan、light、beige)back,(blue、colorful、floral、multi colored、patterned)trunk、sand、beach、ocean,(yellow、gold)bracelet、logo、hill、head,(black、wet)swim trunks、black、wet swim trunks。与 [2] 的 R101-C4 模型相比,我们的模型给出更准确的物体-属性检测结果,以及更适合 VL 应用的视觉特征;完整图片和 [2] 的预测见附录 A。
2. Improving Vision in Vision Language
2. 改进视觉-语言中的视觉部分
Deep learning-based VL models typically consist of two modules: an image understanding module Vision and a cross-modal understanding module VL:
基于深度学习的 VL 模型通常包含两个模块:图像理解模块 Vision,以及跨模态理解模块 VL:
where and are the inputs of the vision and language modalities, respectively. The output of the Vision module consists of and . is the semantic representation of the image, such as tags or detected objects, and the distributional representation of the image in a high-dimensional latent space represented using e.g., the box or region features produced by a VG-pre-trained Faster-RCNN model [2]. Most VL models use only the visual features , while the recently proposed OSCAR [20] model shows that can serve as anchors for learning better vision-language joint representations and and thus can improve the performance on various VL tasks. and of the VL module of Equation (1) vary among different VL tasks. In VQA, is a question and is an answer to be predicted. In text-image retrieval, is a sentence and is the matching score of a sentence-image pair. In image captioning, is not given and is a caption to be generated.
其中 和 分别是视觉模态和语言模态的输入。Vision 模块的输出由 和 组成。 是图像的语义表示,例如标签或检出的物体; 是图像在高维潜空间中的分布表示,例如由在 VG 上预训练的 Faster R-CNN 模型 [2] 给出的框或区域特征。多数 VL 模型只用视觉特征 ,而最近提出的 OSCAR [20] 表明, 可以作为锚点,用来学习更好的视觉-语言联合表示,从而改进各项 VL 任务的成绩。式 (1) 中 VL 模块的 和 随任务而变。在 VQA 里, 是问题, 是待预测的答案。在图文检索里, 是句子, 是句-图对的匹配分数。在图像描述里,不给出 , 是待生成的描述。
¹ We use the terms region and box interchangeably.
Inspired by the great success of pre-trained language models to various natural language processing tasks, vision-language pre-training (VLP) has achieved remarkable success in improving the performance of the cross-modal understanding module VL by (1) unifying vision and language modeling VL with Transformer and (2) pre-training the unified VL with large-scale text-image corpora. However, most recent works on VLP treat the image understanding module Vision as a black box and leave the visual feature improvement untouched since the development of the classical OD model [2] three years ago, despite that there has been much research progress on improving object detection by 1) developing much more diverse, richer, and larger training datasets (e.g. OpenImages and Objects 365), 2) gaining new insights in object detection algorithms such as feature pyramid network [22], one-stage dense prediction [23], and anchor-free detectors [36], and 3) leveraging more powerful GPUs for training bigger models.
受预训练语言模型在多项自然语言处理任务上成功的启发,视觉-语言预训练(VLP)也显著改进了跨模态理解模块 VL,途径是:(1)用 Transformer 把视觉和语言建模统一起来;(2)在大规模图文语料上预训练这个统一的 VL 模型。不过,近期多数 VLP 工作仍把图像理解模块 Vision 当作黑盒,自三年前经典检测器 [2] 出现以来几乎没有改进视觉特征;尽管目标检测本身已有不少进展,包括 1)更多样、更丰富、更大规模的训练数据(例如 OpenImages 和 Objects365),2)特征金字塔网络 [22]、单阶段稠密预测 [23]、无锚框检测器 [36] 等算法上的新认识,以及 3)用更强的 GPU 训练更大的模型。
In this work, we focus on improving Vision for better visual representations. We developed a new OD model by enriching the visual object and attribute categories, enlarging the model size and training on a much larger OD daset-set, and thus advanced the state of the arts on a wide range of VL tasks. We detail how the new OD model is developed in the rest of this section and then describe the use of OSCAR+ for VL pre-training in Section 3.
本文着眼于改进 Vision,以得到更好的视觉表示。我们通过扩充视觉物体和属性类别、加大模型,并在更大的目标检测数据集上训练,得到一个新检测器,从而在多项 VL 任务上推进了当时最好结果。本节余下部分说明新检测器如何训练,第 3 节再介绍如何用 OSCAR+ 做 VL 预训练。
2.1. Object Detection Pre-training
2.1. 目标检测预训练
To improve the OD model for VL tasks, we utilize four public object detection datasets. As most datasets do not have attribute annotations, we adopt a pre-training and fine-tuning strategy to build our OD model. We first pre-train an OD model on a large-scale corpus consisting of four public datasets, and then fine-tune the model with an additional attribute branch on Visual Genome, making it capable of detecting both objects and attributes.
为改进面向 VL 任务的检测器,我们使用四个公开目标检测数据集。由于多数数据集没有属性标注,我们采用先预训练、再微调的策略:先在由四个公开数据集组成的大规模语料上预训练检测器,再在 Visual Genome 上加上属性分支做微调,使模型既能检测物体也能检测属性。
Data. Table 2 summarizes the statistics of the four public datasets used in our object detection pre-training, including COCO, OpenImagesV5 (OI), Objects365V1, and Visual Genome (VG). These datasets have complementary characters, and are extremely unbalanced in terms of data size, object vocabulary, and the number of annotations in each class. For example, the VG dataset has a rich and diverse set of annotations for both objects and their attributes with an open vocabulary. But its annotations are noisy and suffer from the missing-annotation problem. The COCO dataset, on the other hand, is very well annotated. But the coverage of visual objects and attributes is much lower than that in VG although we use both its 80 object classes and 91 stuff classes to include as diverse visual concepts as possible. We take the following steps to build a unified corpus by combining the four datasets.
数据。表 2 汇总了目标检测预训练所用四个公开数据集的统计,包括 COCO、OpenImagesV5(OI)、Objects365V1 和 Visual Genome(VG)。这些数据集特点互补,但在数据规模、物体词表以及各类标注数量上极度不均衡。例如,VG 对物体及其属性有丰富而多样的开放词表标注,但标注较噪,并存在漏标。COCO 的标注质量很高,但视觉物体和属性的覆盖远低于 VG,尽管我们同时使用了它的 80 个物体类和 91 个 stuff 类,以尽量纳入多样的视觉概念。我们按下列步骤把四个数据集合并成一个统一语料。
- First of all, to enhance visual concepts of tail classes, we perform class-aware sampling for OpenImages and Objects365 to get at least 2000 instances per class, resulting in 2.2M and 0.8M images, respectively.
- 首先,为了加强尾部类别的视觉概念,我们对 OpenImages 和 Objects365 做类别感知抽样,使每类至少有 2000 个实例,分别得到 220 万和 80 万张图像。
- To balance the contribution of each dataset, we merge the four datasets with 8 copies of COCO (8×0.11M), 8 copies of VG (8×0.1M), 2 copies of class-aware sampled Objects365 (2×0.8M) and one copy of the class-aware sampled OpenImages (2.2M).
- 为了平衡各数据集的贡献,合并时使用 8 份 COCO(8×0.11M)、8 份 VG(8×0.1M)、2 份经过类别感知抽样的 Objects365(2×0.8M),以及 1 份经过类别感知抽样的 OpenImages(2.2M)。
- To unify their object vocabularies, we use the VG vocabulary and its object aliases as the base vocabulary, merge a class from the other three datasets into a VG class if their class names or aliases match, and add a new class if no match is found.
- 为统一物体词表,以 VG 词表及其物体别名为基准:若另外三个数据集中某类的名称或别名与某个 VG 类匹配,则并入该类;若没有匹配,则新增一类。
- Finally, we keep all VG classes that contain at least 30 instances, resulting in 1594 VG classes and 254 classes from the other three datasets that cannot be mapped to the VG vocabulary, resulting in a merged object detection dataset that contains 1848 classes.
- 最后,保留所有至少有 30 个实例的 VG 类,得到 1594 个 VG 类,以及另外三个数据集中无法映射到 VG 词表的 254 个类,合并后的目标检测数据集共 1848 类。
| Source | VG | COCO w/ stuff | Objects365 | OpenImagesV5 | Total |
|---|---|---|---|---|---|
| Image | 97k | 111k | 609k | 1.67M | 2.49M |
| classes | 1594 | 171 | 365 | 500 | 1848 |
| Sampling | ×8 | ×8 | CA-2k, ×2 | CA-2k | 5.43M |
Table 2: The Vision pre-training datasets. In sampling, × means copies in one epoch and “CA-2k” means class-aware sampling with at least 2K instances per class.
| Source | VG | COCO w/ stuff | Objects365 | OpenImagesV5 | Total |
|---|---|---|---|---|---|
| Image | 97k | 111k | 609k | 1.67M | 2.49M |
| classes | 1594 | 171 | 365 | 500 | 1848 |
| Sampling | ×8 | ×8 | CA-2k, ×2 | CA-2k | 5.43M |
表 2:视觉预训练数据集。抽样中,× 表示一个 epoch 里复制 份;“CA-2k” 表示类别感知抽样,每类至少 2000 个实例。
Model Architecture (FPN vs C4). Although [22] shows that the FPN model outperforms the C4 model for object detection, recent studies [13] demonstrate that FPN does not provide more effective region features for VL tasks than C4, which is also confirmed by our experimental results². We thus conduct a set of carefully designed experiments, as to be detailed in Appendix E, and find two main reasons for this. The first is that all layers in the C4 model used for region feature extraction are pre-trained using the ImageNet dataset while the multi-layer-perceptron (MLP) head of the FPN model are not. It turns out that the VG dataset is still too small to train a good enough visual features for VL tasks and using ImageNet-pre-trained weights is beneficial. The second is due to the different network architectures (CNN vs. MLP). The convolutional head used in C4 has a better inductive bias for encoding visual information than the MLP head of FPN. Therefore, in this study we use C4 architecture for VLP.
模型结构(FPN 与 C4)。虽然 [22] 表明 FPN 在目标检测上优于 C4,但近期研究 [13] 指出,对 VL 任务而言,FPN 并不比 C4 提供更有效的区域特征,我们的实验也证实了这一点²。我们因此做了一组仔细设计的实验(细节见附录 E),并找到两个主要原因。第一,C4 模型里用于提取区域特征的全部层都在 ImageNet 上预训练过,而 FPN 模型的多层感知机(MLP)头没有。VG 数据仍然太小,不足以单独训练出足够好的 VL 视觉特征,使用 ImageNet 预训练权重是有益的。第二是网络结构不同(CNN 对 MLP)。C4 使用的卷积头在编码视觉信息上比 FPN 的 MLP 头有更好的归纳偏置。因此,本研究在 VLP 中采用 C4 结构。
² We find in our experiments that using the same training process, the X152-C4 model even produces better object detection result than the X152-FPN model. See Appendix E for details.
Model Pre-Training. Following the common practice in object detection training, we freeze the first convolution layer, the first residual block, and all the batch-norm layers. We also use several data augmentation methods, including horizontal flipping and multi-scale training. To train a detection model with the X152-C4 architecture, we initialize the model backbone from an ImageNet-5K checkpoint [39] and train for 1.8M iterations with a batch size of 16 images.
模型预训练。按目标检测训练的常见做法,我们冻结第一层卷积、第一个残差块,以及全部 batch-norm 层。数据增强包括水平翻转和多尺度训练。训练 X152-C4 检测模型时,骨干从 ImageNet-5K 检查点 [39] 初始化,训练 180 万次迭代,批量大小为 16 张图像。
2.2. Injecting attribute information into the model
2.2. 向模型注入属性信息
Following [2], we add an attribute branch to the pre-trained OD model, and then fine-tune the OD model on VG to inject attribute information (524 classes). Since the object representations are pre-trained in the object detection pre-training stage, we can focus the VG fine-tuning on learning attributes by picking a much larger attribute loss weight 1.25, compared to 0.5 used in [2, 13]. Thus, our fine-tuned model significantly outperforms previous models [2, 13] in detecting objects and attributes on VG.
我们沿用 [2],在预训练检测器上增加属性分支,再在 VG 上微调,以注入属性信息(524 类)。由于物体表示已在目标检测预训练阶段学好,VG 微调可以把重点放在属性上,因而把属性损失权重设为 1.25,高于 [2, 13] 使用的 0.5。这样微调后的模型,在 VG 上的物体和属性检测明显优于先前模型 [2, 13]。
2.3. Efficient region feature extractor for VL tasks
2.3. 面向 VL 任务的高效区域特征提取器
With a richer set of visual objects and attributes, the classical class-aware non-maximal suppression (NMS) post-processing takes a significantly larger amount of time to remove overlapped bounding boxes, making the feature extraction process extremely slow. To improve the efficiency, we replace the class-aware NMS with the class-agnostic NMS that only conducts the NMS operation once³. We also replace the time-consuming conv layers with dilation=2 used in [2] with conv layers without dilation. These two replacements make the region feature extraction process much faster than that in [2] without any accuracy drop on VL downstream tasks. We report the end-to-end inference time of VL models with different vision models on a Titan-X GPU and a CPU with a single thread in Table 22 in Appendix F.
物体和属性集合更丰富之后,经典的类别感知非极大值抑制(NMS)后处理要花多得多的时间去除重叠框,特征提取会变得极慢。为提高效率,我们把类别感知 NMS 换成只做一次 NMS 的类别无关 NMS³,并把 [2] 中耗时的 dilation=2 卷积层换成无膨胀的卷积层。这两处替换使区域特征提取比 [2] 快很多,且不降低 VL 下游任务的精度。不同视觉模型在 Titan-X GPU 以及单线程 CPU 上的端到端推理时间,见附录 F 的表 22。
³ Counting the NMS in the RPN module, there are in total 2 NMS operations in our efficient region feature extractor.
In summary, the pre-trained OD model serves as the image understanding module, as in Equation (1), to produce vision presentations for downstream VL tasks. Here, is the set of detected object names (in text) and is the set of region features. Each region feature is denoted as , where is a -dimensional representation from the input of the last linear classification layer of the detection head (i.e. ) and is a -dimensional position encoding of the region (i.e. )⁴.
总之,预训练检测器充当式 (1) 中的图像理解模块,为下游 VL 任务给出视觉表示 。这里 是检出的物体名称集合(文本), 是区域特征集合。每个区域特征记为 ,其中 是来自检测头最后一层线性分类器输入的 维表示(即 ), 是该区域的 维位置编码(即 )⁴。
⁴ It includes coordinates of the bounding boxes, and height & width.
3. OSCAR+ Pre-training
3. OSCAR+ 预训练
The success of VLP lies in the use of a unifying model architecture for a wide range of VL tasks and the large-scale pre-training of the unified model using objectives that correlate with the performance metrics of these downstream VL tasks. In this study we pre-train an improved version of OSCAR [20], known as OSCAR+ models, to learn the joint image-text representations using image tags as anchors for image-text alignment.
VLP 之所以有效,在于用统一的模型结构覆盖多项 VL 任务,并在大规模数据上用与这些下游指标相关的目标来预训练这个统一模型。本研究预训练 OSCAR [20] 的改进版,称为 OSCAR+,用图像标签作为图文对齐的锚点,学习联合的图文表示。
3.1. Pre-training corpus
3.1. 预训练语料
We build our pre-training corpus based on three types of existing vision and VL datasets: (1) image captioning datasets with human-annotated captions as and machine-generated⁵ image tags as , including COCO [24], Conceptual Captions (CC) [31], SBU captions [27] and flicker30k [41]; (2) visual QA datasets with questions as and human-annotated answers as , including GQA [12], VQA [8] and VG-QAs; (3) image tagging datasets with machine-generated⁶ captions as and human-annotated tags as , including a subset of OpenImages (1.67M images). In total, the corpus contains 5.65 million unique images, 8.85 million text-tag-image triples. The detailed statistics are presented in Table 17 in the Appendix. The size of the pre-training corpus could have been significantly increased by combining large-scale image tagging datasets, such as the full set of OpenImages (9M images) and YFCC (92M images). We leave it to future work to leverage much larger corpora for model pre-training.
预训练语料由三类已有的视觉与 VL 数据集构成:(1)图像描述数据,以人工标注的描述为 、机器生成⁵ 的图像标签为 ,包括 COCO [24]、Conceptual Captions(CC)[31]、SBU captions [27] 和 flicker30k [41];(2)视觉问答数据,以问题为 、人工标注答案为 ,包括 GQA [12]、VQA [8] 和 VG-QAs;(3)图像打标数据,以机器生成⁶ 的描述为 、人工标注标签为 ,包括 OpenImages 的一个子集(167 万张图像)。语料共有 565 万张不重复图像、885 万条文本-标签-图像三元组。详细统计见附录表 17。若再并入更大规模的打标数据,例如完整的 OpenImages(900 万张)和 YFCC(9200 万张),语料还可以显著扩大。把更大规模语料用于预训练,留给后续工作。
⁵ We use the same model to extract visual features.
⁶ We use the captioning model released by OSCAR [20].
| Loss / / | All 's (OSCAR) | 's from QA | All 's | 3-way contrastive All (OSCAR+) | 3-way contrastive 's from QA |
|---|---|---|---|---|---|
| VQA (dev) | 69.8±0.08 | 70.1±0.08 | 69.5±0.05 | 69.8±0.06 | 69.7±0.06 |
| COCO-IR | 73.9±0.2 | 75.0±0.2 | 75.0±0.7 | 78.3±0.3 | 77.7±0.7 |
Table 3: Effects of different pre-training contrastive losses on downstream tasks (R50-C4 as Vision module and 4-layer Transformer as VL module in (1) ). COCO-IR metric is Image-to-Text retrieval R@1 at COCO 1K test set. Blue indicates the best result for a task and Black indicates the runner-up.
| Loss / / | All 's (OSCAR) | 's from QA | All 's | 3-way contrastive All (OSCAR+) | 3-way contrastive 's from QA |
|---|---|---|---|---|---|
| VQA (dev) | 69.8±0.08 | 70.1±0.08 | 69.5±0.05 | 69.8±0.06 | 69.7±0.06 |
| COCO-IR | 73.9±0.2 | 75.0±0.2 | 75.0±0.7 | 78.3±0.3 | 77.7±0.7 |
表 3:不同预训练对比损失对下游任务的影响(Vision 模块为 R50-C4,式 (1) 中的 VL 模块为 4 层 Transformer)。COCO-IR 指标是 COCO 1K 测试集上的 Image-to-Text 检索 R@1。蓝色表示该任务最好结果,黑色表示次好结果。本文表格中最好结果以粗体标出。
3.2. Pre-training Objectives
3.2. 预训练目标
There are two terms in the OSCAR+ pre-training loss as in Equation (2).
如式 (2) 所示,OSCAR+ 的预训练损失由两项组成。
is the Masked Token Loss defined on the text modality ( and ), following closely [20]. (See Appendix B.2 for details.) is a novel 3-way Contrastive Loss. Different from the binary contrastive loss used in OSCAR [20], the proposed 3-way Contrastive Loss to effectively optimize the training objectives used for VQA [40] and text-image matching [6]⁷.
是定义在文本模态( 和 )上的掩码词元损失,做法紧跟 [20](细节见附录 B.2)。 是一种新的三路对比损失。与 OSCAR [20] 使用的二路对比损失不同,这里提出的三路对比损失是为了有效优化 VQA [40] 和图文匹配 [6] 所用的训练目标⁷。
⁷ [6] uses a deep-learning-based text-image matching model to select the best caption candidate for a given image.
As shown in Equation 3, takes into account two types of training samples : the caption, image-tags, image-features triplets of the image captioning and image tagging data, and the question, answer, image-features triplets of the VQA data.
如式 (3) 所示, 考虑两类训练样本 :来自图像描述和打标数据的 caption, image-tags, image-features 三元组,以及来自 VQA 数据的 question, answer, image-features 三元组。
To compute contrastive losses, negative examples need to be constructed. We construct two types of negative (unmatched) triplets for the two types of training samples, respectively. One is the polluted “captions” and the other the polluted “answers” . To classify whether a caption-tags-image triplet contains a polluted caption is a text-image matching task. To classify whether a question-answer-image triplet contains a polluted answer is an answer selection task for VQA. Since the encoding of [CLS] can be viewed as a representation of the triplet , we apply a fully-connected (FC) layer on top of it as a 3-way classifier to predict whether the triplet is matched (), contains a polluted (), or contains a polluted (). The 3-way contrastive loss is defined as
计算对比损失需要构造负例。我们分别给两类训练样本构造两类负(不匹配)三元组:一类是被污染的“描述” ,另一类是被污染的“答案” 。判断一个描述-标签-图像三元组是否含有被污染的描述,是图文匹配任务;判断一个问题-答案-图像三元组是否含有被污染的答案,是 VQA 的答案选择任务。[CLS] 的编码可以看作三元组 的表示,我们在其上加一个全连接层作为三路分类器 ,预测该三元组是匹配的()、含有被污染的 (),还是含有被污染的 ()。三路对比损失定义为
where the dataset contains 50% matched triples, 25% -polluted triples, and 25% -polluted triples. For efficient implementation, the polluted is uniformly sampled from all 's (captions and questions) and is uniformly sampled from all 's (tags and answers) in the corpus. As demonstrated in Table 3, when only the answer-polluted triplets are used, i.e., with sampled from 's from QA corpus, the contrastive loss simulates closely the objective for the VQA task but not the text-image retrieval task. As a result, the pre-trained model can be effectively adapted to VQA, but not so to text-image retrieval. By contrast, the proposed 3-way contrastive loss transfers well to both tasks.
其中数据集 含 50% 匹配三元组、25% 被污染的三元组和 25% 被污染的三元组。为了高效实现,被污染的 从语料中全部 (描述和问题)里均匀抽样, 从全部 (标签和答案)里均匀抽样。如表 3 所示,若只用答案被污染的三元组,即 且 抽自问答语料中的 ,则对比损失很接近 VQA 的目标,却不像图文检索的目标。结果是,预训练模型能较好地迁到 VQA,对图文检索则不然。相比之下,这里的三路对比损失对两项任务都能较好地迁移。
3.3. Pre-trained models
3.3. 预训练模型
We pre-train two model variants, denoted as OSCAR+ and OSCAR+, which are initialized with parameters of BERT base (, , ) and large (, , ), respectively, where is the number of layers, the hidden size, and the number of self-attention heads. To ensure that the image region features have the same input embedding size as BERT, we transform the position-augmented region features using a linear projection via matrix . The trainable parameters are . OSCAR+ is trained for at least 1M steps, with learning rate and batch size 1024. OSCAR+ is trained for at least 1M steps, with learning rate and batch size 1024. The sequence length of language tokens and region features are 35 and 50, respectively.
我们预训练两个变体,记为 OSCAR+ 和 OSCAR+,分别用 BERT base(,,)和 large(,,)的参数 初始化,其中 是层数, 是隐层大小, 是自注意力头数。为使图像区域特征与 BERT 的输入嵌入维度一致,我们用矩阵 对带位置信息的区域特征做线性投影。可训练参数为 。OSCAR+ 至少训练 100 万步,学习率 ,批量大小 1024。OSCAR+ 至少训练 100 万步,学习率 ,批量大小 1024。语言词元 的序列长度是 35,区域特征 的序列长度是 50。
3.4. Adapting to VL Tasks
3.4. 适配到 VL 任务
We adapt the pre-trained models to seven downstream VL tasks, including five understanding tasks and two generation tasks. Each task poses different challenges for adaptation. We refer to Appendix C for details about the seven tasks and our fine-tuning strategies.
我们把预训练模型适配到七项下游 VL 任务,其中五项是理解任务,两项是生成任务。每项任务对适配都有不同要求。七项任务及微调策略的细节见附录 C。
4. Experiments and Analysis
4. 实验与分析
4.1. Main Results
4.1. 主要结果
To account for model parameter efficiency, we group the SoTA models in three categories: (i) SoTA indicates the best performance achieved by small models prior to the Transformer-based VLP models. (ii) SoTA indicates the best performance produced by VLP models of BERT base size. (iii) SoTA indicates the best performance yielded by VLP models of BERT large size.
为了兼顾参数效率,我们把当时最好模型分成三类:(i)SoTA 表示基于 Transformer 的 VLP 模型出现之前,小模型取得的最好成绩;(ii)SoTA 表示 BERT base 规格的 VLP 模型的最好成绩;(iii)SoTA 表示 BERT large 规格的 VLP 模型的最好成绩。
Table 4 gives an overview of the results of OSCAR+ with VINVL(short for VINVL) on seven VL tasks, compared to previous SoTAs⁸. VINVL outperforms previous SoTA models on all tasks⁹, often by a significantly large margin. The result demonstrates the effectiveness of the region features produced by the new OD model.
表 4 总览 OSCAR+ 配合 VINVL(文中简称 VINVL)在七项 VL 任务上相对先前最好结果的表现⁸。VINVL 在全部任务上都超过了先前最好模型⁹,常常超出一截。这说明新检测器给出的区域特征是有效的。
⁸ All the (single-model) SoTAs are from the published results. For all the tables in this paper, Blue indicates the best result for a task, and gray background indicates results produced by VINVL.
⁹ The only exception is B@4 on image captioning.
| Task | VQA test-dev | VQA test-std | GQA test-dev | GQA test-std | Cap. B@4 | Cap. M | Cap. C | Cap. S | NoCaps C | NoCaps S | IR R@1 | IR R@5 | IR R@10 | TR R@1 | TR R@5 | TR R@10 | NLVR2 dev | NLVR2 test-P |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SoTA | 70.55 | 70.92 | — | 63.17 | 38.9 | 29.2 | 129.8 | 22.4 | 61.5 | 9.2 | 39.2 | 68.0 | 81.3 | 56.6 | 84.5 | 92.0 | 54.10 | 54.80 |
| SoTA | 73.59 | 73.67 | 61.58 | 61.62 | 40.5 | 29.7 | 137.6 | 22.8 | 86.58 | 12.38 | 54.0 | 80.8 | 88.5 | 70.0 | 91.1 | 95.5 | 78.39 | 79.30 |
| SoTA | 74.75 | 74.93 | — | — | 41.7 | 30.6 | 140.0 | 24.5 | — | — | 57.5 | 82.8 | 89.8 | 73.5 | 92.3 | 96.0 | 79.76 | 81.47 |
| VinVL | 75.95 | 76.12 | 65.05 | 64.65 | 40.9 | 30.9 | 140.6 | 25.1 | 92.46 | 13.07 | 58.1 | 83.2 | 90.1 | 74.6 | 92.6 | 96.3 | 82.05 | 83.08 |
| VinVL | 76.52 | 76.60 | — | — | 41.0 | 31.1 | 140.9 | 25.2 | — | — | 58.8 | 83.5 | 90.3 | 75.4 | 92.9 | 96.2 | 82.67 | 83.98 |
| 1.77↑ | 1.67↑ | 3.47↑ | 1.48↑ | 0.7↓ | 0.5↑ | 0.9↑ | 0.7↑ | 5.9↑ | 0.7↑ | 1.3↑ | 0.7↑ | 0.5↑ | 1.9↑ | 0.6↑ | 0.3↑ | 2.91↑ | 2.51↑ |
Table 4: An overall comparison with SoTAs on seven tasks. indicates the improvement over SoTA. SoTA with subscript S, B, L indicates performance achieved by small models, and models with the model size similar to BERT base and large, respectively. SoTAs: VQA is from ERNIE-VIL [42], GQA is from NSM [11], NoCaps is from VIVO [9], NLVR2 is from VILLA [7], the rest tasks are from OSCAR [20].
| Task | VQA test-dev | VQA test-std | GQA test-dev | GQA test-std | Cap. B@4 | Cap. M | Cap. C | Cap. S | NoCaps C | NoCaps S | IR R@1 | IR R@5 | IR R@10 | TR R@1 | TR R@5 | TR R@10 | NLVR2 dev | NLVR2 test-P |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SoTA | 70.55 | 70.92 | — | 63.17 | 38.9 | 29.2 | 129.8 | 22.4 | 61.5 | 9.2 | 39.2 | 68.0 | 81.3 | 56.6 | 84.5 | 92.0 | 54.10 | 54.80 |
| SoTA | 73.59 | 73.67 | 61.58 | 61.62 | 40.5 | 29.7 | 137.6 | 22.8 | 86.58 | 12.38 | 54.0 | 80.8 | 88.5 | 70.0 | 91.1 | 95.5 | 78.39 | 79.30 |
| SoTA | 74.75 | 74.93 | — | — | 41.7 | 30.6 | 140.0 | 24.5 | — | — | 57.5 | 82.8 | 89.8 | 73.5 | 92.3 | 96.0 | 79.76 | 81.47 |
| VinVL | 75.95 | 76.12 | 65.05 | 64.65 | 40.9 | 30.9 | 140.6 | 25.1 | 92.46 | 13.07 | 58.1 | 83.2 | 90.1 | 74.6 | 92.6 | 96.3 | 82.05 | 83.08 |
| VinVL | 76.52 | 76.60 | — | — | 41.0 | 31.1 | 140.9 | 25.2 | — | — | 58.8 | 83.5 | 90.3 | 75.4 | 92.9 | 96.2 | 82.67 | 83.98 |
| 1.77↑ | 1.67↑ | 3.47↑ | 1.48↑ | 0.7↓ | 0.5↑ | 0.9↑ | 0.7↑ | 5.9↑ | 0.7↑ | 1.3↑ | 0.7↑ | 0.5↑ | 1.9↑ | 0.6↑ | 0.3↑ | 2.91↑ | 2.51↑ |
表 4:在七项任务上与当时最好结果的总体比较。 表示相对当时最好结果的提升。下标 S、B、L 分别表示小模型,以及与 BERT base、large 规模相近的模型取得的成绩。当时最好结果来源:VQA 来自 ERNIE-ViL [42],GQA 来自 NSM [11],NoCaps 来自 VIVO [9],NLVR2 来自 VILLA [7],其余任务来自 OSCAR [20]。
In Tables 5 to 11, we report the detailed results for each downstream task, respectively. (i) The VQA results are shown in Table 5, where our single OSCAR+ model outperforms the best ensemble model (InterBERT large [21]) on the VQA leaderboard as of Dec. 12, 2020¹⁰. (ii) The GQA results are shown in Table 6, where OSCAR+ w/ VINVL is the first VLP model that outperforms the neural state machine (NSM) [11] which contains some sophisticated reasoning components deliberately designed for the task. (iii) The Image Captioning results on the public “Karpathy” 5k test split are shown in Table 7. Table 8 shows on a concise version of the COCO image captioning online leaderboard¹¹. The online testing setting reports the results on 40K images, with 5 reference captions (c5) and 40 reference captions (c40) per image. At the time of submitting this paper, our single model achieves No.1 on the entire leaderboard, outperforming all 263 models, including many ensemble (and anonymous) models. (iv) The Novel Object Captioning (NoCaps) results are shown in Table 9. Without any VLP, i.e. by directly training a BERT-based captioning model on COCO, the model with our new visual features (denoted as VinVL) already surpasses the human performance in CIDEr¹². By adding VIVO [9] pre-training, our VinVL improves the original VIVO result by 6 CIDEr points and creates a new SoTA. (v) Overall, on all these tasks (VQA in Table 5, Image Captioning in Table 7, NoCaps in Table 9, Image-Text Retrieval in Table 10, NLVR2 in Table 11), we show that OSCAR+ can match or outperform previous SoTA large models, and OSCAR+ substantially uplifts the SoTA.
表 5 至表 11 分别给出各下游任务的详细结果。(i)VQA 结果见表 5:截至 2020 年 12 月 12 日,我们单个 OSCAR+ 模型已超过 VQA 排行榜上最好的集成模型(InterBERT large [21])¹⁰。(ii)GQA 结果见表 6:OSCAR+ 配合 VINVL 是第一个超过 Neural State Machine(NSM)[11] 的 VLP 模型,而 NSM 含有专门为该任务设计的复杂推理部件。(iii)在公开的 “Karpathy” 5k 测试划分上的图像描述结果见表 7。表 8 是 COCO 图像描述在线排行榜的精简版¹¹。在线测试在 4 万张图像上报告结果,每张图有 5 条参考描述(c5)和 40 条参考描述(c40)。提交本稿时,我们的单模型在整个排行榜上排第一,超过全部 263 个模型,其中包括许多集成(以及匿名)模型。(iv)新物体描述(NoCaps)结果见表 9。不做任何 VLP,也就是直接在 COCO 上训练一个基于 BERT 的描述模型时,使用我们新视觉特征的模型(记为 VinVL)在 CIDEr 上已经超过人类表现¹²。再加上 VIVO [9] 预训练,VinVL 把原来的 VIVO 结果提高了 6 个 CIDEr 点,并刷新最好结果。(v)总体来看,在这些任务上(表 5 的 VQA、表 7 的图像描述、表 9 的 NoCaps、表 10 的图文检索、表 11 的 NLVR2),OSCAR+ 可以追平或超过先前最好的大模型,OSCAR+ 则进一步明显提高了当时最好结果。
¹⁰ VQA leaderboard: https://eval.ai/web/challenges/challenge-page/514/leaderboard/1386
¹¹ Image Captioning Leaderboard: https://competitions.codalab.org/competitions/3221#results
¹² NoCaps leaderboard: https://eval.ai/web/challenges/challenge-page/355/leaderboard/1011
| Method | ViLBERT Base | VL-BERT Base | VisualBERT Base | LXMERT Base | 12-in-1 Base | UNITER Base | UNITER Large | OSCAR Base | OSCAR Large | VILLA Base | VILLA Large | ERNIE-ViL Base | ERNIE-ViL Large | InterBERT Ensemble* | OSCAR+ w/ VinVL Base | OSCAR+ w/ VinVL Large |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Test-dev | 70.63 | 70.50 | 70.80 | 72.42 | 73.15 | 72.27 | 73.24 | 73.16 | 73.61 | 73.59 | 73.69 | 72.62 | 74.75 | — | 75.95 | 76.52 |
| Test-std | 70.92 | 70.83 | 71.00 | 72.54 | — | 72.46 | 73.40 | 73.44 | 73.82 | 73.67 | 74.87 | 72.85 | 74.93 | 76.10 | 76.12 | 76.60 |
Table 5: Evaluation results on VQA. * denotes the No.1 ensemble model of InterBERT Large on the VQA leaderboard.
| Method | ViLBERT Base | VL-BERT Base | VisualBERT Base | LXMERT Base | 12-in-1 Base | UNITER Base | UNITER Large | OSCAR Base | OSCAR Large | VILLA Base | VILLA Large | ERNIE-ViL Base | ERNIE-ViL Large | InterBERT Ensemble* | OSCAR+ w/ VinVL Base | OSCAR+ w/ VinVL Large |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Test-dev | 70.63 | 70.50 | 70.80 | 72.42 | 73.15 | 72.27 | 73.24 | 73.16 | 73.61 | 73.59 | 73.69 | 72.62 | 74.75 | — | 75.95 | 76.52 |
| Test-std | 70.92 | 70.83 | 71.00 | 72.54 | — | 72.46 | 73.40 | 73.44 | 73.82 | 73.67 | 74.87 | 72.85 | 74.93 | 76.10 | 76.12 | 76.60 |
表 5:VQA 上的评测结果。* 表示 VQA 排行榜上 InterBERT Large 的第 1 名集成模型。
| Method | LXMERT | MMN [3] | 12-in-1 | OSCAR | NSM [11] | OSCAR+ w/ VinVL |
|---|---|---|---|---|---|---|
| Test-dev | 60.00 | — | — | 61.58 | — | 65.05 |
| Test-std | 60.33 | 60.83 | 60.65 | 61.62 | 63.17 | 64.65 |
Table 6: Evaluation results on GQA.
| Method | LXMERT | MMN [3] | 12-in-1 | OSCAR | NSM [11] | OSCAR+ w/ VinVL |
|---|---|---|---|---|---|---|
| Test-dev | 60.00 | — | — | 61.58 | — | 65.05 |
| Test-std | 60.33 | 60.83 | 60.65 | 61.62 | 63.17 | 64.65 |
表 6:GQA 上的评测结果。
| Method | cross-entropy B@4 | cross-entropy M | cross-entropy C | cross-entropy S | CIDEr optimization B@4 | CIDEr optimization M | CIDEr optimization C | CIDEr optimization S |
|---|---|---|---|---|---|---|---|---|
| BUTD [2] | 36.2 | 27.0 | 113.5 | 20.3 | 36.3 | 27.7 | 120.1 | 21.4 |
| VLP [44] | 36.5 | 28.4 | 117.7 | 21.3 | 39.5 | 29.3 | 129.3 | 23.2 |
| AoANet [10] | 37.2 | 28.4 | 119.8 | 21.3 | 38.9 | 29.2 | 129.8 | 22.4 |
| OSCAR [20] | 36.5 | 30.3 | 123.7 | 23.1 | 40.5 | 29.7 | 137.6 | 22.8 |
| OSCAR [20] | 37.4 | 30.7 | 127.8 | 23.5 | 41.7 | 30.6 | 140.0 | 24.5 |
| OSCAR+ w/ VinVL | 38.2 | 30.3 | 129.3 | 23.6 | 40.9 | 30.9 | 140.4 | 25.1 |
| OSCAR+ w/ VinVL | 38.5 | 30.4 | 130.8 | 23.4 | 41.0 | 31.1 | 140.9 | 25.2 |
Table 7: Image captioning evaluation results (single model) on COCO “Karpathy” test split. (Note: B@4: BLEU@4, M: METEOR, C: CIDEr, S: SPICE.)
| Method | cross-entropy B@4 | cross-entropy M | cross-entropy C | cross-entropy S | CIDEr optimization B@4 | CIDEr optimization M | CIDEr optimization C | CIDEr optimization S |
|---|---|---|---|---|---|---|---|---|
| BUTD [2] | 36.2 | 27.0 | 113.5 | 20.3 | 36.3 | 27.7 | 120.1 | 21.4 |
| VLP [44] | 36.5 | 28.4 | 117.7 | 21.3 | 39.5 | 29.3 | 129.3 | 23.2 |
| AoANet [10] | 37.2 | 28.4 | 119.8 | 21.3 | 38.9 | 29.2 | 129.8 | 22.4 |
| OSCAR [20] | 36.5 | 30.3 | 123.7 | 23.1 | 40.5 | 29.7 | 137.6 | 22.8 |
| OSCAR [20] | 37.4 | 30.7 | 127.8 | 23.5 | 41.7 | 30.6 | 140.0 | 24.5 |
| OSCAR+ w/ VinVL | 38.2 | 30.3 | 129.3 | 23.6 | 40.9 | 30.9 | 140.4 | 25.1 |
| OSCAR+ w/ VinVL | 38.5 | 30.4 | 130.8 | 23.4 | 41.0 | 31.1 | 140.9 | 25.2 |
表 7:在 COCO “Karpathy” 测试划分上的图像描述评测结果(单模型)。(注:B@4:BLEU@4,M:METEOR,C:CIDEr,S:SPICE。)
| Method | BLEU@4 c5 | BLEU@4 c40 | METEOR c5 | METEOR c40 | ROUGE-L c5 | ROUGE-L c40 | CIDEr-D c5 | CIDEr-D c40 |
|---|---|---|---|---|---|---|---|---|
| BUTD [2] | 36.9 | 68.5 | 27.6 | 36.7 | 57.1 | 72.4 | 117.9 | 120.5 |
| AoANet [10] | 39.4 | 71.2 | 29.1 | 38.5 | 58.9 | 74.5 | 126.9 | 129.6 |
| X-Transformer [28] | 40.3 | 72.4 | 29.6 | 39.2 | 59.5 | 75.0 | 131.1 | 133.5 |
| OSCAR+ w/ VinVL | 40.4 | 74.9 | 30.6 | 40.8 | 60.4 | 76.8 | 134.7 | 138.7 |
Table 8: Leaderboard of the state-of-the-art image captioning models on the COCO online testing.
| Method | BLEU@4 c5 | BLEU@4 c40 | METEOR c5 | METEOR c40 | ROUGE-L c5 | ROUGE-L c40 | CIDEr-D c5 | CIDEr-D c40 |
|---|---|---|---|---|---|---|---|---|
| BUTD [2] | 36.9 | 68.5 | 27.6 | 36.7 | 57.1 | 72.4 | 117.9 | 120.5 |
| AoANet [10] | 39.4 | 71.2 | 29.1 | 38.5 | 58.9 | 74.5 | 126.9 | 129.6 |
| X-Transformer [28] | 40.3 | 72.4 | 29.6 | 39.2 | 59.5 | 75.0 | 131.1 | 133.5 |
| OSCAR+ w/ VinVL | 40.4 | 74.9 | 30.6 | 40.8 | 60.4 | 76.8 | 134.7 | 138.7 |
表 8:COCO 在线测试上当时最好图像描述模型的排行榜。
| Method | CIDEr Val | SPICE Val | CIDEr Test | SPICE Test |
|---|---|---|---|---|
| UpDown | 74.3 | 11.2 | 73.1 | 11.2 |
| OSCAR* | 81.1 | 11.7 | 78.8 | 11.7 |
| OSCAR* | 83.4 | 11.4 | 80.9 | 11.3 |
| Human [1] | 87.1 | 14.2 | 85.3 | 14.6 |
| VIVO* [9] | 88.3 | 12.4 | 86.6 | 12.4 |
| VinVL* | 90.9 | 12.8 | 85.5 | 12.5 |
| VinVL+VIVO | 98.0 | 13.6 | 92.5 | 13.1 |
Table 9: NoCaps evaluation “overall” results. All the models are trained on COCO without additional image-caption pairs following the restriction of NoCaps. (UpDown is UpDown+ELMo+CBS, the models with * is +SCST+CBS, VinVL+VIVO is with SCST only.) We refer to Table 18 in Appendix C for results on different subsets.
| Method | CIDEr Val | SPICE Val | CIDEr Test | SPICE Test |
|---|---|---|---|---|
| UpDown | 74.3 | 11.2 | 73.1 | 11.2 |
| OSCAR* | 81.1 | 11.7 | 78.8 | 11.7 |
| OSCAR* | 83.4 | 11.4 | 80.9 | 11.3 |
| Human [1] | 87.1 | 14.2 | 85.3 | 14.6 |
| VIVO* [9] | 88.3 | 12.4 | 86.6 | 12.4 |
| VinVL* | 90.9 | 12.8 | 85.5 | 12.5 |
| VinVL+VIVO | 98.0 | 13.6 | 92.5 | 13.1 |
表 9:NoCaps “overall” 评测结果。所有模型都只在 COCO 上训练,不额外使用图文对,以符合 NoCaps 的限制。(UpDown 是 UpDown+ELMo+CBS,带 * 的模型是 +SCST+CBS,VinVL+VIVO 只使用 SCST。)不同子集上的结果见附录 C 的表 18。
1K Test Set
| Method | BERT | Text Retrieval R@1 | Text Retrieval R@5 | Text Retrieval R@10 | Image Retrieval R@1 | Image Retrieval R@5 | Image Retrieval R@10 |
|---|---|---|---|---|---|---|---|
| Unicoder-VL [18] | B | 84.3 | 97.3 | 99.3 | 69.7 | 93.5 | 97.2 |
| OSCAR | B | 88.4 | 99.1 | 99.8 | 75.7 | 95.2 | 98.3 |
| OSCAR | L | 89.8 | 98.8 | 99.7 | 78.2 | 95.8 | 98.3 |
| OSCAR+ w/ VinVL | B | 89.8 | 98.8 | 99.7 | 78.2 | 95.6 | 98.0 |
| OSCAR+ w/ VinVL | L | 90.8 | 99.0 | 99.8 | 78.8 | 96.1 | 98.5 |
5K Test Set
| Method | BERT | Text Retrieval R@1 | Text Retrieval R@5 | Text Retrieval R@10 | Image Retrieval R@1 | Image Retrieval R@5 | Image Retrieval R@10 |
|---|---|---|---|---|---|---|---|
| Unicoder-VL [18] | B | 62.3 | 87.1 | 92.8 | 46.7 | 76.0 | 85.3 |
| UNITER [4] | B | 63.3 | 87.0 | 93.1 | 48.4 | 76.7 | 85.9 |
| UNITER [4] | L | 66.6 | 89.4 | 94.3 | 51.7 | 78.4 | 86.9 |
| OSCAR | B | 70.0 | 91.1 | 95.5 | 54.0 | 80.8 | 88.5 |
| OSCAR | L | 73.5 | 92.2 | 96.0 | 57.5 | 82.8 | 89.8 |
| OSCAR+ w/ VinVL | B | 74.6 | 92.6 | 96.3 | 58.1 | 83.2 | 90.1 |
| OSCAR+ w/ VinVL | L | 75.4 | 92.9 | 96.2 | 58.8 | 83.5 | 90.3 |
Table 10: Text and Image retrieval evaluation on the COCO 1K and 5K test sets. (B for Base, L for Large)
1K Test Set
| Method | BERT | Text Retrieval R@1 | Text Retrieval R@5 | Text Retrieval R@10 | Image Retrieval R@1 | Image Retrieval R@5 | Image Retrieval R@10 |
|---|---|---|---|---|---|---|---|
| Unicoder-VL [18] | B | 84.3 | 97.3 | 99.3 | 69.7 | 93.5 | 97.2 |
| OSCAR | B | 88.4 | 99.1 | 99.8 | 75.7 | 95.2 | 98.3 |
| OSCAR | L | 89.8 | 98.8 | 99.7 | 78.2 | 95.8 | 98.3 |
| OSCAR+ w/ VinVL | B | 89.8 | 98.8 | 99.7 | 78.2 | 95.6 | 98.0 |
| OSCAR+ w/ VinVL | L | 90.8 | 99.0 | 99.8 | 78.8 | 96.1 | 98.5 |
5K Test Set
| Method | BERT | Text Retrieval R@1 | Text Retrieval R@5 | Text Retrieval R@10 | Image Retrieval R@1 | Image Retrieval R@5 | Image Retrieval R@10 |
|---|---|---|---|---|---|---|---|
| Unicoder-VL [18] | B | 62.3 | 87.1 | 92.8 | 46.7 | 76.0 | 85.3 |
| UNITER [4] | B | 63.3 | 87.0 | 93.1 | 48.4 | 76.7 | 85.9 |
| UNITER [4] | L | 66.6 | 89.4 | 94.3 | 51.7 | 78.4 | 86.9 |
| OSCAR | B | 70.0 | 91.1 | 95.5 | 54.0 | 80.8 | 88.5 |
| OSCAR | L | 73.5 | 92.2 | 96.0 | 57.5 | 82.8 | 89.8 |
| OSCAR+ w/ VinVL | B | 74.6 | 92.6 | 96.3 | 58.1 | 83.2 | 90.1 |
| OSCAR+ w/ VinVL | L | 75.4 | 92.9 | 96.2 | 58.8 | 83.5 | 90.3 |
表 10:在 COCO 1K 和 5K 测试集上的文本检索与图像检索评测。(B 表示 Base,L 表示 Large)
| Method | MAC | VisualBERT base | LXMERT base | 12-in-1 base | UNITER base | UNITER large | OSCAR base | OSCAR large | VILLA base | VILLA large | OSCAR+ w/ VinVL base | OSCAR+ w/ VinVL large |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Dev | 50.8 | 67.40 | 74.90 | — | 77.14 | 78.40 | 78.07 | 79.12 | 78.39 | 79.76 | 82.05 | 82.67 |
| Test-P | 51.4 | 67.00 | 74.50 | 78.87 | 77.87 | 79.50 | 78.36 | 80.37 | 79.47 | 81.47 | 83.08 | 83.98 |
Table 11: Evaluation results on NLVR2.
| Method | MAC | VisualBERT base | LXMERT base | 12-in-1 base | UNITER base | UNITER large | OSCAR base | OSCAR large | VILLA base | VILLA large | OSCAR+ w/ VinVL base | OSCAR+ w/ VinVL large |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Dev | 50.8 | 67.40 | 74.90 | — | 77.14 | 78.40 | 78.07 | 79.12 | 78.39 | 79.76 | 82.05 | 82.67 |
| Test-P | 51.4 | 67.00 | 74.50 | 78.87 | 77.87 | 79.50 | 78.36 | 80.37 | 79.47 | 81.47 | 83.08 | 83.98 |
表 11:NLVR2 上的评测结果。
| vision \ vl | no VLP | OSCAR [20] | OSCAR+ (ours) |
|---|---|---|---|
| R101-C4 [2] | 68.52 ±0.11 | 72.38 | 72.46±0.05 |
| VinVL (ours) | 71.34 ±0.17 | — | 74.90±0.05 |
Table 12: Effects of vision (V) and vision-language (VL) pre-training on VQA.
| vision \ vl | no VLP | OSCAR [20] | OSCAR+ (ours) |
|---|---|---|---|
| R101-C4 [2] | 68.52 ±0.11 | 72.38 | 72.46±0.05 |
| VinVL (ours) | 71.34 ±0.17 | — | 74.90±0.05 |
表 12:视觉(V)预训练与视觉-语言(VL)预训练对 VQA 的影响。
4.2. Ablation Analysis
4.2. 消融分析
We select the VQA task for the ablation study because its evaluation metric is well-defined and the task has been used as a testbed for all VLP models. To assist our analysis, we create a local validation set, vqa-dev, out of the standard validation set to select the best model during training for evaluation. vqa-dev contains randomly sampled 2K images and their corresponding questions, amounting to 10.4K image-QA pairs in total. Except for Table 4 and 5, all our VQA results are reported on this vqa-dev set. Unless otherwise specified, the reported STD is half of the difference of two runs of the VQA training with different random seeds.
消融实验选用 VQA,是因为它的评价指标定义清楚,并且已被用作所有 VLP 模型的试验台。为便于分析,我们从标准验证集中划出一个本地验证集 vqa-dev,用于在训练中选最好的模型再做评测。vqa-dev 包含随机抽取的 2000 张图像及其对应问题,共 1.04 万个图像-问答对。除表 4 和表 5 外,我们的 VQA 结果都在这个 vqa-dev 上报告。除非另行说明,所报标准差是两次使用不同随机种子训练 VQA 所得分数之差的一半。
In VQA, the VL model has as the question and as the answer. We focus on studying the effect of visual features produced by different Vision models to better understand their relative contribution in the VQA performance. To eliminate the impact of using different tags , we use the same tags in the VQA models of OSCAR [20]. All the ablation experiments are conducted using models of the BERT-base size.
在 VQA 中,VL 模型 以 为问题、 为答案。我们着重考察不同 Vision 模型 给出的视觉特征 ,以便看清它们对 VQA 成绩的相对贡献。为消除使用不同标签 的影响,我们沿用 OSCAR [20] 的 VQA 模型中的同一套标签。全部消融实验都使用 BERT-base 规格的模型。
How much do the V and VL matter to the SoTA?
视觉预训练和视觉-语言预训练分别对当时最好结果贡献多少?
Table 12 shows the VQA results with different vision models, i.e., R101-C4 model from [2] and our X152-C4 model pre-trained with 4 datasets (VinVL), and with different VLP methods, i.e., no VLP, OSCAR [20] and our OSCAR+. Taking the OSCAR model with R101-C4 features as the baseline, the OSCAR+ model with our X152-C4 features improves the absolute accuracy from 72.38 to 74.90, in which the OSCAR+ pre-training contributes 5% of the gain (i.e., ) and the vision pre-training (improved visual features) 95% (i.e., ). This demonstrates that vision representations matter significantly in VLP and downstream tasks.
表 12 给出不同视觉模型([2] 的 R101-C4,以及我们在四个数据集上预训练的 X152-C4,即 VinVL)和不同 VLP 方法(不做 VLP、OSCAR [20]、以及我们的 OSCAR+)下的 VQA 结果。以使用 R101-C4 特征的 OSCAR 为基线,使用我们 X152-C4 特征的 OSCAR+ 把绝对准确率从 72.38 提高到 74.90,其中 OSCAR+ 预训练贡献了 5% 的增益(即 ),视觉预训练(改进的视觉特征)贡献了 95%(即 )。这说明视觉表示在 VLP 和下游任务里影响很大。
Taking the “no VLP” model with R101-C4 features as the baseline, Table 12 shows that the gains of VinVL () and VLP () are additive (). This is intuitive because vision pre-training and VLP improve the Vision model and VL model separately. This also indicates that our pre-trained vision model can be utilized in any VL models by directly replacing their vision models, such as R101-C4 [2], with ours.
若以使用 R101-C4 特征、不做 VLP 的模型为基线,表 12 显示 VinVL 的增益()和 VLP 的增益()是可加的()。这并不难理解,因为视觉预训练和 VLP 分别改进 Vision 模型 和 VL 模型 。这也说明,我们的预训练视觉模型可以通过直接替换已有视觉模块(例如 R101-C4 [2])用到任意 VL 模型中。
How much do data and model sizes matter to the new vision model?
数据规模和模型规模对新视觉模型有多大影响?
The improvement of VQA from R101-C4 [2] to VinVL (ours) in Table 12 is a compound effect of increasing model size (from R101-C4 to X152-C4) and data size (from VG to our merged four OD datasets). Table 13 shows the ablation of the two factors without VLP. Although VG’s large object and attribute vocabulary allows to learn rich semantic concepts, VG does not contain large amounts of annotations for effective training of deep models. Vision models trained using the merged four OD datasets perform much better than VG-only-trained models, and the improvement is larger with the increase of the model size.¹³
表 12 中 VQA 从 R101-C4 [2] 到 VinVL(本文)的提升,是模型变大(从 R101-C4 到 X152-C4)和数据变多(从 VG 到我们合并的四个检测数据集)的综合结果。表 13 在不做 VLP 的情况下对这两个因素做了消融。尽管 VG 的物体和属性词表很大,有助于学习丰富的语义概念,但其标注量不足以有效训练很深的模型。用合并后的四个检测数据集训练的视觉模型,明显好于只在 VG 上训练的模型,而且模型越大,这一提升越明显。¹³
¹³ The R101-C4 model in Table 13 is exactly the VG-pre-pretrained model from [2]. We do not train this model on our merged OD dataset because this model architecture is old-fashioned and is slow to train.
| data \ model | R50-FPN | R50-C4 | R101-C4 [2] | X152-C4 |
|---|---|---|---|---|
| VG | 67.35±0.26 | 67.86±0.31 | 68.52 ±0.11 | 69.10±0.06 |
| 4Sets→VG | 68.3±0.11 | 68.39±0.16 | — | 71.34 ±0.17 |
Table 13: Ablation of model size and data size on training vision models.
| data \ model | R50-FPN | R50-C4 | R101-C4 [2] | X152-C4 |
|---|---|---|---|---|
| VG | 67.35±0.26 | 67.86±0.31 | 68.52 ±0.11 | 69.10±0.06 |
| 4Sets→VG | 68.3±0.11 | 68.39±0.16 | — | 71.34 ±0.17 |
表 13:训练视觉模型时模型规模与数据规模的消融。
How much does OD model architecture matter?
目标检测模型结构有多大影响?
The choice of model architecture affects the VQA performance. Table 13 shows that R50-FPN under-performs R50-C5 when they are trained only on VG; but the performance gap diminishes when both are trained on the merged dataset (4Sets). A detailed comparison between FPN and C4 architectures is presented in Appendix E.
模型结构的选择会影响 VQA 成绩。表 13 显示,只在 VG 上训练时,R50-FPN 不如 R50-C5;但两者都在合并数据集(4Sets)上训练时,差距会缩小。FPN 与 C4 结构的详细比较见附录 E。
How much does OD pre-training matter for object detection tasks?
目标检测预训练对检测任务本身有多大影响?
Table 14 presents the object detection results on COCO and the object-attribute detection results on VG (1594 object classes, 524 attribute classes). The results show that OD pre-training benefits the object detection tasks. Note that the mAP on VG is much lower than that on typical OD datasets (such as COCO) due to two reasons: (1) VG contains a large number of object classes with limited and extremely unbalanced annotations, (2) there are many missing annotations in the VG evaluation data.¹⁴ Although the mAP numbers are low, the detection result using X152-C4 is reasonably good; see Appendix A for visualizations. We also see that FPN models perform consistently worse in attribute detection than C4 models, neither do FPN models show any advantage in object detection on VG. This contributes to the inferior performance of FPN, compared to C4, on downstream VL tasks, as discussed in Section 2.1.
表 14 给出 COCO 上的目标检测结果,以及 VG 上的物体-属性检测结果(1594 个物体类、524 个属性类)。结果显示,检测预训练对检测任务本身有帮助。需要说明的是,VG 上的 mAP 远低于典型检测数据集(如 COCO),原因有二:(1)VG 物体类很多,标注有限且极度不均衡;(2)VG 评测数据中有大量漏标。¹⁴ 尽管 mAP 数字偏低,X152-C4 的检测结果仍算合理;可视化见附录 A。我们还看到,FPN 模型在属性检测上一直不如 C4,在 VG 的物体检测上也不占优。这有助于解释第 2.1 节所讨论的现象:在下游 VL 任务上,FPN 不如 C4。
¹⁴ As a reference, the R101-C4 model from [2] on VG with 1600 objects and 400 attributes has mAP of 8.7/7.8 evaluated in our code, whereas it was reported as 10.2/7.8 due to differences in OD evaluation pipeline.
| Model / Pre-training dataset | R50-FPN ImageNet | R50-FPN 4Sets | R50-C4 ImageNet | R50-C4 4Sets | X152-C4 ImageNet5k | X152-C4 4Sets |
|---|---|---|---|---|---|---|
| COCO | 40.2 [39] | 44.78* | 38.4 [39] | 42.4 | 42.17 | 50.51 |
| VG obj | 9.6 | 11.3 | 9.6 | 12.1 | 11.2 | 13.8 |
| attr with gt boxes | 5.4 | 5.5 | 6.3 | 6.1 | 6.6 | 7.1 |
- Since our four pre-training datasets contain Objects365, it is not surprising that we obtain better results than 42.3 in [30], which is obtained by pre-training on Objects365.
Table 14: Effect of vision pre-training on object detection tasks.
| Model / Pre-training dataset | R50-FPN ImageNet | R50-FPN 4Sets | R50-C4 ImageNet | R50-C4 4Sets | X152-C4 ImageNet5k | X152-C4 4Sets |
|---|---|---|---|---|---|---|
| COCO | 40.2 [39] | 44.78* | 38.4 [39] | 42.4 | 42.17 | 50.51 |
| VG obj | 9.6 | 11.3 | 9.6 | 12.1 | 11.2 | 13.8 |
| attr with gt boxes | 5.4 | 5.5 | 6.3 | 6.1 | 6.6 | 7.1 |
- 由于我们的四个预训练数据集包含 Objects365,高于 [30] 中在 Objects365 上预训练得到的 42.3 并不意外。
表 14:视觉预训练对目标检测任务的影响。
How much does the diversity of visual concepts, i.e., object and attribute vocabularies, matter?
视觉概念的多样性,也就是物体和属性词表,有多大影响?
We directly train vision models on different datasets, including (1) standard ImageNet with 1K classes (ImageNet), (2) Visual Genome with 317 object classes (VG-obj) that are shared with COCO 80 classes and OpenImagesV5 500 classes, (3) VG with all 1594 object classes (VG w/o attr), (4) VG with 1594 object classes and 524 attribute classes (VG), and (5) the merged OD dataset (4Sets) for pre-training and VG for fine-tuning. For all the OD models (the last four columns in Table 15), we initialize the OD training with an ImageNet-pre-trained classification model, and use maximal 50 region features per image as input to the VL fusion module. For the ImageNet pre-trained classification model (the second column in Table 15), we use all the grid features (maximal 273) for each image. The results show that
我们直接在不同数据集上训练视觉模型,包括:(1)标准 ImageNet 的 1000 类(ImageNet);(2)Visual Genome 中与 COCO 80 类和 OpenImagesV5 500 类共享的 317 个物体类(VG-obj);(3)VG 全部 1594 个物体类(VG w/o attr);(4)VG 的 1594 个物体类加 524 个属性类(VG);(5)用合并检测数据集(4Sets)预训练、再在 VG 上微调。对所有检测模型(表 15 的后四列),检测训练都从 ImageNet 预训练的分类模型初始化,每张图最多把 50 个区域特征送入 VL 融合模块。对 ImageNet 预训练的分类模型(表 15 的第二列),每张图使用全部网格特征(最多 273 个)。结果显示:
• In general, vocabularies with richer objects lead to better VQA results: VG-obj < ImageNet < VG w/o attr. The VG-obj vocabulary contains 79 of 80 COCO classes (only missing potted plant) and 313 of 500 OpenImagesV5 classes, and is a good approximation of common object classes of typical OD tasks. However, our results show that this vocabulary is not rich enough for VL tasks because it misses many important visual concepts (e.g., sky, water, mountain, etc.) which are crucial for VL tasks, as also illustrated by the comparison of detected regions in Figure 1.¹⁵
• 一般而言,物体词表更丰富,VQA 结果更好:VG-obj < ImageNet < VG w/o attr。VG-obj 词表包含 80 个 COCO 类中的 79 个(只缺 potted plant),以及 500 个 OpenImagesV5 类中的 313 个,是典型检测任务中常见物体类的一个较好近似。但结果表明,这一词表对 VL 任务还不够丰富,因为它漏掉了许多对 VL 任务很重要的视觉概念(例如 sky、water、mountain 等),图 1 中检测区域的对比也说明了这一点。¹⁵
¹⁵ Using the same training procedure on VG, we trained an R50-C4 model on the OpenImagesV5 dataset (500 classes). Using the region features produced by this model, the VQA performance is 63.55±0.14. The result is slightly worse than that of VG-obj because both VG and VQA images are from the COCO dataset but OpenImages images are not.
• Attribute information is crucial to VL tasks: models trained with attributes (VG and 4Sets→VG) are significantly better than those without attributes.
• 属性信息对 VL 任务很关键:带属性训练的模型(VG 和 4Sets→VG)明显好于不带属性的模型。
• Even for the small vision model R50-C4, vision pre-training improves visual features for VQA, i.e., 4Sets→VG is the best performer.
• 即便是较小的视觉模型 R50-C4,视觉预训练也能改进用于 VQA 的视觉特征,也就是说 4Sets→VG 表现最好。
| Dataset name / #obj & #attr | ImageNet 1000 & 0 | VG-obj 317 & 0 | VG w/o attr 1594 & 0 | VG [2] 1600 & 400 | VG 1594 & 524 | 4Sets→VG 1848 & 524 |
|---|---|---|---|---|---|---|
| R50-C4 + BERT | 66.13±0.04 | 64.25±0.16 | 66.51±0.11 | 67.63±0.25 | 67.86±0.31 | 68.39±0.16 |
Table 15: Effect of object-attribute vocabulary. We use all grid features (maximal 273) for the ImageNet classification model (first column), and maximal 50 region features for OD models (other columns).
| Dataset name / #obj & #attr | ImageNet 1000 & 0 | VG-obj 317 & 0 | VG w/o attr 1594 & 0 | VG [2] 1600 & 400 | VG 1594 & 524 | 4Sets→VG 1848 & 524 |
|---|---|---|---|---|---|---|
| R50-C4 + BERT | 66.13±0.04 | 64.25±0.16 | 66.51±0.11 | 67.63±0.25 | 67.86±0.31 | 68.39±0.16 |
表 15:物体-属性词表的影响。ImageNet 分类模型(第一列)使用全部网格特征(最多 273 个),检测模型(其余列)每张图最多使用 50 个区域特征。
In Table 16, we use different kinds of region proposals to extract image features. COCO groundtruth object regions (GT-Obj, 80 classes) and object-stuff regions (GT-Obj&Stuff, 171 classes) are perfect in terms of localization, but their vocabulary sizes are limited. Regions proposed by VG-trained models ([2] and VinVL) are imperfect in localization but using a larger vocabulary. For the VQA task, COCO GT boxes are much worse than the proposals generated by VG-trained models. The result demonstrates the difference between the typical OD tasks and the OD tasks in VL: OD in VL requires much richer visual semantics to align with the rich semantics in the language modality. This further echoes our claim that an image understanding module trained using richer vocabularies performs better for VL tasks.
在表 16 中,我们用不同类型的区域提案来提取图像特征。COCO 的真实物体区域(GT-Obj,80 类)和物体-stuff 区域(GT-Obj&Stuff,171 类)在定位上近乎完美,但词表规模有限。由在 VG 上训练的模型([2] 和 VinVL)提出的区域,定位并不完美,但词表更大。对 VQA 而言,COCO 真实框远不如 VG 训练模型给出的提案。这一结果说明了典型检测任务与 VL 中的检测任务的差别:VL 中的检测需要丰富得多的视觉语义,才能与语言模态中丰富的语义对齐。这也进一步印证了我们的看法:用更丰富的词表训练的图像理解模块,在 VL 任务上表现更好。
| model \ region | GT-Obj | GT-Obj&Stuff | Anderson et al. [2] | VinVL (ours) |
|---|---|---|---|---|
| Anderson et al. [2] | 63.81 ±0.94 | 66.68 ±0.16 | 68.52 ±0.11 | 69.05 ±0.06 |
| VinVL (ours) | 65.60 ±0.21 | 68.13 ±0.26 | 70.25 ±0.05 | 71.34 ±0.17 |
Table 16: Effect of different region proposals on VQA.
| model \ region | GT-Obj | GT-Obj&Stuff | Anderson et al. [2] | VinVL (ours) |
|---|---|---|---|---|
| Anderson et al. [2] | 63.81 ±0.94 | 66.68 ±0.16 | 68.52 ±0.11 | 69.05 ±0.06 |
| VinVL (ours) | 65.60 ±0.21 | 68.13 ±0.26 | 70.25 ±0.05 | 71.34 ±0.17 |
表 16:不同区域提案对 VQA 的影响。
5. Conclusion
5. 结论
In this paper we have presented a new recipe to pre-train an OD model for VL tasks. Compared to the most widely used bottom-up and top-down model [2], the new model is bigger, better-designed for VL tasks, and pre-trained on much larger text-image corpora, and thus can generate visual features for a richer collection of visual objects and concepts that are crucial for VL tasks. We validate the new model via a comprehensive empirical study where we feed the visual features to a VL fusion model which is pre-trained on a large-scale paired text-image corpus and then fine-tuned on seven VL tasks. Our results show that the new OD model can substantially uplift the SoTA results on all seven VL tasks across multiple public benchmarks. Our ablation study shows that the improvement is mainly attributed to our design choices regarding diversity of object categories, visual attribute training, training data scale, model size, and model architecture.
本文给出了一套为 VL 任务预训练目标检测模型的新做法。与当时用得最广的 bottom-up and top-down 模型 [2] 相比,新模型更大、更针对 VL 任务,并在更大规模的图文语料上预训练,因此能为对 VL 任务至关重要的更丰富视觉物体和概念生成视觉特征。我们通过系统实验检验这一模型:把视觉特征送入一个在大规模配对图文语料上预训练、再在七项 VL 任务上微调的融合模型。结果表明,新检测器在多个公开基准的全部七项 VL 任务上都明显提高了当时最好结果。消融实验显示,这一提升主要来自物体类别多样性、视觉属性训练、训练数据规模、模型大小和模型结构等方面的设计选择。
References
参考文献
[1] Harsh Agrawal, Karan Desai, Yufei Wang, Xinlei Chen, Rishabh Jain, Mark Johnson, Dhruv Batra, Devi Parikh, Stefan Lee, and Peter Anderson. nocaps: novel object captioning at scale. In ICCV, 2019. 1, 6, 16, 17
[2] Peter Anderson, Xiaodong He, Chris Buehler, Damien Teney, Mark Johnson, Stephen Gould, and Lei Zhang. Bottom-up and top-down attention for image captioning and visual question answering. In CVPR, 2018. 1, 2, 3, 4, 6, 7, 8, 11, 13, 14, 15, 16, 17, 18, 20, 21
[3] Wenhu Chen, Zhe Gan, Linjie Li, Yu Cheng, William Wang, and Jingjing Liu. Meta module network for compositional visual reasoning. arXiv preprint arXiv:1910.03230, 2019. 6, 14
[4] Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. Uniter: Learning universal image-text representations. arXiv preprint arXiv:1909.11740, 2019. 1, 6, 16
[5] Fartash Faghri, David J Fleet, Jamie Ryan Kiros, and Sanja Fidler. Vse++: Improved visual-semantic embeddings. arXiv preprint arXiv:1707.05612, 2(7):8, 2017. 16
[6] Hao Fang, Saurabh Gupta, Forrest Iandola, Rupesh K Srivastava, Li Deng, Piotr Dollár, Jianfeng Gao, Xiaodong He, Margaret Mitchell, John C Platt, et al. From captions to visual concepts and back. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1473–1482, 2015. 5
[7] Zhe Gan, Yen-Chun Chen, Linjie Li, Chen Zhu, Yu Cheng, and Jingjing Liu. Large-scale adversarial training for vision-and-language representation learning. arXiv preprint arXiv:2006.06195, 2020. 6
[8] Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Batra, and Devi Parikh. Making the V in VQA matter: Elevating the role of image understanding in visual question answering. In CVPR, 2017. 1, 4, 14
[9] Xiaowei Hu, Xi Yin, Kevin Lin, Lijuan Wang, Lei Zhang, Jianfeng Gao, and Zicheng Liu. Vivo: Surpassing human performance in novel object captioning with visual vocabulary pre-training. arXiv preprint arXiv:2009.13682, 2020. 2, 6, 17
[10] Lun Huang, Wenmin Wang, Jie Chen, and Xiao-Yong Wei. Attention on attention for image captioning. In ICCV, 2019. 6, 16
[11] Drew Hudson and Christopher D Manning. Learning by abstraction: The neural state machine. In NeurIPS, 2019. 1, 5, 6
[12] Drew A Hudson and Christopher D Manning. GQA: A new dataset for real-world visual reasoning and compositional question answering. arXiv preprint arXiv:1902.09506, 2019. 1, 4, 14
[13] Huaizu Jiang, Ishan Misra, Marcus Rohrbach, Erik Learned-Miller, and Xinlei Chen. In defense of grid features for visual question answering. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10267–10276, 2020. 3, 4, 18
[14] Andrej Karpathy and Li Fei-Fei. Deep visual-semantic alignments for generating image descriptions. In CVPR, 2015. 16
[15] Ranjay Krishna, Yuke Zhu, Oliver Groth, Justin Johnson, Kenji Hata, Joshua Kravitz, Stephanie Chen, Yannis Kalantidis, Li-Jia Li, David A Shamma, et al. Visual genome: Connecting language and vision using crowdsourced dense image annotations. International Journal of Computer Vision, 123(1):32–73, 2017. 1
[16] Alina Kuznetsova, Hassan Rom, Neil Alldrin, Jasper Uijlings, Ivan Krasin, Jordi Pont-Tuset, Shahab Kamali, Stefan Popov, Matteo Malloci, Tom Duerig, et al. The open images dataset v4: Unified image classification, object detection, and visual relationship detection at scale. arXiv preprint arXiv:1811.00982, 2018. 1, 16
[17] Kuang-Huei Lee, Xi Chen, Gang Hua, Houdong Hu, and Xiaodong He. Stacked cross attention for image-text matching. In ECCV, 2018. 16
[18] Gen Li, Nan Duan, Yuejian Fang, Daxin Jiang, and Ming Zhou. Unicoder-VL: A universal encoder for vision and language by cross-modal pre-training. arXiv preprint arXiv:1908.06066, 2019. 1, 6, 16
[19] Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, and Kai-Wei Chang. Visualbert: A simple and performant baseline for vision and language. arXiv preprint arXiv:1908.03557, 2019. 1
[20] Xiujun Li, Xi Yin, Chunyuan Li, Pengchuan Zhang, Xiaowei Hu, Lei Zhang, Lijuan Wang, Houdong Hu, Li Dong, Furu Wei, Yejin Choi, and Jianfeng Gao. Oscar: Object-semantics aligned pre-training for vision-language tasks. In European Conference on Computer Vision, pages 121–137. Springer, 2020. 1, 2, 4, 6, 7, 12, 14, 15, 16, 19
[21] Junyang Lin, An Yang, Yichang Zhang, Jie Liu, Jingren Zhou, and Hongxia Yang. Interbert: Vision-and-language interaction for multi-modal pretraining. arXiv preprint arXiv:2003.13198, 2020. 5
[22] Tsung-Yi Lin, Piotr Dollár, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2117–2125, 2017. 3
[23] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár. Focal loss for dense object detection. In Proceedings of the IEEE international conference on computer vision, pages 2980–2988, 2017. 3
[24] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft COCO: Common objects in context. In ECCV, 2014. 1, 4, 14, 16
[25] Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. VilBERT: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. In NeurIPS, 2019. 1
[26] Jiasen Lu, Vedanuj Goswami, Marcus Rohrbach, Devi Parikh, and Stefan Lee. 12-in-1: Multi-Task vision and language representation learning. arXiv preprint arXiv:1912.02315, 2019. 16
[27] Vicente Ordonez, Girish Kulkarni, and Tamara L Berg. Im2text: Describing images using 1 million captioned photographs. In NeurIPS, 2011. 4
[28] Yingwei Pan, Ting Yao, Yehao Li, and Tao Mei. X-linear attention networks for image captioning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10971–10980, 2020. 6
[29] Steven J Rennie, Etienne Marcheret, Youssef Mroueh, Jerret Ross, and Vaibhava Goel. Self-critical sequence training for image captioning. In CVPR, 2017. 16
[30] Shuai Shao, Zeming Li, Tianyuan Zhang, Chao Peng, Gang Yu, Xiangyu Zhang, Jing Li, and Jian Sun. Objects365: A large-scale, high-quality dataset for object detection. In Proceedings of the IEEE international conference on computer vision, pages 8430–8439, 2019. 1, 7
[31] Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In Annual Meeting of the Association for Computational Linguistics, 2018. 4, 16
[32] Botian Shi, Lei Ji, Pan Lu, Zhendong Niu, and Nan Duan. Knowledge aware semantic concept expansion for image-text matching. In IJCAI, 2019. 16
[33] Weijie Su, Xizhou Zhu, Yue Cao, Bin Li, Lewei Lu, Furu Wei, and Jifeng Dai. VL-BERT: Pre-training of generic visual-linguistic representations. arXiv preprint arXiv:1908.08530, 2019. 1
[34] Alane Suhr, Stephanie Zhou, Ally Zhang, Iris Zhang, Huajun Bai, and Yoav Artzi. A corpus for reasoning about natural language grounded in photographs. arXiv preprint arXiv:1811.00491, 2018. 1, 16
[35] Hao Tan and Mohit Bansal. LXMERT: Learning cross-modality encoder representations from transformers. EMNLP, 2019. 1
[36] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. Fcos: A simple and strong anchor-free object detector. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020. 3
[37] Yaxiong Wang, Hao Yang, Xueming Qian, Lin Ma, Jing Lu, Biao Li, and Xin Fan. Position focused attention network for image-text matching. arXiv preprint arXiv:1907.09748, 2019. 16
[38] Zihao Wang, Xihui Liu, Hongsheng Li, Lu Sheng, Junjie Yan, Xiaogang Wang, and Jing Shao. CAMP: Cross-Modal adaptive message passing for text-image retrieval. In ICCV, 2019. 16
[39] Yuxin Wu, Alexander Kirillov, Francisco Massa, Wan-Yen Lo, and Ross Girshick. Detectron2. https://github.com/facebookresearch/detectron2, 2019. 4, 7, 19, 21
[40] Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alex Smola. Stacked attention networks for image question answering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 21–29, 2016. 4
[41] Peter Young, Alice Lai, Micah Hodosh, and Julia Hockenmaier. From image descriptions to visual denotations: New similarity metrics for semantic inference over event descriptions. Transactions of the Association for Computational Linguistics, 2:67–78, 2014. 4
[42] Fei Yu, Jiji Tang, Weichong Yin, Yu Sun, Hao Tian, Hua Wu, and Haifeng Wang. Ernie-vil: Knowledge enhanced vision-language representations through scene graph. arXiv preprint arXiv:2006.16934, 2020. 6
[43] Zhedong Zheng, Liang Zheng, Michael Garrett, Yi Yang, and Yi-Dong Shen. Dual-path convolutional image-text embedding with instance loss. arXiv preprint arXiv:1711.05535, 2017. 16
[44] Luowei Zhou, Hamid Palangi, Lei Zhang, Houdong Hu, Jason J Corso, and Jianfeng Gao. Unified vision-language pre-training for image captioning and VQA. AAAI, 2020. 1, 6, 15, 16
