Contrastive Audio-Visual Masked Autoencoder

Yuan Gong, Andrew Rouditchenko, Alexander H. Liu, David Harwath, Leonid Karlinsky, Hilde Kuehne, James R. Glass

Introduction

Humans naturally integrate sight and sound to understand the world, but replicating this multi-modal perception in AI remains a significant challenge. Recently, self-supervised learning (SSL) for video has been dominated by two distinct paradigms: Contrastive Learning (CL) and Masked Data Modeling (MDM/MAE). While CL excels at matching audio to corresponding video frames (ideal for retrieval), it often discards modality-unique information. Conversely, MDM learns rich, dense representations by reconstructing hidden patches but lacks an explicit mechanism to understand the correspondence between different modalities.

In this paper, we introduce the Contrastive Audio-Visual Masked Auto-Encoder (CAV-MAE), a framework that unifies these two "titans" of modern deep learning. By combining contrastive learning and masked data modeling, CAV-MAE learns a joint and coordinated audio-visual representation, achieving state-of-the-art performance on major benchmarks while remaining computationally efficient.

The CAV-MAE Architecture

The core insight behind CAV-MAE is that contrastive and reconstructive objectives are complementary. A vanilla multi-modal MAE might learn to reconstruct a video, but it doesn't necessarily learn that the sound of a "bark" belongs to the "dog" in the frame. CAV-MAE bridges this gap by explicitly aligning the modalities during the reconstruction process.

The CAV-MAE architecture combines tokenization, contrastive learning, and masked auto-encoding into a unified framework.

The model utilizes a Transformer-based architecture to process audio spectrograms and video frames through several key mechanisms:

  • Modality-Specific and Joint Encoders: The architecture features separate encoders for audio and visual inputs, followed by a joint encoder where the modalities are fused.
  • Masked Contrastive Learning: Unlike standard contrastive learning that processes full images, CAV-MAE performs contrastive alignment on inputs where 75% of the patches are masked. This forces the model to learn from sparse information, preventing overfitting and drastically improving computational efficiency.
  • Multi-Stream Forward Pass: To prevent "representation collapse"—where the model finds a shortcut to solve the task without learning useful features—the data is passed through the joint encoder in three distinct streams: audio-only, video-only, and joint (fused). The contrastive loss is applied to the unimodal streams to align them, while the reconstruction loss is applied to the fused stream.
  • Joint Reconstruction: Finally, a joint decoder takes the output of the joint encoder and attempts to reconstruct the original, unmasked audio spectrogram and video frame.

Datasets and Evaluation

CAV-MAE was pretrained and evaluated on massive, industry-standard datasets, including AudioSet (2M and 20K subsets), VGGSound (over 200,000 clips across 309 classes), Kinetics-Sounds, and MSR-VTT (for cross-modal retrieval).

Key Insights and Results

The integration of contrastive learning with masked auto-encoding yielded several striking results:

  • State-of-the-Art Performance: CAV-MAE achieved a new state-of-the-art accuracy of 65.9% on VGGSound for audio-visual event classification. It matches or outperforms previous top-tier models like MBT and Perceiver while using significantly fewer GPUs and training epochs.
  • The Power of Complementarity: The contrastive objective does more than just enable retrieval tasks; it actively improves the joint representation for classification. The contrastive loss acts as a "glue" that helps the reconstruction task focus on relevant, cross-modal features.
  • Cross-Modal Synergy for Single Modalities: Strikingly, pretraining on both modalities improves performance even for single-modality downstream tasks. On AudioSet-20K, the model improved audio-only classification from 34.2 mAP (standard Audio-MAE) to 37.7 mAP. The video essentially acts as a "soft label" for the audio during training, providing richer context than human-provided category tags alone.
  • Effective Retrieval: While a vanilla AV-MAE performs near random on retrieval tasks, CAV-MAE achieves high Recall@1 scores (e.g., 18.8 on AudioSet), proving it successfully coordinates the two modalities.

Limitations and Future Directions

While CAV-MAE sets a new standard for audio-visual representation learning, the authors note a few limitations. First, it is not yet a strong visual sound source localization model; it occasionally struggles to pinpoint the exact object making a sound, sometimes focusing on the background instead. Second, the current model uses a frame aggregation strategy (sampling 1 frame per second). While highly efficient, this approach might miss fine-grained temporal dynamics that a 3D-convolutional or more complex video transformer could capture. Exploring more sophisticated temporal handling and improving localization capabilities remain exciting next steps for the CAV-MAE framework.

Summary updated

BibTeX
@inproceedings{gong2023contrastive,
  author = {Yuan Gong and Andrew Rouditchenko and Alexander H. Liu and David Harwath and Leonid Karlinsky and Hilde Kuehne and James R. Glass},
  title = {{Contrastive Audio-Visual Masked Autoencoder}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=QPtMRyk5rb},
}
Figure