VideoBERT: A Joint Model for Video and Language Representation Learning | AGIDaily
AGI Daily
资讯日报词条论文人物新创
返回论文列表
1. 引言2. 相关工作3. 模型3.1. BERT 模型3.2. VideoBERT 模型4. 实验与分析4.1. 数据集4.2. 视频与语言预处理4.3. 模型预训练4.4. 零样本动作分类4.5. 大规模训练集的好处4.6. 用于描述的迁移学习5. 讨论与结论
返回论文列表
目录

VideoBERT: A Joint Model for Video and Language Representation Learning

收录于 ICCV 2019 会议论文被引 1,639 次
打开论文来源

VideoBERT: A Joint Model for Video and Language Representation Learning

Chen Sun, Austin Myers, Carl Vondrick, Kevin Murphy, and Cordelia Schmid

Google Research

VideoBERT text-to-video generation and future forecasting examples

Figure 1: VideoBERT text-to-video generation and future forecasting. (Above) Given some recipe text divided into sentences, (y = y_{1:T}), we generate a sequence of video tokens (x = x_{1:T}) by computing (x^*_t = \arg\max_k p(x_t = k \mid y)) using VideoBERT. (Below) Given a video token, we show the top three future tokens forecasted by VideoBERT at different time scales. In this case, VideoBERT predicts that a bowl of flour and cocoa powder may be baked in an oven, and may become a brownie or cupcake. We visualize video tokens using the images from the training set closest to centroids in feature space.

图 1:VideoBERT 的文本生成视频与未来预测。(上)给定分成若干句子的菜谱文本 (y = y_{1:T}),我们用 VideoBERT 计算 (x^*t = \arg\max_k p(x_t = k \mid y)),生成视频记号序列 (x = x{1:T})。(下)给定一个视频记号,展示 VideoBERT 在不同时间尺度上预测出的三个最可能的未来记号。在这个例子里,VideoBERT 预测一碗面粉和可可粉可能会被放进烤箱烘烤,并可能变成布朗尼或纸杯蛋糕。我们用训练集中距离特征空间簇中心最近的图像来可视化视频记号。

Abstract

摘要

Self-supervised learning has become increasingly important to leverage the abundance of unlabeled data available on platforms like YouTube. Whereas most existing approaches learn low-level representations, we propose a joint visual-linguistic model to learn high-level features without any explicit supervision. In particular, inspired by its recent success in language modeling, we build upon the BERT model to learn bidirectional joint distributions over sequences of visual and linguistic tokens, derived from vector quantization of video data and off-the-shelf speech recognition outputs, respectively. We use VideoBERT in numerous tasks, including action classification and video captioning. We show that it can be applied directly to open-vocabulary classification, and confirm that large amounts of training data and cross-modal information are critical to performance. Furthermore, we outperform the state-of-the-art on video captioning, and quantitative results verify that the model learns high-level semantic features.

要利用 YouTube 这类平台上大量未标注数据,自监督学习变得越来越重要。已有方法大多在学低层表征,我们则提出一种视觉–语言联合模型,在没有任何显式监督的情况下学习高层特征。具体而言,受其近期在语言建模上成功的启发,我们基于 BERT 模型,学习视觉记号序列与语言记号序列上的双向联合分布;前者来自对视频数据的向量量化,后者来自现成的语音识别输出。我们将 VideoBERT 用于多项任务,包括动作分类和视频描述。我们表明它可以直接用于开放词表分类,并确认大量训练数据和跨模态信息对性能至关重要。此外,我们在视频描述上超过了当时最好的结果,定量结果也验证了模型学到了高层语义特征。

1. Introduction

1. 引言

Deep learning can benefit a lot from labeled data [24], but this is hard to acquire at scale. Consequently there has been a lot of recent interest in “self supervised learning”, where we train a model on various “proxy tasks”, which we hope will result in the discovery of features or representations that can be used in downstream tasks. A wide variety of such proxy tasks have been proposed in the image and video domains. However, most of these methods focus on low level features (e.g., textures) and short temporal scales (e.g., motion patterns that last a second or less). We are interested in discovering high-level semantic features which correspond to actions and events that unfold over longer time scales (e.g. minutes), since such representations would be useful for various video understanding tasks.

深度学习可以从标注数据中获得很大收益 [24],但这类数据很难大规模获取。因此,近来人们对“自监督学习”很感兴趣:在各种“代理任务”上训练模型,希望借此发现可用于下游任务的特征或表征。图像和视频领域已经提出了多种多样的这类代理任务。不过,这些方法大多关注低层特征(例如纹理)和短时间尺度(例如持续一秒或更短的运动模式)。我们希望发现与更长时间尺度(例如按分钟展开)的动作和事件相对应的高层语义特征,因为这样的表征对多种视频理解任务会有用。

In this paper, we exploit the key insight that human language has evolved words to describe high-level objects and events, and thus provides a natural source of “self” supervision. In particular, we present a simple way to model the relationship between the visual domain and the linguistic domain by combining three off-the-shelf methods: an automatic speech recognition (ASR) system to convert speech into text; vector quantization (VQ) applied to low-level spatio-temporal visual features derived from pretrained video classfication models; and the recently proposed BERT model [6] for learning joint distributions over sequences of discrete tokens.

本文利用一个关键观察:人类语言已经演化出描述高层物体和事件的词语,因而提供了一种自然的“自我”监督来源。具体来说,我们把三种现成方法结合起来,给出一种对视觉域与语言域之间关系建模的简单做法:用自动语音识别(ASR)系统把语音转成文本;对由预训练视频分类模型得到的低层时空视觉特征做向量量化(VQ);再用最近提出的 BERT 模型 [6] 学习离散记号序列上的联合分布。

Additional VideoBERT text-to-video generation and future forecasting examples

Figure 2: Additional text-to-video generation and future forecasting examples from VideoBERT, see Figure 1 for details.

图 2:VideoBERT 文本生成视频与未来预测的更多例子,细节见图 1。

More precisely, our approach is to apply BERT to learn a model of the form (p(x, y)), where (x) is a sequence of “visual words”, and (y) is a sequence of spoken words. Given such a joint model, we can easily tackle a variety of interesting tasks. For example, we can perform text-to-video prediction, which can be used to automatically illustrate a set of instructions (such as a recipe), as shown in the top examples of Figure 1 and 2. We can also perform the more traditional video-to-text task of dense video captioning [10] as shown in Figure 6. In Section 4.6, we show that our approach to video captioning significantly outperforms the previous state-of-the-art [39] on the YouCook II dataset [38].

更准确地说,我们的做法是用 BERT 学习形如 (p(x, y)) 的模型,其中 (x) 是一串“视觉词”,(y) 是一串口语词。有了这样的联合模型,就可以较容易地处理多种有意思的任务。例如,我们可以做文本到视频的预测,用来自动为一段说明(例如菜谱)配上画面,如图 1 和图 2 上方的例子所示。我们也可以做更传统的视频到文本任务,即密集视频描述 [10],如图 6 所示。在第 4.6 节,我们表明该方法在 YouCook II 数据集 [38] 上的视频描述明显超过先前最好的结果 [39]。

We can also use our model in a “unimodal” fashion. For example, the implied marginal distribution (p(x)) is a language model for visual words, which we can use for long-range forecasting. This is illustrated in the bottom examples of Figure 1 and 2. Of course, there is uncertainty about the future, but the model can generate plausible guesses at a much higher level of abstraction than other deep generative models for video, such as those based on VAEs or GANs (see e.g., [4, 5, 13, 27]), which tend to predict small changes to low level aspects of the scene, such as the location or pose of a small number of objects.

