FocusTikZ: Quality-Aware Focused Token Optimization for TikZ Code Generation
Abstract
Generating TikZ code from textual descriptions requires models to produce executable code while preserving the intended semantics, spatial organization, and visual appearance of the resulting graphics. Current approaches primarily learn from paired descriptions and reference code, lacking explicit supervision of rendered diagram quality and assigning equal importance to all token positions during optimization. In this paper, we introduce , a quality-aware approach for focused token optimization in TikZ code generation. FocusTikZ assesses generated candidates through compilation and code quality signals, together with three specialized assessment models focused on logic, layout, and style. We further propose Difference-and-Entropy Focused GRPO (DE-GRPO), which identifies informative update positions using reference differences and generation uncertainty. Across multiple benchmarks, FocusTikZ consistently improves both code-level performance and visual fidelity relative to general-purpose and task-specific baselines, with the same trend further supported by human evaluation.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.