Home · ASPLOS 2026 · Machine Learning Systems

Dynamic Sparsity in Large-Scale Video DiT Training

Xin Tan, Yuetao Chen, Yimin Jiang, Xing Chen, Kun Yan, Nan Duan and 3 others

Conference
ASPLOS 2026
Published
2026
Pages
101-116
Citations
1

Training a diffusion transformer to generate high-definition video is throttled by 3D full attention, whose cost grows with the square of the token count and can eat up to 95 percent of the time; most of that attention turns out to be wasted because a few key-value pairs dominate, but in video the important ones move around unpredictably and differ head by head, so fixed-sparsity tricks fail; this paper (CUHK and StepFun — Xin Tan, Hong Xu, and colleagues) builds DSV, which trains a tiny low-rank predictor per attention head to guess the critical pairs cheaply without breaking the fused attention kernel, computes attention only on them with custom kernels, and rebalances the now-lopsided work across GPUs with a hybrid sparsity-aware context parallelism, reaching up to 3.02 times higher training throughput on 520,000-token sequences across 128 GPUs with no quality loss.

The argument in one glance

  1. Problem

    Video generators drown in attention as clips get longer

    Diffusion Transformers are the state of the art for turning text into high-quality video, but training them on high-definition, lengthy clips is punishing. The heart of the model is 3D full self-attention, which lets every video token attend to every other, and its cost grows with the square of the number of tokens. A high-definition or long video, even after being compressed into a latent representation, can reach hundreds of thousands of tokens, at which point attention can consume up to 95 percent of the processing time and a single GPU can no longer hold the whole sequence in memory. So the very mechanism that makes these models good is also the wall that stops them from scaling to the videos people actually want to generate.

  2. What people did

    Exploit the sparsity — most attention is nearly wasted

    A hopeful observation is that attention is extremely sparse: the scores follow a power-law, so for any query only a small handful of key-value pairs carry almost all the weight and the rest contribute little. If you could compute attention over just those critical pairs, you would skip the overwhelming majority of the work. Language-model systems already do this using known, fixed patterns such as attention sinks or sliding windows.

  3. Why it fell short

    In video the important pairs move, and finding them costs what you saved

    The catch is that sparsity in video DiTs is dynamic. Unlike language models, the critical key-value positions have no clear locality or fixed pattern; the sparsity level and pattern differ from block to block, differ across attention heads within the same block, and intensify as training proceeds. So any method assuming a fixed pattern fails here. The obvious alternative — actually computing the full attention scores to find the important pairs — defeats itself twice: extracting the whole attention matrix breaks the I/O-aware fused kernels that make training fast, and by the time you have the scores you have already done most of the attention work, erasing the savings.

  4. This paper's idea

    Predict the critical pairs cheaply, compute only those, and rebalance across GPUs

    DSV exploits the dynamic sparsity without ever computing full attention. For each attention head it trains a tiny low-rank predictor — two small matrices that approximate the query-key product at a fraction of the cost — and uses it to guess which key-value pairs are critical, all without tearing open the fused attention kernel. Custom kernels then estimate the critical pairs and compute sparse attention over only them in a single efficient pass. Because different heads and blocks end up with very different amounts of work, DSV adds a hybrid sparsity-aware context parallelism that rebalances the now-skewed load across GPUs and exchanges only the critical pairs between them. A two-stage schedule keeps quality intact by training full at first and turning on sparsity once the predictors are trustworthy. The result is up to 3.02 times higher training throughput at 520,000 tokens across 128 GPUs, with no quality loss.

Why this problem is worth solving

The bottleneck is not incidental; it is the dominant cost of the whole training run.

