Do AI design tools catch ugly, overlapping layouts better by checking the actual picture, or just by checking the code ran?
Can bounding-box signals prevent visual flaws better than code APIs?
This explores whether AI systems that generate slides, web pages or other visual layouts catch problems like overlapping or misplaced elements better when they check where things actually land on the rendered page (their bounding boxes) than when they only check that the layout code ran without errors.
This explores whether checking where elements actually land after rendering catches layout flaws that code-level checks miss. The corpus has no head-to-head experiment of the two. It does point in one direction: code that runs is a weak guarantee of a page that looks right. The clearest case is Can slide-editing agents fix visual flaws they cannot see?. PPTAgent edits slides through code APIs, and its self-correction loop only checks whether those API calls succeeded. A slide whose text boxes overlap still counts as a pass, because nothing ever looks at the rendered result. The same gap shows up in another domain in Can CAD code be syntactically correct yet geometrically wrong?. After supervised fine-tuning, 91% of a model's CAD programs run, but the shapes they produce match the target geometry only about half the time. Running correctly and looking correct are separate skills, and training one doesn't deliver the other.
Geometric signals target exactly this blind spot. Can rendering-based metrics better reward WebUI code generation? renders the generated page and the reference page, pairs up matching elements by their text, and rewards the model for spatial alignment, grouping and style consistency. In effect it compares where the boxes landed. The interesting part is what this avoids. It skips the cost and fuzziness of asking a vision model whether the page looks right. It also avoids comparing code structure, which is brittle because two very different HTML files can render the same page. A separate line of work shows that box coordinates carry a lot of information on their own: Can bounding boxes replace image encoders for document understanding? finds that text plus bounding boxes can model document layout without an image encoder at all, at much lower compute cost. Boxes turn out to be a compact, checkable stand-in for visual structure.
The main alternative is to judge pixels directly. Can multimodal LLMs judge front-end code quality better than tests? and Can visual matching alone train image-to-code models without text? both score rendered screenshots. Their bet is that checking whether a render matches is easier than writing the code that produces it. Pixel judges have their own blind spots, though. Do text-to-image rewards all miss the same structural flaws? finds that every image reward model tested misses the same structural flaws: distorted geometry, duplicated objects, blended entities. A bounding-box check is the kind of deterministic test that can catch duplication or overlap when an aesthetic judge waves it through. Why do vision-only GUI agents struggle with screen interpretation? makes a related point for GUI agents: parsing a screen into structured elements first helps the model more than asking it to read raw pixels and act at the same time.
The twist is that no single kind of check covers everything. Can vision-language models alone detect broken website functionality? shows a website can look perfect while its buttons are broken, so you still need to actually build and run the page. Can feeding accessibility violations back into code generation improve results? shows that feeding automated checker results back into generation helps a lot but still misses subtler accessibility issues such as keyboard focus. So bounding-box signals likely beat code-API checks at catching visual flaws, since one inspects the result and the other only inspects the process. In practice they work best as one layer in a stack: code that runs, boxes in the right places, a page that works, and only then a judgment of whether it looks good.
Sources 10 notes
PPTAgent outperforms text-to-slides baselines on layout but corrects only code-level execution, not rendered appearance. Its self-correction loop checks HTML representation success, not whether overlapping elements or other visual breaks occur after rendering.
Supervised fine-tuning alone produces 91% executable CAD code but only 50% geometric IoU. Chain-of-thought reasoning raises IoU to 61%, while RL post-training pushes it to 72%, showing the two capabilities decouple during early training.
ALISA computes RL rewards by rendering generated and ground-truth pages, then matching elements by text similarity and measuring spatial alignment, grouping, and style consistency. This avoids vision-model overhead and DOM-structure brittleness caused by code asymmetry in crawled training data.
DocLLM shows that bounding-box spatial information combined with decomposed transformer attention can capture text-spatial alignment in documents without pixel-based visual encoding. Pretraining on text-infilling objectives suited to irregular layouts achieves this at substantially lower computational cost than multimodal LLMs using image encoders.
ReLook trains a reward model on visual screenshots rather than unit tests, using a strict zero-reward rule for invalid renders to prevent reward hacking. It outperformed baselines across three benchmarks by embedding pixel-level visual judgment into the policy training loop.
Show all 10 sources
RRVF rewards MLLMs for how closely rendered code output matches the source image, not for matching ground-truth text or code. This leverages asymmetry-of-verification: checking if rendered output matches is easier than generating code, making visual similarity a tractable RL reward signal.
Every tested reward model—aesthetic, preference, and consistency-based—develops its own failure mode, but all consistently fail to penalize geometric distortions, object duplication, and entity blending. A lightweight adaptive reward model trained on human-judged artifact examples can fill this gap.
OmniParser demonstrates that GPT-4V fails when forced to simultaneously identify icon meanings and predict actions from raw screenshots. Pre-parsing screenshots into structured semantic elements with descriptions lets the model focus solely on action prediction, removing the composite-task bottleneck.
WebGen-R1 found that VLM aesthetic scoring misses broken event handlers and logic chains hiding beneath visually perfect interfaces. The solution is to gate VLM scoring behind deterministic structural checks and actual build-render-execute pipelines first.
FeedA11y's ReAct-based feedback loop significantly outperforms zero-shot, few-shot, and self-criticism prompting by iteratively feeding evaluator results back into generation. However, it still struggles with nuanced ARIA constraints like keyboard navigation and focus management, suggesting evaluator feedback alone cannot substitute for domain expertise.
Papers this line draws on 8
The research behind the notes this line reads — ranked by how closely each paper relates.
- ReLook: Vision-Grounded RL with a Multimodal LLM Critic for Agentic Web Coding
- Learning Only with Images: Visual Reinforcement Learning with Reasoning, Rendering, and Visual Feedback
- GameUIAgent: An LLM-Powered Framework for Automated Game UI Design with Structured Intermediate Representation
- ScreenCoder: Advancing Visual-to-Code Generation for Front-End Automation via Modular Multimodal Agents
- Code Aesthetics with Agentic Reward Feedback
- WebGen-R1: Incentivizing Large Language Models to Generate Functional and Aesthetic Websites with Reinforcement Learning
- WebRenderBench: Enhancing Web Interface Generation through Layout-Style Consistency and Reinforcement Learning
- AeSlides: Incentivizing Aesthetic Layout in LLM-Based Slide Generation via Verifiable Rewards