Scientific Graphics Program Synthesis via Dual Self-Consistency Reinforcement Learning
Juekai Lin, Yun Zhu, Honglin Lin, Sijing Li, Tianwei Lin, Zheng Liu, Xiaoyang Wang, Wenqiao Zhang, Lijun Wu · 2026
Read Scientific Graphics Program Synthesis via Dual Self-Consistency Reinforcement Learning by Juekai Lin, Yun Zhu, Honglin Lin, Sijing Li, Tianwei Lin, Zheng Liu, Xiaoyang Wang, Wenqiao Zhang, Lijun Wu (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-06079.txt.
Introduction
Lin and colleagues' 2026 paper tackles graphics program synthesis, turning static visuals back into editable TikZ code. Image-TikZ sets often fail on executability and visual alignment, and fidelity benchmarks are missing. Their closed-loop framework offers SciTikZ-230K, a dataset from an execution-centred engine across 11 fields. It also offers SciTikZ-Bench, a benchmark from basic shapes to complex hierarchical diagrams. Dual self-consistency learning uses round-trip verification to penalize bad code and boost self-consistency. Their trained model, SciTikZer-8B, beats Gemini-2.5-Pro and massive rivals.
Catalog record
| CREATOR | Juekai Lin, Yun Zhu, Honglin Lin, Sijing Li, Tianwei Lin, Zheng Liu, Xiaoyang Wang, Wenqiao Zhang, Lijun Wu |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 84488 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2604.06079
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Scientific Graphics Program Synthesis via Dual Self-Consistency Reinforcement Learning Juekai Lin, Yun Zhu, Honglin Lin, Sijing Li, Tianwei Lin, Zheng Liu, Xiaoyang Wang, Wenqiao Zhang, Lijun Wu Abstract Graphics Program Synthesis is pivotal for interpreting and editing visual data, effectively facilitating the reverse-engineering of static visuals into editable TikZ code. While TikZ is the de facto standard for scientific schematics due to its programmatic flexibility, its requirement for rigorous spatial precision presents a significant challenge for Multimodal Large Language Models. Progress is currently stifled by two primary gaps: (1) Data Quality Gap: existing image-TikZ corpora often lack strict executability and reliable visual alignment; (2) Evaluation Gap: a lack of benchmarks for both structural and visual fidelity. To address these, we present a closed-loop framework featuring: SciTikZ-230K , a large-scale, high-quality dataset from our Execution-Centric Data Engine covering 11 diverse scientific disciplines; SciTikZ-Bench , a multifaceted benchmark spanning from basic geometric constructs to intricate hierarchical schematics to evaluate both visual fidelity and structural logic. To further broaden the scope of visual-code optimization methodology, we introduce a novel Dual Self-Consistency Reinforcement Learning optimization paradigm, which utilizes Round-Trip Verification to penalize degenerate code and boost overall self-consistency. Empowered by these, our trained model SciTikZer-8B achieves state-of-the-art performance, consistently outperforming proprietary giants like Gemini-2.5-Pro and massive models like Qwen3-VL-235B-A22B-Instruct. 1]Zhejiang University 2]Shanghai Artificial Intelligence Laboratory, OpenDataLab 3]Shanghai Jiao Tong University 4]Peking University \correspondence Lijun Wu, \metadata [Code] https://github.com/JackieLin0123/SciTikZ 1 Introduction Graphics Program Synthesis [ 8 , 7 ] enables the reverse-engineering of static raster images into editable, symbolic code, facilitating the modification and reuse of visual data. While the task spans various vector formats, the TikZ language [ 43 ] has established itself as the de facto standard for high-fidelity scientific schematics, such as circuit diagrams and structured flowcharts. Unlike statistical plotting libraries that tolerate automated layout approximations, TikZ demands precise coordinates, explicit symbolic primitives, and rigorous spatial definitions to represent intricate, fine-grained topological structures. This strictness renders the synthesis process highly sensitive to perturbations, where even trivial errors can trigger compilation failures or structurally degenerate artifacts during rendering and execution (Figure 1 ). Consequently, despite recent advances in multimodal reasoning and code generation, achieving high-fidelity schematic program synthesis still remains a formidable open problem for current Multimodal Large Language Models (MLLMs) [ 22 , 13 , 12 , 11 , 60 , 45 , 27 ] . Figure 1 : Challenges in graphics program synthesis. Current open-source MLLMs struggle with the strict constraints of TikZ, exhibiting critical issues such as syntax hallucinations , dependency omissions and geometric misalignments . Current progress in graphics program synthesis is largely driven by advances in both data scaling and methodological refinement. On the data front , initiatives such as AutomatikZ [ 6 ] and MathCoder [ 44 ] focus on constructing large-scale image-code pairs to facilitate effective Supervised Fine-Tuning (SFT). However, these approaches are often hampered by persistently low-quality training signals: while web-scraped data suffers from intrinsic noise, existing synthetic corpora are often low-quality, with cluttered layouts and limited structural coherence. This results in models that frequently hallucinate spatial relationships or fail to generalize beyond rigid synthetic templates in more realistic scientific settings. This issue is further compounded by a systemic evaluation deficit . While recent benchmarks like Image2Struct [ 34 ] attempt to evaluate structured information extraction, they remain notably narrow, focusing primarily on formulas and charts rather than more complex, multi-disciplinary graphics. This lack makes it difficult to establish a standardized, comprehensive evaluation of scientific graphic synthesis. Recent methodological frameworks , such as TikZero [ 5 ] and DeTikZify [ 7 ] , rely on relatively limited strategies like only CLIP-based alignment or MCTS-driven search. These paradigms primarily focus on unidirectional generation, failing to utilize TikZ’s executable nature for closed-loop training. Consequently, they struggle to balance the rigidity of SFT, which over-penalizes syntactically different yet valid variants, and the permissiveness of visual reinforcement learning (RL), which is prone to reward hacking and structural degeneracy. Ultimately, the current field remains constrained by such limited methodological strategies, lacking a generalized paradigm to ensure self-consistency between visual and symbolic representations under executable, structurally faithful program synthesis objectives. To bridge these gaps and cultivate intrinsic visual-coding alignment, we propose a comprehensive framework that unifies high-quality data curation with a novel RL paradigm in a closed-loop manner. First , we tackle the scarcity of reliable training samples by constructing a scalable Execution-Centric Data Engine. Unlike previous pipelines that passively scrape noisy web data, our engine synergizes MLLM-based semantic verification with active compilation feedback and iterative fault correction. This rigorous filtration process ensures rendering fidelity, resulting in SciTikZ-230K , a large-scale, strictly compilable dataset that transcends the noise limitations of prior corpora to provide robust grounding for visual reasoning and executable synthesis. Second , we address the evaluation deficit by establishing SciTikZ-Bench , a multifaceted benchmark comprising 611 diverse scientific figures. This suite moves beyond simple similarity metrics, enabling the rigorous and holistic assessment of both visual fidelity and code quality across diverse scientific domains and structural patterns. Third , building upon this infrastructure, we introduce a novel Dual Self-Consistency (DSC) RL paradigm inspired by the philosophy of dual learning [ 19 ] . Addressing existing methodological constraints, DSC transcends the rigidity of SFT and the structural blindness of visual RL by establishing a robust Round-Trip Verification mechanism. Specifically, we demand that the generated code is not only visually accurate but also structurally canonical enough to be reconstructed from its own rendered image. This self-consistency explicitly penalizes visual hacking by suppressing the generation of degenerate, uneditable code, thereby fostering a harmony between pixel-level alignment and symbolic interpretability. Extensive experiments demonstrate that our trained models, SciTikZer-4B/8B , achieve state-of-the-art (SOTA) performance, significantly outperforming both general-purpose MLLMs [ 22 , 13 , 49 , 46 , 4 , 2 ] and domain-specialized baselines [ 7 , 36 , 55 ] . Specifically, our contributions are organized as follows: • We curate SciTikZ-230K dataset, a high-quality, strictly compilable TikZ dataset via an Execution-Centric Data Engine, and establish SciTikZ-Bench for standard and comprehensive evaluation. • We propose Dual Self-Consistency (DSC) , an RL paradigm unifying visual fidelity and structural logic through round-trip reconstruction. By forming closed-loop verification, it removes ground-truth dependency and enables logical self-consistency on unlabeled data. • We open-source SciTikZer-4B/8B . Experiments demonstrate that SciTikZer-8B achieves SOTA performance, significantly outperforming orders-of-magnitude larger models and specialized baselines in both compilation rates and visual alignment. 2 Related Work Visual Program Synthesis. MLLM advancements have significantly propelled visual program synthesis [ 23 ] for data visualization [ 37 ] . Systems like ViperGPT [ 42 ] , MatPlotAgent [ 51 ] and METAL [ 26 ] drive Python libraries via an imperative paradigm of sequential commands. To standardize evaluation, benchmarks such as DePlot [ 30 ] , Plot2Code [ 47 ] , ChartMimic [ 50 ] and ChartEdit [ 56 ] have evolved from simple extraction to complex chart reproduction and editing. Concurrently, model and data-centric advances—exemplified by ChartLlama [ 18 ] , ChartCoder [ 57 ] and Chart2Code53 [ 33 ] —boosted chart-to-code fidelity and scalability. However, imperative charting often abstracts geometric details. In contrast, TikZ is declarative and compilation-critical, requiring explicit spatial specifications that