我们也可以把模型用在“单模态”设定里。例如,它所蕴含的边缘分布 (p(x)) 是视觉词上的语言模型,可以用来做长程预测。图 1 和图 2 下方的例子展示了这一点。未来当然存在不确定性,但该模型能在比其他视频深度生成模型高得多的抽象层级上给出合理猜测;那些基于 VAE 或 GAN 的模型(例如 [4, 5, 13, 27])往往只预测场景低层属性的小幅变化,例如少数物体的位置或姿态。

In summary, our main contribution in this paper is a simple way to learn high level video representations that capture semantically meaningful and temporally long-range structure. The remainder of this paper describes this contribution in detail. In particular, Section 2 briefly reviews related work; Section 3 describes how we adapt the recent progress in natural language modeling to the video domain; Section 4 presents results on activity recognition and video captioning tasks; and Section 5 concludes.

总之,本文的主要贡献是一种学习高层视频表征的简单方法,能够刻画有语义意义、并且在时间上跨度较长的结构。后文将详细介绍这一贡献。其中,第 2 节简要回顾相关工作;第 3 节说明我们如何把自然语言建模的近期进展迁移到视频领域;第 4 节给出在活动识别和视频描述任务上的结果;第 5 节作总结。

2. Related Work

2. 相关工作

Supervised learning. Some of the most successful approaches for video representation learning have leveraged large labeled datasets (e.g., [9, 19, 36, 7]) to train convolutional neural networks for video classification. However, it is very expensive to collect such labeled data, and the corresponding label vocabularies are often small and not capable of representing the nuances of many kinds of actions (e.g., “sipping” is slightly different than “drinking” which is slightly different than “gulping”). In addition, these approaches are designed for representing short video clips, typically a few seconds long. The main difference to our work is that we focus on the long-term evolution of events in video, and we do not use manually provided labels.

有监督学习。 视频表征学习中一些最成功的做法,是借助大规模标注数据集(例如 [9, 19, 36, 7])训练用于视频分类的卷积神经网络。不过,收集这类标注数据非常昂贵,而且相应的标签词表往往很小,无法刻画许多动作的细微差别(例如 “sipping” 与 “drinking” 略有不同,后者又与 “gulping” 略有不同)。此外,这些方法是为表示短视频片段设计的,通常只有几秒长。与我们工作的主要差别在于,我们关注视频中事件的长期演化,并且不使用人工提供的标签。

Unsupervised learning. Recently, a variety of approaches for learning density models from video have been proposed. Some use a single static stochastic variable, which is then “decoded” into a sequence using an RNN, either using a VAE-style loss [32, 35] or a GAN-style loss [31, 17]. More recent work uses temporal stochastic variables, e.g., the SV2P model of [4] and the SVGLP model of [5]. There are also various GAN-based approaches, such as the SAVP approach of [13] and the MoCoGAN approach of [27]. We differ from this work in that we use the BERT model, without any explicit stochastic latent variables, applied to visual tokens derived from the video. Thus our model is not a generative model of pixels, but it is a generative model of features derived from pixels, which is an approach that has been used in other work (e.g., [30]).

无监督学习。 近来已有多种从视频学习密度模型的方法。有些使用单个静态随机变量,再用循环网络把它“解码”成序列,损失既可以是变分自编码器风格 [32, 35],也可以是生成对抗网络风格 [31, 17]。更新的工作使用时间上的随机变量,例如 [4] 的 SV2P 模型和 [5] 的 SVGLP 模型。也有多种基于生成对抗网络的方法,例如 [13] 的 SAVP 和 [27] 的 MoCoGAN。我们与这些工作的不同之处在于,我们把不含显式随机潜变量的 BERT 模型用到由视频得到的视觉记号上。因此,我们的模型不是像素的生成模型,而是由像素得到的特征的生成模型;这一做法在其他工作中也出现过(例如 [30])。

Self-supervised learning. To avoid the difficulties of learning a joint model (p(x_{1:T})), it has become popular to learn conditional models of the form (p(x_{t+1:T} \mid x_{1:t})), where we partition the signal into two or more blocks, such as grayscale and color, or previous frame and next frame (e.g., [18]), and try to predict one from the other (see e.g., [23] for an overview). Our approach is similar, except we use quantized visual words instead of pixels. Furthermore, although we learn a set conditional distributions, our model is a proper joint generative model, as explained in Section 3.

自监督学习。 为了避开学习联合模型 (p(x_{1:T})) 的困难,一种流行做法是学习形如 (p(x_{t+1:T} \mid x_{1:t})) 的条件模型:把信号分成两块或更多块,例如灰度与彩色,或前一帧与后一帧(例如 [18]),再尝试由一块预测另一块(综述见 [23])。我们的做法与此类似,只不过用的是量化后的视觉词而不是像素。此外,尽管我们学习的是一组条件分布,该模型仍是一个真正的联合生成模型,第 3 节会说明这一点。

Cross-modal learning. The multi-modal nature of video has also been an extensive source of supervision for learning video representations, which our paper builds on. Since most videos contain synchronized audio and visual signals, the two modalities can supervise each other to learn strong self-supervised video representations [3, 20, 21]. In this work, we use speech (provided by ASR) rather than low-level sounds as a source of cross-modal supervision.

跨模态学习。 视频的多模态特性也是学习视频表征的重要监督来源,本文建立在这一点上。由于大多数视频都含有同步的音频和视觉信号,两种模态可以相互监督,从而学到较强的自监督视频表征 [3, 20, 21]。本文使用由自动语音识别得到的语音,而不是低层声音,作为跨模态监督。

Natural language models. We build upon recent progress in the NLP community, where large-scale language models such as ELMO [22] and BERT [6] have shown state-of-the-art results for various NLP tasks, both at the word level (e.g., POS tagging) and sentence level (e.g., semantic classification). The BERT model is then extended to pre-train on multi-lingual data [12]. Our paper builds on the BERT model to capture structure in both the linguistic and visual domains.

自然语言模型。 我们建立在自然语言处理领域的近期进展之上。ELMO [22] 和 BERT [6] 等大规模语言模型已在多种自然语言处理任务上取得当时最好的结果,既包括词级任务(例如词性标注),也包括句级任务(例如语义分类)。BERT 随后还被扩展到多语言数据上预训练 [12]。本文基于 BERT 模型,同时刻画语言域和视觉域中的结构。

Image and video captioning. There has been much recent work on image captioning (see e.g., [11, 8, 15]), which is a model of the form (p(y \mid x)), where (y) is the manually provided caption and (x) is the image. There has also been some work on video captioning, using either manually provided temporal segmentation or estimated segmentations (see e.g., [10, 39]). We use our joint (p(x, y)) model and apply it to video captioning, and achieve state-of-the-art results, as we discuss in Section 4.6.

图像与视频描述。 近期有大量图像描述工作(例如 [11, 8, 15]),它们是形如 (p(y \mid x)) 的模型,其中 (y) 是人工提供的描述,(x) 是图像。也有一些视频描述工作,使用人工提供的时间分段或估计出的分段(例如 [10, 39])。我们把联合模型 (p(x, y)) 用于视频描述,并取得了当时最好的结果,第 4.6 节会讨论。

Instructional videos. Various papers (e.g., [16, 2, 10, 38, 39]) have trained models to analyse instructional videos, such as cooking. We differ from this work in that we do not use any manual labeling, and we learn a large-scale generative model of both words and (discretized) visual signals.

教学视频。 已有多篇论文(例如 [16, 2, 10, 38, 39])训练模型来分析教学视频,例如烹饪视频。我们与这些工作的不同在于,我们不使用任何人工标注,并且学习词语与(离散化)视觉信号的大规模生成模型。