A Diffusion Transformer learns to generate video by repeatedly denoising, and its central operation is 3D full self-attention over the video’s spatiotemporal tokens: every token attends to every other, so the query, key, and value sequences all equal the full token count. That makes the cost quadratic in the number of tokens, and because the attention is non-causal (unlike a language model’s left-to-right masking), there is no triangular shortcut. Cross-attention to the text prompt is cheap by comparison, since the prompt is only a hundred or so tokens, but self-attention scales with the video. As resolution and length rise, the token count climbs into the hundreds of thousands, and measurements show self-attention taking on the order of 92 to 95 percent of the forward and backward compute in models at these sequence lengths. Two things follow. First, any speedup to training must come from attention, because nothing else is large enough to matter. Second, the sequence no longer fits on one GPU, so attention must be split across devices, which drags communication into the problem too. This is why a video DiT’s trainability is essentially decided by how efficiently its attention runs.

Sparsity is the obvious lever, but the shape of the sparsity here is what makes it hard.

Attention being sparse means that, for a given query, only a small subset of key-value pairs have scores large enough to matter — formally, the critical set is the top pairs that together account for, say, 90 percent of the total attention. If you knew that set in advance you could compute attention over it alone and skip the rest. In language models the critical positions tend to sit in predictable places, such as the first few tokens (sinks) or a local window, so a fixed sparse pattern works. Video DiTs break all of those assumptions at once. The critical positions have no clean spatial locality, so you cannot point to a fixed region; the sparsity level and the pattern differ from one transformer block to another and even from one attention head to another inside the same block; and the sparsity deepens as training goes on, so a pattern measured early is wrong later. This is dynamic, heterogeneous sparsity, reported here for video DiTs for the first time, and it means the important pairs must be located afresh, per head, throughout training. That requirement is exactly what defeats both fixed-pattern methods and brute-force score computation, and it is the constraint the whole design must satisfy.

What people did before, and where it broke

  • Full 3D attention with I/O-aware fused kernels. Compute dense attention efficiently using kernels like FlashAttention that never materialize the full score matrix. Where it broke. Even at peak efficiency the work is quadratic in tokens, so at hundreds of thousands of tokens attention still dominates training and the sequence overflows a single GPU’s memory.
  • Fixed sparse-attention patterns from language models. Reuse known patterns — attention sinks, sliding windows — to attend to a predetermined subset. Where it broke. Video DiT sparsity has no such fixed structure; the critical positions lack locality and shift across blocks, heads, and training time, so a fixed pattern misses the pairs that actually matter and degrades quality.
  • Compute the full scores, then select the top pairs. Get the real attention scores and keep the critical ones. Where it broke. Extracting the full attention matrix tears up the fused kernels that make training fast, and computing the scores is already most of the attention cost, so almost none of the potential savings survive.
  • Standard context parallelism for the long sequence. Split the sequence across GPUs with head-wise or sequence-wise context parallelism to fit and parallelize attention. Where it broke. These assume each head has uniform cost; once sparsity makes some heads far cheaper than others, head-wise splitting creates stragglers, and sequence-wise splitting still ships all key-value pairs between devices regardless of which are critical, wasting communication.
  • The gap. No system located the dynamic, per-head critical pairs cheaply enough to be worth it — without breaking the fused kernel or paying full attention cost — and then reorganized the cross-GPU parallelism around the resulting uneven, sparsity-dependent workload.

How DSV works

From dense attention to predicted-sparse attention, rebalanced across GPUs

  1. new

  2. new

  3. new

  4. new

  5. new

The idea

Predict the sparsity cheaply instead of measuring it expensively. The trap that defeats brute force is that finding the critical key-value pairs seems to require the very attention scores you are trying to avoid computing. DSV’s central move is to break that circularity with a cheap surrogate: for each attention head it trains two small low-rank matrices whose product approximates the real query-key scores, at an inner dimension of sixteen instead of the full head dimension, adding under ten million parameters to a three-billion-parameter model. This predictor is accurate enough to rank the pairs and pick the critical ones, yet cheap enough that using it does not eat the savings — and crucially, because the selection runs on the predictor rather than on the real attention, DSV never has to crack open the fused attention kernel that makes training fast. Learning a small, cheap model that forecasts which parts of a computation matter, so the expensive computation can skip the rest, is the same instinct the work on detecting and omitting weak attentions covered elsewhere on this site is built on, deciding in advance which attention scores are worth computing rather than computing them all to find out.

