MAMS: Model-Agnostic Module Selection Framework for Video Captioning

Sangho Lee, Il Yong Chun, Hogun Park

Introduction

In the field of computer vision, video captioning remains a complex balancing act. Generating an accurate description requires a model to process temporal sequences, yet the optimal amount of data—the number of frames and visual tokens—varies significantly from one video to another. If a model samples too few frames, it risks missing critical actions; if it samples too many, it often becomes overwhelmed by redundant or "noisy" data that obscures the primary narrative.

A new research paper, "MAMS: Model-Agnostic Module Selection Framework for Video Captioning," addresses this "Goldilocks problem." The authors introduce a plug-and-play framework that allows models to adaptively decide how much information is required for any given video, effectively giving existing architectures a "selective eye."

The Problem: Performance Saturation

Most contemporary video captioning models are rigid by design, processing a fixed number of frames (e.g., 32 or 64) regardless of the video's content. Whether the input is a high-speed sports highlight or a static shot of a person speaking, the model applies the same computational weight.

The researchers identify a phenomenon known as performance saturation: as the number of frames increases, model accuracy often plateaus or declines. This occurs because dense sampling introduces redundant visual tokens that distract the transformer’s attention mechanism. Conversely, sparse sampling in complex, fast-moving videos leads to information loss. Currently, there is a lack of model-agnostic methods to scale complexity dynamically based on visual content.

The MAMS Framework

The MAMS framework acts as a sophisticated filter and router that can be integrated into existing architectures like SwinBERT or mPLUG-2. Its architecture is built upon four core components:

  1. Dual-Module Architecture: MAMS maintains two versions of a captioning module—a "large" module for complex videos and a "small" module for simpler ones. This allows the system to allocate computational resources more efficiently.
  2. Token Significance Score: To determine which visual elements are essential, the framework calculates a significance score for every token. This score goes beyond standard attention weights by factoring in the norm (magnitude) of the visual features. The authors hypothesize that features with higher magnitudes carry greater semantic weight.
  3. Module and Token Selector: Utilizing the Gumbel-Softmax operator, the system makes discrete choices—selecting specific frames and the appropriate module size—while remaining fully differentiable and trainable via backpropagation.
  4. Adaptive Attention Mask: Unlike fixed masks that often prioritize the center of a frame, MAMS generates a custom mask for every video. This forces the transformer to ignore unselected or redundant tokens, focusing its "gaze" exclusively on the most informative segments of the sequence.

Experimental Results

The researchers evaluated MAMS across three major benchmarks: MSVD (short snippets), MSRVTT (diverse general content), and YouCookII (procedural cooking videos).

The framework consistently improved performance across all metrics, including BLEU-4, METEOR, ROUGE, and CIDEr. Notable highlights include:

  • mPLUG-2 Enhancement: On the MSVD dataset, the state-of-the-art mPLUG-2 model saw its CIDEr score rise from 165.8 to 171.6.
  • SwinBERT Boost: On the challenging YouCookII dataset, which requires understanding long-term dependencies, MAMS helped SwinBERT improve its CIDEr score from 109.0 to 116.7.
  • Validation: Sanity tests confirmed the framework's logic; when the model was forced to use the "small" module for complex videos, performance dropped significantly, proving that the selection mechanism accurately identifies video complexity.

Key Insights

  • Content-Aware Complexity: The study demonstrates that "more data" is not synonymous with "better data." By allowing a model to "downshift" for simple videos, MAMS improves accuracy by actively reducing noise.
  • The Power of the Norm: The inclusion of the visual token's norm alongside attention weights proved to be a more reliable indicator of importance than attention weights alone.
  • Overcoming Center Bias: Adaptive masking allows the model to find critical details that may exist at the edges or corners of a frame, a significant improvement over models that assume the action is always centered.

Limitations and Future Work

While MAMS offers a significant performance leap, it introduces some training overhead due to the dual-module requirement. Additionally, the authors found that adding more than two candidate modules (e.g., three or four) actually decreased performance, likely because it partitioned the training data too thinly across sub-models.

Future research will focus on extending the MAMS logic to other video-based tasks, such as video summarization and video question-answering (VQA), where selective attention is equally vital for processing efficiency and accuracy.

Paper Citation: Lee, S., Chun, I. Y., & Park, H. (2025). MAMS: Model-Agnostic Module Selection Framework for Video Captioning. arXiv:2501.18269v1.

Summary updated

BibTeX
@inproceedings{lee2025mams,
  author = {Sangho Lee and Il Yong Chun and Hogun Park},
  title = {{MAMS: Model-Agnostic Module Selection Framework for Video Captioning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i5.32478},
}
Figure