Sightline: Long-Window Speculative Decoding Accelerates SVG Generation

Sightline leverages rare and clustered SVG draft errors with long verification windows and wide draft trees to achieve lossless acceleration.
This paper proposes Sightline, a lossless acceleration method for vector graphics generation. It finds that speculative decoding draft errors in SVG are rare and clustered, with high drafter accuracy at deep positions, breaking the limits of traditional short-window designs. Through a run-length identity and theoretical proofs, the authors show that as long as the draft tree is wide enough, extending the verification window to the drafter's horizon always yields gains. Sightline extends the verification window to the drafter's horizon and pairs it with a wide draft tree to fill the window, maximizing the speedup ratio. Experiments cover text-to-SVG and image-to-SVG tasks, and across six benchmarks and multiple model families, Sightline is the fastest lossless decoder. Analysis shows the advantage stems from rounds that short windows would truncate, benefiting both loop and non-loop content. Additionally, speculative decoding accelerates rendering-based sample selection, outperforming likelihood-based selection.
The Bottleneck of Speculative Decoding in Vector Graphics Generation
SVG generation models output graphics token by token as code, requiring a forward pass at each step, which makes drawing slow. Speculative Decoding accelerates generation without loss of accuracy by using a block-level drafter to guess multiple tokens at once. However, in SVG tasks, the drafter frequently accepts entire blocks and only terminates at the end of the verification window, meaning traditional short-window designs fail to fully exploit the structural characteristics of SVG.

Key Finding: Draft Errors on SVG Are Rare and Clustered
The research team observed that in SVG generation, drafter errors (i.e., tokens rejected by verification) are very rare and clustered, and that the distance over which the drafter remains accurate within a block is far deeper than in natural language. Through a run-length identity and three propositions, the authors prove that as long as candidates are sufficiently wide, a longer verification window yields gains up to the drafter's prediction horizon. This forms the design foundation of Sightline—extending the verification window to the drafter's horizon and pairing it with a sufficiently wide draft tree to fill the window.
Speculative Decoding is a lossless acceleration technique for autoregressive generation: it uses a smaller, faster "drafter" model to predict multiple subsequent tokens at once, and then the original large model verifies these candidates in parallel. If verification passes, multiple tokens are accepted at once; if a rejection occurs somewhere, resampling starts from the rejection position. Its speedup ratio depends on the accepted draft length. Traditional methods use short verification windows to control waste caused by declining draft quality, but this paper finds that in SVG generation draft errors are rare and clustered with high deep-layer accuracy, so long windows can accept more tokens without increasing verification cost.
Run-length identity is the theoretical analysis tool used in this paper, linking the expected accepted length of the verification window to the run-length distribution of draft errors. Through this identity and three propositions, the authors prove that as long as the draft tree is wide enough to cover every position in the window, extending the verification window to the drafter's prediction horizon always yields gains. This provides the mathematical foundation for Sightline's long-window design.
Sightline Method: Long Window + Wide Draft Tree
The core innovation of Sightline lies in the coordinated scaling of window length and draft tree width. Traditional speculative decoding typically uses shorter verification windows to avoid wasting computation when draft quality declines; but in SVG generation the drafter maintains high accuracy at deep positions, so extending the window accepts more tokens without additional verification cost. Paired with a wide draft tree, Sightline ensures that every position in the window has candidate tokens available for verification, thereby maximizing the speedup ratio.
Draft tree is the structure for organizing candidate tokens in speculative decoding. Unlike a linear draft sequence, a draft tree provides multiple candidate branches at each position, enabling simultaneous checking of multiple paths during verification. The width of the tree determines the number of candidates available at each position. In Sightline, the wide draft tree ensures that every position in the verification window has candidate tokens available for verification, avoiding wasted window length due to missing candidates. The coordinated scaling of window length and tree width is key: a long window needs a wide tree to fill it, and a wide tree needs a long window to be valuable. This design maximizes the potential of the block-level drafter, achieving a higher speedup ratio.
Experimental Validation: Leading Across Multiple Benchmarks and Models
Experiments cover both text-to-SVG and image-to-SVG tasks, testing three models on six benchmarks: MMSVG, MMSVG-2M, and SArena. In all settings, Sightline is the fastest among the compared lossless decoders. On SArena, even when all decoders share the same loop control, Sightline remains ahead. Furthermore, on six models from four other families (generating SVG code, compressed SVG tokens, or Lottie JSON), Sightline also leads in almost all settings. Analysis shows that the advantage stems from rounds that short windows would truncate—whether loop-free content or loop structures.
MMSVG, MMSVG-2M, and SArena are benchmark datasets for evaluating SVG generation models. MMSVG and MMSVG-2M focus on multimodal (text/image-to-SVG) generation tasks and contain a large number of SVG samples; SArena is a more comprehensive SVG generation evaluation platform covering multiple tasks and models. These benchmarks provide standardized test environments for comparing different decoders in terms of generation speed and quality. This paper tests on six benchmarks, covering both text-to-SVG and image-to-SVG tasks, ensuring the generality of the conclusions.
Implications for Rendering-Based Sample Selection
Speculative decoding can also accelerate rendering-based sample selection, and the effect is better than likelihood-based selection. This suggests that in vector graphics generation, sampling strategies combined with rendering feedback and long-window speculative decoding can synergistically improve efficiency and quality. The researchers have open-sourced the code and data (https://github.com/LiZaiyuan0619/Sightline), providing a reproducible foundation for future work.
Rendering-based sample selection refers to generating multiple candidate samples and then selecting the best one by actually rendering the SVG and evaluating the quality of the rendered result, rather than relying solely on model likelihood probabilities. This approach better reflects human perception of graphic quality, but the rendering process is time-consuming. Speculative decoding can accelerate the process of generating multiple candidate samples, making rendering-based selection more feasible. Experiments show that sampling strategies combined with rendering feedback and long-window speculative decoding can synergistically improve efficiency and quality, providing a new optimization direction for vector graphics generation.
Conclusion
Sightline demonstrates that in vector graphics generation, speculative decoding should verify as far as the drafter's horizon allows. The combination of long windows and wide draft trees unleashes the potential of block-level drafters, providing an efficient lossless acceleration solution for SVG and similar structured output tasks.
Related articles

The 15-Year Programmer Who's Been Unemployed for Two Years: The Tech Worker's Dilemma in the AI Era
A US senior software engineer with 15 years of experience has been unemployed for two years, exhausted his savings, and sought help on Hacker News. This article analyzes the structural causes of long-term unemployment among tech workers, strategies for addressing resume gaps, and the redefinition of experience value in the AI era.

Soundcore Liberty 5 Pro Drops to All-Time Low: The Go-To True Wireless Earbuds for Commutes and Calls
Soundcore Liberty 5 Pro drops to an all-time low of $129.99 (from $169.99). These Anker true wireless earbuds excel at call quality and are on sale at Amazon, Best Buy, and Walmart in four colors—ideal for commutes and online meetings.

After Anthropic's IPO, How Far Can Safety-First Go?
The Verge podcast explores Anthropic's post-IPO core tension: can a public company stay safety-first? How public market pressure reshapes AI lab safety decisions.