3. Models

3. 模型

In this section, we briefly summarize the BERT model, and then describe how we extend it to jointly model video and language data.

本节先简要概括 BERT 模型,再说明我们如何把它扩展到对视频和语言数据的联合建模。

3.1. The BERT model

3.1. BERT 模型

BERT [6] proposes to learn language representations by using a “masked language model” training objective. In more detail, let (x = {x_1, \ldots, x_L}) be a set of discrete tokens, (x_l \in \mathcal{X}). We can define a joint probability distribution over this set as follows:

BERT [6] 提出用“掩码语言模型”训练目标来学习语言表征。更具体地说,设 (x = {x_1, \ldots, x_L}) 是一组离散记号,(x_l \in \mathcal{X})。我们可以在这组记号上定义如下联合概率分布:

[
p(x \mid \theta) = \frac{1}{Z(\theta)} \prod_{l=1}^{L} \phi_l(x \mid \theta) \propto \exp\left( \sum_{l=1}^{L} \log \phi_l(x \mid \theta) \right)
]

where (\phi_l(x)) is the (l)'th potential function, with parameters (\theta), and (Z) is the partition function.

其中 (\phi_l(x)) 是第 (l) 个势函数,参数为 (\theta),(Z) 是配分函数。

The above model is permutation invariant. In order to capture order information, we can “tag” each word with its position in the sentence. The BERT model learns an embedding for each of the word tokens, as well as for these tags, and then sums the embedding vectors to get a continuous representation for each token. The log potential (energy) functions for each location are defined by

上述模型对置换是不变的。为了刻画顺序信息,我们可以给每个词标上它在句子中的位置。BERT 为每个词记号以及这些位置标记学习嵌入,再把嵌入向量相加,得到每个记号的连续表示。各位置的对数势函数(能量函数)定义为

[
\log \phi_l(x \mid \theta) = x_l^{\top} f_{\theta}(x_{\setminus l})
]

where (x_l) is a one-hot vector for the (l)'th token (and its tag), and

其中 (x_l) 是第 (l) 个记号(及其标记)的 one-hot 向量,并且

[
x_{\setminus l} = (x_1, \ldots, x_{l-1}, \mathrm{MASK}, x_{l+1}, \ldots, x_L)
]

The function (f(x_{\setminus l})) is a multi-layer bidirectional transformer model [28] that takes an (L \times D_1) tensor, containing the (D_1)-dimensional embedding vectors corresponding to (x_{\setminus l}), and returns an (L \times D_2) tensor, where (D_2) is the size of the output of each transformer node. See [6] for details. The model is trained to approximately maximize the pseudo log-likelihood

函数 (f(x_{\setminus l})) 是一个多层双向 Transformer 模型 [28],它接收一个 (L \times D_1) 的张量,其中包含与 (x_{\setminus l}) 相对应的 (D_1) 维嵌入向量,并返回一个 (L \times D_2) 的张量,其中 (D_2) 是每个 Transformer 节点输出的维数。细节见 [6]。模型被训练以近似最大化伪对数似然

[
\mathcal{L}(\theta) = \mathbb{E}{x \sim \mathcal{D}} \sum{l=1}^{L} \log p(x_l \mid x_{\setminus l}; \theta)
]

In practice, we can stochastically optimize the logloss (computed from the softmax predicted by the (f) function) by sampling locations as well as training sentences.

实践中,我们可以通过同时对位置和训练句子做采样,随机优化对数损失(由 (f) 函数预测的 softmax 计算得到)。

BERT can be extended to model two sentences by concatenating them together. However, we are often not only interested in simply modeling the extended sequence, but rather relationships between the two sentences (e.g., is this a pair of consecutive or randomly selected sentences). BERT accomplishes this by prepending every sequence with a special classification token, [CLS], and by joining sentences with a special separator token, [SEP]. The final hidden state corresponding to the [CLS] token is used as the aggregate sequence representation from which we predict a label for classification tasks, or which may otherwise be ignored. In addition to differentiating sentences with the [SEP] token, BERT also optionally tags each token by the sentence it comes from. The corresponding joint model can be written as (p(x, y, c)), where (x) is the first sentence, (y) is the second, and (c = {0, 1}) is a label indicating whether the sentences were separate or consecutive in the source document.

把两个句子拼接起来,就可以把 BERT 扩展到对两个句子建模。不过,我们往往不仅想建模这段加长的序列,还想建模两个句子之间的关系(例如,这是一对连续句子,还是随机选出的句子)。BERT 的做法是在每个序列前加上特殊的分类记号 [CLS],并用特殊的分隔记号 [SEP] 连接句子。[CLS] 记号对应的最终隐状态被用作整段序列的聚合表示,可从中预测分类任务的标签,也可以被忽略。除了用 [SEP] 区分句子外,BERT 还可以选择给每个记号标上它所来自的句子。相应的联合模型可以写成 (p(x, y, c)),其中 (x) 是第一句,(y) 是第二句,(c = {0, 1}) 是一个标签,表示这两句在源文档中是分开的还是连续的。

For consistency with the original paper, we also add a [SEP] token to the end of the sequence, even though it is not strictly needed. So, a typical masked-out training sentence pair may look like this: [CLS] let's make a traditional [MASK] cuisine [SEP] orange chicken with [MASK] sauce [SEP]. The corresponding class label in this case would be (c = 1), indicating that (x) and (y) are consecutive.

为了与原文保持一致,我们还在序列末尾加上一个 [SEP] 记号,尽管这并非严格必需。因此,一个典型的带掩码训练句对可能是这样的:[CLS] let's make a traditional [MASK] cuisine [SEP] orange chicken with [MASK] sauce [SEP]。此时对应的类别标签是 (c = 1),表示 (x) 和 (y) 是连续的。

Illustration of VideoBERT masked token prediction for video and text

Figure 3: Illustration of VideoBERT in the context of a video and text masked token prediction, or cloze, task. This task also allows for training with text-only and video-only data, and VideoBERT can furthermore be trained using a linguistic-visual alignment classification objective (not shown here, see text for details).

图 3:在视频与文本的掩码记号预测(即完形填空)任务中对 VideoBERT 的示意。该任务也可以只用文本或只用视频来训练;此外,VideoBERT 还可以用语言–视觉对齐分类目标来训练(此处未画出,细节见正文)。

3.2. The VideoBERT model

3.2. VideoBERT 模型

To extend BERT to video, in such a way that we may still leverage pretrained language models and scalable implementations for inference and learning, we decided to make minimal changes, and transform the raw visual data into a discrete sequence of tokens. To this end, we propose to generate a sequence of “visual words” by applying hierarchical vector quantization to features derived from the video using a pretrained model. See Section 4.2 for details. Besides its simplicity, this approach encourages the model to focus on high level semantics and longer-range temporal dynamics in the video. This is in contrast to most existing self-supervised approaches to video representation learning, which learn low-level properties such as local textures and motions, as discussed in Section 2.

为了在把 BERT 扩展到视频的同时,仍能利用预训练语言模型以及可扩展的推断与学习实现,我们决定尽量少做改动,并把原始视觉数据变成离散的记号序列。为此,我们建议对由预训练模型从视频中得到的特征做层级向量量化,从而生成一串“视觉词”。细节见第 4.2 节。除了简单之外,这一做法也会促使模型把注意力放在视频中的高层语义和更长程的时间动态上。这与第 2 节讨论的大多数现有自监督视频表征方法形成对照,那些方法学习的是局部纹理和运动等低层属性。

