TL;DR
Autoregressive image generation models are notoriously slow because they flatten 2D images into 1D token sequences, ignoring natural spatial structure. Spatially Speculative Decoding (SSD) fixes this by drafting tokens horizontally and vertically in parallel, exploiting 2D spatial correlations to achieve up to an 11.03× wall-clock speedup without sacrificing image quality.
What Problem Does This Paper Address?
State-of-the-art autoregressive (AR) visual models (like Janus, Emu3, and Lumina-mGPT) unify text and vision by treating image patches as discrete tokens. However, to fit the linear processing stream of standard transformers, these 2D token grids are flattened into a 1D sequence via a raster-scan (row-by-row) order.
This modality-agnostic design introduces a severe inference bottleneck: generating a single image requires thousands of sequential forward passes, running head-first into the memory-bandwidth "memory wall." While speculative decoding successfully accelerates text generation by using a small draft model to predict a linear sequence of future tokens, it fails in vision. Visual patches have high localized entropy and lack rigid 1D grammar, meaning that predicting far ahead in a flattened 1D horizon results in extremely low draft acceptance rates.
Methods
SSD aligns the mechanics of speculative decoding with the intrinsic 2D geometry of images through three core components:
- 2D Spatial Drafting: Instead of guessing a fragile 1D future, SSD factorizes anticipation into two orthogonal streams using lightweight multi-token prediction (MTP) heads. It uses horizontal heads ($k_h$) to draft along the current row, and vertical heads ($k_v$) to draft subsequent rows directly below the completed tokens.
- Column-Wise Independence: Because vertical predictions depend on the completed row directly above rather than adjacent tokens within the same target row, an entire row of $n$ tokens can be drafted simultaneously in a single parallel step.
- Continuous Latent Space Prediction: Rather than predicting discrete token IDs (which suffer from flat codebook distributions), the drafting heads target the continuous hidden states ($h_{pre}$) of the transformer's last layer, significantly improving drafting accuracy.
- Verification as Auto Correction: Standard speculative decoding discards the entire draft at the first incorrect token. SSD relaxes this by using a parallel verification pass over a fixed number of rounds ($r$) to repair mismatched tokens in parallel using acceptance-rejection sampling, acting as an automated correction mechanism.
Datasets
The authors trained the lightweight spatial drafting heads via self-distillation using images generated from the Midjourney prompts dataset (60,000 prompts for Janus-Pro, 20,000 for Lumina-mGPT, and 5,000 for Emu3).
For evaluation, they utilized:
- DPG-Bench: To evaluate text-image semantic alignment under dense, compositionally rich prompts.
- GenEval: To measure compositional generation fidelity focusing on object relations, attributes, and counting.
- COCO2017-val 5K: To evaluate perceptual quality via Fréchet Inception Distance (FID).
Key Insights and Ideas
- Images are Fundamentally 2D, Not 1D: The authors elegantly prove that vertical prediction relies on spatial adjacency rather than sequence position. As shown in the paper's context corruption experiment, even if you replace the second half of a row with completely random tokens, the model can still accurately predict the row below it as long as the token directly above is correct.
- Continuous Space Bypasses the Codebook Bottleneck: Predicting discrete visual tokens typically yields exact-match acceptance rates below 5%. Shifting the target to continuous hidden states provides a much richer supervisory signal for the lightweight drafting heads.
- Staged Verification Stabilizes Multi-Row Generation: When predicting multiple rows ahead, jointly verifying all rows simultaneously destabilizes convergence due to inter-row correlations. Committing the leading row before refining the trailing row provides the stable, corrected context needed for high-quality synthesis.
Key Results
SSD achieves massive computational savings by successfully overcoming the memory wall, reducing the number of forward evaluations (NFE) while maintaining generation quality:
- Wall-Clock Speedups: SSD accelerates image generation by 11.03× on Emu3 (8B), 7.35× on Lumina-mGPT (7B), and 5.70× on Janus-Pro (7B) when tested on an RTX Blackwell 6000 Pro GPU.
- Maintained Quality: On DPG-Bench and GenEval, SSD matches or exceeds the generation quality of prior state-of-the-art acceleration methods (like ZipAR and GSD).
- Perceptual Fidelity: Evaluating Janus-Pro-7B on COCO2017-val showed that SSD ($r=2$) achieved a clean-FID of 28.89, which is statistically indistinguishable from the standard autoregressive baseline (29.13), meaning the speedup comes with zero visible cost to image fidelity.
Limitations and Future Work
- Approximated Distribution: Because SSD verifies rows in parallel using contexts that may still contain unverified draft tokens, it does not sample from the exact autoregressive distribution.
- Finite-Budget Convergence: SSD is an approximate decoder and does not guarantee convergence to an exact fixed point. The number of verification rounds ($r$) must be manually tuned as an explicit knob to balance inference speed against strict adherence to the original model distribution.
Summary updated