Turn the prediction into speed with kernels that never materialize what they skip. A correct list of critical pairs is only useful if the hardware can act on it efficiently; a sparse computation implemented naively can easily be slower than the dense one it replaces. So DSV pairs its predictor with custom kernels that fuse the critical-KV estimation and the sparse attention into a single pass, keeping intermediates on-chip and never building the full score matrix. It also exploits a measured regularity — neighboring queries tend to attend to similar critical pairs — by grouping queries so a selected set of keys and values is reused across them, which both amortizes the selection and improves locality. Co-designing the sparse algorithm with specialized fused kernels so that the theoretical savings actually appear on the GPU is the same discipline the video-transformer acceleration work covered elsewhere on this site relies on, restructuring the attention computation itself so that skipping work translates into real wall-clock gains rather than kernel overhead.

Once the work is uneven, the parallelism has to be redesigned around it. Sparsity does not just make attention cheaper; it makes it lopsided, because different heads and blocks end up with wildly different amounts of surviving work. That wrecks the assumption behind standard context parallelism, which splits the long sequence across GPUs as if every head cost the same: head-wise splitting then leaves some GPUs idle waiting on the heaviest head, and sequence-wise splitting still ships every key-value pair between devices even though most are not critical. DSV answers with a hybrid sparsity-aware context parallelism that reallocates heads by their real sparse workload and gathers only the critical pairs across the network, and it picks the best hybrid configuration for each block by solving an optimization that balances load against communication. Recognizing that a distributed training system must reshape how it partitions and communicates once the per-device workload becomes skewed is the same concern the large-model 3D-parallelism training work covered elsewhere on this site is organized around, tuning how computation and communication are split so that no device becomes the straggler that stalls the rest.

Following an attention block through DSV

Computing one sparse attention block during video DiT training

A trace, drawn from the paper's design, of how DSV replaces a dense attention block with a predicted-sparse one while preserving quality.

Step 1 of 5

Early training: run full attention, train the predictor

In the first stage, the block computes ordinary full attention so the model learns normally. Alongside it, and off the main computation graph, DSV trains the block's two low-rank matrices so their product tracks the real query-key scores, using a loss that preserves the relative magnitudes of the scores.

The predictor updates during the forward pass and avoids storing the full score tensor, keeping its memory and compute overhead small.

Why it works

  • A low-rank predictor breaks the find-it-to-skip-it circularity. Locating critical pairs seems to need the full scores you want to avoid → but a cheap low-rank approximation ranks the pairs accurately at a fraction of the cost → so DSV finds the sparsity without paying for full attention or breaking the fused kernel.
  • Running selection off the real kernel preserves I/O efficiency. Extracting the true attention matrix would disrupt the I/O-aware fused kernels → but the predictor lives beside the main graph and selects from its own approximation → so the fast attention kernel stays intact and the savings are not eaten by overhead.
  • Fused sparse kernels turn skipped work into real speed. A naive sparse computation can be slower than dense on a GPU → but custom kernels fuse estimation and sparse attention in one on-chip pass and reuse selections across grouped queries → so the theoretical sparsity becomes actual throughput, up to 3.02 times.
  • Rebalancing removes the stragglers sparsity creates. Uneven per-head work makes uniform context parallelism stall on the heaviest device → but reallocating heads by real workload and gathering only critical pairs evens the load and cuts traffic → so scaling to 128 GPUs and 520,000 tokens stays efficient.
  • Two-stage gating keeps quality while cutting cost. Turning on sparsity too early, or where the predictor is inaccurate, would hurt the model → but training full until the predictor’s error is low and going sparse only in sufficiently sparse blocks protects the result → so DSV matches full-attention video quality.

