Sketch2TikZ: Multi-Reward Reinforcement Learning for Converting Hand-Drawn Sketches to Executable TikZ
Shubham Paliwal, Arushi Jain, Monika Sharma, Manasi Patwardhan
Abstract
Automatic digitization of hand-drawn sketches into editable formats is crucial for modern document workflows and LaTeX integration. Converting sketches into executable TikZ code provides a structured representation of diagrams, but remains challenging due to noisy and ambiguous inputs, which hinder reliable interpretation and limit the effectiveness of token-level supervision for ensuring global diagram validity. To address these challenges, we propose Sketch2TikZ, a reinforcement learning framework that optimizes sketch-to-code generation via a sequential multi-reward strategy, combining Code-Structure (Rcs), OCR (Rocr), CleanDIFT (Rcd), and Self-Similarity (Rss) rewards to enforce textual, visual and structural correctness. We evaluate Sketch2TikZ on the SkeTikZ and FlowChart-3B benchmarks using metrics including compilation success rate (CSR), image similarity, code similarity, and character similarity. Our method achieves near-perfect compilation success and improves visual and textual alignment over strong open-source baselines, while remaining competitive with proprietary GPT-based vision-language models. Extensive ablations demonstrate that curriculum-based reward scheduling is critical for reducing reward interference, stabilizing training and mitigating proxy over-optimization. Overall, our results highlight the effectiveness of reference-aware, multi-objective reinforcement learning for structured diagram generation from noisy sketches.
Create a lesson
Related papers
Spatial Query Execution as Verifiable Rewards for Multi-step Spatial Reasoning
Shared title terminology · Jiyoon Pyo, Dongwon Jung, Zekun Li et al.
Automating Multi-View Quality Assessment of 3D Annotation Layouts
Shared title terminology · Hongyi Yang, Jinao Wu, Yanwei Zhang et al.
When Visually Rich Documents Meet Multi-Vector Retrieval for Region-level Retrieval-Augmented Generation
Shared title terminology · Xu Yuan, Liangbo Ning, Yujuan Ding et al.
EgoLAM: Learning Latent Actions from Hand and Head Motion
Shared title terminology · Ziyi Ding, Yiwei Wang, Zhongxing Wei et al.
InterBand-EMG: A Cross-Band Foundation Model for Generalizable Hand-Pose Estimation
Shared title terminology · Zongheng Guo, Tao Chen, Dalong Du et al.
MODULE: A Mutual-Promoting Deep Unfolding Framework Towards Degradation-Robust Multi-modal Image Fusion
Shared title terminology · Yunfei Deng, Han Xu, Jiayi Ma et al.