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, Baotian Hu, Min Zhang
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.
Create a lesson
Metadata
- Categories
- cs.CL, cs.CV
- Comments
- Accepted by NeurIPS 2026
Related papers
MedCoast: Semantic Abstraction of Reasoning Trajectories for Test-Time Biomedical Question Answering
Shared title terminologycs.CLYishan Zhong, Jieru Li, Xuanzhe Ding et al.
Test-Time Scaling for Diffusion Language Models with Frequency-Aware Remasking
Shared title terminologycs.CLBowen Zuo, Yue Yu, Dongruo Zhou et al.
Beyond Self-Consistency: Recursive Self-Improvement at Test Time
Shared title terminologycs.CLJianyu Wu, Yizhou Wang, Encheng Su et al.
Can Speech LLMs Recognize When Audio Evidence Is Insufficient? A Diagnostic Study and a Pre-Generation Probing Mitigation
Shared title terminologycs.CLVladislav Nesterenko, Polina Doronicheva, Olga Golubeva et al.
Faithful Persona Steering under Incongruity via Dual-Stream Refinement
Shared title terminologycs.CLYu-An Chu, Jen-Ren Pong, Chia-Yao Yeh et al.
Can LLM-Simulated Respondents Pre-Test Survey Questions? Evidence From Preregistered Prospective Validation
Shared title terminologycs.CLSristi Bafna, Mac MacComas, Michael Bader et al.