VideMAEv2

VideoMAEv2: Scaling Video Masked Autoencoders with Dual Masking[1] 🎞️

作者们是来自南大 Novel Software Technology Lab、上海AI Lab和深圳先进院的团队,论文出处[1]: Wang, Limin, et al. "Videomae v2: Scaling video masked autoencoders with dual masking." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2023.

总结:

以下 “我们”指作者

  1. 在大规模数据上预训练的大基础模型正在成为学习多数据模态通用表征的成功范式。基础模型可以很容易地通过zero-shot、linear probe、prompt tuning、fine tuning 应用到广泛的下游任务(那能够这么广泛地应用到下游任务,是数据量大的原因呢占比多一些呢还是模型比较好的原因多一些)。Transformer with masked autoencoding 是有效的自监督视觉学习器。我们将VideoMAE同时在模型和数据上扩展:用ViT-g (Transformer with billion-level parameters) 初始化模型;将数据集的size增加到million-level。

  2. 面临的问题:

  • 扩展VideoMAE非常耗GPU内存和计算资源。为了提高预训练效率:处理数据冗余:1) 在encoder中mask高比例的cubes,2) 在decoder中drop some cubes。
  • MAE 对大量的数据需求很大。现有的视频数据相比于图像数据的量级,要少很多。我们简单地将多个来源的数据mix,来为VideoMAE做预训练。pre-training on million-level unlabeled video dataset and then post-pre-training on the labeled hybrid dataset。
  1. 视觉基础模型: 从早期的CNN ------> Transformer -------> BEiT, SimMIM, MAE。vision-languange pre-trained model: CLIP, ALIGN。近期的工作尝试用对比学习 Contrastive Learning、Siamese Learning来做无监督学习。这些视觉基础模型在zero-shot迁移上展示出了良好的性能。

  2. VideoMAE

    1. three core components:
    • cube embedding: cube embedding encodes the local spatio-temporal features and builds the token list
    • encoder: operates on unmasked tokens \(T^u\) with a 普通的时空注意力的ViT.
    • decoder: 将combined tokens \(Z^c\) 作为输入,用另一个ViT进行重建, \[ \hat{I} = \Phi_{dec} (Z^{c}) \]
    • losss function: MSE: mean square error between masked pixels and the reconstructed pixels。
    1. encoder-decoder非对称, encoder要小一些。将VideoMAE扩展到billion-level时,整体的计算量和存储量消耗就成了瓶颈。
  3. Dual Masking for VideoMAE:

    1. 与VideoMAE的不同之处在于:decoder的输入来自encoder visible tokens and part of the remaining tokens visible under the decoder mask \(M_d\)。用decoder mask来降低decoder的输入的长度 for high efficiency。
    2. encoder试图去缓解时序关联造成的information leakage;而在decoder masking中,encourage information complement,来确保partial reconstruction information loss最小;尽可能选择diverse cubes 来cover 整个视频信息 -----> 采用running cell masking的策略。
  4. Scaling VideoMAE:

    1. encoder采用不同的backbones: ViT-B,ViT-L, ViT-H, ViT-g。decoder就相对shallow和lightweight:用更少的layers和channels。
    2. 弄了一个unlabeled hybrid视频数据集,约1.3M clips。
    3. Progressive training: 先在无标签的hybrid video dataset上用MAE做无监督预训练;然后建了一个labeled hybrid video dataset, 对其做post-pre-training。 最后在目标数据集上做fine-tuning,将通用语义迁移到task-centric knowledge上。
VideoMAE with Dual Masking

\(Figure\ 1^{[1]}\). VideoMAE with dual masking. To improve the overall efficiency of computation and memory in video masked autoencoding, we propose to mask the decoder as well and devise the dual masking strategy. Like encoder, we also apply a masking map to the deocoder and simply reconstruct a subset of pixel cubes selected by the running cell masking. The final reconstruction loss only applies for the invisible tokens dropped by the encoder