Start with one long video
Generate an image or video
A diffusion model repeatedly denoises a large set of visual tokens. Dense attention lets every token exchange information with every other token.
75K noisy tokens → cleaner tokens
At each denoising step, attention transforms the current visual-token sequence into contextualized features used for the next prediction.
Quadratic pair count
Doubling sequence length roughly quadruples dense query–key comparisons, and makes attention dominate long-video inference.
Source: paper Introduction and Section 2. The 75K-token example is illustrative of the long-video regime, not a benchmark input fixed by the method.
The complete idea in one pass
Scroll horizontally to inspect the complete pipeline.
Formalized from Sections 3.1–3.2, Equations (4), (9), (10), and (11), and Algorithm 1.
Unselected blocks still matter
SOL-Attn does not simply erase low-scoring blocks. It retains their aggregate probability mass and value contribution at block resolution.
No learned coarse/fine gate
VSA trains separate coarse and fine outputs and combines them with learned gates. SOL-Attn is training-free and merges both paths into one online-softmax calculation.
Dynamic threshold: one knob, query-specific budgets
Standardize before deciding
raw threshold for query block i
mean proxy score for query i
shared sparsity control
proxy-score standard deviation
selected exact blocks
key-block and query-block indices
pooled block proxy score
comparison, definition, addition, set condition and punctuation
Running example: with beta 1.04, a roughly Gaussian score row retains about its upper 15%—but this query may keep more or fewer than the average.
Visual mapping: the slider below controls beta; green blocks satisfy the set condition and violet blocks take the approximate path.
Source: Section 3.1, Equation (4).
No complete proxy map is needed
mean query vector in block i
mean key vector in block j
number of key blocks
transpose
mean and variance
sum over pooled key blocks
indices and powers
operators, grouping and punctuation
Running example: the 16 pooled keys provide one mean and one second-moment summary; every query block gets its own mu and sigma from those summaries.
Visual mapping: this is the threshold-computation stage before the proxy-score stream in the overview.
Source: Section 3.1, Equation (5). The paper also gives a cheaper diagonal estimator in Equation (15).
Try the beta threshold on 16 illustrative proxy scores
This teaching control applies Equation (4) to fixed standardized scores. It is not a reproduced benchmark.
Green = exact path; violet = approximate correction. The fixed scores are an illustrative running example; the selection rule is Equation (4).
Approximate correction: why the value is summed
Every approximated block still represents B tokens
softmax denominator for query block i
unselected and selected block sets
tokens per block
query-token matrix
pooled and original keys
row reduction and exponential
output domain and shape
indices, operators, grouping and punctuation
Running example: if each block contains 64 tokens, one approximate proxy logit represents 64 denominator terms—not one.
Visual mapping: violet blocks contribute the first term; green blocks contribute the second.
Source: Section 3.2, Equation (9). Source-only color-box commands are omitted visually; all mathematical terms are preserved.
The summed value preserves the block’s aggregate contribution
unnormalized value numerator
unselected and selected block sets
query-token matrix
pooled and exact keys
summed and original values
unnormalized attention weight
output domain and shape
indices, operators, grouping and punctuation
Running example: each violet block supplies one pooled-key score and its sum of 64 value vectors; each green block supplies its original 64 keys and values.
Visual mapping: both colored paths terminate at the same dark online-softmax box in the overview.
Source: Section 3.2, Equation (10). Source-only color-box commands are omitted visually; all mathematical terms are preserved.
How the fused kernel executes it
The approximation tile also performs routing
token-to-block score tile
query tokens and pooled query
chunk t of pooled keys
chunk of proxy scores
column mean over query tokens
query-block and chunk indices
transpose
definition, equality, grouping and punctuation
Running example: process the 16 pooled keys in chunks; as each proxy-score chunk appears, route its green blocks immediately and never store a complete 16-entry map.
Visual mapping: Step 2 below uses one score tile for both the threshold decision and the approximate path.
Source: Section 3.2, Equation (11), Figure 4, and Algorithm 1.
Source: Algorithm 1 and Section 3.2 hardware-aligned implementation.
Place it among nearby methods
Exact or dropped
A router selects blocks for exact token attention. Every unselected block contributes zero, so error grows quickly at aggressive sparsity.
Learned coarse + fine
Pooled cube attention routes fixed top-K cubes and supplies a coarse global output; a learned gate combines it with fine sparse attention. Training or adaptation is required.
Exact or approximate
A standardized threshold gives a dynamic block count. Both routes update one online-softmax state, with no learned router or gate.
What the paper measured
Limits and open questions
Approximation error remains
Replacing every key in an unselected block by its mean is accurate only when within-block key variation has a limited effect on attention.
Beta is still a deployment knob
No calibration dataset is mandatory, but the Gaussian density mapping is approximate. Quality and actual density should be validated on the target workload.
Long sequences benefit most
At moderate lengths, proxy preparation, thresholding and irregular exact dispatch can consume the saved time.