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

C. Theoretical Analysis of Sparse Video Attention
Here we provide the theoretical analyses of SVG. Consider a video with N frames, each containing F tokens. Every
token can be encoded by an indices pair (i, j), where 0 ≤ i < N, 0 ≤ j < F . In the attention map we will flatten these
two-dimensional indices into a 1D vector. Corresponding formula is x = i · F + j.

Spatial Head
For spatial head, let a1 > 0 denote the threshold for spatial closeness between tokens. The spatial attention mask is defined
as:                                                                  (
                                                                      1 if |i1 − i2 | < a1 ,
                                       fs ((i1 , j1 ), (i2 , j2 )) =
                                                                      0 otherwise

For flattened indices x1 = i1 · F + j1 and x2 = i2 · F + j2 ,
                                                                jx k         jx k
                                                                     1         2
                                          fs (x1 , x2 ) = 1 ⇔            −          < a1
                                                                     F        F
The resulting attention map takes the form of block-banded structures: the attention mask will be on the main diagonal and
also on neighboring ±(a1 − 1) diagonals.

Temporal Head
For temporal head, let a2 > 0 denote the threshold for temporal closeness between tokens. The temporal attention mask is
defined as:                                                        (
                                                                    1 if |j1 − j2 | < a2 ,
                                     ft ((i1 , j1 ), (i2 , j2 )) =
                                                                    0 otherwise

For flattened indices x1 = i1 · F + j1 and x2 = i2 · F + j2 ,

         ft (x1 , x2 ) = 1 ⇔ |(x1 mod F ) − (x2 mod F )| < a2 ⇔ ∃k, 0 ≤ k < 2N − 1, |(x1 − x2 ) − kF | < a2

The resulting attention map forms 2N − 1 slanted diagonals that align along constant column index differences. These
diagonals, often referred to as “slashes,” correspond to the token positions sharing similar temporal locations across frames.
The corresponding points in the attention matrix yield a “slash-wise” pattern with width a2 .




                                                                17
