OmniSparse: Training-Aware Fine-Grained Sparse Attention for Long-Video MLLMs

Feng Chen, Yefei He, Shaoxuan He, Yuanyu He, Jing Liu, Lequan Lin, Akide Liu, Zhaoyang Li, Jiyuan Zhang, Zhenbang Sun, Bohan Zhuang, Qi Wu

TL;DR

This paper introduces OmniSparse, a novel training-aware sparse attention mechanism for long-video Multimodal Large Language Models (MLLMs). OmniSparse addresses the performance gap between training and inference in sparse attention methods by applying fine-grained sparsity across queries, key-values, and attention heads, achieving significant speedups and memory reductions without sacrificing accuracy.

What Problem Does This Paper Address?

Long-video MLLMs are crucial for understanding complex temporal dynamics in videos, but their computational cost, particularly the quadratic complexity of the attention mechanism, severely limits their practical application. Existing sparse attention methods primarily focus on inference-time acceleration by predefining sparsity patterns. However, these methods often suffer from a "training-inference gap" because models are trained with full attention and then deployed with sparse attention, leading to inconsistent performance. Furthermore, these methods often lack fine-grained control over sparsity across multiple dimensions (queries, keys, values, and attention heads), limiting their ability to achieve optimal efficiency. OmniSparse aims to bridge this gap by integrating sparse attention into the training process and enabling dynamic, multi-dimensional sparsity.

Methods

OmniSparse introduces three key mechanisms for achieving fine-grained, training-aware sparse attention:

  1. Query Selection (Lazy-Active Classification): This method identifies and prunes "lazy" queries that focus on a limited number of tokens and exhibit functional redundancy with other queries. It formulates this as a binary classification task, distinguishing between "active" queries that capture broader context and "lazy" ones. This is achieved by using the attention sink as a lazy reference and an aggregated visual key as an active reference to compute similarity scores. The first attention head is preserved as active to maintain information integrity.
  2. KV Selection (Head-Level Dynamic Budget Allocation): Recognizing that different attention heads have varying sparsity patterns, OmniSparse dynamically allocates a budget for selecting key-value (KV) pairs. Instead of a uniform Top-k strategy, it first identifies the "flattest" attention head (requiring more tokens for recall) and uses its token budget as a uniform baseline for all heads. This ensures that each head can select its most salient KV pairs while maintaining overall attention recall above a predefined threshold.
  3. KV Cache Slimming: To further reduce memory overhead during decoding, this mechanism selectively fetches visual KV caches. If a decoding query is identified as "lazy" (based on the query selection mechanism), its corresponding visual KV cache is omitted, significantly reducing memory access costs without impacting performance.

Datasets

The paper evaluates OmniSparse on several video understanding benchmarks, including:

  • ActivityNet-QA
  • VideoDC
  • Next-QA
  • VideoMME
  • EgoSchema
  • EventBench
  • PerceptionTest
  • LongVideoBench
  • MVBench
  • VNBench

For training, they use LongVITA data and a Qwen2.5-7b-Instruct LLM backbone with a SigLip-400M visual encoder.

Key Insights and Ideas

  • Query Redundancy is Significant: The paper highlights that many queries in MLLMs focus on a small subset of tokens, indicating substantial redundancy that can be pruned without significant performance loss.
  • Training-Aware Sparsity is Crucial: Applying sparsity only during inference leads to a performance gap. Integrating sparse attention into the training process ensures consistency and better generalization.
  • Multi-Dimensional Sparsity is Key: Optimizing sparsity across queries, KV pairs, and attention heads simultaneously unlocks greater computational savings than focusing on just one or two dimensions.
  • Flattest Head as a Budget Indicator: Using the flattest head's token requirements to set a uniform budget for all heads is an efficient way to balance attention recall across diverse head patterns.
  • KV Cache Slimming for Decoding: Skipping KV cache fetches for lazy queries during decoding is an effective strategy for reducing memory footprint without compromising output quality.

Key Results

OmniSparse achieves performance comparable to full attention mechanisms while offering significant efficiency gains:

  • Prefill Speedup: Up to 2.7x speedup during the prefill stage.
  • Decoding Memory Reduction: Up to 2.4x reduction in memory usage during decoding.
  • FLOPs Reduction: Achieves substantial FLOPs reduction (e.g., 77.9% when query and KV selection are combined).
  • Accuracy: Maintains performance comparable to full attention across various benchmarks.

Limitations and Future Work

The authors acknowledge that the threshold for lazy-active query classification might vary across layers, potentially impacting the balance between efficiency and performance in layers with more dynamic attention patterns. Future work could involve further investigating how attention layer variations affect video perception and understanding.

Summary updated

BibTeX
@inproceedings{chen2026omnisparse,
  author = {Feng Chen and Yefei He and Shaoxuan He and Yuanyu He and Jing Liu and Lequan Lin and Akide Liu and Zhaoyang Li and Jiyuan Zhang and Zhenbang Sun and Bohan Zhuang and Qi Wu},
  title = {{OmniSparse: Training-Aware Fine-Grained Sparse Attention for Long-Video MLLMs}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i24.39087},
}
Figure