Scaling the Long Video Understanding of Multimodal Large Language Models via Visual Memory Mechanism

Tao Chen, Kun Zhang, Qiong Wu, Xiao Chen, Chao Chang, Xiaoshuai Sun, Yiyi Zhou, Rongrong Ji

TL;DR

Long video understanding in Multimodal Large Language Models (MLLMs) is severely bottlenecked by memory overhead and context length limits. This paper introduces FlexMem (Flexible Memory), a training-free, plug-and-play mechanism that mimics human video-watching behavior by iteratively compressing and recalling visual Key-Value (KV) caches. FlexMem enables standard MLLMs to process thousands of video frames on a single commodity GPU (like an RTX 3090) while achieving state-of-the-art performance.

What Problem Does This Paper Address?

When we watch a movie, we don't hold every single pixel in our working memory simultaneously; instead, we continuously process the narrative and recall specific details when asked a question. Current MLLMs, however, try to ingest everything at once. For a long video, this creates a massive "token explosion"—processing 1,024 frames can generate over 200,000 visual tokens, easily exceeding model context windows and crashing GPU memory.

Existing workarounds fall into two camps, both with major drawbacks:

  1. Retrieval-Augmented Generation (RAG): Selects keyframes based on a query. While memory-efficient, it struggles with global context and temporal continuity.
  2. Visual Feature Compression: Shrinks the visual tokens but still forces the model to look at all compressed features during the final answering phase, eventually hitting a computational ceiling.

The authors bridge this gap by introducing a visual memory mechanism that allows continuous video streaming with a constant memory footprint, followed by a flexible recall phase.

Methods

FlexMem processes videos iteratively, clip by clip, using a Dual-Pathway Compression (DPC) design that splits visual representations based on how they will be used:

  • Context Memory ($C_i$): Used during the prefilling stage. It retains visual tokens that excel at aggregating historical context and propagating information forward to subsequent clips, ensuring temporal continuity.
  • Local Memory ($M_i$): Used during the decoding stage. It filters out intra-clip redundancy, keeping only the most distinctive visual evidence. These compressed tokens are written into a permanent Visual Memory Bank.
Figure 2. Illustration of the proposed FlexMem method. (a) FlexMem is an iterative method, and it encodes two types of compressed memories for each video clip Vi, namely Context Memory Ci and Local Memory Mi, based on the metrics of aggregation score Si and local saliency score ˆSi, respectively. Mi is then stored in the visual memory bank Mbank, while the context memory C are used in the iterative encoding step for information propagation. Besides, we can also retrieval some stored Ml as the long-term memory for encoding, while it is optional as well as the text instruction Tq. (b) The stored memories Ma will be recalled from the memory bank for the decoding of answers Y . (c) One intuitive and effective indexing for FlexMem is the Encoding-based one, which uses the cross-attention during memory encoding with Tq (a) to reflect the relevance of memories. (d) We also investigate the other fast index method, termed MemIndex, based on the compact index tensors for both question and visual memories, of which process is independent to the encoding of memories. Its selection of cache layers and tokens stems from the fitting results of the encoding-based index.

To read from this memory bank when a question is asked, FlexMem offers two strategies:

  1. Question Encoding-based Reading: Uses full cross-modal attention between the video clips and the question to recall the most relevant fragments.
  2. Fast Memory Indexing (MemIndex): For streaming or multi-question scenarios where full cross-attention is too slow, MemIndex uses a lightweight linear regression model to predict relevance scores using a highly compact index tensor, bypassing repeated heavy MLLM inferences.

Datasets

The authors evaluated FlexMem across five demanding long-video QA benchmarks and one streaming benchmark:

  • Video-MME & LongVideoBench: For diverse form content and precise multimodal reasoning.
  • MLVU & LVBench: For long-term memory retention and complex temporal understanding (videos up to 2 hours).
  • TimeScope: Probing extreme limits with videos ranging from 1 minute to 8 hours.
  • OVOBench: Used specifically to test streaming QA and backward information tracing.

Key Insights and Ideas

  • Memory Roles are Asymmetric: A key insight is that visual memory needs differ between understanding the flow of a video (prefilling) and answering a specific question (decoding). Separating these into Context and Local pathways prevents the loss of long-range dependencies.
  • Constant Footprint, Infinite Length: Because context memory is propagated iteratively and local memory is offloaded to a bank, the model's active context window remains bounded, theoretically allowing it to process infinitely long videos.
  • Statistical Alignment Beats Heavy Compute: The success of MemIndex proves that full cross-modal attention can be closely approximated by statistically fitting a compact index tensor, making real-time streaming video dialogue computationally viable.

Key Results

The authors integrated FlexMem into LLaVA-Video (7B) and LLaVA-OneVision (7B). All efficiency benchmarks were run on a single, consumer-grade RTX 3090 GPU (24GB VRAM).

Figure 1. Comparison between FlexMem (ours) and existing ef- ficient video understanding methods for MLLMs on five bench- marks. All methods are run on the same device of one 3090 GPU, and our FlexMem presents obvious performance gains.
  • Massive Baseline Boosts: FlexMem improved LLaVA-Video's performance by 32.2% on TimeScope and 19.7% on LVBench compared to standard uniform sampling.
  • Hardware Efficiency: Under strict 24GB memory constraints, competing methods like AdaRETAKE suffered severe performance degradation because they had to drop frame counts. FlexMem maintained 99.5% of its unrestricted performance, outperforming SOTA methods by 3.9% to 5.2% on average.
  • Competing with Giants: Powered by FlexMem on a single 3090, the open-source LLaVA-Video achieved results comparable to proprietary models like GPT-4o and Gemini-1.5 Pro on long-video benchmarks, notably outperforming Gemini-1.5 Pro by 54.1% on LVBench.

Limitations and Future Work

While a dedicated limitations section is not included, the text highlights an inherent semantic gap between offline visual memory caches and question tokens, which requires empirical tuning (such as selecting specific layers and tokens for the index feature). Additionally, because FlexMem is training-free, its ultimate performance remains bounded by the cross-modal alignment capabilities of the underlying base MLLM. Future work could explore fine-tuning strategies to optimize the dual-pathway compression thresholds end-to-end.

Summary updated

BibTeX
@inproceedings{chen2026scaling,
  author = {Tao Chen and Kun Zhang and Qiong Wu and Xiao Chen and Chao Chang and Xiaoshuai Sun and Yiyi Zhou and Rongrong Ji},
  title = {{Scaling the Long Video Understanding of Multimodal Large Language Models via Visual Memory Mechanism}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=MgWcfKwKSu},
}
Figure