Text-Guided Video Masked Autoencoder

David Fan, Jue Wang, Shuai Liao, Zhikang Zhang, Vimal Bhat, Xinyu Li

Abstract

Masked Autoencoders (MAE) have emerged as a powerful paradigm for self-supervised video representation learning. However, the effectiveness of MAE is heavily dependent on the masking strategy employed. Traditional methods rely on random masking or motion-based saliency, which often fail to capture semantically important but static regions. This paper introduces Text-Guided Masking (TGM), a novel approach that leverages natural language captions to identify and mask the most salient regions of a video. By integrating TGM into a unified framework that combines generative reconstruction with discriminative contrastive learning, the proposed method achieves state-of-the-art performance across multiple action recognition benchmarks, including Kinetics-400 and Epic-Kitchens.

Introduction

The core challenge in video Masked Autoencoders is determining "where to mask." While random masking assumes information is distributed uniformly, saliency-based methods attempt to focus on important regions. Previous saliency methods often use motion (e.g., optical flow or motion vectors) as a proxy for importance. However, motion is frequently a noisy indicator; not all moving objects are semantically critical, and many important objects may remain static.

This research argues that natural language provides a much denser and more robust representation of saliency. A caption such as "a man dribbling a basketball" implicitly identifies the semantically critical components of a scene—the man and the ball—regardless of their motion state.

Methodology

The proposed approach consists of two primary components: Text-Guided Masking (TGM) and a unified generative-discriminative training framework.

Text-Guided Masking (TGM)

For datasets lacking manual annotations, the framework utilizes an off-the-shelf BLIP-2 model to generate descriptive captions. A pretrained CLIP model then calculates the correspondence between these text captions and individual video patches. Unlike random masking, TGM specifically targets patches with the highest similarity to the text. This strategy forces the decoder to reconstruct the most semantically meaningful parts of the scene using only the surrounding context.

Comparison of different masking strategies: (a) Original video, (b) Random mask, (c) Motion-guided mask, and (d) Text-guided mask.

Unified Generative-Discriminative Framework

While standard MAEs are purely generative (minimizing Mean Squared Error for pixel reconstruction), this work unifies them with discriminative learning. An InfoNCE contrastive loss is added to the MAE encoder, aligning video and text embeddings. This dual objective ensures the encoder produces representations that are both sufficient for reconstruction and semantically aligned with natural language.

Experiments and Results

The model was evaluated on several benchmarks, including Kinetics-400 (K400), Something-Something V2 (SSv2), and the egocentric Epic-Kitchens 55 dataset.

Key Findings

  • Superior Saliency Proxy: TGM outperformed motion-guided masking (MGM) by 1.3% on Kinetics-400 finetuning, suggesting that semantic saliency is a more effective prior than physical motion.
  • Synergistic Losses: Contrary to some previous findings, the combination of MAE and contrastive learning proved highly synergistic. On UCF101, adding the contrastive loss resulted in a massive 22.7% performance boost in linear probing over pure TGM.
  • Robustness in Complex Environments: On the challenging Epic-Kitchens dataset, characterized by heavy occlusion and camera jitter, the TGM-based framework achieved 37.2% accuracy, demonstrating its effectiveness in messy, real-world environments.
Visualization of Text-Guided Masking (TGM) across multiple frames, showing how the mask tracks semantically relevant regions.

Discussion and Conclusion

Text-Guided Masking represents a significant shift from pixel-level or motion-level heuristics to semantic-level guidance in self-supervised learning. By using language as a "semantic anchor," the model focuses on reconstructing the most meaningful parts of the video.

While the current implementation relies on frame-based captioning and pretrained models, which may introduce some temporal noise or computational overhead, the results indicate that language-guided saliency is a powerful alternative to traditional methods. Future work will explore more advanced video-language models to capture complex temporal nuances and scale the approach to even larger datasets.

Summary updated

BibTeX
@inproceedings{fan2024text,
  author = {David Fan and Jue Wang and Shuai Liao and Zhikang Zhang and Vimal Bhat and Xinyu Li},
  title = {{Text-Guided Video Masked Autoencoder}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72652-1\_17},
}
Figure