Simple Test-Time Refinement for Plot-to-Code Generation via Visual-Code Diagnostics
Peiming Guo, Jinpeng Huang, Yangbin Sun, Gaoxiong Cao, Ensheng Shi, Yuchi Ma, Yu Zhang, Meishan Zhang,
Key points
From the paper's conclusion- We propose a Visual-Code Diagnostics framework that enables refinement through visual feedback from source code.
Abstract
Plot-to-code generation has been greatly advanced by recent multimodal large language models (MLLMs). However, existing studies mainly focus on one-pass generation or iterative sampling guided by verifier-based filtering, which does not align with the typical human programming workflow of generate first, then iteratively error-location and fix. This naturally motivates a test-time refinement paradigm for plot-to-code generation. In this work, we present the first study on plot-to-code generation via iterative test-time refinement. We propose a Visual-Code Diagnostics framework that enables refinement through visual feedback from source code. Specifically, we first categorize generation errors into four coarse-grained types, and then train lightweight discriminators to recognize and localize these errors based on the rendered visual outputs and corresponding code. Unlike traditional compiler- or debugger-based verification, our approach performs iterative refinement guided by one diagnostics system, enabling more effective semantic and visual correction during test time. Extensive experiments demonstrate that our method consistently improves generation quality across diverse generators and significantly outperforms strong test-time scaling baselines.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- ManimCode: Learning Visual Self-Correction for Educational AnimationarXiv · 2026
- InterWebCoder: Learning Interactive Webpage Generation from Executable Tests via Reinforcement LearningarXiv · 2026
- A Survey of Image-to-Code Generation for Software EngineeringarXiv · 2026
- Understanding Regression in Code Self-Refinement: A Study of Refinement Protocols Without Execution FeedbackAI · 2026
- PreCoG: Preview-Edit for Efficient Video Correction in Generation-TimearXiv · 2026
- InspectCoder: Dynamic Analysis-Driven Self Repair through Interactive LLM-Debugger CollaborationProceedings of the ACM on Programming Languages · 2026