Paper commentary
CLiS: Plug-and-Play Attention Acceleration for Video Diffusion on TPUs via Certified Stabilization
CLiS fixes softmax shifts per row to speed up video diffusion attention on TPUs
- Problem Online softmax stalls long-context attention on TPUs because it repeats a row-maximum reduction and accumulator rescaling on every key block. That chain costs as much as the matrix products, so it limits generation latency.
- Method CLiS computes one shift per query row before the key loop, so the loop skips the maximum reduction and rescaling. It certifies each head first and falls back to online softmax when certification fails.
- Results On Wan 2.2 and LTX-2 across TPU v6e and TPU7x, CLiS cuts diffusion transformer step latency by up to 19.6% compared with tuned online softmax, without measurable quality loss.
Why softmax stalls long-context TPU attention
Softmax stalls long-context TPU attention because its cost rivals the matrix products, even though matmuls dominate the FLOP count. Exponentiation alone matches the matrix work at head dimension 128, which is the size Wan 2.2 and LTX-2 use. On TPU7x, the vector-unit maximum reduction and rescaling push the full softmax cost past the matrix work.
The compiler's low-level optimizer schedules show this imbalance in the final VLIW bundles, not only in a FLOP model.

Figure 2 . (1)Each unit’s modeled share of cycles per attention score (work divided by peak throughput). At d=128 (dotted line, used by Wan 2.2 and LTX-2), exponentiation alone matches the matmuls. On TPU7x, vector-unit max reduction and rescaling push softmax past them.(2)Exposed softmax in the compiled VLIW bundle schedule for Wan 2.2 DiT self-attention (one KV-block iteration) on TPU7x.
Original paper · CC BY 4.0Online softmax keeps a running row maximum m, a normalization accumulator ℓ, and an output accumulator o. For each key block j, it computes a block maximum, updates m, and computes a correction factor α. Every block that raises the maximum forces a rescale of the accumulated sums ℓ and o.
A fixed per-row shift removes both the block maximum reduction and the rescaling, so the chain disappears from the loop. That shift has to sit in a narrow band, though, because the numbers must stay within floating-point range. If the shift lies too far below a row's maximum, exponentials overflow, and if it lies too far above, they underflow to zero.
The exact maximum avoids both failures, but computing it costs an extra pass over all attention scores.
So the real question is how to certify a safe fixed shift at negligible cost, which CLiS addresses per head. Prior GPU work only moves partway there, since FlashDecoding++ recomputes rows that violate its shared shift.
A fixed per-row shift instead of a running maximum
A loop-invariant stabilizer swaps the running row maximum for one shift that is computed once per row before the key-block loop. CLiS computes that shift as B_i minus a recentering constant C, so the same value serves every key block of the query block. Inside the loop, only the exponentials and the accumulation remain, so the per-block maximum reduction and the rescale disappear.
Certified heads take this path, and uncertified heads keep standard online softmax.
The swap can't change the math, since softmax is invariant to a uniform shift in exact arithmetic. The risk lives in floating point, where a stabilizer that sits too far below the row maximum makes exponentials overflow. A stabilizer that sits too far above the maximum pushes exponentials to underflow toward zero. The per-row bound B_i keeps the shift near the logits, which is why the certificate checks it before the loop.
The kernel in Algorithm 1 computes the shift for each query block once, while the query block sits on chip. It then runs the KV loop with exp2 of the score minus the shift, and it adds the row sums without any rescale. Certified heads still apply an online update on the final partial KV block, so they reduce the row maximum only there. Each head picks its path before the loop, so the eligibility check stays outside the KV loop.
How the certificate picks the shift
The certificate starts by centering the keys, which fixes the bound that the shift is built from. The mean of the valid key tokens is computed and subtracted from every key, giving centered keys. For each query, this subtracts the same scalar from every logit in its row, so attention is preserved. After centering, each row's maximum logit is at least zero in exact arithmetic.
Cauchy–Schwarz then bounds that maximum by B_i, with κ the largest centered key norm and B_i = ⌈‖q_i‖₂ κ⌉. Each attention head is certified on its own, and the statistics for one head never combine with another head's.
The loop-invariant shift is μ_i = B_i − C, where C is an integer recentering constant. Using B_i directly can underflow when the bound is loose, so CLiS subtracts C to raise every exponent argument. This keeps exponent arguments bounded above by C while still allowing positive values. The certificate requires C − B_h − ρ ≥ L_exp and C ≤ U_exp, so the row keeps a nonzero denominator and exponentials stay finite.
A third condition, C + ⌈log₂ N_k⌉ + G < U_acc, reserves FP32 headroom for summing over N_k keys. The implementation sets ρ to 1 and picks the largest feasible integer C, and a head with no feasible C uses online softmax.
A single shared shift wouldn't work, because logit ranges differ across rows and heads. The kernel computes B_i and μ_i once per query block while Q_i sits on chip. Each head picks its execution path before the KV loop, so eligibility checks stay outside the loop. Any final partial key block still gets an online update, and certified heads run a row-maximum reduction only on that block.
What the removed work buys in latency
On one compiled KV-block iteration of Wan 2.2 on TPU7x, the fixed stabilizer cuts the schedule from 23,185 to 17,556 bundles. Spill stores fall by 48%, so fewer live values travel between vector registers and VMEM. These counts describe issued instructions rather than elapsed cycles, so they show less scheduled work, not a measured time saving.