We can combine the linguistic sentence (derived from the video using ASR) with the visual sentence to generate data such as this: [CLS] orange chicken with [MASK] sauce [>] v01 [MASK] v08 v72 [SEP], where v01 and v08 are visual tokens, and [>] is a special token we introduce to combine text and video sentences. See Figure 3 for an illustration.

我们可以把由自动语音识别从视频得到的语言句子与视觉句子结合起来,生成这样的数据:[CLS] orange chicken with [MASK] sauce [>] v01 [MASK] v08 v72 [SEP],其中 v01 和 v08 是视觉记号,[>] 是我们引入的、用来拼接文本句子和视频句子的特殊记号。示意见图 3。

While this cloze task extends naturally to sequences of linguistic and visual tokens, applying a next sentence prediction task, as used by BERT, is less straightforward. We propose a linguistic-visual alignment task, where we use the final hidden state of the [CLS] token to predict whether the linguistic sentence is temporally aligned with the visual sentence. Note that this is a noisy indicator of semantic relatedness, since even in instructional videos, the speaker may be referring to something that is not visually present.

虽然这一完形填空任务可以自然地推广到语言记号与视觉记号的序列,但要把 BERT 中使用的下一句预测任务搬过来,就不那么直接。我们提出一种语言–视觉对齐任务:用 [CLS] 记号的最终隐状态,预测语言句子是否与视觉句子在时间上对齐。需要说明的是,这只是语义相关性的一个嘈杂指标,因为即便在教学视频里,说话人也可能在指某个画面中并不存在的东西。

To combat this, we first randomly concatenate neighboring sentences into a single long sentence, to allow the model to learn semantic correspondence even if the two are not well aligned temporally. Second, since the pace of state transitions for even the same action can vary greatly between different videos, we randomly pick a subsampling rate of 1 to 5 steps for the video tokens. This not only helps the model be more robust to variations in video speeds, but also allows the model to capture temporal dynamics over greater time horizons and learn longer-term state transitions. We leave investigation into other ways of combining video and text to future work.

为应对这一点,我们首先随机把相邻句子拼成一个长句,让模型即使在两者时间上对得不准时,也能学习语义对应。其次,即便是同一动作,状态转换的节奏在不同视频之间也可能差得很远,因此我们为视频记号随机选取 1 到 5 步的子采样率。这既有助于模型对视频速度变化更稳健,也让模型能够在更长的时间跨度上刻画时间动态,并学习更长期的状态转换。其他把视频和文本结合起来的方式,我们留待未来工作。

Overall, we have three training regimes corresponding to the different input data modalities: text-only, video-only and video-text. For text-only and video-only, the standard mask-completion objectives are used for training the model. For text-video, we use the linguistic-visual alignment classification objective described above. The overall training objective is a weighted sum of the individual objectives. The text objective forces VideoBERT to do well at language modeling; the video objective forces it to learn a “language model for video”, which can be used for learning dynamics and forecasting; and the text-video objective forces it to learn a correspondence between the two domains.

总体而言,对应于不同的输入数据模态,我们有三种训练设定:只用文本、只用视频,以及视频–文本。只用文本和只用视频时,采用标准的掩码补全目标来训练模型。文本–视频则使用上文所述的语言–视觉对齐分类目标。总的训练目标是各项的加权和。文本目标迫使 VideoBERT 做好语言建模;视频目标迫使它学习一个“视频的语言模型”,可用于学习动态并做预测;文本–视频目标则迫使它学习两个域之间的对应。

Once we have trained the model, we can use it in a variety of downstream tasks, and in this work we quantitatively evaluate two applications. In the first application, we treat it as a probabilistic model, and ask it to predict or impute the symbols that have been MASKed out. We illustrate this in Section 4.4, where we perform “zero-shot” classification. In the second application, we extract the predicted representation (derived from the internal activations of the model) for the [CLS] token, and use that dense vector as a representation of the entire input. This can be combined with other features derived from the input to be used in a downstream supervised learning task. We demonstrate this in Section 4.6, where we perform video captioning.

模型训练完成后,可以用于多种下游任务。本文对两个应用做了定量评估。在第一个应用中,我们把它当作概率模型,让它预测或补全被掩码掉的符号。第 4.4 节用“零样本”分类来说明这一点。在第二个应用中,我们抽出 [CLS] 记号的预测表示(来自模型的内部激活),把这个稠密向量当作整个输入的表征。它可以与由输入得到的其他特征结合起来,用于下游有监督学习任务。我们在第 4.6 节用视频描述来展示这一点。

4. Experiments and Analysis

4. 实验与分析

In this section we describe our experimental setup, and show quantitative and qualitative results.

本节介绍实验设置,并给出定量和定性结果。

4.1. Dataset

4.1. 数据集

Deep learning models, in both language and vision domains, have consistently demonstrated dramatic gains in performance with increasingly large datasets. For example, the “large” BERT model (which we use) was pretrained on the concatenation of the BooksCorpus (800M words) and English Wikipedia (2,500M words).

无论在语言还是视觉领域,深度学习模型都一再表明:随着数据集增大,性能会显著提升。例如,我们使用的“large” BERT 模型,是在 BooksCorpus(8 亿词)和英文维基百科(25 亿词)的拼接数据上预训练的。

Therefore, we would like to train VideoBERT with a comparably large-scale video dataset. Since we are interested in the connection between language and vision, we would like to find videos where the spoken words are more likely to refer to visual content. Intuitively, this is often the case for instructional videos, and we focus on cooking videos specifically, since it is a well studied domain with existing annotated datasets available for evaluation. Unfortunately, such datasets are relatively small, so we turn to YouTube to collect a large-scale video dataset for training.

因此,我们希望用规模相当的视频数据集来训练 VideoBERT。由于我们关心语言与视觉之间的联系,希望找到口语更可能指向画面内容的视频。直观上,教学视频常常如此;我们特别关注烹饪视频,因为这是一个研究充分、并且已有标注数据集可用于评测的领域。可惜这类数据集相对较小,于是我们转向 YouTube,收集大规模视频数据用于训练。

We extract a set of publicly available cooking videos from YouTube using the YouTube video annotation system to retrieve videos with topics related to “cooking” and “recipe”. We also filter videos by their duration, removing videos longer than 15 minutes, resulting in a set of 312K videos. The total duration of this dataset is 23,186 hours, or roughly 966 days. For reference, this is more than two orders of magnitude larger than the next largest cooking video dataset, YouCook II, which consists of 2K videos with a total duration of 176 hours [38].

我们利用 YouTube 的视频标注系统,检索主题与 “cooking” 和 “recipe” 相关的公开烹饪视频,并按时长过滤,去掉超过 15 分钟的视频,最终得到 31.2 万段视频。该数据集总时长为 23,186 小时,大约 966 天。作为对照,这比当时最大的烹饪视频数据集 YouCook II(2,000 段视频,总时长 176 小时)[38] 还要大两个数量级以上。

To obtain text from the videos, we utilize YouTube's automatic speech recognition (ASR) toolkit provided by the YouTube Data API [1] to retrieve timestamped speech information. The API returns word sequences and the predicted language type. Among the 312K videos, 180K have ASR that can be retrieved by the API, and 120K of these are predicted to be in English. In our experiments, while we use all videos for the video-only objective, we only use text from English ASR for VideoBERT's text-only and video-text objectives.

为了从视频中得到文本,我们使用 YouTube Data API [1] 提供的自动语音识别工具,获取带时间戳的语音信息。该接口返回词序列以及预测的语言类型。在 31.2 万段视频中,有 18 万段能通过该接口取到自动语音识别结果,其中 12 万段被判定为英语。在我们的实验中,只用视频的训练目标会用到全部视频,而 VideoBERT 只用文本以及视频–文本的训练目标,则只使用英语语音识别文本。

