Generating high-resolution, long-duration videos is a significant challenge in current generative AI. While Video Diffusion Models (VDMs) like Sora or Kling have demonstrated impressive results, they are constrained by the quadratic complexity of full attention mechanisms. As video length increases, the computational cost grows exponentially, creating a bottleneck for scaling.
A new study from Peking University and Kuaishou Technology introduces VMoBA (Video Mixture-of-Block Attention), a sparse attention mechanism designed specifically for video models. VMoBA aims to improve training and inference efficiency without compromising the quality of the generated output.
The Challenge of Video Attention
The core of modern video models is the Transformer, which relies on self-attention to relate every pixel-token to every other token. In high-resolution videos (e.g., 720p), the token count can exceed 76,000, making full attention matrices prohibitively expensive.
Existing sparse attention methods developed for text (1D) often fail when applied to video (3D: Time $\times$ Height $\times$ Width). Methods like MoBA, which flatten video into a 1D sequence, destroy spatial and temporal locality—the inherent relationship between a pixel and its neighbors in space and time.
Methods: Making Sparse Attention "Video-Native"
VMoBA introduces three key innovations to address these limitations:
- Layer-wise 1D-2D-3D Block Partitioning: Instead of a uniform grid, VMoBA cycles through different partitioning strategies across layers. Some layers focus on temporal chunks (1D), some on spatial patches (2D), and others on spatio-temporal cubes (3D), allowing the model to capture motion and structure at multiple scales.
- Global Block Selection: Unlike standard sparse attention where each query token selects its own key blocks, VMoBA selects the most important blocks globally for an entire attention head. This ensures that high-importance regions, such as moving subjects, receive more computational resources than static backgrounds.
- Threshold-based Selection: Rather than picking a fixed number of blocks (Top-$K$), VMoBA uses a dynamic threshold ($\tau$). This allows the model to adaptively pick fewer blocks for "sharp" attention patterns and more for "diffuse" ones, maintaining high fidelity.
Key Results and Evaluation
The researchers evaluated VMoBA using the Koala-36M dataset for training and the VBench suite for quality assessment.
Efficiency and Quality Gains
- Training Speedup: VMoBA achieved a 1.48x latency speedup and a 2.92x reduction in FLOPs during training on long sequences.
- Superior Quality: On the VBench suite, VMoBA achieved a score of 68.34, slightly outperforming Full Attention (68.25) while being significantly cheaper to train (187 vs. 276 GPU hours).
- Inference Performance: For 720p inference, it offered a 1.35x speedup, demonstrating its utility as a training-free accelerator for existing models.
As shown in the quantitative plots, VMoBA maintains a near-linear scaling of generation latency as sequence length increases, whereas Full Attention and other baselines scale much more aggressively. Furthermore, the efficiency-quality Pareto front highlights that VMoBA provides the best balance of high video quality and low GFLOPs.
Conclusion
VMoBA successfully bridges the gap between efficiency and quality in video generation. By embracing the multi-dimensional nature of video through cyclical partitioning and dynamic global selection, it provides a scalable path for future long-video diffusion models. Future work will focus on custom CUDA kernel optimization to further align practical speed with theoretical FLOP savings and testing the architecture at the 10B+ parameter scale.
Summary updated