Figure 5 . Online-stabilization overhead for one compiled KV-block iteration.Wan 2.2 on TPU7x, generating a 5 s, 720p video (81 frames), at identical tile sizes.(a)A loop-invariant stabilizer µi removes the reduction and rescaling chain.(b–c)Compiled VLIW schedules. Fixed stabilization reduces VPU-only issue bundles and shortens the schedule by 24.3%.(d–e)Scheduled bundles, VPU vmaxreductions, VPU-only issue bundles, and VREG spill stores. Counts describe instruction issue, not elapsed unit-active cycles.
Original paper · CC BY 4.0 · Elisa Tsai, Shao-yu Huang, Daniel Mandragona, Wei-Yu Lin, WenXin Dong, Jevin Jiang, Chandra Devarakonda, Mehdy Bohlool, Yixin Shi · CLiS: Plug-and-Play Attention Acceleration for Video Diffusion on TPUs via Certified Stabilization · Original paper figure · Extracted the figure area from page 4 of the original PDF.Taking out the running-maximum work and the rescaling trims DiT-step latency by 7.5% in a runtime ablation. Removing all softmax work cuts DiT-step latency by 8.2%, so stabilization accounts for 91% of the removable softmax overhead. The fixed stabilizer keeps exponentiation in the loop and drops only the rest of the stabilization chain.
Across the measured Wan 2.2 and LTX-2 workloads, CLiS cuts attention-kernel latency by 9.4 to 24.0% against tuned online softmax. The kernel reduction doesn't rise steadily with sequence length, so the gain isn't only a long-context effect. DiT-step latency drops by 3.1 to 19.6%, a smaller share because attention changes leave the rest of each step untouched.
Both TPU v6e and TPU7x show the gain, and the absolute latencies appear in Tables 8 and 9 of Appendix C.

