arXiv:2606.10334cs.AI2026-06

让代码生成视觉内容时能自我纠错,提升图表网页的视觉质量。

Self-Distillation Policy Optimization via Visual Feedback: Bridging Code and Visual Artifacts

论文配图:Self-Distillation Policy Optimization via Visual Feedback: Bridging Code and Visual Artifacts
图 1 · 摘自论文原文
  • 用渲染反馈指导代码优化,通过教师学生架构实现自蒸馏。
  • 在多个任务上比零样本基线高10+分,优于GRPO至少2.4分。
  • 适合需要高质量视觉输出的AI编程场景,如自动化设计。

代码生成大模型(LLM)越来越多地通过执行不可微渲染器生成图表、网页和幻灯片等视觉内容,但在观察渲染结果前就提交代码,导致生成的视觉产物常出现重叠元素、截断文字、错位、对比度低和溢出等明显缺陷。本文研究基于视觉反馈的自蒸馏策略,提出Visual-SDPO框架:将渲染后的视觉反馈作为教师模型的特权上下文,将其知识蒸馏到编码学生模型中。为实现精准监督,引入视觉锚定代码信用加权机制,追踪每个缺陷对应的代码语句并增强其蒸馏信号。同时采用序列级分组相对策略优化(GRPO),奖励可执行且视觉质量高的生成结果;即使执行失败,也能通过自蒸馏路径学习错误信息。该方法以统一的Qwen3-VL-8B-Instruct为基础,在ChartMimic、Design2Code和AeSlides三个基准上,相比零样本基线提升超10个绝对点,较GRPO提升至少2.4点,训练步数更少,推理无额外开销。

原文摘要 · Abstract (English)

Code-generating large language models (LLMs) increasingly produce visual artifacts such as charts, web pages, and slides by writing programs that are executed by non-differentiable renderers, committing to code before observing the render. As a result, otherwise executable code often yields artifacts with visually salient defects, including overlapping elements, clipped text, broken alignment, low contrast, and overflow. We study visual-feedback self-distillation for code-generated visual artifacts. We propose Visual-SDPO, a self-distillation policy-optimization framework that treats rendered visual feedback as privileged context for a weight-sharing teacher and distills this feedback into a coding student. To make supervision spatially targeted rather than uniform, we introduce Visual-Grounded Code Credit Weighting, which traces each detected defect back to the code statements responsible for the affected elements and amplifies the distillation signal on those statements. A sequence-level GRPO (Group Relative Policy Optimization) term complements the dense token-level objective by rewarding executable, visually high-quality rollouts, while failed executions remain learnable through the self-distillation path by passing execution errors as privileged context to the teacher. We instantiate Visual-SDPO for chart, web/UI, and slide generation with a unified Qwen3-VL-8B-Instruct backbone. Across chart-to-code, UI-to-code, and slide-generation benchmarks (ChartMimic, Design2Code, and AeSlides), Visual-SDPO improves over the zero-shot base by more than 10 absolute points in the primary metric and over GRPO by at least 2.4 points, with fewer training steps and no added inference-time cost.

代码生成视觉反馈自蒸馏多模态

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。