Should a webpage's code working and its design looking good count equally when training AI to build websites?
Should executable functionality and visual appearance be weighted equally in webpage reward signals?
This explores how a reward signal for training AI to generate webpages should balance 'does it actually work' against 'does it look good', and whether averaging the two into one score is the right design.
This explores how a reward signal for AI-generated webpages should balance whether the page works against whether it looks good. The short answer from the corpus is that 'equal weighting' is the wrong way to frame it. The systems that hold up don't add the two scores together. They make functionality a gate: if the page doesn't build, render, or respond, its looks don't count. Looks get optimized only after a page has passed that gate.
The reason is a blind spot that shows up again and again. A vision-language model scoring screenshots can't see a broken click handler or a logic chain that fails quietly behind a polished interface Can vision-language models alone detect broken website functionality?. If functionality and aesthetics are blended into one number, a beautiful page that does nothing can still score well, and reinforcement learning will find and exploit that. WebGen-R1's fix is to run deterministic structural checks and a real build-render-execute pipeline first, and only then hand the page to the visual judge. ReLook takes a harsher version of the same idea: any page that fails to render gets zero reward, however promising its code looks Can multimodal LLMs judge front-end code quality better than tests?. Neither of these is a weighting scheme. Both are on/off switches.
Splitting the problem further also helps. One approach uses three separate reward agents: one checks that the code executes, one judges the static visual result, and one actually clicks through and interacts with the rendered page Can reward agents teach code to look better?. The interactive agent matters because a screenshot is frozen, while a webpage is something you use Can static screenshots alone evaluate interactive webpage quality?. With this setup, a 4B-parameter model beat GPT-4o on webpage aesthetics. That suggests the biggest gains came from keeping 'works' and 'looks good' as separate, checkable signals rather than from fine-tuning a balance between them. ALISA pushes 'looks good' toward something measurable too. It renders the generated page and the target page and compares their layout alignment, grouping, and styling, with no vision model involved Can rendering-based metrics better reward WebUI code generation?.
The gate-then-optimize pattern isn't specific to webpages. Work on rubric-based training found that using rubrics to accept or reject whole batches of outputs, rather than turning rubric scores into points to add up, prevented reward hacking while still allowing fine-grained optimization among the valid answers Can rubrics and dense rewards work together without hacking?. That is the same structure: feasibility is a hard constraint, and quality is what you optimize inside it. Image generation shows what happens without such a gate. Every aesthetic and preference reward tested failed to penalize the same structural flaws, such as duplicated objects and warped geometry Do text-to-image rewards all miss the same structural flaws?. The general lesson is that reward hacking happens whenever you optimize against a signal that captures only part of the real task Does reward hacking always stem from the same failure?. A visual score is exactly that kind of partial signal for a webpage.
The less obvious point is that the two properties aren't symmetric. Functionality can mostly be checked objectively: the page renders or it doesn't, the button fires or it doesn't. Aesthetics depends more on judgment, and the corpus flags that even a carefully designed aesthetic reward may not hold across cultures or user groups Can a single aesthetic reward model generalize across cultures?. So the useful design question isn't how much weight each property gets. It's which property you can verify strictly enough to use as a gate, and which one you have to keep optimizing carefully because its definition is never fully settled.
Sources 9 notes
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.
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.
A three-agent reward system (execution, static visual, interactive) integrated into GRPO training enabled a 4B-parameter model to surpass GPT-4o and GPT-4.1 on webpage and plot aesthetics. The approach used 358K training examples and a new 840-case benchmark.
The paper adds an interactive aesthetics agent that actively navigates and interacts with rendered pages, distinct from a static vision judge. This prevents the training signal from rewarding pages that look polished but fail to function.
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.
Show all 9 sources
DRO shows that using rubrics to accept or reject rollout groups—rather than converting rubric scores into dense rewards—prevents reward hacking. This separation preserves the categorical strength of rubrics while letting token-level rewards optimize within valid answers.
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.
Reward hacking arises during weight training, output selection, and prompt revision through a shared failure: optimization against signals that incompletely represent the actual task. The substrate matters less than the misalignment between the scoring function and ground truth.
The paper acknowledges that aesthetic standards vary across cultures and user groups, stating a single reward may not capture that diversity. However, it reports no data on cultural variation magnitude, annotator selection, or how reward quality shifts across different populations.
Papers this line draws on 8
The research behind the notes this line reads — ranked by how closely each paper relates.
- Code Aesthetics with Agentic Reward Feedback
- WebGen-R1: Incentivizing Large Language Models to Generate Functional and Aesthetic Websites with Reinforcement Learning
- GameUIAgent: An LLM-Powered Framework for Automated Game UI Design with Structured Intermediate Representation
- WebRenderBench: Enhancing Web Interface Generation through Layout-Style Consistency and Reinforcement Learning
- AeSlides: Incentivizing Aesthetic Layout in LLM-Based Slide Generation via Verifiable Rewards
- ReLook: Vision-Grounded RL with a Multimodal LLM Critic for Agentic Web Coding
- UI-Bench: A Benchmark for Evaluating Design Capabilities of AI Text-to-App Tools
- Understanding Reward Hacking in Text-to-Image Reinforcement Learning