Figure 7 . Normalized attention-kernel latency for CLiS and baselines, relative to online softmax (1.0×). Lower is better. All runs use eight TensorCores with CFG=2×Ring=4 (Ulysses=1). Panels (a1)–(d2) use focused axes. Out-of-range bars are clipped and labeled with their measured ratios. Crosses mark corrupted outputs.
Original paper · CC BY 4.0VFA can cut latency, but it corrupts outputs on 9 of 10 workloads each for Wan 2.2 and LTX-2. CLiS produces valid outputs on all ten Wan 2.2 workloads on TPU7x, so its latency gains come with valid results.
Valid outputs and unchanged generation quality
CLiS produced valid outputs on all ten Wan 2.2 workloads on TPU7x, and so did the FD++-style and FA4-style baselines. Valid here means no NaN or Inf values and no all-zero outputs, which the table counts per workload. The VFA-style baseline produced valid outputs on only 1 of 10 workloads, failing on nine. VFA freezes an approximate maximum without a safety guarantee, so the failure shows what an uncertified stabilizer does without a recovery mechanism.
CLiS avoids this failure because it certifies each head before using the loop-invariant shift and falls back to online softmax otherwise.
The attention output of CLiS differs from online softmax by 2.7×10 −3 in relative ℓ2 error. The authors describe this error as comparable to the valid FD++-style and FA4-style baselines, which show 2.73×10 −3 and 2.05×10 −3. CLiS preserves attention in exact arithmetic, so this error comes only from floating-point effects. Its largest maximum absolute error is 3.1×10 −2, matching the FD++-style and FA4-style baselines.
To check generation quality, the authors scored videos with selected VBench metrics, using 110 prompts with matched seeds at 720p with 81 frames. The VBench deltas are measured against online softmax, and the largest difference for CLiS is +0.0110 on imaging quality. CLiS's other deltas stay small, at +0.0015 on subject consistency and +0.0004 on temporal flicker.
The authors read these small differences as no material drop in generation quality in this evaluation.
How often the fallback fires and what it prevents
The fallback to online softmax fires on only a small share of head evaluations in the Wan 2.2 run. In the 40-step run at 720p with 81 frames, CLiS keeps loop-invariant stabilization for 98.22% of head evaluations. The remaining 1.78% fall back to online softmax, as Table 2a reports. Per expert, the high-noise expert falls back at 1.46% and the low-noise expert at 1.93%.
Figure 8 shows the fallback rate staying near 2% across sequence lengths and denoising steps.
The authors replayed the 84 rejected head sites without the fallback to see what would break. In that replay, 23 sites would produce NaNs. One further site would zero out a ring shard's weights.
So the certificate is conservative, yet it catches the cases that need the fallback for numerical safety. Maximum reductions still mostly disappear under the hybrid implementation. Relative to online softmax, the hybrid removes 93.05% of reduce-max operations. It also removes 95.79% of score-row reductions.
Carrying the idea into causal LLM training
The authors ran a preliminary check of the forward-pass idea on causal LLM training, using causal Splash and Ring Attention on TPU7x. They trained four model families: 8K scratch pretraining for 1,500 steps on C4, ClimbMix and FineWeb-Edu, plus 8K SFT on UltraChat. They also ran 128K to 256K continual pretraining with Ring Attention on PG-19, and 512-chip FP8 MLA training of DeepSeek-V3-671B.
At 8K context, CLiS speeds up end-to-end training steps by 6.7% to 8.9% on Qwen3-8B and Llama-3.1-8B. At 128K and 256K, Ring Attention takes a larger share of each step, so forward attention kernel latency falls by 33.4% to 43.6%. In those same settings, end-to-end step throughput rises by 11.6% to 19.0%. On 512-chip DeepSeek-V3-671B, CLiS cuts forward Splash kernel time by 22.1%.
Final-50 training loss under CLiS lands between −0.18% and +0.11% relative to online softmax in every certified run. That spread is smaller than the ±0.30% to ±0.56% shift that changing the online-softmax KV reduction block size from 512 to 256 causes. Models with bounded query-key norms, from QK-Norm or pretrained checkpoints, keep 95.5% to 100% of their heads certified through training.
Training Llama-3.1-8B from random initialization without QK-Norm is the failure case the authors report. Its logits grow past the FP32 exponent budget by step 40, so the certificate falls back to online softmax and prevents NaNs.
What the certificate and the evidence leave untested
CLiS's certificate is conservative, so some heads that would have stayed safe still take the fallback path. The authors replayed the 84 rejected head sites with a fixed shift, and 60 of them would have been numerically harmless. The fallback still covers 1.78% of head evaluations in the 40-step Wan 2.2 run at 720p with 81 frames. Even so, the hybrid path removes 93.05% of reduce max operations relative to online softmax, so the fallback cost stays small.
The kernel and DiT-step results cover only Wan 2.2 and LTX-2, measured on TPU v6e and TPU7x. They didn't test other video diffusion models or other TPU generations. Quality checks use VBench on 110 prompts at 720p and 81 frames. The GPU baselines were ported to TPU, so their numbers reflect the authors' adaptations rather than the original methods.
The causal LLM results are preliminary, and the authors ran them on TPU7x only. Certification depends on bounded query-key norms, which hold for QK-Norm models and pretrained checkpoints. Those models keep 95.5% to 100% head certification throughout training. Training Llama-3.1-8B from random initialization without QK-Norm lets logits grow past the FP32 exponent budget by step 40.
In that setting the certificate falls back to online softmax, so the speedup doesn't carry over.
Paper info
- Authors
- Elisa Tsai, Shao-yu Huang, Daniel Mandragona, Wei-Yu Lin, WenXin Dong, Jevin Jiang, Chandra Devarakonda, Mehdy Bohlool, Yixin Shi
- Venue
- arXiv · Preprint
- First published
- 2026-10-30
- Added
- 2026-11-7
- Updated
- 2026-10-30
- Version
- v1
- arXiv
- 2611.00444
- Category
- cs.LG
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
High-resolution video diffusion relies on attention over long token sequences, making attention efficiency critical to generation latency. Our analysis identifies repeated maximum reductions and accumulator rescaling in online softmax as a bottleneck in long-context TPU attention. We propose CLiS (Certified Loop-invariant Stabilization), a training-free, plug-and-play optimization for video diffusion inference. CLiS fixes per-row stabilizers before the KV loop and certifies numerical safety per head, falling back to online softmax when certification fails. It integrates into existing fused-attention kernels without changing model weights or architecture. On Wan 2.2 and LTX-2 across TPU v6e and TPU7x, CLiS reduces diffusion transformer (DiT) step latency by up to 19.6% relative to tuned online softmax without measurable quality loss. Controlled TPU adaptations of prior GPU stabilization methods show performance or numerical-safety limitations. Preliminary causal LLM experiments also show up to 13.5% higher training throughput in continued pretraining and 7.7% in supervised fine-tuning.
Quote from the paper
Elisa Tsai, Shao-yu Huang, Daniel Mandragona, Wei-Yu Lin, WenXin Dong, Jevin Jiang, Chandra Devarakonda, Mehdy Bohlool, Yixin Shi (2026). CLiS: Plug-and-Play Attention Acceleration for Video Diffusion on TPUs via Certified Stabilization. arXiv:2611.00444v1. https://arxiv.org/abs/2611.00444v1
BibTeX
@misc{tsai2026clis,
title = {{CLiS: Plug-and-Play Attention Acceleration for Video Diffusion on TPUs via Certified Stabilization}},
author = {Elisa Tsai and Shao-yu Huang and Daniel Mandragona and Wei-Yu Lin and WenXin Dong and Jevin Jiang and Chandra Devarakonda and Mehdy Bohlool and Yixin Shi},
year = {2026},
eprint = {2611.00444},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.00444v1}
}