We evaluate VideoBERT on the YouCook II dataset [38], which contains 2000 YouTube videos averaging 5.26 minutes in duration, for a total of 176 hours. The videos have manually annotated segmentation boundaries and captions. On average there are 7.7 segments per video, and 8.8 words per caption. We use the provided dataset split, with 1333 videos for training and 457 for validation. To avoid potential bias during pretraining, we also remove any videos which appear in YouCook II from our pretraining set.

我们在 YouCook II 数据集 [38] 上评估 VideoBERT。该数据集包含 2,000 段 YouTube 视频,平均时长 5.26 分钟,总计 176 小时。视频带有人工标注的分段边界和描述。平均每段视频有 7.7 个片段,每条描述有 8.8 个词。我们使用提供的数据划分,1,333 段用于训练,457 段用于验证。为避免预训练时可能出现的偏差,我们还从预训练集中剔除了所有出现在 YouCook II 中的视频。

4.2. Video and Language Preprocessing

4.2. 视频与语言预处理

For each input video, we sample frames at 20 fps, and create clips from 30-frame (1.5 seconds) non-overlapping windows over the video. For each 30-frame clip, we apply a pretrained video ConvNet to extract its features. In this work, we use the S3D [34] which adds separable temporal convolutions to an Inception network [25] backbone. We take the feature activations before the final linear classifier and apply 3D average pooling to obtain a 1024-dimension feature vector. We pretrain the S3D network on the Kinetics [9] dataset, which covers a wide spectrum of actions from YouTube videos, and serves as a generic representation for each individual clip.

对每个输入视频,我们以 20 fps 采样帧,并用 30 帧(1.5 秒)的不重叠窗口切出片段。对每个 30 帧片段,我们用预训练的视频卷积网络提取特征。本文使用 S3D [34],它在 Inception 网络 [25] 主干上加入了可分离时间卷积。我们取最终线性分类器之前的特征激活,再做三维平均池化,得到 1024 维特征向量。S3D 网络在 Kinetics [9] 数据集上预训练,该数据集覆盖了来自 YouTube 视频的广泛动作,并作为每个片段的通用表示。

We tokenize the visual features using hierarchical (k)-means. We adjust the number of hierarchy levels (d) and the number of clusters per level (k) by visually inspecting the coherence and representativeness of the clusters. We set (d=4) and (k = 12), which yields (12^4 = 20736) clusters in total. Figure 4 illustrates the result of this “vector quantization” process.

我们用层级 (k)-means 对视觉特征做记号化。层级数量 (d) 和每层簇数 (k) 是通过目视检查簇的一致性和代表性来调整的。我们取 (d=4)、(k=12),一共得到 (12^4=20{,}736) 个簇。图 4 展示了这一“向量量化”过程的结果。

Video sentence pairs from pretraining videos with visual centroids

Figure 4: Examples of video sentence pairs from the pretraining videos. We quantize each video segment into a token, and then represent it by the corresponding visual centroid. For each row, we show the original frames (left) and visual centroids (right). We can see that the tokenization process preserves semantic information rather than low-level visual appearance.

图 4:预训练视频中的视频句子对例子。我们把每个视频片段量化成一个记号,再用对应的视觉簇中心来表示它。每一行中,左侧是原始帧,右侧是视觉簇中心。可以看出,记号化过程保留的是语义信息,而不是低层视觉外观。

For each ASR word sequence, we break the stream of words into sentences by adding punctuation using an off-the-shelf LSTM-based language model. For each sentence, we follow the standard text preprocessing steps from BERT [6] and tokenize the text into WordPieces [33]. We use the same vocabulary provided by the authors of BERT, which contains 30,000 tokens.

对每段自动语音识别得到的词序列,我们用现成的基于 LSTM 的语言模型加上标点,把词流断成句子。对每个句子,我们按 BERT [6] 的标准文本预处理步骤,把文本切成 WordPiece [33]。我们使用 BERT 作者提供的同一词表,其中包含 30,000 个记号。

Unlike language which can be naturally broken into sentences, it is unclear how to break videos into semantically coherent segments. We use a simple heuristic to address this problem: when an ASR sentence is available, it is associated with starting and ending timestamps, and we treat video tokens that fall into that time period as a segment. When ASR is not available, we simply treat 16 tokens as a segment.

语言可以自然地断成句子,但如何把视频切成语义连贯的片段并不清楚。我们用一个简单启发式来处理:当有自动语音识别句子时,它带有起止时间戳,我们把落入该时段的视频记号当作一个片段。当没有自动语音识别结果时,我们就简单地以 16 个记号作为一个片段。

4.3. Model Pre-training

4.3. 模型预训练

We initialize the BERT weights from a text pre-trained checkpoint. Specifically, we use the BERT(_\mathrm{LARGE}) model released by the authors of [6], using the same backbone architecture: it has 24 layers of Transformer blocks, where each block has 1024 hidden units and 16 self-attention heads.

我们用文本预训练检查点来初始化 BERT 权重。具体来说,我们使用 [6] 的作者发布的 BERT(_\mathrm{LARGE}) 模型,并采用相同的主干结构:它有 24 层 Transformer 块,每个块有 1024 个隐单元和 16 个自注意力头。

We add support for video tokens by appending 20,736 entries to the word embedding lookup table for each of our new “visual words”. We initialize these entries with the S3D features from their corresponding cluster centroids. The input embeddings are frozen during pretraining.

为了支持视频记号,我们在词嵌入查找表中为每个新的“视觉词”追加 20,736 项。这些项用对应簇中心的 S3D 特征来初始化。预训练期间,输入嵌入是冻结的。

Our model training process largely follows the setup of BERT: we use 4 Cloud TPUs in the Pod configuration with a total batch size of 128, and we train the model for 0.5 million iterations, or roughly 8 epochs. We use the Adam optimizer with an initial learning rate of 1e-5, and a linear decay learning rate schedule. The training process takes around 2 days.

模型训练过程大体沿用 BERT 的设定:我们使用 Pod 配置下的 4 个 Cloud TPU,总批次大小为 128,训练 50 万步,大约 8 个 epoch。我们使用 Adam 优化器,初始学习率为 (1\times 10^{-5}),并采用线性衰减的学习率计划。训练过程大约需要两天。

4.4. Zero-shot action classification

4.4. 零样本动作分类

Once pretrained, the VideoBERT model can be used for “zero-shot” classification on novel datasets, such as YouCook II (By “zero-shot” we mean the model is not trained on YouCook II data nor with the same label ontology used in YouCook II). More precisely, we want to compute (p(y \mid x)) where (x) is the sequence of visual tokens, and (y) is a sequence of words. Since the model is trained to predict sentences, we define (y) to be the fixed sentence, “now let me show you how to [MASK] the [MASK],” and extract the verb and noun labels from the tokens predicted in the first and second masked slots, respectively. See Figure 5 for some qualitative results.

预训练完成后,VideoBERT 模型可以在新的数据集上做“零样本”分类,例如 YouCook II(这里的“零样本”是指:模型既没有在 YouCook II 数据上训练,也没有使用 YouCook II 中的同一套标签体系)。更准确地说,我们希望计算 (p(y \mid x)),其中 (x) 是视觉记号序列,(y) 是词序列。由于模型是按预测句子来训练的,我们把 (y) 取成固定句子 “now let me show you how to [MASK] the [MASK]”,并分别从第一个和第二个掩码位置上预测出的记号中提取动词和名词标签。一些定性结果见图 5。

