MAMA: Meta-optimized Angular Margin Contrastive Framework for Video-Language Representation Learning

Thong Nguyen, Yi Bin, Xiaobao Wu, Xinshuai Dong, Zhiyuan Hu, Khoi Le, Cong-Duy Nguyen, See-Kiong Ng, Luu Anh TuanarXiv 2024 · arXiv

TL;DR

MAMA (Meta-optimized Angular MArgin) is a new framework that significantly improves how AI models learn to connect videos and language. It tackles two major hurdles in current datasets—imperfectly aligned captions and biased topic distributions—by introducing a regularizing angular margin and a meta-learned sample weighting strategy, achieving state-of-the-art results across multiple benchmarks.

What Problem Does This Paper Address?

Video-language representation learning—teaching models to understand the relationship between video frames and textual descriptions—is fundamental for tasks like Video Question Answering (VideoQA) and text-video retrieval. However, the field faces two persistent data quality issues:

  1. Imperfect Alignment: Captions often omit fine-grained details present in the video. For example, a video of a soccer match might have the caption "A soccer match is being played," ignoring the green grass or the specific crowd actions. Aggressively forcing the model to match these "imperfect" pairs can lead to distorted representations.
  2. Concept Imbalance: Popular datasets are often heavily skewed toward specific topics. As shown in Figure 2, the MSRVTT dataset is dominated by gaming and singing, while fashion is a tiny minority. This bias prevents models from performing well on "long-tail" or unpopular subjects.
Topic distribution of the MSRVTT dataset showing significant imbalance.

Methods

The authors propose MAMA, which introduces three key innovations to the standard contrastive learning pipeline:

  • Subtractive Angular Margin: Instead of simply trying to minimize the angle between a video and its caption to zero, MAMA subtracts a margin ($\mu$) in the angular space. This acts as a regularizer, preventing the model from trying to achieve "perfect" similarity for pairs that are inherently only partially aligned. Mathematically, this decays the gradient norm for positive samples, restraining them from overfitting to noisy or incomplete captions.
  • MLP-Parameterized Weighting Function: To handle data imbalance, MAMA uses a Multi-Layer Perceptron (MLP) to map training losses to sample weights. Unlike manually designed functions (like Focal Loss), this MLP can adaptively learn which samples the model should focus on.
  • Meta-Optimized Learning: The weighting MLP is trained using a small, high-quality "meta-data" set that is unbiased and perfectly aligned. This ensures the model's training is guided by a clean "ground truth" distribution. The overall architecture is illustrated in Figure 3.
Fig. 3: Illustration of the proposed MAMA framework and its components.
  • LVLM-based Augmentation: MAMA uses an off-the-shelf Large Vision-Language Model (LLaVA) to generate more detailed captions for existing datasets (like HowTo100M). They extract keyframes using density peak-based clustering, arrange them in a grid, and prompt the LVLM to provide a comprehensive description.

Datasets

The framework was evaluated on a wide range of standard benchmarks:

  • VideoQA: MSRVTT-QA, MSVD-QA, TGIF-QA-R, NExT-QA, and Causal-VidQA.
  • Text-Video Retrieval: MSRVTT, DiDeMo, and ActivityNet.
  • Augmentation Source: The HowTo100M dataset was used for LVLM-based caption augmentation.

Key Insights and Ideas

  • The Margin as Regularizer: The most elegant insight is that a subtractive margin in angular space naturally constrains the gradient. This acknowledges that "perfect" similarity in cross-modal data is often a false goal due to the inherent semantic gap between a rich video and a brief text description.
  • Meta-Learning for Weighting: By using a small, clean meta-dataset to train the weighting function, the authors bypass the need for human-engineered heuristics. The MLP learns to prioritize samples that align with the clean meta-gradient, effectively filtering out noise and emphasizing underrepresented concepts.
  • Addressing the Long-Tail: The framework's ability to improve performance on minority topics is a standout result. As shown in Figure 5, MAMA achieves the highest relative improvements on the least frequent topics and answer labels.

Key Results

MAMA consistently outperformed state-of-the-art baselines across various backbones (VIOLET, VGT, CLIP-ViP):

  • VideoQA: On MSRVTT-QA, MAMA-VIOLET achieved 46.4% accuracy, surpassing the previous best LVLM-augmented approach (LaViLa) by 1.5%. On TGIF-Frame, it improved performance by 3.7% over LaViLa.
  • Retrieval: In text-to-video retrieval on MSRVTT, MAMA-CLIP-ViP reached an R@1 of 60.0%, a significant jump over the baseline CLIP-ViP's 55.7%.
  • Ablation Success: The authors found that the meta-learning strategy was superior to joint learning, and that LLaVA was a more effective caption augmenter than other models like BLIP-2.

Limitations and Future Work

While MAMA shows impressive gains, some areas remain for exploration:

  • Meta-Data Dependency: The framework relies on a manually curated, unbiased meta-dataset. While small (M ≪ N), the quality of this set is crucial. Future work could explore ways to automate the selection of this meta-data.
  • Computational Cost of Augmentation: While using an off-the-shelf LVLM for augmentation is a one-time cost, generating captions for massive datasets like HowTo100M still requires significant compute.
  • Temporal Reasoning: The authors noted that even advanced models like ChatGPT still struggle to infer complex temporal relations between separate video frames, suggesting that more sophisticated temporal modeling within the augmentation phase could yield further benefits.

Summary updated

Abstract

Data quality stands at the forefront of deciding the effectiveness of video-language representation learning. However, video-text pairs in previous data typically do not align perfectly with each other, which might lead to video-language representations that do not accurately reflect cross-modal semantics. Moreover, previous data also possess an uneven distribution of concepts, thereby hampering the downstream performance across unpopular subjects. To address these problems, we propose MAMA, a new approach to learning video-language representations by utilizing a contrastive objective with a subtractive angular margin to regularize cross-modal representations in their effort to reach perfect similarity. Furthermore, to adapt to the non-uniform concept distribution, MAMA utilizes a multi-layer perceptron (MLP)-parameterized weighting function that maps loss values to sample weights which enable dynamic adjustment of the model's focus throughout the training. With the training guided by a small amount of unbiased meta-data and augmented by video-text data generated by large vision-language model, MAMA improves video-language representations and achieve superior performances on commonly used video question answering and text-video retrieval datasets. The code, model, and data have been made available at https://nguyentthong.github.io/MAMA.
BibTeX
@misc{nguyen2024mama,
  author = {Thong Nguyen and Yi Bin and Xiaobao Wu and Xinshuai Dong and Zhiyuan Hu and Khoi Le and Cong-Duy Nguyen and See-Kiong Ng and Luu Anh Tuan},
  title = {{MAMA: Meta-optimized Angular Margin Contrastive Framework for Video-Language Representation Learning}},
  year = {2024},
  eprint = {2407.03788},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.03788},
}
Figure