AesCode Improves Visual Quality of Code
- •Microsoft researchers present AesCode for generating editable, verifiable visuals as code
- •The method uses reference images, design graphs and separate machine and vision-language model rewards
- •AesCode-8B and AesCode-32B improve visual quality by 31.1 and 22.4 percentage points over Qwen3-VL baselines
Microsoft researchers introduced AesCode, a method for generating information-rich visuals such as slides, posters and dashboards as editable, verifiable code. The paper was published on October 13 and submitted to arXiv on October 14. It addresses a limitation of code models: they cannot directly see how layout and color choices combine on a canvas, which can hinder spatial planning and visual quality. Image generators can offer stronger visual design, but may misrender requested content, making their outputs unreliable for direct production.
AesCode uses an image generated from the same prompt as aesthetic guidance while grounding its code in the prompt’s content. It represents the target visual as a design graph describing the whole canvas, with properties that can be attributed to individual elements. Deterministic verifiers score properties that can be parsed from code and rendering; a vision-language model (AI that interprets images and text together) evaluates properties that cannot be parsed, using a sample-specific Visual Graph Rubric linked to graph elements and relationships.
The researchers optimize these separate rewards with reinforcement learning and per-channel normalization to improve spatial planning, aesthetics and verifiable correctness. They also built a benchmark that scores correctness and visual quality separately, reporting that its visual scores closely match human judgments. Their tests found reference images substantially improved the visual quality of code generated by existing models, and ablation studies found AesCode benefited from references both as model input and as a source of visual rewards. With the same references, AesCode-8B and AesCode-32B improved visual quality over same-scale Qwen3-VL baselines by 31.1 and 22.4 percentage points, respectively, reaching scores comparable to GPT-5.5 and Claude Opus 4.8.