VideoBERT predicting nouns and verbs from video clips

Figure 5: Using VideoBERT to predict nouns and verbs given a video clip. See text for details. The video clip is first converted into video tokens (two are shown here for each example), and then visualized using their centroids.

图 5:用 VideoBERT 在给定视频片段时预测名词和动词。细节见正文。视频片段先被转换成视频记号(这里每个例子展示两个),再用它们的簇中心来可视化。

For quantitative evaluation, we use the YouCook II dataset. In [37], the authors collected ground truth bounding boxes for the 63 most common objects for the validation set of YouCook II. However, there are no ground truth labels for actions, and many other common objects are not labeled. So, we collect action and object labels, derived from the ground truth captions, to address this shortcoming. We run an off-the-shelf part-of-speech tagger on the ground truth captions to retrieve the 100 most common nouns and 45 most common verbs, and use these to derive ground truth labels. While VideoBERT's word piece vocabulary gives it the power to effectively perform open-vocabulary classification, it is thus more likely to make semantically correct predictions that do not exactly match the more limited ground truth. So, we report both top-1 and top-5 classification accuracy metrics, where the latter is intended to mitigate this issue, and we leave more sophisticated evaluation techniques for future work. Lastly, if there is more than one verb or noun associated with a video clip, we deem a prediction correct if it matches any of those. We report the performance on the validation set of YouCook II.

定量评估使用 YouCook II 数据集。在 [37] 中,作者为 YouCook II 验证集上最常见的 63 类物体收集了真实边界框。不过,动作没有真实标签,许多其他常见物体也未被标注。因此,我们从真实描述中收集动作和物体标签,以弥补这一不足。我们用现成的词性标注器处理真实描述,取出 100 个最常见名词和 45 个最常见动词,并据此得到真实标签。VideoBERT 的词片词表使它实际上能够做开放词表分类,因而也更可能给出语义正确、但与较为受限的真实标签并不完全一致的预测。我们同时报告 top-1 和 top-5 分类准确率,后者正是为了减轻这一问题,更精细的评估方法留待未来工作。最后,如果一个视频片段对应不止一个动词或名词,只要预测与其中任何一个匹配,我们就判为正确。我们报告在 YouCook II 验证集上的表现。

Table 1 shows the top-1 and top-5 accuracies of VideoBERT and its ablations. To verify that VideoBERT actually makes use of video inputs, we first remove the video inputs to VideoBERT, and use just the language model (p(y)) to perform prediction. We also use the language prior from the text-only BERT model, that was not fine-tuned on cooking videos. We can see that VideoBERT significantly outperforms both baselines. As expected, the language prior of VideoBERT is adapted to cooking sentences, and is better than the vanilla BERT model.

Table 1 给出了 VideoBERT 及其消融实验的 top-1 和 top-5 准确率。为了验证 VideoBERT 确实利用了视频输入,我们首先去掉它的视频输入,只用语言模型 (p(y)) 来做预测。我们也使用未经在烹饪视频上微调的、纯文本 BERT 模型的语言先验。可以看到,VideoBERT 明显超过这两条基线。正如所料,VideoBERT 的语言先验已经适应了烹饪句子,并且好于原始的 BERT 模型。

Table 1: Action classification performance on YouCook II dataset. See text for details.

Method Supervision verb top-1 (%) verb top-5 (%) object top-1 (%) object top-5 (%)
S3D [34] yes 16.1 46.9 13.2 30.9
BERT (language prior) no 0.0 0.0 0.0 0.0
VideoBERT (language prior) no 0.4 6.9 7.7 15.3
VideoBERT (cross modal) no 3.2 43.3 13.1 33.7

表 1:YouCook II 数据集上的动作分类表现。细节见正文。

方法 监督 动词 top-1(%) 动词 top-5(%) 物体 top-1(%) 物体 top-5(%)
S3D [34] 是 16.1 46.9 13.2 30.9
BERT(语言先验) 否 0.0 0.0 0.0 0.0
VideoBERT(语言先验) 否 0.4 6.9 7.7 15.3
VideoBERT(跨模态) 否 3.2 43.3 13.1 33.7

We then compare with a fully supervised classifier that was trained using the training split of YouCook II. We use the pre-computed S3D features (same as the inputs to VideoBERT), applying average pooling over time, followed by a linear classifier. Table 1 shows the results. As we can see, the supervised framework outperforms VideoBERT in top-1 verb accuracy, which is not surprising given that VideoBERT has an effectively open vocabulary. (See Figure 5 for an illustration of the ambiguity of the action labels.) However, the top-5 accuracy metric reveals that VideoBERT achieves comparable performance to the fully supervised S3D baseline, without using any supervision from YouCook II, indicating that the model is able to perform competitively in this “zero-shot” setting.

我们再与一个在 YouCook II 训练划分上训练的全监督分类器进行比较。我们使用预先计算好的 S3D 特征(与 VideoBERT 的输入相同),在时间上做平均池化,再接一个线性分类器。结果见表 1。可以看出,全监督框架在动词 top-1 准确率上超过 VideoBERT,这并不奇怪,因为 VideoBERT 实际上具有开放词表。(动作标签的含糊之处可见图 5。)不过,top-5 准确率表明,VideoBERT 在不使用来自 YouCook II 的任何监督时,已经达到与全监督 S3D 基线相当的水平,说明该模型能够在这种“零样本”设定下具有竞争力。

4.5. Benefits of large training sets

4.5. 大规模训练集的好处

We also studied the impact of the size of the pretraining dataset. For this experiment, we take random subsets of 10K, 50K and 100K videos from the pretraining set, and pretrain VideoBERT using the same setup as above, for the same number of epochs. Table 2 shows the performance. We can see that the accuracy grows monotonically as the amount of data increases, showing no signs of saturation. This indicates that VideoBERT may benefit from even larger pretraining datasets.

我们还研究了预训练数据集规模的影响。在该实验中,我们从预训练集中随机取出 1 万、5 万和 10 万段视频的子集,用与上文相同的设定、相同的 epoch 数来预训练 VideoBERT。表现见表 2。可以看到,准确率随数据量增加而单调上升,没有出现饱和迹象。这表明 VideoBERT 还可能从更大的预训练数据集中获益。

Table 2: Action classification performance on YouCook II dataset as a function of pre-training data size.

Method Data size verb top-1 (%) verb top-5 (%) object top-1 (%) object top-5 (%)
VideoBERT 10K 0.4 15.5 2.9 17.8
VideoBERT 50K 1.1 15.7 8.7 27.3
VideoBERT 100K 2.9 24.5 11.2 30.6
VideoBERT 300K 3.2 43.3 13.1 33.7

表 2:YouCook II 数据集上的动作分类表现随预训练数据规模的变化。

方法 数据规模 动词 top-1(%) 动词 top-5(%) 物体 top-1(%) 物体 top-5(%)
VideoBERT 10K 0.4 15.5 2.9 17.8
VideoBERT 50K 1.1 15.7 8.7 27.3
VideoBERT 100K 2.9 24.5 11.2 30.6
VideoBERT 300K 3.2 43.3 13.1 33.7

4.6. Transfer learning for captioning

4.6. 用于描述的迁移学习

We further demonstrate the effectiveness of VideoBERT when used as a feature extractor. To extract features given only video inputs, we again use a simple fill-in-the-blank task, by appending the video tokens to a template sentence “now let's [MASK] the [MASK] to the [MASK], and then [MASK] the [MASK].” We extract the features for the video tokens and the masked out text tokens, take their average and concatenate the two together, to be used by a supervised model in a downstream task.

