Spark-H3: Adaptive Block Sparse Attention for Video Diffusion Models
Abstract: Long video sequences make attention a substantial cost in video diffusion models. Block sparse attention (BSA) reduces this cost by computing selected blocks exactly while compressing the remaining blocks. However, fixed token grouping can place tokens with dissimilar attention preferences in the same group, while uniform key averaging can underestimate the attention mass of compressed blocks. We introduce Spark-Attn, a training-free BSA method comprising Spark-Reblock and Spark-Reweight. Spark-Reblock recursively groups tokens by attention preference while preserving regular block shapes for efficient GPU execution. Spark-Reweight uses the global mean query as an anchor to construct attention-weighted key-value representations and logit biases for the compressed blocks, calibrating their attention mass. We instantiate Spark-Attn in MiniMax-H3 as Spark-H3. At 10% exact-block density, Spark-H3 delivers a 2.49 DiT speedup and reaches 24.81 dB PSNR against the corresponding dense outputs on MiniMax-H3 (20 denoising steps, 345 frames, 1344768). Increasing the density to 20% further improves PSNR to 26.76 dB while still achieving a 2.26 DiT speedup. These results demonstrate that Spark-H3 achieves a state-of-the-art quality-efficiency trade-off for training-free BSA on video diffusion models.
Paper Prompts
Sign up for free to create and run prompts on this paper.
Explain it Like I'm 14
1. What is this paper about?
This paper introduces Spark-H3, a faster way to generate videos with artificial intelligence.
Video-generation models create videos by starting with random visual noise and gradually turning it into a clear video. This process is called diffusion. To decide how each part of a video should relate to every other part, the model uses a mechanism called attention.
Attention is powerful, but it becomes very slow for long, high-resolution videos. The model may need to compare thousands or millions of video pieces with one another. The paper proposes a method that avoids many unnecessary comparisons while trying to keep the final video looking almost the same.
The main idea is:
Carefully calculate the most important comparisons and estimate the less important ones.
The method is called Spark-Attn, and its version designed for the MiniMax-H3 video model is called Spark-H3.
2. What questions does the research ask?
The researchers wanted to answer several main questions:
- Can video generation be made much faster without retraining the original model?
- Can the model choose the most important video-token comparisons intelligently?
- Can the method avoid damaging details such as motion, hair, clothing patterns, and objects?
- Does the method work on more than one video-generation model?
- How much quality is lost when some attention calculations are approximated instead of calculated exactly?
Here, a token is a small piece of information representing part of a video. It might describe a small image region at a particular time, somewhat like a tiny tile in a mosaic.
3. How does the method work?
The problem with normal attention
Imagine a classroom where every student must ask every other student a question. With 10 students, this is manageable. With 10,000 students, it would take far too long.
Dense attention works in a similar way: every video token is compared with every other token. This becomes especially expensive when videos are long or have high resolution.
The researchers divide tokens into groups called tiles. Instead of comparing every token with every other token, Spark-Attn:
- Finds which groups are likely to matter most.
- Calculates those important groups accurately.
- Uses smart summaries for the remaining groups.
This is called block sparse attention.
Spark-Reblock: grouping similar tokens
A problem with ordinary grouping is that one group might contain tokens that pay attention to very different things. For example, one group might contain information about a person’s face, a moving hand, and the background. A single summary of that group would not represent it well.
Spark-Reblock tries to place tokens with similar “attention preferences” together. In simple terms, it asks:
Which tokens tend to look at the same kinds of things?
It then repeatedly divides the tokens into smaller, balanced groups, rather like sorting a pile of objects into similar categories.
The groups are kept the same size. This is important because computer hardware can process regularly shaped groups efficiently.
Spark-Reweight: better summaries
The method still needs to represent groups that are not calculated exactly. A simple approach would be to average all the tokens in a group. But this can be misleading: an average may hide a particularly important token.
Spark-Reweight gives more importance to the keys that are more relevant to the video as a whole. It uses the average query—a kind of “typical question” asked by the video tokens—as a guide for deciding which information in each group matters most.
An analogy is summarizing a book:
- Simple averaging treats every sentence as equally important.
- Spark-Reweight gives more weight to sentences that seem especially relevant to the main topic.
It also adds a correction factor so that compressed groups do not appear less important than they really are.
Exact and estimated calculations
For each group of tokens, Spark-Attn uses one of two paths:
- Exact path: It performs the full attention calculation.
- Compressed path: It uses the carefully constructed summary.
The method combines both paths so that the model can still consider information from the whole video.
Importantly, this process is training-free. The original video model does not need to be retrained, and its learned parameters remain unchanged.
4. What experiments did the researchers perform?
The researchers tested Spark-Attn on two video-generation models:
- MiniMax-H3
- LTX-2.5
They compared it with the original method, called dense attention, and with several other faster attention methods.
They measured two main things:
Speed
They measured how long the model’s main video-processing component, called a DiT or diffusion transformer, took to run.
A speedup of 2.49×, for example, means the new method was about 2.49 times faster than the original calculation.
Similarity and quality
They compared videos produced by the fast method with videos produced by dense attention. They used several measures:
- PSNR: how closely the individual pixel values match.
- SSIM: how similar the overall structure and appearance are.
- LPIPS: how similar the videos look to people, using a learned visual comparison.
- VBench: a collection of tests for video quality, such as appearance and motion.
The researchers also looked at videos by eye to check motion, fine details, and consistency between frames.
5. What were the main findings?
Spark-H3 was much faster
For MiniMax-H3, using only 10% of the attention blocks exactly, Spark-H3 achieved:
- A 2.49× speedup
- A PSNR of 24.81 dB
Using 20% of the blocks exactly gave:
- A 2.26× speedup
- A higher PSNR of 26.76 dB
Using more exact blocks generally improved similarity, but reduced the speed advantage. This shows a trade-off:
More calculations usually give better quality, while fewer calculations give greater speed.
It often performed better than other fast methods
At similar settings, Spark-H3 generally produced videos closer to the original dense-attention outputs than the other block-sparse methods tested.
For example, at 10% exact-block density, Spark-H3 had a PSNR of 24.81 dB, while one comparison method had 20.20 dB. At 20% density, Spark-H3 reached 26.76 dB, compared with 21.26 dB for another method.
These numbers suggest that Spark-H3 was better at preserving the behavior of the original model while still being fast.
Spark-Reblock was especially helpful
The experiments showed that grouping similar tokens together made a large difference.
At 10% density:
- Without Spark-Reblock, the method captured about 61% of the important attention.
- With Spark-Reblock, it captured about 80%.
The video similarity also improved substantially, from 20.30 dB to 24.81 dB.
This means the way tokens are grouped is very important. A smarter grouping method can be more useful than simply increasing the number of blocks calculated exactly.
Spark-Reweight also improved the results
Spark-Reweight reduced errors in the summaries of the compressed groups. When used together with Spark-Reblock, it improved PSNR from 26.24 dB to 26.76 dB.
This suggests that both parts of Spark-Attn solve different problems:
- Spark-Reblock chooses better groups.
- Spark-Reweight creates better summaries of the groups that are not calculated exactly.
The method worked on another model too
On LTX-2.5, Spark-Attn also produced strong results. At 10% exact-block density, it achieved:
- A 3.92× speedup
- A PSNR of 30.84 dB
At 50% density, it achieved a PSNR of 36.79 dB and was still faster than several competing methods.
The method also worked with a faster, eight-step version of MiniMax-H3, showing that it can be combined with other techniques for speeding up video generation.
Visual details were preserved
In example videos, Spark-H3 was able to preserve:
- More natural body positions and movement
- Fine details such as hair
- More consistent designs on clothing
- Better consistency between nearby video frames
This matters because small mistakes between frames can make a video look shaky or unnatural.
6. Why are these results important?
Generating high-quality videos requires a lot of computer power. Long videos and high-resolution videos are particularly expensive because they contain many tokens.
Spark-H3 shows that it may be possible to make video-generation systems considerably faster without changing the original model or retraining it. This could help:
- Reduce the cost of creating AI-generated videos
- Make video generation more practical on powerful but limited hardware
- Allow users to create videos more quickly
- Make longer or higher-resolution videos easier to produce
- Reduce the amount of computing energy needed
The method is also useful because it does not require special training for every model or every model modification.
7. Overall conclusion
The paper presents Spark-Attn, a way to speed up video diffusion models by avoiding unnecessary attention calculations.
Its two main ideas are:
- Spark-Reblock: group tokens with similar attention behavior.
- Spark-Reweight: make better summaries of the groups that are not processed exactly.
The experiments show that Spark-H3 can be roughly two to four times faster in the tested settings while keeping its videos fairly close to those made with the slower, full-attention method.
The broader impact is that AI video generation could become faster, cheaper, and more accessible. However, the method is still an approximation, so using the full calculation may remain preferable when the highest possible accuracy is more important than speed.
Practical Applications
Immediate Applications
- Faster inference for commercial text-to-video systems (software, media, advertising)
- Potential product: a Spark-Attn inference backend or plugin for video-generation APIs.
- Workflow: retain the pretrained model and denoising schedule, insert Spark-Reblock and Spark-Reweight during attention computation, and expose density as a quality–latency control.
- Dependencies: GPU kernels must efficiently support the reordering, routing, and compressed KV branches; reported speedups may vary by GPU, batch size, resolution, and implementation quality.
- Real-time or near-real-time creative preview generation (film, animation, advertising, gaming)
- Potential tool: an interactive video-generation interface with “draft,” “balanced,” and “quality” modes.
- Rationale: Spark-H3 maintains strong similarity to dense outputs while substantially reducing DiT latency, making iterative prompt and composition exploration more practical.
- Dependencies: preview quality must be acceptable for the intended creative task; PSNR and VBench similarity do not guarantee preservation of every semantic or temporal detail.
- High-resolution video generation with lower compute cost (content platforms, post-production, cloud AI)
- Potential product: a cloud video-generation service that dynamically selects sparse-attention density based on output resolution, duration, and customer latency targets.
- Dependencies: the reported measurement excludes some pipeline components, including text encoding, VAE processing, and—in the LTX-2.5 setup—the first denoising stage and latent upsampling. End-to-end savings may therefore be smaller.
- Accelerated generation for few-step distilled models (consumer applications, mobile/cloud generation)
- Potential workflow: use distilled models for low-latency generation and apply Spark-Attn without retraining the LoRA or backbone.
- Dependencies: compatibility should be validated separately for each LoRA, denoising schedule, and model architecture. The method is training-free but is not automatically guaranteed to preserve quality for arbitrary adapters.
- GPU and cloud-cost optimization (AI infrastructure, data centers)
- Potential tool: an inference scheduler that adjusts according to GPU utilization, queue length, video duration, and service-level objectives.
- Dependencies: actual energy and cost savings depend on whether attention is the dominant bottleneck. Reblocking and routing overhead, memory movement, and kernel launch costs may reduce gains for short videos or small workloads.
- Drop-in acceleration for pretrained checkpoints and LoRAs (open-source software, model deployment)
- Potential product: a model-serving library compatible with Hugging Face-style video diffusion pipelines, with automatic fallback to dense attention.
- Dependencies: the implementation must preserve tensor layouts, numerical stability, attention masks, positional encodings, and model-specific control paths. Broad portability beyond the evaluated models remains to be demonstrated.
- Research and benchmarking infrastructure for efficient attention (academia and industrial R&D)
- Potential workflow: compare exact-block density, attention-mass recall, log-mass error, PSNR, SSIM, LPIPS, VBench, and end-to-end latency across models and hardware.
- Dependencies: comparisons should use identical denoising schedules, warm-up steps, hardware, and pipeline accounting. The paper’s latency excludes some non-DiT components, so benchmark protocols must be carefully normalized.
- Adaptive quality–latency controls in consumer video tools (daily life, education, social media)
- Potential workflow: generate a low-density draft, inspect it, and selectively regenerate only approved clips at 20–50% density or with dense attention.
- Dependencies: user-facing quality thresholds require task-specific validation; dense-reference fidelity is not equivalent to factual correctness, safety, or artistic usefulness.
Long-Term Applications
- Scaling to substantially longer videos and higher resolutions (film production, surveillance analytics, virtual worlds)
- Potential product: long-form video generation with adaptive temporal tiling and sparse attention across shots.
- Why further work is needed: the paper evaluates videos up to 14.4 seconds and reports latency trends rather than establishing reliable long-duration generation. Attention preference distributions may change substantially across long narratives, scene cuts, and heterogeneous motion.
- Dynamic density scheduling across denoising steps (diffusion optimization)
- Potential tool: a learned or heuristic controller that uses attention-mass estimates, motion magnitude, or uncertainty to select exact blocks.
- Dependencies: timestep-specific routing must be evaluated for temporal flicker, object identity, and denoising stability. The current experiments use configured densities and a fixed dense warm-up strategy.
- Content-aware sparse attention for difficult motion and scene transitions (robotics simulation, gaming, visual effects)
- Potential product: a video renderer that allocates exact attention preferentially to motion boundaries and semantically important objects.
- Dependencies: additional semantic or motion signals may introduce overhead and could conflict with the method’s training-free design. Object-level quality metrics and failure-case analysis are needed.
- Extension to video understanding and multimodal transformers (healthcare, robotics, security, education)
- Potential tools: long-video retrieval systems, robot perception modules, lecture indexing, or clinical video summarization pipelines.
- Dependencies: the paper evaluates generative video diffusion, not discriminative or multimodal tasks. Approximation errors that are visually minor may still alter classification decisions or safety-critical predictions, requiring task-specific guarantees.
- Hardware-native sparse-attention accelerators (semiconductor, robotics, edge AI)
- Potential product: kernels or ASIC primitives supporting hierarchical token partitioning, top- block routing, exact/compressed dual branches, and shared softmax accumulation.
- Dependencies: the reblocking procedure, data permutation, irregular routing, and synchronization may limit hardware efficiency. Specialized kernels and co-designed memory layouts are required.
- Edge and on-device video generation (mobile devices, cameras, personal computers)
- Potential workflow: use low-density Spark-Attn for local previews and selectively invoke a cloud or dense model for final rendering.
- Dependencies: the reported experiments use large-scale GPU settings. Memory footprint, thermal limits, quantization compatibility, battery use, and on-device kernel support remain unverified.
- Formal error-controlled sparse inference (academia, safety-critical deployment)
- Potential tool: a controller that increases when queries are far from the anchor or when compressed-block log-mass error is high.
- Dependencies: the current method is an approximation and offers no general exactness guarantee away from the anchor. Establishing reliable error bounds is necessary before use in regulated or safety-critical workflows.
- Unified sparse-attention runtime across model families (AI platforms and academic tooling)
- Potential product: a compiler or runtime that automatically profiles token dimensions, selects tile sizes, estimates second moments, and chooses density and warm-up policies.
- Dependencies: generalization beyond MiniMax-H3 and LTX-2.5 requires broader testing across architectures, positional encodings, attention variants, batch sizes, and conditioning mechanisms.
Glossary
- Attention mass: The total normalized attention weight assigned to a token, tile, or block. “The resulting Jensen gap can cause compressed blocks to receive too little attention mass.”
- Attention preference: The relative ranking of keys for a query, or queries for a key, based on attention scores. “We define attention preference as the ranking induced by scaled dot-product scores: all keys for a query, or all queries for a key.”
- Autoregressive state: Information carried forward between sequential generation steps in an autoregressive model. “SANA-Video~\cite{sanavideo} adopts a linear DiT with autoregressive state for long-video generation.”
- Block sparse attention (BSA): An attention mechanism that computes exact attention only for selected blocks and approximates or omits the rest. “Block sparse attention (BSA) reduces the cost of Eq.~\eqref{eq:dense-attention} by computing token-level scores only in selected blocks.”
- Centroid compensation: An adjustment that corrects approximation errors using representative cluster centers. “SVG-EAR~\cite{svgear} adds error-aware routing and centroid compensation.”
- Cluster sparse attention (CSA): Sparse attention that adaptively groups tokens according to similarity or attention structure. “Cluster sparse attention (CSA) methods instead use adaptive token grouping to expose sparse structure.”
- Cosine similarity: A similarity measure based on the angle between two vectors, independent of their magnitudes. “Rather than comparing raw query features by Euclidean distance, we use cosine similarity between normalized score vectors as a surrogate for attention-preference similarity.”
- Denoising schedule: The sequence of noise-removal steps used to generate a sample with a diffusion model. “All sparse-attention methods use four initial dense denoising steps as warm-up before switching to sparse attention.”
- Dense attention: Attention that evaluates interactions between every query and every key. “Dense self-attention~\cite{vaswani2017attention} compares every query token with every key token, incurring quadratic complexity with respect to sequence length.”
- Diffusion distillation: The process of training a diffusion model to produce comparable outputs with fewer sampling steps. “We further evaluate whether Spark-H3 can be combined with few-step diffusion distillation using MiniMax-H3-Turbo~\cite{lightx2v2026}”
- DiT: A diffusion transformer architecture that applies transformer computations within a diffusion model. “We instantiate Spark-Attn in MiniMax-H3 as Spark-H3.”
- Exact-block density: The fraction of attention blocks computed exactly rather than through compression. “At 10\% exact-block density, Spark-H3 delivers a 2.49 DiT speedup”
- Few-step distillation: A distillation approach that enables generation with substantially fewer diffusion steps. “These results demonstrate the effectiveness of Spark-H3 when combined with few-step distillation.”
- FlashAttention: A memory-efficient attention implementation that computes attention in hardware-resident tiles. “FlashAttention~\cite{dao2022flashattention} computes these scores block by block on chip while updating the numerator and denominator in Eq.~\eqref{eq:dense-attention}.”
- Global mean query: The mean of all query vectors in an attention head, used as a shared representative query. “Spark-Reweight uses the global mean query as an anchor to construct attention-weighted key--value representations and logit biases for the compressed blocks.”
- Hybrid attention: An attention mechanism combining different attention formulations, such as local softmax attention and linear attention. “Video DeltaNet~\cite{vdn} learns a hybrid of local softmax attention and linear memory.”
- Inference discrepancy: The difference between a model’s outputs under an approximate method and its outputs under the original inference procedure. “capturing the inference discrepancy introduced by sparse-attention replacement.”
- Jensen gap: The difference caused by interchanging a nonlinear function, such as logarithm or exponential, with averaging. “The resulting Jensen gap can cause compressed blocks to receive too little attention mass.”
- Latent upsampling: Increasing the spatial resolution of a representation in a diffusion model’s latent space. “8 steps at , followed by 3 steps at the target resolution after latent upsampling.”
- Logit bias: An additive adjustment to an attention score before exponentiation and normalization. “Spark-Reweight addresses compression bias by constructing attention-weighted key and value representatives together with a scalar logit bias”
- Log-sum-exp: A numerically useful smooth approximation of the maximum, computed as the logarithm of a sum of exponentials. “The weight--bias construction admits a simple mathematical interpretation as a first-order approximation to the tile's log-sum-exp.”
- Mahalanobis distance: A distance measure that accounts for correlations and scaling induced by a positive-semidefinite matrix. “The non-centered second moment expresses this comparison as a cosine distance under a key-induced Mahalanobis-type inner product”
- Mean pooling: Replacing a collection of vectors with their arithmetic mean. “Mean-pooled KV compression uses ”
- Mixture of experts: A model architecture in which different inputs are routed to specialized subnetworks or experts. “MoBA~\cite{moba}, which formulates block routing as a mixture-of-experts process”
- Numerical warm-up: Initial computation using a more accurate or expensive method before switching to an approximation. “All sparse-attention methods use four initial dense denoising steps as warm-up before switching to sparse attention.”
- PSNR: Peak signal-to-noise ratio, a logarithmic measure of similarity between a reference signal and a reconstructed signal. “For quality, we use PSNR, SSIM~\cite{wang2004ssim}, and LPIPS~\cite{lpips} to measure fidelity to dense-attention outputs”
- Recursive partitioning: Repeatedly dividing a set into smaller subsets until a specified stopping condition is reached. “Recursive splitting terminates when , yielding uniformly sized tiles.”
- Scaled dot-product attention: Attention in which query–key dot products are divided by the square root of the head dimension. “For a query and a key , define the scaled dot-product score as .”
- Semantic-aware permutation: Reordering tokens according to semantic or content-based relationships. “SVG2~\cite{svg2} uses semantic-aware permutation”
- Softmax normalization: Converting scores into nonnegative weights that sum to one by exponentiating and normalizing them. “Both branches share one softmax normalization”
- Spatiotemporal token: A token representing information associated with both spatial position and time in a video. “Video diffusion transformers (DiTs)~\cite{peebles2023dit} generate videos by repeatedly processing spatiotemporal token sequences”
- Taylor expansion: A local polynomial approximation of a function around a chosen point. “The weight--bias construction admits a simple mathematical interpretation as a first-order approximation to the tile's log-sum-exp.”
- Temporal coherence: Consistency of motion, appearance, and structure across successive video frames. “These examples illustrate Spark-H3's ability to preserve temporal coherence and fine visual details.”
- Token grouping: Assigning tokens to groups or tiles so that their interactions can be processed together. “Fixed token grouping can place tokens with dissimilar attention preferences in the same group”
- Training-free inference: Model inference that does not update parameters or train additional modules. “Unlike trainable sparse or hybrid attention methods such as VSA and Video DeltaNet~\cite{vsa,vdn}, we consider a training-free setting”
- VAE decoding: Converting a latent representation into an observable output using a variational autoencoder decoder. “For efficiency, we measure DiT latency, excluding text encoding and VAE decoding”
- Value-weighted numerator: The attention-weighted sum of value vectors before normalization by total attention mass. “Here is the value-weighted numerator and is the total attention mass.”



