arXiv:2608.30689cs.CVAug 2026

Manuscript Offprint

arXiv:2608.30689

CANVAS: Consistency-Aware Navigation via Visual Adaptive Sampling for Long-Context Text-to-SVG Generation

Yichen Wu, Haoxuan Qu, Yihang Lou, Hossein Rahmani, Jun Liu

Abstract

Autoregressive large models have recently advanced Text-to-SVG generation from simple icons to complex, long-context graphics, yet standard autoregressive decoding often fails to maintain global consistency across geometry, layout, occlusion, and composition. We introduce CANVAS (Consistency-Aware Navigation via Visual Adaptive Sampling), a training-free, render-aware inference framework that combines power-sharpened trajectory likelihood with visual feedback from rendered futures and derives a stroke-wise navigation rule. It effectively estimates each candidate stroke's future value under a limited generation and rendering budget and adaptively allocates samples according to candidate uncertainty, decision influence, and rollout cost. Experiments across multiple autoregressive SVG backbones and complementary benchmarks demonstrate improvements in global consistency, which includes sound geometric relationships, spatial layouts, occlusion ordering, and overall composition, without additional training, demonstrating the effectiveness and generalization ability of our framework.

1. Introduction

Text-to-SVG generation aims to generate scalable, structurally editable vector graphics from natural-language descriptions, has broad applications in icon design, digital illustration, and web content creation, and has thus attracted increasing research attention [3, 16, 18, 20, 21, 24, 26]. In recent years, with advances in multimodal large language models in code generation and visual understanding, the direct autoregressive generation of SVG code with large models, as a mainstream technical route for this task, has expanded from simple icons to complex graphics containing numerous paths, coordinates, and style attributes [16, 24, 26, 28].

However, the ability to generate longer SVG sequences does not mean that a model can stably produce complete images with good global consistency, which includes sound geometric relationships, spatial layouts, occlusion ordering, and overall composition, all of which are important to the generation quality of complex SVGs [3, 12, 18, 19, 21, 24–26, 28]. This is because achieving these properties depends on a large number of interdependent drawing decisions. However, standard autoregressive decoding selects only according to the conditional probability at the current position. Therefore, a locally high-probability decision may still lead to a low-quality complete SVG, whereas a globally better generation trajectory may be eliminated early because its early local probabilities are lower and cannot be recovered during subsequent generation.

Such problems do not necessarily mean that the base model has not learned the structure of long-sequence SVGs. Models trained on large-scale SVG data already contain structural priors about path combinations, stylistic relationships, and complete programs, but standard autoregressive decoding may not fully reflect the model's preference over complete generation trajectories. Therefore, we study how to use these existing capabilities more effectively at inference time, without modifying the model parameters, to improve the consistency of long-context SVG generation.

However, relying only on the base model’s token probabilities remains insufficient, because they mainly reflect the code distribution and generation preferences learned from the training data rather than an explicit evaluation of the final rendering, and thus cannot directly determine whether the shapes, positions, occlusion relationships, and overall composition in the final rendering are consistent. Even if an SVG trajectory has high model probability and can be parsed successfully, its rendering may still exhibit element misalignment, occlusion conflicts, or compositional imbalance. Motivated by prior studies that incorporate rendered visual feedback into SVG generation [12, 19], we retain the structural priors learned by the base model while leveraging rendered outputs to provide direct visual feedback.

To this end, we propose CANVAS (Consistency-Aware Navigation via Visual Adaptive Sampling), a training-free, render-aware decoding framework for long-context Text-to-SVG generation. Here, “navigation” refers to selecting generation trajectories in the SVG program space rather than following locally probable token decisions alone. At the complete-sequence level, CANVAS constructs a unified objective that combines the base model's preference over complete SVG trajectories with the visual quality of the final rendering. Inspired by professional artists, who consider the global composition when deciding how to place each stroke, we reformulate the complete-sequence objective as a stroke-wise future-aware navigation rule: at each complete drawing boundary identified by an incremental parser, CANVAS navigates among candidate strokes (i.e., newly appended SVG drawing units that are parser-complete and directly renderable) according to their selection probabilities and the overall quality of the future complete SVGs they may produce.

Practical SVG applications also demand efficient inference, as users often need to generate, compare, and modify multiple candidate SVGs [3, 28]. However, exactly computing the future value of each stroke requires enumerating a large number of complete SVG continuation trajectories, making the associated computational cost prohibitive. To make this navigation computationally practical, CANVAS uses finite-sample rollouts to obtain conditionally unbiased estimates of finite-horizon future values and adaptively allocates generation and rendering budgets according to the uncertainty, decision influence, and sampling cost of different candidate strokes. Under theoretical guarantees, this improves the reliability of the estimates under a limited computational budget.

Figure 1 compares CANVAS with Best-of-N decoding. Even after the unchanged backbone is sampled N = 5 times and the best completed SVG is selected, CANVAS still exhibits better global consistency, which includes sound geometric relationships, spatial layouts, occlusion ordering, and overall composition.

In summary, our main contributions are as follows: 1) We propose CANVAS, a training-free, render-aware inference framework for consistency-aware navigation in long-context Text-to-SVG generation. 2) We transform the joint model-and-visual objective at the complete-SVG level into a stroke-wise future-aware navigation rule and propose a reliable visual adaptive sampling method with a finite horizon and adaptive budget allocation. 3) Experiments on multiple representative autoregressive SVG generators and complementary benchmarks verify the effectiveness and generalization ability of our method.

References (28)