我们进一步展示把 VideoBERT 当作特征抽取器时的效果。在只有视频输入时,为了抽取特征,我们再次使用一个简单的填空任务:把视频记号接到模板句 “now let's [MASK] the [MASK] to the [MASK], and then [MASK] the [MASK].” 后面。我们抽出视频记号和被掩码文本记号的特征,各自取平均后再拼接起来,供下游任务中的有监督模型使用。

We evaluate the extracted features on video captioning, following the setup from [39], where the ground truth video segmentations are used to train a supervised model mapping video segments to captions. We use the same model that they do, namely a transformer encoder-decoder, but we replace the inputs to the encoder with the features derived from VideoBERT described above. We also concatenate the VideoBERT features with average-pooled S3D features; as a baseline, we also consider using just S3D features without VideoBERT. We set the number of Transformer block layers to 2, the hidden unit size to 128, and Dropout probability to 0.4. We use a 5-fold cross validation on the training split to set the hyper-parameters, and report performance on the validation set. We train the model for 40K iterations with batch size of 128. We use the same Adam optimizer as in VideoBERT pre-training, and set the initial learning rate to 1e-3 with a linear decay schedule.

我们按 [39] 的设定,在视频描述上评估抽出的特征:用真实视频分段来训练一个把视频片段映射到描述的有监督模型。我们使用与他们相同的模型,即 Transformer 编码器–解码器,但把编码器的输入换成上文所述由 VideoBERT 得到的特征。我们还将 VideoBERT 特征与平均池化的 S3D 特征拼接;作为基线,我们也考虑只使用不含 VideoBERT 的 S3D 特征。我们将 Transformer 块的层数设为 2,隐单元大小设为 128,Dropout 概率设为 0.4。超参数在训练划分上用 5 折交叉验证选定,并在验证集上报告表现。模型训练 4 万步,批次大小为 128。我们使用与 VideoBERT 预训练相同的 Adam 优化器,并将初始学习率设为 (1\times 10^{-3}),采用线性衰减计划。

Table 3 shows the results. We follow the standard practice in machine translation and compute BLEU and METEOR scores micro-averaged at corpus level, and also report ROUGE-L [14] and CIDEr [29] scores. For the baseline method [39], we recompute the metrics using the predictions provided by the authors. We can see that VideoBERT consistently outperforms the S3D baseline, especially for CIDEr. We can also see that cross-modal pre-training outperforms the video-only version. Furthermore, by concatenating the features from VideoBERT and S3D, the model achieves the best performance across all metrics.(^1)

结果见表 3。我们沿用机器翻译中的通行做法,计算在语料级别做微平均的 BLEU 和 METEOR,并同时报告 ROUGE-L [14] 和 CIDEr [29]。对于基线方法 [39],我们用作者提供的预测重新计算了这些指标。可以看到,VideoBERT 一贯超过 S3D 基线,在 CIDEr 上尤其明显。还可以看到,跨模态预训练好于只用视频的版本。此外,把 VideoBERT 与 S3D 的特征拼接后,模型在全部指标上都取得了最好结果。(^1)

(^1)The metrics used by [39] are macro-averaged at video level and may suffer from undesirable sparsity artifacts. Using their provided evaluation code, VideoBERT + S3D has B@4 of 1.79, and METEOR of 10.80.

(^1)[39] 使用的指标是在视频级别做宏平均,可能受到不良稀疏性伪影的影响。使用他们提供的评估代码,VideoBERT + S3D 的 B@4 为 1.79,METEOR 为 10.80。

Figure 6 shows some qualitative results. We note that the predicted word sequence is rarely exactly equal to the ground truth, which explains why the metrics in Table 3 (which measure n-gram overlap) are all low in absolute value. However, semantically the results seem reasonable.

图 6 给出了一些定性结果。我们注意到,预测出的词序列很少与真实描述完全相同,这解释了表 3 中这些度量 n-gram 重合的指标在绝对值上为何都偏低。不过,从语义上看,这些结果显得是合理的。

Table 3: Video captioning performance on YouCook II. We follow the setup from [39] and report captioning performance on the validation set, given ground truth video segments. Higher numbers are better.

Method BLEU-3 BLEU-4 METEOR ROUGE-L CIDEr
Zhou et al. [39] 7.53 3.84 11.55 27.44 0.38
S3D [34] 6.12 3.24 9.52 26.09 0.31
VideoBERT (video only) 6.33 3.81 10.81 27.14 0.47
VideoBERT 6.80 4.04 11.01 27.50 0.49
VideoBERT + S3D 7.59 4.33 11.94 28.80 0.55

表 3:YouCook II 上的视频描述表现。我们沿用 [39] 的设定,在给定真实视频片段的验证集上报告描述表现。数值越高越好。

方法 BLEU-3 BLEU-4 METEOR ROUGE-L CIDEr
Zhou et al. [39] 7.53 3.84 11.55 27.44 0.38
S3D [34] 6.12 3.24 9.52 26.09 0.31
VideoBERT(仅视频) 6.33 3.81 10.81 27.14 0.47
VideoBERT 6.80 4.04 11.01 27.50 0.49
VideoBERT + S3D 7.59 4.33 11.94 28.80 0.55

Example captions generated by VideoBERT and the S3D baseline

Figure 6: Examples of generated captions by VideoBERT and the S3D baseline. In the last example, VideoBERT fails to exploit the full temporal context, since it misses the paper towel frame.

图 6:VideoBERT 与 S3D 基线生成的描述例子。在最后一个例子中,VideoBERT 没有利用完整的时间上下文,因为它漏掉了纸巾那一帧。

5. Discussion and conclusion

5. 讨论与结论

This paper adapts the powerful BERT model to learn a joint visual-linguistic representation for video. Our experimental results demonstrate that we are able to learn high-level semantic representations, and we outperform the state-of-the-art for video captioning on the YouCook II dataset. We also show that this model can be used directly for open-vocabulary classification, and that its performance grows monotonically with the size of training set.

本文将强大的 BERT 模型加以改造,用于学习视频的视觉–语言联合表征。实验结果说明,我们能够学到高层语义表征,并在 YouCook II 数据集的视频描述上超过了当时最好的结果。我们还表明,该模型可以直接用于开放词表分类,并且其性能随训练集规模单调上升。

This work is a first step in the direction of learning such joint representations. For many applications, including cooking, it is important to use spatially fine-grained visual representations, instead of just working at the frame or clip level, so that we can distinguish individual objects and their attributes. We envision either using pretrained object detection and semantic segmentation models, or using unsupervised techniques for broader coverage. We also want to explicitly model visual patterns at multiple temporal scales, instead of our current approach, that skips frames but builds a single vocabulary.

这项工作只是朝着学习这类联合表征迈出的第一步。对包括烹饪在内的许多应用来说,重要的是使用空间上更精细的视觉表征,而不是只在帧或片段级别上工作,这样才能区分单个物体及其属性。我们设想,要么使用预训练的物体检测和语义分割模型,要么使用无监督技术以获得更广的覆盖。我们还希望显式地在多种时间尺度上建模视觉模式,而不是像现在这样跳过一些帧、却只建立一套词表。

Beyond improving the model, we plan to assess our approach on other video understanding tasks, and on other domains besides cooking. (For example, we may use the recently released COIN dataset of manually labeled instructional videos [26].) We believe the future prospects for large scale representation learning from video and language look quite promising.

除了改进模型,我们还计划在其他视频理解任务上,以及在烹饪以外的领域中评估这一方法。(例如,我们可以使用当时新发布的、带人工标注的教学视频数据集 COIN [26]。)我们相信,从视频和语言中做大规模表征学习,未来前景相当可观。