What it costs (trade-offs and scope)

  • The predictor is an approximation, and quality rides on it being good. The whole speedup depends on the low-rank query-key product faithfully ranking the critical pairs; the two-stage gating and the approximation-loss threshold are the guardrails, but a head whose true attention resists low-rank approximation could have its critical pairs mis-selected, so the accuracy of the surrogate is a real dependency.
  • There is extra machinery and overhead to run. DSV adds per-head predictor matrices trained continuously, a sparsity profiler, custom kernels, and an optimization solver for the parallel configuration; the parameter cost is small (under ten million for a three-billion model) and the predictor training is off the main graph, but it is still additional complexity and compute that a plain dense trainer does not carry.
  • Benefits depend on how sparse the workload actually is. Sparsity intensifies during training and varies by block, so early in training or in blocks that stay dense, DSV keeps full attention and gains little there; the reported speedups reflect long sequences and later training where sparsity is high, not every phase or configuration.
  • The gains are largest at long sequences. The up-to-3.02-times throughput and 3.5-times latency numbers are for input lengths up to 520,000 tokens; at shorter sequences, where attention is a smaller fraction of the cost and less sparse, the payoff is smaller, so DSV targets the long, high-definition regime specifically.
  • Evidence is a specific system and models. Results come from a PyTorch FSDP-based implementation on models up to a few billion parameters (a case study on a 2.7-billion MovieGen-like model) trained on video datasets across up to 128 H100 GPUs; behavior on much larger models, other hardware, or other data is inferred rather than exhaustively shown.

The evaluation

Scaling attention in long-sequence video DiT training

PropertyFull attentionFixed sparse patternDSV
Finds the critical KV pairs
Keeps the fused attention kernel
Handles per-head workload skew
Cross-GPU communication
Reported outcome
A comparison drawn from the paper. DSV is built on PyTorch FSDP and evaluated on video DiT models up to a few billion parameters across up to 128 H100 GPUs at sequence lengths to 520,000 tokens; the 3.02-times and 3.5-times figures are the paper's reported results, with quality on par with full attention.Underlined values explain themselves when clicked.

Check yourself

Check your understanding

  1. 1. Why does the sparsity in video DiT attention resist the fixed-pattern methods that work for language models?

  2. 2. What is the circular problem DSV solves, and how does its low-rank predictor break it?

  3. 3. Why does DSV need a new context-parallelism strategy once it introduces sparsity?

  4. 4. What are DSV's main results, and how does it protect model quality?

Sources

The paper is “Dynamic Sparsity in Large-Scale Video DiT Training” (the system is named DSV, “Exploiting Dynamic Sparsity to Accelerate Large-Scale Video DiT Training”) by Xin Tan, Yuetao Chen, and Hong Xu (The Chinese University of Hong Kong), Xing Chen, Kun Yan, Nan Duan, Yibo Zhu, and Daxin Jiang (StepFun), and Yimin Jiang, published at ASPLOS 2026, DOI 10.1145/3760250.3762216. It is licensed CC BY.

This explainer is based on the paper’s full text, obtained from the authors’ arXiv preprint (arXiv:2502.07590). The account of the mechanism — the quadratic 3D full-attention bottleneck in video DiT training; the empirical observations of dynamic, heterogeneous, training-intensifying attention sparsity (power-law scores, no locality, per-block and per-head variation, and query similarity among neighbors); the per-head low-rank query-key predictor trained off the main computation graph with a magnitude-preserving loss; the two-stage schedule gated on the predictor’s approximation loss; the custom fused kernels for critical-KV estimation and sparse attention with query grouping; and the hybrid sparsity-aware context parallelism that reallocates heads by workload and selectively gathers critical key-value pairs, chosen per block by an optimization balancing load and communication — follows the paper’s own description. The reported results cited here are the paper’s own: up to 3.02 times higher training throughput and up to 3.5 times lower end-to-end latency at input lengths to 520,000 tokens, scaling to 128 GPUs, with video quality on par with full attention, implemented on PyTorch FSDP. Exact per-configuration numbers, the predictor and threshold settings, and the parallelism optimization details should be read from the paper itself.

Related papers on Machine Learning Systems

See all 212 →