MeMViT: Memory-Augmented Multiscale Vision Transformer for Efficient Long-Term Video Recognition

Chao-Yuan Wu, Yanghao Li, Karttikeya Mangalam, Haoqi Fan, Bo Xiong, Jitendra Malik, Christoph Feichtenhofer

Introduction

Modern video recognition models excel at short-term action identification but struggle with long-term temporal context. Understanding complex activities—like distinguishing between cooking and cleaning based on events from 30 seconds prior—requires reasoning over extended durations. However, standard Vision Transformers (ViTs) face a "memory wall" due to the quadratic computational complexity of self-attention relative to video length. Doubling the temporal window quadruples the memory and compute requirements, making long-term processing prohibitively expensive.

The MeMViT Architecture

To overcome these limitations, the authors propose MeMViT (Memory-Augmented Multiscale Vision Transformer). MeMViT transitions from traditional batch processing to an efficient online approach by caching and reusing features from previous iterations.

MeMViT architecture overview showing hierarchical memory caching and attention mechanism.

The core methodology involves several key innovations:

  1. Sequential Processing: Video is processed as a sequence of short clips rather than a single massive block.
  2. Memory Caching: Internal representations (Keys and Values) from previous clips are cached as "memory."
  3. Extended Attention: During the current iteration, the model's "Queries" attend to both current frames and the cached memory of the past.
  4. Hierarchical Receptive Field: Memory augmentation occurs at every layer, allowing the temporal receptive field to grow deeper as information moves through the network.
  5. Pipelined Memory Compression: A learnable compression module prevents cache bloat. By using a pipelined training strategy that only backpropagates through the most recent memory step, the model learns to retain essential cues without the massive overhead of backpropagating through the entire history.

Key Results and Efficiency

MeMViT achieves state-of-the-art performance while maintaining remarkable efficiency. It supports temporal windows up to 30x longer than standard models (up to 40 seconds) with only a marginal 4.5% increase in GFLOPs.

Comparison of compute cost vs. temporal support between MeMViT and traditional models.

Performance Highlights:

  • Accuracy: On the AVA dataset, MeMViT improved spatiotemporal action localization by 2.3 mAP over short-term baselines.
  • State-of-the-Art: It set new benchmarks on EPIC-Kitchens-100 for both action classification and anticipation, outperforming multi-modal models using only raw pixels.
  • Scalability: To match MeMViT's 40-second temporal support using traditional scaling, a standard model would require over 3,000% more compute.

Conclusion

MeMViT demonstrates that long-term video understanding does not necessitate exponential increases in computation. By treating the past as a compressed, hierarchical memory bank, Vision Transformers can efficiently "connect the dots" across extended timelines. Future work may explore dynamic "forgetting" mechanisms to enable processing of even longer, hour-scale video streams.

Summary updated

BibTeX
@inproceedings{wu2022memvit,
  author = {Chao-Yuan Wu and Yanghao Li and Karttikeya Mangalam and Haoqi Fan and Bo Xiong and Jitendra Malik and Christoph Feichtenhofer},
  title = {{MeMViT: Memory-Augmented Multiscale Vision Transformer for Efficient Long-Term Video Recognition}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  doi = {10.1109/cvpr52688.2022.01322},
}
Figure