Acknowledgements. We would like to thank Jack Hessel, Bo Pang, Radu Soricut, Baris Sumengen, Zhenhai Zhu, and the BERT team for sharing amazing tools that greatly facilitated our experiments; Justin Gilmer, Abhishek Kumar, David Ross, and Rahul Sukthankar for helpful discussions. Chen would like to thank Y. M. for inspiration.

致谢。 我们感谢 Jack Hessel、Bo Pang、Radu Soricut、Baris Sumengen、Zhenhai Zhu 以及 BERT 团队分享了极大便利了我们实验的出色工具;感谢 Justin Gilmer、Abhishek Kumar、David Ross 和 Rahul Sukthankar 的有益讨论。Chen 感谢 Y. M. 带来的启发。

References

参考文献

[1] YouTube Data API. https://developers.google.com/youtube/v3/docs/captions. 5

[2] Jean-Baptiste Alayrac, Piotr Bojanowski, Nishant Agrawal, Josef Sivic, Ivan Laptev, and Simon Lacoste-Julien. Unsupervised learning from narrated instruction videos. In CVPR, 2016. 3

[3] Yusuf Aytar, Carl Vondrick, and Antonio Torralba. Soundnet: Learning sound representations from unlabeled video. In NeurIPS, 2016. 3

[4] Mohammad Babaeizadeh, Chelsea Finn, Dumitru Erhan, Roy H Campbell, and Sergey Levine. Stochastic variational video prediction. In ICLR, 2018. 2

[5] Emily Denton and Rob Fergus. Stochastic video generation with a learned prior. In ICML, 2018. 2

[6] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. 2, 3, 5

[7] Chunhui Gu, Chen Sun, David A Ross, Carl Vondrick, Caroline Pantofaru, Yeqing Li, Sudheendra Vijayanarasimhan, George Toderici, Susanna Ricco, Rahul Sukthankar, et al. AVA: A video dataset of spatio-temporally localized atomic visual actions. In CVPR, 2018. 2

[8] Andrej Karpathy and Li Fei-Fei. Deep visual-semantic alignments for generating image descriptions. In CVPR, 2015. 3

[9] Will Kay, Joao Carreira, Karen Simonyan, Brian Zhang, Chloe Hillier, Sudheendra Vijayanarasimhan, Fabio Viola, Tim Green, Trevor Back, Paul Natsev, et al. The kinetics human action video dataset. arXiv preprint arXiv:1705.06950, 2017. 2, 5

[10] Ranjay Krishna, Kenji Hata, Frederic Ren, Li Fei-Fei, and Juan Carlos Niebles. Dense-Captioning events in videos. In ICCV, 2017. 2, 3

[11] Girish Kulkarni, Visruth Premraj, Sagnik Dhar, Siming Li, Yejin Choi, Alexander C Berg, and Tamara L Berg. Baby talk: Understanding and generating image descriptions. In CVPR, 2011. 3

[12] Guillaume Lample and Alexis Conneau. Cross-lingual language model pretraining. arXiv preprint arXiv:1901.07291, 2019. 3

[13] Alex X Lee, Richard Zhang, Frederik Ebert, Pieter Abbeel, Chelsea Finn, and Sergey Levine. Stochastic adversarial video prediction. arXiv:1804.01523, 2018. 2

[14] Chin-Yew Lin. Rouge: A package for automatic evaluation of summaries. Text Summarization Branches Out, 2004. 7

[15] Jiasen Lu, Jianwei Yang, Dhruv Batra, and Devi Parikh. Neural baby talk. In CVPR, 2018. 3

[16] Jonathan Malmaud, Jonathan Huang, Vivek Rathod, Nick Johnston, Andrew Rabinovich, and Kevin Murphy. What’s cookin’? interpreting cooking videos using text, speech and vision. In NAACL, Mar. 2015. 3

[17] Michael Mathieu, Camille Couprie, and Yann LeCun. Deep multi-scale video prediction beyond mean square error. In ICLR, 2016. 2

[18] Ishan Misra, C Lawrence Zitnick, and Martial Hebert. Shuffle and learn: unsupervised learning using temporal order verification. In ECCV, 2016. 3

[19] Mathew Monfort, Alex Andonian, Bolei Zhou, Kandan Ramakrishnan, Sarah Adel Bargal, Yan Yan, Lisa Brown, Quanfu Fan, Dan Gutfreund, Carl Vondrick, et al. Moments in time dataset: one million videos for event understanding. TPAMI, 2019. 2

[20] Andrew Owens, Phillip Isola, Josh McDermott, Antonio Torralba, Edward H Adelson, and William T Freeman. Visually indicated sounds. In CVPR, 2016. 3

[21] Andrew Owens, Jiajun Wu, Josh H McDermott, William T Freeman, and Antonio Torralba. Ambient sound provides supervision for visual learning. In ECCV, 2016. 3

[22] Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. In NAACL, 2018. 3

[23] Marc Aurelio Ranzato and Alex Graves. Deep unsupervised learning. NIPS Tutorial, 2018. 3

[24] Chen Sun, Abhinav Shrivastava, Saurabh Singh, and Abhinav Gupta. Revisiting unreasonable effectiveness of data in deep learning era. In ICCV, 2017. 1

[25] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott E. Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. arXiv preprint arXiv:1409.4842, 2014. 5

[26] Yansong Tang, Dajun Ding, Yongming Rao, Yu Zheng, Danyang Zhang, Lili Zhao, Jiwen Lu, and Jie Zhou. COIN: A large-scale dataset for comprehensive instructional video analysis. In CVPR, 2019. 8

[27] Sergey Tulyakov, Ming-Yu Liu, Xiaodong Yang, and Jan Kautz. MoCoGAN: Decomposing motion and content for video generation. In CVPR, 2018. 2

[28] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NIPS, 2017. 3

[29] Ramakrishna Vedantam, C Lawrence Zitnick, and Devi Parikh. Cider: Consensus-based image description evaluation. In CVPR, 2015. 7

[30] Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Anticipating visual representations from unlabeled video. In CVPR, 2016. 2

[31] Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Generating videos with scene dynamics. In NeurIPS, 2016. 2

[32] Jacob Walker, Carl Doersch, Abhinav Gupta, and Martial Hebert. An uncertain future: Forecasting from static images using variational autoencoders. In ECCV, 2016. 2

[33] Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016. 5

[34] Saining Xie, Chen Sun, Jonathan Huang, Zhuowen Tu, and Kevin Murphy. Rethinking spatiotemporal feature learning for video understanding. In ECCV, 2018. 5, 7, 8

[35] Tianfan Xue, Jiajun Wu, Katherine Bouman, and Bill Freeman. Visual dynamics: Probabilistic future frame synthesis via cross convolutional networks. In NIPS, 2016. 2

[36] Hang Zhao, Zhicheng Yan, Heng Wang, Lorenzo Torresani, and Antonio Torralba. Slac: A sparsely labeled dataset for action classification and localization. arXiv preprint arXiv:1712.09374, 2017. 2

[37] Luowei Zhou, Nathan Louis, and Jason J Corso. Weakly-supervised video object grounding from text by loss weighting and object interaction. In BMVC, 2018. 6

[38] Luowei Zhou, Chenliang Xu, and Jason J Corso. Towards automatic learning of procedures from web instructional videos. In AAAI, 2018. 2, 3, 5

[39] Luowei Zhou, Yingbo Zhou, Jason J. Corso, Richard Socher, and Caiming Xiong. End-to-end dense video captioning with masked transformer. In CVPR, 2018. 2, 3, 7, 8