TL;DR
Code-generating large language models often produce visual artifacts with defects due to non-differentiable rendering. Visual-SDPO, a self-distillation policy optimization framework, uses visual feedback to improve code generation quality.
✦ Why It Matters
Engineers can leverage Visual-SDPO to enhance the quality of code-generated visual outputs in their applications.
Key Takeaways
Full Summary
Large language models (LLMs) that generate code can create visual artifacts like charts and web pages, but these often contain defects such as overlapping elements and low contrast due to the limitations of non-differentiable renderers. To address this, Visual-SDPO (Self-Distillation Policy Optimization) was developed, which leverages visual feedback as a privileged context for a teacher model to guide a student model in code generation.
A key innovation is Visual-Grounded Code Credit Weighting, which links visual defects back to specific code statements, enhancing the learning signal for those statements. Additionally, a sequence-level Group Relative Policy Optimization (GRPO) term rewards high-quality, executable outputs while allowing the model to learn from execution errors.
When tested on benchmarks like ChartMimic and Design2Code, Visual-SDPO outperformed baseline models by more than 10 points and GRPO by at least 2.4 points, all while reducing training time and maintaining inference efficiency. These results suggest significant improvements in the quality of code-generated visual artifacts.
Related