TL;DR
AesCode is a new framework that enables LLMs to generate high-quality, editable infographics (like dashboards and posters) by using AI-generated images as "aesthetic guides." By representing designs as a structured "Design Graph" and using decoupled reinforcement learning rewards, it produces code that is both factually accurate and visually professional, rivaling the performance of closed-source frontier models.
What Problem Does This Paper Address?
Creating information-rich visual artifacts—think business dashboards, academic posters, or event flyers—is a balancing act. If you use an image generator (like DALL-E or Midjourney), the results look stunning but are "dumb" pixels; you can't edit the text, and the data is often hallucinated. If you use a code-generation model to write HTML/CSS, the output is editable and verifiable, but the model is essentially "blind" to the canvas. Without a visual sense, these models often produce layouts that look dated, cluttered, or physically impossible.
The authors address this "vision-gap" in code models. They want to give code models the aesthetic intuition of an image generator without sacrificing the structural integrity and factual correctness of code.
Methods
The core innovation of AesCode is the Design Graph, a structured intermediate representation that separates what needs to be on the page (content) from how it should look (style).
The system works in three main stages:
- Aesthetic Guidance: For a given prompt, an image generator creates a reference image. This image isn't a "ground truth" to be copied pixel-for-pixel (which would include the image generator's errors), but rather a visual prior for layout and color.
- Design Graph Abstraction: The target is represented as a graph where nodes are elements (text, charts, tables) and edges define relationships (alignment, containment).
- Decoupled Cross-Modal Rewards: To train the model via Reinforcement Learning (RL), the authors use two types of rewards:
- Deterministic Verifiers: Programmatic checks that ensure the code executes, the text is correct, and elements stay within the canvas boundaries.
- VLM Judge with Visual Graph Rubric (VGR): A Vision-Language Model (VLM) acts as a design critic. Instead of giving a vague "holistic" score, it answers specific binary questions tied to the Design Graph (e.g., "Is the legend aligned with the chart?").
To prevent the "dense" programmatic rewards from drowning out the "sparse" aesthetic feedback, they use Group reward-Decoupled Normalization Policy Optimization (GDPO), which normalizes each reward channel separately.
Datasets
The researchers curated a pool of 18,000 human-designed artifacts (slides, posters, etc.) to extract prompts and requirements.
- SFT Data: 3,000 high-quality demonstrations paired with original human designs.
- RL Data: ~8,000 prompts where the model learns from synthetic image references.
- Benchmark: They introduced a new 300-instance infographic benchmark that evaluates "Rule" (verifiable correctness) and "Visual" (aesthetic quality) separately.
Key Insights and Ideas
- Reference as Prior, Not Target: Previous "image-to-code" methods tried to replicate pixels. AesCode treats the image as a suggestion, allowing the model to ignore the image generator's typos while adopting its professional layout.
- The Power of "Yes/No" Questions: VLMs are notoriously unstable at giving 1-10 scores. By forcing the VLM judge to answer specific, node-linked binary questions (the VGR), the authors achieved a 93.3% agreement rate with human judgments.
- Attributable Rewards: Because every reward is tied to a specific node or edge in the Design Graph, the model receives much clearer gradients on why a particular generation failed (e.g., "the text is right, but the layout is overlapping").
Key Results
AesCode significantly closes the gap between open-source models and proprietary giants.
- Massive Gains: AesCode-32B improved visual quality by 22.4 percentage points over its base Qwen3-VL model.
- Frontier Parity: It reached visual quality scores comparable to GPT-5.5 and Claude Opus 4.8 while maintaining significantly higher factual correctness (fewer content errors).
- Verifiable Correctness: In the "Rule" category (Text, Boundary, and Chart accuracy), AesCode-32B scored 94.33%, outperforming all tested frontier models.
Limitations and Future Work
Despite its success, the authors note a few "residual failure modes":
- Canvas Overflow: While rare, the model sometimes fails to anticipate the final pixel geometry of complex elements, leading to slight spills off the edge.
- Relational Complexity: High-level connections (like complex flowcharts) remain difficult to optimize because the rewards for these relationships are sparse.
- Semantic Degradation: Small icons sometimes lose their specific meaning and turn into generic circles or squares during the optimization process.
Future work will likely focus on visually grounded iterative refinement, where the model "sees" its own rendered output and makes surgical edits to fix alignment or overlap issues.
Summary updated