BIMBA: Selective-Scan Compression for Long-Range Video Question Answering

Md Mohaiminul Islam, Tushar Nagarajan, Huiyu Wang, Gedas Bertasius, Lorenzo Torresani

Introduction

Multimodal Large Language Models (MLLMs) have achieved remarkable success in short video understanding. However, they face a significant hurdle when processing "long-form" content—videos spanning minutes or hours. The primary bottleneck is the quadratic cost of self-attention ($O(N^2)$).

In a standard pipeline, extracting tokens from a 128-frame video can result in over 800,000 tokens. Feeding such a massive sequence into a Transformer-based LLM often leads to "Out of Memory" (OOM) errors. While existing solutions like spatial pooling or sparse sampling reduce token counts, they are often "lossy," potentially discarding the precise details needed to answer specific queries. BIMBA (Bidirectional Interleaved Mamba for Better Answers) addresses this by introducing an efficient, linear-scaling compression mechanism.

The BIMBA Framework

BIMBA replaces naive compression with a sophisticated Spatiotemporal Token Selector based on the Mamba (S6) architecture. Unlike Transformers, Mamba utilizes a selective scan mechanism that scales linearly ($O(N)$) with sequence length, allowing it to process massive token sequences and selectively propagate only the most relevant information to the LLM.

Overview of the BIMBA framework for long-form video question answering.

Key Innovations in Token Selection

The core of the framework is the Spatiotemporal Token Selector, which incorporates several key design choices to maximize information retention:

  • Mamba-based Compression: By treating the Mamba architecture as an intelligent filter, the model decides which spatiotemporal features to remember and which to discard based on the context.
  • Interleaved Queries: To avoid the positional bias common in long-context models (where the model over-focuses on the end of a sequence), BIMBA interleaves learnable "summary tokens" at regular intervals throughout the video sequence. This ensures uniform context capture across the entire video duration.
  • Bidirectional Scan: While standard Mamba is causal (one-way), BIMBA employs both forward and backward scans to better capture the complex spatiotemporal structures inherent in video data.
  • Question-Conditioned Selection: The model can optionally incorporate the user's query during the compression phase, prioritizing tokens that are specifically relevant to the question asked.
The Spatiotemporal Token Selector architecture and various scanning strategies, including interleaved and bidirectional scans.

Evaluation and Results

BIMBA was trained on a collection of 370K instruction-tuning videos and evaluated across seven diverse benchmarks, including EgoSchema, Video-MME, and VNBench.

State-of-the-Art Performance

BIMBA-LLaVA (utilizing a Qwen2-7B backbone) achieved top-tier results across the board. Notably, on EgoSchema, it reached 71.14% accuracy, surpassing previous state-of-the-art models like LongVU by 3.54%. On VNBench, which specifically tests "needle-in-a-haystack" retrieval in long videos, BIMBA outperformed LLaVA-Video by 7.11%, demonstrating that its selective compression is significantly more effective than standard pooling methods.

Computational Efficiency

The model maintains linear memory usage and runtime. While vanilla Transformer models typically hit OOM limits at 16 frames, BIMBA scales gracefully to 64 frames and beyond, achieving a 16x compression ratio without sacrificing accuracy.

Limitations and Future Work

While highly effective, Question-Conditioned Token Selection introduces computational overhead because the video must be re-processed for every new query. This presents a challenge for multi-turn conversations. Future research will focus on adapting the BIMBA architecture for hierarchical video modeling and exploring caching mechanisms to enable efficient multi-turn dialogue without re-scanning the entire video sequence.

Summary updated

BibTeX
@inproceedings{islam2025bimba,
  author = {Md Mohaiminul Islam and Tushar Nagarajan and Huiyu Wang and Gedas Bertasius and Lorenzo Torresani},
  title = {{BIMBA: Selective-Scan Compression for Long-Range Video Question Answering}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.02709},
}
Figure