Learning reusable skills can improve visual reasoning agents, yet applying a skill still requires the agent to implement or invoke a procedure and produce the final answer. Errors and hallucinations at these steps can prevent acquired experience from translating into reliable single-run performance. We propose VisualCoding, which combines execution-guided acquisition of reusable visual programs with direct adoption of their answers on applicable inputs. Execution-Guided Program Acquisition composes visual primitives and additional code into family-level solvers, then iteratively tests and revises them on labeled training instances. Scope-Aware Direct Execution runs a retained solver and returns its valid in-scope answer. We evaluate VisualCoding on four models across four benchmarks spanning 69 task families. VisualCoding exceeds the strongest evaluated baseline in mean accuracy by 4.45 percentage points with Gemini-3.1-Pro and by 14.78 points when reusing the frozen Pro-acquired artifacts with Flash-Lite. Ablations support execution-guided acquisition and show that direct execution outperforms textual or callable reuse of the same programs. Code is available at https://github.com/jiaq-liu/VisualCoding.
Figures & tables
Figure 1: From text skills to executable experience. Agents can still make errors when applying text skills distilled from rollouts (top). VisualCoding refines reusable programs through execution feedback and directly adopts their valid answers for more reliable visual reasoning (bottom).
Figure 2: VisualCoding overview. Program acquisition: training examples, baseline statistics, and visual primitives support program search. Execution feedback guides revision, and scope fitting and selection retain a frozen program P and scope g . Direct execution: valid in-scope outputs directly supply the answer through an adapter.
Method
TIR
MIRA
GQA
PVQA
Avg.
Direct (TF)
48.9
33.3
68.3
93.6
61.0
GEPA (TF)
52.9 +4.0
35.0 +1.7
73.7 +5.4
97.8 +4.3
64.9 +3.8
TextGrad (TF)
54.0 +5.1
33.3 0.0
75.1 +6.8
96.7 +3.1
64.8 +3.8
Tool agent
62.9
37.2
73.3
93.7
66.8
XSkill
68.9 +6.0
42.4 +5.2
78.4 +5.1
96.9 +3.2
71.7 +4.9
Trace2Skill
65.8 +2.9
45.2 +8.0
74.9 +1.6
95.7 +2.0
70.4 +3.6
Table 1: Main comparison with Gemini 3.1 Pro. Accuracy (%); Avg. equally weights four task-weighted dataset accuracies. GQA: GameQA-17; PVQA: PuzzleVQA; TF: tool-free inference. Bold/underline mark best/second-best distinct displayed accuracies within each executor (ties included). Small green/red numbers are gains/losses in percentage points: GEPA/TextGrad versus Direct; XSkill/Trace2Skill/SkillOpt/VC versus Tool agent. Protocol details: Appendix C.4 .
Method
TIR-Bench
MIRA
GameQA
PuzzleVQA
Avg.
(a) Gemini 3.1 Flash-Lite
Direct (TF)
28.3
17.9
28.6
78.8
38.4
GEPA (TF)
36.3 +8.0
18.5 +0.6
40.9 +12.3
91.8 +12.9
46.9 +8.4
TextGrad (TF)
33.5 +5.2
16.3 -1.7
32.5 +3.9
84.4 +5.5
41.7 +3.3
Tool agent
39.0
20.9
30.4
83.4
43.4
XSkill
48.7 +9.7
28.4 +7.4
45.1 +14.8
93.0 +9.6
53.8 +10.4
Table 2: Cross-executor reuse. Accuracy (%); annotations follow Table 1 , ranked separately per executor. (a) External Pro-learned artifacts deploy with Flash-Lite; ours uses Flash-Lite training-side calibration. (b) DeepSeek/GPT reuse frozen FL routes and program readings without target calibration. Judge assignments and evaluation protocol: Appendix C.4 .
Figure 3: Representative cases. (a) TIR-Bench: lighter cells indicate lower boundary-matching costs. (b) MIRA: scores show the difference between reflected and original ORB match counts; C has the largest increase. (c) GameQA: the displayed path has 16 turns and is verified on the extracted grid. (d) PuzzleVQA: measured component areas identify six (A) as the answer.
Variant
TIR-Bench
MIRA
Tool agent
62.9
37.2
(a) Acquisition
Full execution feedback
75.9
46.6
Independent search
73.5
46.0
No scope during acquisition
68.3
42.0
(b) Deployment
Table 3: Acquisition and deployment ablations with Gemini-3.1-Pro. Complete-panel accuracy (%): TIR-Bench has 746 questions and MIRA 363. Panel (a) compares feedback conditions on five re-acquired families under controlled deployment settings. Panel (b) changes how frozen main-experiment programs are used. Both panels retain full-system outputs on unaffected questions. Feedback-granularity and deployment-configuration controls appear in the appendix.
Table 4: The fixed generic primitive library. Diagnostic returns can be included in the program’s diag ; debug images and substep checks support offline feedback.
Criterion
High-precision tier
Gain tier
Minimum fitted precision
0.95
0.50
Minimum fitted support per route
3
5
Minimum pooled leave-one-out precision
0.90
0.50
Minimum rule stability
0.80
0.50
Maximum learned atoms per route
2
2
Minimum numeric separation
0.02
0.02
Appendix
Table 5: Acceptance hyperparameters.
Method
Ci=0
0<Ci<Kte
Ci=Kte
Full panel
Task count
194
211
341
746
Tool agent (reference pool)
0.00
52.25
100.00
60.49
VisualCoding CORE
41.75
62.80
100.00
74.33
VisualCoding full
50.90
65.76
97.21
76.27
Appendix
Table 6: Success stratified by four observed Pro attempts on TIR. Entries are pass@1 (%) on common baseline-defined strata. CORE disables text skills but keeps the same programs, scopes, and family eligibility; the full policy retains skill fallback. The tool-agent row uses the reference pool that defines the strata.
Figure 4: Single-run accuracy across observed sampling strata. TIR-Bench tasks are grouped by the number of correct answers among four stored Pro tool-agent attempts. Bars reproduce Table 6 ; CORE retains programs and scopes with text fallback disabled. Grouping fixes the reference rates at 0% and 100% in the extreme strata.
Family
N
Base @1
Base @4
Full @1
Color
67
71.64
85.07
72.39
Contrast
34
63.24
79.41
63.97
Instrument
54
22.69
37.04
25.00
Jigsaw
80
4.38
11.25
95.00
Math
80
74.69
83.75
75.62
Maze
80
88.12
95.00
100.00
Appendix
Table 7: Family-level Pro sampling reference and full-policy accuracy on TIR. Percentages; all families are reported. OCR uses stored model-dependent program readings. Other rows can include program, skill, or base routes; these are complete-family scores, not in-scope precision.
Dataset
Families
Train
Test
TIR-Bench
12
369
746
MIRA
20
183
363
GameQA
17
259
514
PuzzleVQA
20
663
1337
Appendix
Table 8: Training and evaluation partitions.
Dataset ( n )
Tool agent
Pro policy
Pro no check
FL policy
Pro − FL [95% CI]
TIR-Bench (746)
39.0
61.5
65.0
68.5
−7.0[−9.4,−4.7]
MIRA (363)
20.9
36.4
38.3
41.6
−5.2[−8.0,−3.0]
GameQA (514)
30.4
52.7
58.6
65.4
−12.6[−16.0,−9.5]
PuzzleVQA (1,337)
83.4
97.1
98.7
98.8
−1.7[−2.5,−0.9]
Avg. (datasets)
43.4
61.9
65.1
68.6
−6.6
Pooled (2,960)
55.3
73.0
75.8
78.3
−5.4[−6.3,−4.5]
Appendix
Table 9: Flash-Lite sensitivity to the family deployment policy. Accuracy (%); every column uses Flash-Lite as the executor. Pro and FL denote the executor used for deployment calibration; no check removes the additional executor-specific check from the Pro configuration. The final column reports Pro-policy minus FL-policy accuracy in percentage points, with paired task-bootstrap 95% intervals from 4,000 resamples for each dataset and the pooled sample. Avg. equally weights datasets; Pooled weights all 2,960 questions.
Variant
TIR-Bench
MIRA
Full method
76.3
47.1
No text fallback
76.0
46.3
Appendix
Table 10: Text-skill fallback control. Complete-panel accuracy (%) with Pro on the same TIR-Bench and MIRA panels as Table 3 .
Figure 5: Additional executable procedures. (a) Minimum-area frame orientation yields four angle candidates; the answer adapter matches the provided options to select C ( 310∘ clockwise). (b) Measured hand directions, mirror/dial correction, and time arithmetic yield 9:15; the central dial depicts corrected angles schematically. (c) Centroid offset determines Pac-Man’s direction; the enlarged scanline counts four beans before a wall. (d) Component fill heights map the query bar to yellow (B). All four examples use programs without model calls.
Round
Revision
Correct / 40
1
Boundary matching with constrained Kruskal/Prim-style assembly.
35
2
Run Prim-style assembly from every starting piece and compare complete grids.
37
4
Jointly trim two boundary pixels and replace RMSE costs with MSE; rejected after regression.
18
6
Combine multiple cost variants and fixed-seed perturbations; rank complete grids by RMS boundary cost.
39
Appendix
Table 27: Selected candidates in the deployed jigsaw solver’s acquisition history. Correct counts use all 40 training puzzles before scope filtering; missing outputs count as incorrect. These are candidates within one historical acquisition run, separate from the controlled acquisition ablations.
Multimodal models increasingly reach for tools when solving visual tasks (crop, zoom, rotate, brighten), a paradigm known as thinking-with-images. The central challenge is one of perception: tools mostly serve to expose visual evidence, reasoning over that evidence stays in language, and most targets are ones a human could in principle determine by inspection. Some visual questions, however, are not bottlenecked by perception: recovering their answers requires executing a multi-step visual algorithm over the pixels. On such questions a model often names the correct algorithm at once yet still answers wrong, because language can describe an algorithm without being able to run one. Code-with-Image crosses that line: given nothing but a Python interpreter, the model must implement a genuine visual algorithm in code to solve the task; the program itself becomes the reasoning. The bottleneck then shifts from executing code to deciding which algorithm to implement. So we let the model teach itself: a training-free reflection loop studies its own failed programs, tests repairs against constructive ground truth, and keeps what survives as portable skills. On our Code-with-Image Bench (CwI-Bench), thirty task families induced by hidden visual computations with disjoint learning and evaluation splits, even GPT-5.6-luna stays below 30% with tool-free chain of thought; given a bare interpreter it reaches 43%, and with skills evolved through its own executable reflection, 67%. The open 27B model climbs the same ladder (9% → 33% → 56%), and the skills are plain text, transferable across scales and families. When code carries the reasoning, debugging code becomes debugging reasoning.
Tianze Yang, Liang Wu, Ruitong Sun +6
Nokia · University of Georgia · The Hong Kong Polytechnic University
Coding agents are increasingly moving beyond text-based software tasks to reconstruct visual targets through code. This capability, visual coding, requires agents to translate their understanding of visual targets into executable code. Slides provide a natural testbed for this capability, combining rich visual structure with objects that can be programmatically created and edited. To measure this capability, we introduce PPTBench, a benchmark for reconstructing scientific flow diagrams as editable PowerPoint slides. PPTBench covers 500 scientific flow-diagram tasks across 10 presentation domains, drawn from real research papers, and is evaluated with a four-stage agentic judge covering artifact validity, process and connector fidelity, rendering quality, and visual fidelity. Evaluation of ten models across 36 model--harness--effort configurations shows a substantial gap in reliable visual coding: the best configuration achieves 77.34, while the median across configurations is 24.38. Fine-grained analysis shows that agents can generally produce valid slide files, but struggle to produce high-quality reconstructions that faithfully recover the semantics and visual structure of the target. Further analysis shows that increasing reasoning effort primarily improves hard-gate passage rather than mean detail quality on each configuration's passing tasks, while configurations with more inspection tend to achieve higher overall scores. PPTBench establishes a measurable testbed for studying visual coding and advancing agents toward more reliable visual creation.
What does it take to build a visual reasoner that works across charts, science, spatial understanding, and open-ended tasks? The strongest vision-language models (VLMs) suggest that broad visual reasoning is within reach, yet their closed data and reinforcement learning (RL) pipelines make their gains difficult to study, reproduce, or extend. We introduce Vero, a family of fully open VLMs that match or exceed existing open-weight models across diverse visual reasoning tasks. We scale RL data and rewards across six broad task categories, constructing Vero-600K, a 600K-sample dataset from 59 datasets, and designing task-routed rewards that handle heterogeneous answers. Across VeroEval, our 30-benchmark suite, Vero-600K outperforms existing RL datasets under controlled comparisons. Applied to five starting models, Vero variants gain 2.9-5.4 points on average over their initial models. Notably, Vero-Qwen3I-8B, trained on the Instruct model, surpasses Qwen3-VL-8B-Thinking by 3.8 points on average without additional distillation. Systematic ablations reveal that different task categories elicit distinct reasoning patterns and that broad gains depend on learning them jointly rather than in isolation. All data, code, and models are publicly available.