---
title: "Sparse VideoGen — paper by Xi et al. (2025)"
description: "Sparse VideoGen speeds up video diffusion by choosing where each attention head looks and arranging the selected tokens for efficient GPU…"
canonical: "https://research.elamur.ai/free/en/papers/xi-2025-sparse-videogen-accelerating-video-diffusion/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/xi-2025-sparse-videogen-accelerating-video-diffusion/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2025](https://md.research.elamur.ai/free/en/papers/2025/) / Sparse VideoGen: Accelerating Video Diffusion Transformers with Spatial-Temporal Sparsity

# Sparse VideoGen: Accelerating Video Diffusion Transformers with Spatial-Temporal Sparsity

Paper · 2025 · Haocheng Xi, Shuo Yang, Yilong Zhao et al.

**Authors:** [Haocheng Xi](https://md.research.elamur.ai/free/en/authors/haocheng-xi/), [Shuo Yang](https://md.research.elamur.ai/free/en/authors/shuo-yang/), [Yilong Zhao](https://md.research.elamur.ai/free/en/authors/yilong-zhao/), Chenfeng Xu, Muyang Li, [Xiuyu Li](https://md.research.elamur.ai/free/en/authors/xiuyu-li/), [Yujun Lin](https://md.research.elamur.ai/free/en/authors/yujun-lin/), [Han Cai](https://md.research.elamur.ai/free/en/authors/han-cai/), [Jintao Zhang](https://md.research.elamur.ai/free/en/authors/jintao-zhang/), [Dacheng Li](https://md.research.elamur.ai/free/en/authors/dacheng-li/), [Jianfei Chen](https://md.research.elamur.ai/free/en/authors/jianfei-chen/), Ion Stoica, [Kurt Keutzer](https://md.research.elamur.ai/free/en/authors/kurt-keutzer/) and [Song Han](https://md.research.elamur.ai/free/en/authors/song-han/) · **Year:** 2025 · **Venue:** arXiv:2502.01776 · **Licence:** [CC BY 4.0 (arXiv)](http://creativecommons.org/licenses/by/4.0/)

[**1** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W4407184867) · [Cited by **55** papers in our library of the 163,136 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/xi-2025-sparse-videogen-accelerating-video-diffusion/cited-by/) · [arXiv:2502.01776](https://openalex.org/S4306400194) · [licence](http://creativecommons.org/licenses/by/4.0/)

- [PDF](https://arxiv.org/pdf/2502.01776)
- [arXiv 2502.01776](https://arxiv.org/abs/2502.01776)
- [OpenAlex](https://openalex.org/W4407184867)

Citations: OpenAlex, 2026-10-14.

## Summary

A video generator builds a clip through repeated passes that turn a noisy representation into a coherent sequence of frames. In each pass, full attention lets every part of that representation draw information from every other part. That freedom helps the generator build a scene and carry it across frames, but the amount of work grows quadratically as the representation gets longer. Higher resolution and more frames both make it longer. Sparse VideoGen examines which of these comparisons matter enough to keep in a video diffusion [transformer](https://md.research.elamur.ai/free/en/concepts/transformer/).

The authors find two recurring patterns. Some attention heads, the parallel components that gather information from the sequence, draw most heavily on tokens from the current frame and nearby frames. Other heads give greater weight to corresponding positions across frames. The paper calls these spatial and temporal heads. A head can change its pattern with the prompt or the denoising step. Sparse VideoGen therefore tests both patterns on a small sample of query rows during generation. It compares their outputs with full attention on those same rows, then uses the closer approximation for the head as a whole. The procedure works with pretrained generators and requires no further training.

Skipping comparisons saves arithmetic, but the comparisons left in temporal attention are scattered through the original sequence. The authors reorder the data so that tokens at the same position in successive frames sit together in memory. This lets a GPU process the selected comparisons in blocks. The design makes the choice of which tokens to compare and the choice of how to store them work together.

The paper reports end-to-end speedups of up to 2.28× on CogVideoX-v1.5, 2.33× on HunyuanVideo, and a factor of 1.51 on Wan 2.1. In the HunyuanVideo timing example, Sparse VideoGen reduces generation time for a 5.3-second, 720p clip from 2253 seconds to 968 seconds. In the quality comparisons, the authors report an average peak signal-to-noise ratio of 29.99 for CogVideoX-v1.5 text-to-video generation, and a HunyuanVideo average exceeding 29.55. These figures measure how closely the accelerated output follows its full-attention counterpart. A separate profiling experiment finds that sampling 1% of the query rows gives generation quality comparable to checking every row on the tested subset. Together, the experiments connect the observed concentration of attention to an actual reduction in generation time.

## Deep dive: Sparse VideoGen: Accelerating Video Diffusion Transformers with Spatial-Temporal Sparsity

Sparse VideoGen speeds up video diffusion by choosing where each attention head looks and arranging the selected tokens for efficient GPU computation. · about 32 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Why video makes full attention expensive

A text-to-video generator starts with a written description and produces a sequence of images. In image-to-video generation, a source image also guides the result. For the generators studied here, the diffusion process works on a compressed video representation. The denoising network repeatedly updates this representation, which is ultimately decoded into a clip. The attention operations that Sparse VideoGen changes take place during those updates.

A token in this setting represents part of the compressed video. Its position identifies both a frame and a location within that frame. The transformer receives a sequence of these tokens, and full attention gives it a way to connect any pair. Views of a scene within one frame can inform one another, and representations from different frames can inform one another. The paper describes this as a move from attention over spatial positions in an image to full attention over space and time in a video. Its starting point is the use of transformers in image diffusion, described in [Scalable Diffusion Models with Transformers](https://md.research.elamur.ai/free/en/papers/peebles-2022-scalable-diffusion-models-transformers/).

Attention has several heads, each with its own way of weighting the information available to a token. A head produces an output for every query position by combining information from the positions it attends to. In dense attention, every query has access to every key position. An attention map records the weights for these comparisons. A row shows which keys contribute to one query, while a region of the map can show how a set of queries relates to a set of keys. The distinction matters here because a map can be dense in the comparisons the system computes and concentrated in the weights it assigns.

As video resolution rises, the sequence can contain more tokens per frame. Adding frames increases the number of tokens along the time axis. Both changes enlarge the set of queries and the set of keys they can inspect. A longer sequence therefore has more comparisons per query as well as more queries. Denoising repeats that operation, so full attention can account for a larger share of generation time as the video representation grows.

The authors illustrate the bottleneck with runtime breakdowns. At a context length of 17k, attention accounts for 51% of latency in CogVideoX-v1. At 45k, it accounts for 73% in CogVideoX-v1.5. For HunyuanVideo at a context length of 120k, attention can take more than 80% of runtime. The introduction also describes an A100 example in which HunyuanVideo takes almost an hour to generate a 5-second clip. These examples motivate attention as the target. They cover different configurations, so they illustrate where the time goes without isolating sequence length as the sole cause of the differences.

The pressure comes from the combination of context size and repeated computation. An optimization that affects a short operation can matter if the operation runs frequently enough, and full attention here is already expensive on an individual pass. At the same time, a replacement has to work repeatedly on inputs that change as the clip takes shape. A pattern chosen once may describe one state of the video well and provide a poor approximation at another stage.

#### Where earlier approaches save work

The paper organizes work on diffusion efficiency around several places to intervene. One is the denoising schedule. If a generator can complete a clip in fewer updates, every operation inside those skipped updates is saved. The authors discuss early approaches based on stochastic differential equations, then describe a line of work that uses ordinary differential equations or improves the paths and solvers used for sampling. The paper places DDIM and rectified flow in that line of work. [Denoising Diffusion Implicit Models](https://md.research.elamur.ai/free/en/papers/song-2020-denoising-diffusion-implicit-models/) · [Flow Straight and Fast](https://md.research.elamur.ai/free/en/papers/liu-2022-flow-straight-fast-learning-generate/)

The authors also discuss approaches that teach a generator to produce a result in fewer steps. Consistency-based training aims to consolidate work that would otherwise take multiple updates. Distillation trains a simpler generator to reproduce the behavior of a more expensive one. The paper emphasizes the cost of further training for video generation. Sparse VideoGen addresses a different part of inference. It changes the work done inside attention in a pretrained generator. [Latent Consistency Models](https://md.research.elamur.ai/free/en/papers/luo-2023-latent-consistency-models-synthesizing-high/)

Another place to intervene is numerical precision. Quantization represents numbers with fewer bits, so the same operation can use a cheaper numerical format if the hardware and workload support it. The paper describes previous examples that compress weights and activations, as well as work that applies low precision directly to attention. It also discusses more efficient architectures and autoencoders that compress the input representation more aggressively. The distinction is where the saving comes from. A more compressed representation can shorten the sequence before attention starts. Lower precision changes the cost of computing the selected interactions. Sparse attention changes the selection itself.

System-level work offers other ways to make generation cheaper. Dynamic batching groups work for execution, with the aim of improving throughput. Caching saves intermediate results and reuses them when subsequent computations would be similar enough. The paper describes PAB as a method that caches and broadcasts intermediate features at different timestep intervals. It also discusses methods that reuse conditional and unconditional outputs, or use similarity between inputs to predict when outputs can be reused. In each cache-based case, the approximation concerns whether an earlier result is a suitable substitute for a fresh computation. Sparse VideoGen evaluates current inputs using a restricted set of comparisons.

The paper situates this work within [GPU and parallel computing](https://md.research.elamur.ai/free/en/topics/gpu-parallel-computing/) as well. Rewriting an operation to do less arithmetic gives the hardware an opportunity to finish sooner. Whether it does so depends on how efficiently it can access the relevant data and group the remaining operations. A sparse rule that selects isolated elements can be a poor fit for equipment designed to multiply compact matrices. That concern is central here because the two video attention patterns look quite different in the same memory layout.

#### What attention research on text suggested

The paper draws on earlier work showing that dense attention can assign most of its weight to a small part of a text sequence. Some methods exploit attention to early or recent tokens. Others track a set of comparatively influential tokens, sometimes called heavy hitters. Query-aware approaches address the fact that which content matters can depend on the position asking for it. These studies establish several ways in which the cost of computing every interaction can exceed what the output appears to require. [H₂O](https://md.research.elamur.ai/free/en/papers/zhang-2023-h-2-o-heavy-hitter/) · [Quest](https://md.research.elamur.ai/free/en/papers/tang-2024-quest-query-aware-sparsity-efficient/)

There is also a precedent for looking at heads individually. DuoAttention and MInference identify different patterns among heads, which makes the head a natural unit for choosing an approximation. The paper uses that general observation to motivate studying video heads on their own terms. A video token has coordinates in the frame and a place in the sequence of frames. Positions that are far apart in the flattened sequence can still share an obvious relation, such as representing the same location at different times. The regularity that Sparse VideoGen exploits comes from this geometry. [DuoAttention](https://md.research.elamur.ai/free/en/papers/xiao-2024-duoattention-efficient-long-context-llm/) · [MInference](https://md.research.elamur.ai/free/en/papers/jiang-2024-minference-1-0-accelerating-pre/)

The authors also describe linear attention, which changes how attention is computed so that its complexity is linear in sequence length, and low-bit attention, which reduces the precision of the arithmetic. Sparse VideoGen keeps the familiar attention calculation over a restricted set of positions. Its starting point is an empirical question about pretrained video generators. If their heads already concentrate on regular arrangements of space or time, the inference system can give each head access to the part of the sequence it is most likely to use.

### The method, step by step

#### How the video becomes a sequence

The generators in the study use a spatiotemporal variational autoencoder, or VAE, to form a compressed representation of video. A frame in the attention calculation refers to a frame of that representation. Within each such frame, the tokens lie in a fixed sequence. The sequence then continues with the tokens of the next frame. Under this ordering, positions in a single frame are close together. The same position in consecutive frames is separated by the length of a frame's token sequence.

An attention head gives each token a query, a representation used to ask which positions are relevant. The other positions supply keys, which are compared with the query, and values, which carry the information that the head combines. Attention scores determine the relative weight of the values in the output. When the paper profiles a row, it is checking the output for a selected query. That check can account for the aggregate effect of the values that receive weight, even if a plot of the attention scores makes several individual entries look important.

Sparse VideoGen starts from this existing token arrangement and the attention behavior that the pretrained generators already exhibit. Its sparse patterns are masks over pairs of positions. A mask says which keys a query can use. The method has a choice of masks for each head, an inexpensive way of choosing between them, and an implementation that executes the chosen mask over the input. These parts address different costs. The masks reduce the number of comparisons, the profiler pays to decide where to reduce them, and the implementation determines how quickly the GPU handles the comparisons left over.

How Sparse VideoGen runs an attention head The steps in order.

#### How spatial and temporal masks differ

In a spatial head, attention weights concentrate on positions within the same frame and its neighbors. A query can use information from many spatial positions in that small group of frames. In the original sequence, each frame occupies a contiguous span. When a span of queries emphasizes a span of keys, the corresponding region of the attention map looks like a block. Nearby frames extend the region with additional blocks. The pattern gives the head access to relationships among parts of the current frame and surrounding frames that can help preserve the structure of the scene.

A temporal head concentrates on corresponding locations across frames. Imagine tracing a fixed location through the compressed video. Reading its token in the next frame requires stepping over a frame's worth of sequence positions. Repeating this gives a set of keys at regular intervals. In the usual sequence order, this relationship appears as slanted bands in the attention map. The temporal pattern can also retain a limited group of spatial positions. Its defining feature is that it gathers evidence across frames for those positions.

The two masks offer complementary ways to spend comparisons. The spatial mask covers more of the image across a restricted span of time. The temporal mask follows a smaller set of spatial positions through the clip. These are explanations of the observed patterns and the design of the approximation. A head assigned to a temporal mask still participates in a transformer that has spatial heads, and several rounds of denoising can combine the information that different heads provide.

Some positions receive substantial weight under both patterns. The authors highlight the text prompt and the first frame. Sparse VideoGen retains these tokens in both masks. Thus the choice between space and time governs how the head treats the rest of the video, while each candidate still has access to the shared positions. The shared treatment matters when interpreting the comparison. An output produced by the temporal candidate can still reflect information from the first frame and the prompt.

The names spatial and temporal describe choices made for a particular input and denoising step. The authors observe that the same head can look spatial for one prompt and temporal for another, and that its behavior can vary over denoising. SVG makes its assignment using the current attention inputs. A head can therefore receive a different mask the next time it runs, even though it uses the same pretrained weights.

#### Choosing a mask from sampled queries

The authors first consider a reference procedure that has access to every query row. It runs full attention for a head and calculates the outputs under the spatial and temporal masks. For each sparse candidate, it measures the mean squared error relative to the full-attention output. This error averages the squared differences between corresponding output values. The mask with the smaller error is the closer of the two candidates according to that measure.

The comparison is at the level of the head output. A mask may exclude a collection of keys that looks substantial in a visualization yet change the combined output very little. Conversely, discarding a set of values can matter even when no individual entry stands out. Comparing the outputs accounts for the joint result of restricting the head's access. The all-row procedure is an oracle for this particular decision because it can inspect the complete set of head outputs before committing to a mask. The same requirement makes it expensive as an inference strategy.

The deployed profiler runs the same kind of comparison on random query rows. The paper denotes the sampling percentage by `x`. It takes the selected queries and computes full-attention outputs for them, allowing those queries to reach the full key context. It computes spatial and temporal outputs for the same queries under their respective masks. Sampling is on the query side. In particular, the dense reference for a sampled row remains a full-attention calculation for that query. This arrangement gives both sparse candidates the same reference outputs and lets their errors be compared on the same positions.

The selected mask governs the head's sparse computation over the sequence. Sampling decides which rows supply evidence for the assignment. The head then produces outputs for the other queries as well under the selected rule. This distinction explains how the profiler can do a small amount of dense work and still support a generation pass that needs a complete head output. The profiling work grows with the number of rows inspected, so its sampling fraction is itself an efficiency setting.

This procedure amounts to an inference-time test between pre-defined candidates. It neither requires labels for spatial and temporal heads nor learns a classifier from a separate collection of clips. Full attention on the current sampled rows supplies the target for the comparison. The video benchmarks are used to evaluate the method, and the authors use sensitivity tests to examine how the sampling setting affects quality. Preparation of prompts for those evaluations is part of the benchmark procedure.

#### Why the arithmetic can shrink

The paper counts the floating-point work of attention over the video tokens under simplified assumptions. It omits the prompt and first-frame terms from this estimate, treating them as a small shared part of the calculation. The counts concern the attention products. Other operations, including the pattern test and changes to memory layout, have to be accounted for when measuring runtime.

```
2 · 2 · (LN)² · H = 4L²N²H
```

Here `L` is the number of tokens in a frame, `N` is the number of frames, and `H` is the hidden dimension used in the cost expression. `LN` is the full length of the video-token sequence. Squaring that length counts the dense set of query–key pairs. The factors of `2` count the two attention products, for scores and for combining values, and the multiply and add in the operation count. The multiplication dots and juxtaposed symbols both denote multiplication. The equality expresses the paper's full-attention cost in two forms.

```
(2 · 2 · L²H) · cₛN
```

This is the spatial attention cost. `L`, `H`, and `N` retain their meanings. The subscript `ₛ` labels the spatial choice, and `cₛ` is the number of nearby frames included in that choice per query frame. The parenthesized expression counts the work on a pair of frames, each containing `L` tokens. The factor `cₛN` counts the selected frame pairs in the simplified calculation. The factors of `2` have the same operation-count meaning as in the dense case.

```
cₛ / N
```

This is the retained fraction of the estimated dense attention work for the spatial pattern. `cₛ` is the number of frames allowed by the spatial mask, `N` is the total frame count, and the slash denotes division. The paper calls this fraction sparsity. In this convention, a smaller value means that the mask retains less of the dense pairwise computation.

```
(2 · 2 · N²H) · cₜL
```

This is the temporal attention cost. `N` is the frame count, `H` is the hidden dimension, and `L` is the spatial token count per frame. The subscript `ₜ` labels the temporal choice. `cₜ` is the number of spatial token positions the temporal mask allows each position to use across the frames. The term `N²` describes the frame pairs compared for a selected pair of spatial positions. The factor `cₜL` counts the selected pairs of spatial positions, and the factors of `2` again account for the attention products and the multiply and add.

```
cₜ / L
```

This is the corresponding retained fraction for temporal attention. `cₜ` is the number of spatial positions retained by the temporal mask and `L` is the number available per frame. The slash again denotes division. Holding the width of the temporal mask fixed gives a different dependence on video shape from holding the width of the spatial mask fixed. The temporal fraction is expressed relative to the size of a frame, while the spatial fraction is expressed relative to the number of frames.

These expressions give the authors separate controls for the two patterns. A spatial mask can be widened by including more frames. A temporal mask can be widened by including more positions across the frames. Either change affords the head access to more information and requires more arithmetic. The paper chooses settings intended to leave approximately 30% of the modeled dense work in each head type. That target describes arithmetic under the simplified count. The effective cost also includes the shared positions, profiling, data movement, and operations outside attention.

#### Making temporal attention contiguous

The spatial pattern already fits the initial layout reasonably well. Tokens from one frame sit together, and the queries and keys associated with frame pairs can be handled in blocks. Temporal attention under that layout is harder to optimize. The tokens it wants are separated by a stride of `L`, the number of tokens per frame. Even when the attention map has many entries that can be skipped, the entries retained by the temporal pattern are spread through it.

A GPU tensor core accelerates matrix multiplication by working on tiles. In its discussion of hardware, the paper describes a case where execution needs a minimum of 16 consecutive elements in every dimension. With a strided temporal selection, the relevant values fall into separate portions of memory. That arrangement can prevent the surviving operations from using the fast dense multiplication available inside a tile. The number of operations removed and the time saved consequently depend on different properties of the computation.

Sparse VideoGen switches the order of the frame and position axes for temporal heads. In the usual order, it visits positions within a frame before moving to the next frame. In the transformed order, it visits the frames for a given position before moving to the next position. Successive entries in a group now correspond to the same location through time. A temporal mask expressed in this order can be executed with block-sparse attention. The kernel works through the retained blocks as compact units and skips the unused blocks.

The layout change preserves the identities of the query, key, and value tokens. A consistent permutation of those identities and the mask arranges the same sparse interactions into different memory positions. The results are associated with their original query positions. This is the sense in which the rearrangement is mathematically equivalent to computing the temporal mask in the original order. The approximation comes from restricting the mask. The rearrangement changes the execution of the resulting sparse operation.

The conceptual distinction also explains the layout ablation. The paper can keep the temporal attention rule and compare different ways of executing it. If the reordered version runs faster, the improvement can be attributed to how the selected interactions are arranged and processed in that comparison. The authors implement fused kernels for profiling and layout work with [Triton](https://md.research.elamur.ai/free/en/papers/tillet-2019-triton-intermediate-language-compiler-tiled/) and use a block-sparse attention kernel from [FlashInfer](https://md.research.elamur.ai/free/en/papers/ye-2025-flashinfer-efficient-customizable-attention-engine/).

#### Other changes to the inference path

The implementation also addresses operations around attention. QK-norm normalizes the query and key representations. RoPE applies a rotary position encoding so that positional information affects the attention calculation. The authors found limited parallelism in these operations with small head dimensions, citing a dimension of 64 in CogVideoX-v1.5. They implement CUDA kernels using sub-warp reductions, which perform a reduction within a smaller group of GPU threads. This gives the small operations a way to make better use of the available parallel execution.

The paper additionally combines the sparse mask with FP8 attention. FP8 is a low-precision floating-point format. The authors implement a kernel that supports both that format and block-sparse computation. The choice of mask still determines which interactions are evaluated, while the numerical format governs how the selected interactions are computed. The expected benefit depends on the accelerator and the attention configuration. The experiments report gains for HunyuanVideo and explain why the authors use the regular precision path for CogVideoX-v1.5.

Sparse VideoGen thus applies a runtime change to a pretrained generation pipeline. The sampling fraction and mask widths are inference settings, and the paper studies them empirically. The authors released the Sparse VideoGen implementation under that name. The released work covers the profiling and execution designs that turn the observed attention patterns into a usable replacement for dense attention.

### Experiments and results

#### Generators, prompts, and comparison settings

The main benchmark studies CogVideoX-v1.5 in both image-to-video and text-to-video generation, together with HunyuanVideo in text-to-video generation. The tests generate 720p outputs. In CogVideoX-v1.5, attention receives 11 frames of the compressed representation, with 4080 tokens in each frame. In HunyuanVideo, it receives 33 frames, with 3600 tokens per frame. The counts describe the representation after the VAE. The resulting configurations give the paper workloads with different frame counts and frame sizes. [CogVideoX](https://md.research.elamur.ai/free/en/papers/yang-2024-cogvideox-text-video-diffusion/) · [HunyuanVideo](https://md.research.elamur.ai/free/en/papers/kong-2024-hunyuanvideo-systematic-framework-large/)

The main CogVideoX-v1.5 runs use VBench prompts after the prompt optimization suggested by CogVideoX. The main HunyuanVideo benchmark uses prompts from the Penguin Video Benchmark released with HunyuanVideo. A separate HunyuanVideo sensitivity experiment uses a random subset of VBench. The paper also describes a VBench experiment for the initial all-row pattern-selection analysis. These distinctions matter when matching reported results to their conditions. The main HunyuanVideo quality results and the HunyuanVideo mask-width sensitivity results come from different prompt setups.

For CogVideoX-v1.5, the spatial mask uses a width of 4 frames and the temporal mask uses 1224 token positions. For HunyuanVideo, those settings are 10 frames and 1200 token positions. The authors describe the configurations as yielding roughly 30% sparsity for each pattern in their convention. They use the official settings for MInference and PAB. The experiment setup also says that the first 25% of denoising steps are skipped for the baseline accelerations because early steps are critical to generation quality. This refers to holding back those interventions during that portion of denoising.

Dense attention provides the reference generation. The acceleration baselines include DiTFastAttn, which the authors treat as a spatial-only comparison, and a Temporal-only attention implementation they add for the experiment. These baselines test what happens when the inference path favors one of the two kinds of connection. MInference supplies a comparison with another strategy for selecting sparse attention patterns, and PAB supplies a comparison with feature reuse. The baseline timing uses FlashAttention-2. The end-to-end efficiency experiments run on an H100-80GB-HBM3 with CUDA 12.4. This is the hardware and software context for the timing measurements, distinct from the A100 example used to motivate the problem.

#### How the paper measures similarity and quality

PSNR, or peak signal-to-noise ratio, measures pixel-level agreement with a reference output. A higher value indicates greater agreement under that measure. Here the dense-attention generation is the reference, so a difference contributes to the score even if an observer might accept either rendering as a reasonable answer to the prompt. That property suits the authors' question about fidelity to the pretrained generator's behavior.

The paper also reports structural similarity, or SSIM, and learned perceptual image patch similarity, or LPIPS. SSIM measures structural agreement. LPIPS measures how different the outputs look in a learned representation, with lower values indicating closer agreement. Using these alongside PSNR gives the experiment several views of how acceleration changes the generated result. Fine pixel differences, structural changes, and differences measured in learned features can contribute differently to the measures.

The VBench measures reported in the benchmark concern imaging quality and subject consistency. Imaging quality evaluates properties of the rendered output, and subject consistency concerns whether the depicted subject remains consistent across the video. These measures address aspects of the clip in its own right. Read together, the metrics let the paper ask both how far Sparse VideoGen moves a result from the dense-attention version and whether the accelerated video retains desirable visual properties.

For efficiency, the paper considers floating-point work, end-to-end latency, and speedup. Floating-point counts describe computational scale. Kernel benchmarks time particular operations. End-to-end latency measures the complete inference run, incorporating the costs around attention and elsewhere in generation. Those levels give different answers to the question of speed. The overall timing is the one that measures how long someone waits for the clip, while a kernel comparison can show which part of the design explains a change in that wait.

#### Fidelity against the dense reference

The authors report that Sparse VideoGen outperforms the acceleration baselines on PSNR, SSIM, and LPIPS in the main comparison. They report an average PSNR exceeding 29.55 for HunyuanVideo in the main quality evaluation and an average of 29.99 for CogVideoX-v1.5 text-to-video generation. They also describe CogVideoX-v1.5 text-to-video generation at 31% retained work for both attention patterns as having an average PSNR of 29.99. These numbers concern agreement with dense-attention generation. They are meaningful alongside the generation setting and the prompt collection used in the experiment.

The paper interprets MInference's poorer fidelity through the geometry of temporal attention. Its block selection uses mean pooling, which can miss a narrow diagonal pattern in the original token order. The relevant weights may occupy only part of an otherwise weak block, making the pooled score a poor guide to whether that block contains an important temporal connection. The paper's illustrated comparisons show blurring in one example and inconsistency in a tree trunk across frames in another. The examples connect a possible failure in mask selection to visible differences in the generated video.

The PAB comparison concerns a different kind of departure from dense attention. PAB reuses previously computed features, and the authors attribute the divergence they observe to that reuse. Sparse VideoGen computes with current values while restricting where each head can look. The quality comparison therefore covers interventions that preserve or discard different information. The spatial-only and temporal-only runs test choices within the attention calculation, and the caching run tests substitution of a prior result.

The paper also reports that HunyuanVideo can use FP8 sparse attention with a PSNR decrease of 0.1 and an efficiency gain of 1.3×. This comparison concerns adding quantization to the sparse computation. The authors explain that they did not use FP8 attention on CogVideoX-v1.5 because its head dimension of 64 limits arithmetic intensity and gave them no GPU speedup. Arithmetic intensity is the amount of calculation performed relative to the data that must be moved. The result shows why the paper evaluates the combination on the workload that benefits from it.

#### Time to generate a clip

The most concrete timing comparison follows HunyuanVideo through generation of a 5.3-second, 720p clip. The dense-attention run takes 2253 seconds. The Sparse VideoGen run takes 968 seconds. The paper reports a 2.33× end-to-end speedup for this comparison. It attributes the largest contribution in the runtime breakdown to sparse attention, with a reported improvement of 1.81× at that point in the breakdown. The full result includes the execution and kernel changes that accompany the sparse masks.

End-to-end latency for a 5.3-second HunyuanVideo clip at 720p Sparse VideoGen finishes the documented generation run sooner than dense attention.

**The numbers**

| System or setting | seconds |
| --- | --- |
| Dense attention | 2253 |
| Sparse VideoGen (this paper) | 968 |

The paper reports a speedup of up to 2.28× on CogVideoX-v1.5, and the main efficiency discussion also gives 2.28× as its reported average speedup. The HunyuanVideo example gives the highest headline speedup. The abstract separately reports a speedup factor of 1.51 for Wan 2.1. The appendix shows visual comparisons with dense attention for HunyuanVideo text-to-video, Wan 2.1 text-to-video, and Wan 2.1 image-to-video generation at 720p. For Wan 2.1, the headline speedup and the visual comparisons provide different forms of evidence from the detailed benchmark and breakdown reported for HunyuanVideo. [Wan](https://md.research.elamur.ai/free/en/papers/wan-2025-wan-open-advanced-large-scale/)

The kernel measurements explain how the system makes use of the reduced attention work. The authors report that their block-sparse attention kernel approaches the theoretical speedup across the sparsity settings they test. They also benchmark query and key normalization and rotary position encoding under a CogVideoX-v1.5 configuration with 4080 tokens per frame and 96 attention heads. Across the frame counts included in those tests, the reported average kernel speedups are 7.4× for QK-norm and 15.5× for RoPE relative to PyTorch. Those are operation-level results. Their effect on a complete generation run depends on how much time those operations occupied before the changes.

The end-to-end speedups reflect the share of latency that the system can change, the cost of identifying a sparse pattern, and the efficiency of the resulting GPU operations. The comparison with dense attention measures how those effects add up in the tested pipelines. It is possible for an individual kernel to improve substantially while having a modest effect on the complete run, or for a simple change to matter because it applies to the operation that dominates generation time.

### What the ablations show

#### Comparing the same sparse pattern in different layouts

The formal layout ablation uses the HunyuanVideo configuration to measure sparse attention with and without the rearrangement. Both versions have access to the temporal pattern. The version using the original order must work with strided positions, while the transformed version processes the corresponding temporal groups as contiguous blocks. Holding the sparsity setting fixed keeps the nominal retained computation comparable. The test then measures whether the layout makes that computation cheaper in practice.

At the 10% sparsity setting, the authors report an additional 1.7× speedup for the transformed implementation over the original sparse implementation, with a 3.63× overall improvement in the kernel comparison. Across the tested settings, the transformed implementation runs closer to the speedup predicted from the reduced operation count. The authors' explanation is that contiguous blocks make the retained arithmetic accessible to efficient GPU multiplication. The ablation tests the benefit under the hardware and dimensions used in the experiment.

This comparison is especially informative because the original sparse implementation has already removed much of the nominal work. Improving the layout can still make a substantial difference. If sparsity alone were sufficient to realize the arithmetic saving, the original implementation would follow the theoretical curve more closely. The gap between the two implementations shows the cost of asking the GPU to handle the temporal pattern in the same order in which the video tokens originally arrive.

#### How many queries the profiler needs

The authors compare sampled profiling with their all-row procedure. The all-row version evaluates the spatial and temporal outputs against dense attention for every query. It serves as the stronger reference for choosing between the same masks. The sampled version has access to fewer query outputs for making that choice. This comparison tests the cost of using less evidence for the assignment while keeping the candidate masks and error criterion in place.

On a random subset of VBench with CogVideoX-v1.5, the paper reports generation quality comparable for profiling 1% of the input rows and for profiling 100% of them. The methodology discussion describes the CogVideoX-v1.5 image-to-video sensitivity test as reaching up to 31.1 PSNR with the 1% setting and reports 3% runtime overhead for profiling relative to full attention. The all-row analysis in the motivation section, applied to CogVideoX-v1.5 and HunyuanVideo on VBench, reports PSNR over 29 when the sparse candidate is chosen using the complete comparison.

The generation-quality comparison supports using the smaller sample in the tested setup. It measures the result after the profiler's choices have been applied throughout generation. Comparable video quality leaves open how often the sample and the oracle chose the same mask. A disagreement can have little effect when both candidates produce similar outputs, while an occasional disagreement could matter more when their full-sequence errors are far apart. The experiment asks how the complete generation behaves with less profiling, which is the relevant outcome for the deployed method.

The oracle analysis also separates the suitability of the masks from the efficiency of the decision. If checking every row and selecting the lower-error mask caused large departures from dense generation, a cheaper selector would have limited value. The all-row result shows that the candidates can approximate the dense pathway under those test conditions. The sampled experiment shows how much of that measured quality remains when the authors reduce the amount of work used to choose between them.

#### How far the masks can be narrowed

A separate sensitivity test varies the retained attention work for HunyuanVideo using a random subset of VBench. The authors change the spatial and temporal mask widths and measure the resulting LPIPS. They report an LPIPS of 0.154 at a sparsity setting of 13%. In the paper's convention, that setting retains a smaller fraction of dense attention than the main settings around 30%. The authors report that LPIPS decreases as the retained fraction rises across the sensitivity comparison.

This experiment varies what each candidate is allowed to see, whereas the profiling comparison varies how much evidence the system uses to choose a candidate. More sampled queries can produce a more informed decision between the current masks. Wider masks can make either candidate closer to dense attention by giving it access to additional positions. The quality trend with width shows that the amount of context kept remains a meaningful setting even when the head type has been selected.

The test reports perceptual distance on the VBench subset. It shows how measured similarity responds to the work retained in that setting. The paper uses a width chosen for each principal generator in the main benchmark. It leaves to future work the possibility of making the width itself adaptive, in addition to the already adaptive selection of a spatial or temporal pattern.

#### What the fixed-pattern comparisons add

DiTFastAttn and the manually implemented Temporal-only baseline provide a comparison with consistently favoring one geometry. A spatial-only method retains detailed within-frame relationships over its temporal window. A temporal-only method prioritizes recurring spatial positions through the clip. Sparse VideoGen can give either rule to a particular head on the current input. The authors interpret its stronger quality scores as evidence that the two patterns are useful together and that the benefit depends on applying them where they fit.

The fixed-pattern baselines sit alongside the formal layout ablation and the sensitivity tests. They compare complete acceleration methods and therefore include differences in how those methods operate. Their role is to check whether the headline results can be explained by using a single video-specific pattern everywhere. The layout ablation addresses a narrower question about executing a given pattern. The profiling and width tests address decisions within Sparse VideoGen itself. Together they cover the choice of geometry, the amount of evidence used to make that choice, and the efficiency of the implementation.

### Limitations

#### Limits the authors state

The authors leave adaptive sparsity control for future work. In the reported main experiments, each generator has configured widths for the spatial and temporal masks. The part that adapts at runtime is which mask a head uses. A method that could also adjust the mask width by input, head, or denoising step would address an open question about how much context each decision needs. The reported sensitivity test provides evidence of a tradeoff under different widths while leaving that decision policy open.

The authors also identify a hardware constraint on combining the method with FP8. They report the quantized efficiency gain on HunyuanVideo and attribute the absence of a corresponding GPU gain for CogVideoX-v1.5 to its small head dimension. The gain from reduced precision therefore has a narrower demonstrated scope than the availability of the sparse masks. It depends on how much arithmetic the GPU can perform for the data it has to move in a particular attention configuration.

The paper offers a hypothesis about why matching positions across time can work. The authors suggest that slow motion in the training material could make same-position connections adequate for many of the temporal relationships the generator needs. They present this as a possible explanation. The evaluations show what the attention approximation does on the tested prompts. They leave the relationship between training-video motion and the learned temporal pattern open.

#### Limits of the evidence

The paper uses strong language about preserving quality. Its numerical evidence characterizes the size of the differences under particular measurements. PSNR, SSIM, and LPIPS compare an accelerated output to its dense counterpart, and VBench imaging quality and subject consistency address selected properties of the video. Pixel-identical reproduction would be a stronger claim than close scores on reference-based measures, and the finite reported errors quantify departures from the dense output. The visual comparisons help readers see what those departures can look like in particular clips.

The dense reference also sets the scope of the fidelity question. Close agreement shows that an intervention preserves much of what the original generation would have produced. The original generation may itself vary in how well it fulfills a prompt. The paper's imaging-quality and subject-consistency measures add information about the output, while the experiments leave broader judgments about preference and performance across different kinds of scenes open.

The mask selector solves a restricted decision problem. The all-row oracle tests the spatial and temporal candidates chosen by the authors and selects the one with smaller mean squared error. An unrestricted search over possible attention masks would answer a different question about what each head can usefully omit. Similarly, the sample test characterizes generation quality under random profiling in the tested setting. The chance of a consequential error under different prompts or sparsity settings, and exact assignment agreement across all heads and steps, remain separate questions.

Same-position attention across frames is a fixed geometric rule. A subject can change its position as it moves, and the temporal mask can retain more than a single spatial position. How well the resulting pattern covers large displacements depends on where the relevant information appears in the attention maps and on what the surrounding heads supply. The benchmarks quantify results for their prompt collections. The paper's motivation identifies temporal coherence as important, while the reported comparisons leave motion-specific robustness across a broader range of scenes open.

The arithmetic analysis describes the main video-token interactions and omits shared prompt and first-frame contributions for simplicity. GPU runtime also includes profiling, permutations, kernel execution overhead, and other stages of generation. The H100 timing gives a direct measurement in the specified configuration. The A100 example establishes the scale of the bottleneck in a separate setting. Scaling the same method to other sequence shapes or accelerators would put different demands on memory layout, tile utilization, and the costs of operations outside attention.

The paper uses several levels of evidence across generators. The main CogVideoX-v1.5 and HunyuanVideo experiments specify prompt sources and mask widths and report similarity and timing results. Wan 2.1 appears in the abstract's speedup claim and in the appendix's visual comparisons, which give a narrower basis for understanding its performance under different settings. The comparison also covers the named acceleration baselines. Claims of superiority apply to that experimental comparison and those settings, while the interaction with other sparsity rules or other ways of reducing diffusion cost remains open.

Finally, the benchmark protocol reflects the authors' judgment that early denoising steps are especially important. The reported baseline runs set aside the initial 25% of steps from their acceleration interventions. This conditions the speed and quality comparisons on a choice about when to approximate. The results bear on that schedule and the mask and profiling settings reported in the study. A schedule that introduces approximations at different points could shift both the time saved and the quality observed.

### What came after

The related work points to several ways of making attention cheaper. They share the problem of executing attention efficiently, but their titles and the paper's technical discussion identify different places to intervene. Some change which blocks are selected, some change the precision of their arithmetic, and others focus on the order or structure of the computation. The published dates also matter to the relationship. Sparse VideoGen discusses some of this work as existing context, so a technical connection does not on its own establish that a method originated as an extension of Sparse VideoGen.

#### Low precision and block selection

Sparse VideoGen cites SageAttention as work on low-precision attention. It describes the earlier technique as using smoothing to support INT8 arithmetic in the attention module. That contribution concerns how a set of comparisons is computed. Sparse VideoGen's masks determine which comparisons to perform. The paper demonstrates the compatibility of these two kinds of intervention by incorporating FP8 attention into its own block-sparse implementation. SageAttention is thus part of the numerical-efficiency context for the study, with a direct connection to the question of how cheaply retained interactions can be computed. [SageAttention](https://md.research.elamur.ai/free/en/papers/zhang-2024-sageattention-accurate-8-bit-attention/)

XAttention addresses the choice of retained blocks through antidiagonal scoring. Sparse VideoGen discusses it as a general method for identifying sparsity, and the title specifies the structure used to score candidate blocks. Sparse VideoGen starts its own selection from two geometries that recur in video attention, then scores those candidates by output error on sampled queries. The papers address the same need to identify important regions without first doing all of the work the sparse computation is intended to save. They locate the decision at different levels, one around scoring individual blocks and the other around choosing a video-specific mask for a head. [XAttention](https://md.research.elamur.ai/free/en/papers/xu-2025-xattention-block-sparse-attention-antidiagonal/)

#### Real-time generation and online permutation

MonarchRT puts efficient attention in the service of real-time video generation. This is the same application area in which Sparse VideoGen measures the time required to produce an entire clip. Sparse VideoGen's evidence concerns the effect of a particular sparse approximation and GPU implementation on end-to-end latency. MonarchRT's stated objective connects attention efficiency to a real-time generation requirement. The relationship established here is the application and the attention bottleneck it addresses. [MonarchRT](https://md.research.elamur.ai/free/en/papers/agarwal-2026-monarchrt-efficient-attention-real-time/)

S2O addresses early stopping in sparse attention through online permutation. Online rearrangement is also an ingredient in Sparse VideoGen, where a permutation makes the selected temporal interactions contiguous for block execution. In S2O's stated approach, permutation is tied to the decision to stop processing. In Sparse VideoGen, sampled error determines the mask, and permutation makes that mask efficient to execute. The connection is that the order of attention data can serve a computational purpose once the system has a way to prioritize some interactions over others. [S2O](https://md.research.elamur.ai/free/en/papers/zhang-2026-s2o-early-stopping-sparse-attention/)

## Cite

Cite as Haocheng Xi, Shuo Yang, Yilong Zhao, Chenfeng Xu, Muyang Li, Xiuyu Li, Yujun Lin, Han Cai, Jintao Zhang, Dacheng Li, Jianfei Chen, Ion Stoica, Kurt Keutzer and Song Han. 2025. Sparse VideoGen: Accelerating Video Diffusion Transformers with Spatial-Temporal Sparsity. arXiv:2502.01776.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2502.01776](https://doi.org/10.48550/arxiv.2502.01776) · [arXiv 2502.01776](https://arxiv.org/abs/2502.01776)

```bibtex
@misc{xi2025sparse,
  title = {{Sparse VideoGen: Accelerating Video Diffusion Transformers with Spatial-Temporal Sparsity}},
  author = {Haocheng Xi, Shuo Yang, Yilong Zhao, Chenfeng Xu, Muyang Li, Xiuyu Li, Yujun Lin, Han Cai, Jintao Zhang, Dacheng Li, Jianfei Chen, Ion Stoica, Kurt Keutzer and Song Han},
  year = {2025},
  doi = {10.48550/arxiv.2502.01776},
  eprint = {2502.01776},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2502.01776}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
