AI-generated web pages can look identical while using totally different code underneath — so how do you fairly grade them?
How does code asymmetry break DOM-based evaluation of generated web interfaces?
This explores why comparing the underlying HTML structure (the DOM) of AI-generated web pages against a reference page is an unreliable way to score them, given that many different pieces of code can produce the same visible page, and what evaluation approaches the corpus offers instead.
This explores why checking AI-generated web pages by comparing their code structure to a reference page breaks down, and what researchers use instead. The core problem is that code and appearance don't line up one-to-one. Web pages crawled from the real internet are built in very different ways: one site nests ten divs to center a button, another uses a single flexbox rule, a third uses absolute positioning. All three can look the same on screen. If you reward a model for matching the reference DOM, you punish it for producing a different but equally valid structure, and you push it to imitate one site's quirks instead of learning to build the layout. ALISA names this "code asymmetry" and works around it by rendering both pages, matching elements by their visible text, and then scoring spatial alignment, grouping, and style consistency. It judges what the page looks like, not how it was written, and it avoids the cost of running a vision model as a judge Can rendering-based metrics better reward WebUI code generation?.
The rest of the corpus shows that dropping code comparison fixes one blind spot and opens another. If you judge only the rendered result, you can't see whether the page works. WebGen-R1 found that vision-language model scoring passes websites that look perfect but have broken event handlers and broken logic underneath. Their fix was to run deterministic structural checks and actual build-render-execute pipelines before any visual scoring Can vision-language models alone detect broken website functionality?. ReLook trains with a screenshot-scoring critic but gives zero reward to any page that fails to render, so the model can't game the visual judge with broken output Can multimodal LLMs judge front-end code quality better than tests?. A three-agent reward setup goes further by splitting the judgment into execution, static appearance, and interactive behavior. With it, a 4B-parameter model beat GPT-4o on webpage aesthetics Can reward agents teach code to look better?.
Accessibility is where this matters most, and it's easy to miss. For a screen-reader user, the DOM is the interface. ARIA attributes, focus order, and keyboard navigation live in the code structure and never show up in a screenshot. LLMs already produce code that passes surface-level automated checks like contrast and alt text while failing on ARIA Do large language models write more accessible web code than humans?. Feedback loops that send accessibility-checker results back into generation help, but they still struggle with keyboard and focus requirements Can feeding accessibility violations back into code generation improve results?. LLM repair passes cut violations sharply, but fewer than a quarter of files end up fully compliant Can LLMs actually fix web accessibility problems?. A reward that ignores code structure because the training data is asymmetric could make this gap worse without anyone noticing. GUI agents point the same way: Agent S works better when it pairs screenshots with accessibility trees, because the structure carries information that pixels don't Can structured interfaces help language models control GUIs better?.
In short, code asymmetry is a good reason to stop comparing DOMs to a reference. It is not a reason to stop looking at the DOM. The approaches that look strongest judge appearance by rendering, judge function by running the page, and judge semantics by checking structure against rules (accessibility standards, working event handlers) rather than against one reference implementation. That three-way split also explains a finding from generative UI tools: they skip about a third of functional requirements, more than other kinds of design rationale Do generative UI tools actually implement their stated design rationales?. Function is the layer that neither visual similarity nor code matching reliably catches. One caveat: only the ALISA note addresses code asymmetry by name. The other connections are drawn across neighboring work, not taken from papers that study the problem directly.
Sources 9 notes
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.
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.
GPT-4o and Qwen2.5-Coder outperformed human developers on contrast and alt text but struggled with ARIA attributes. Both models produced code that passed surface-level automated checks while missing deeper semantic requirements.
Show all 9 sources
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.
Testing Kimi K2.5 on real HTML pages shows LLM-generated repairs improve compliance in 80% of cases and reduce violations per file from 3.98 to 1.7, yet fully resolve fewer than 26% of files. Iterating repairs increases cost 52% with no improvement.
Agent S's dual-input design—visual input for environmental understanding plus image-augmented accessibility trees for grounding—achieved 9.37% improvement over baseline by factoring planning and grounding into separate optimization paths rather than forcing end-to-end prediction.
A benchmark of 24 tasks across five tools found roughly 25% of design rationales go unimplemented, rising to 34% for functional requirements. Tools recognized only half the UX principles embedded in prompts.
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
- WebRenderBench: Enhancing Web Interface Generation through Layout-Style Consistency and Reinforcement Learning
- GameUIAgent: An LLM-Powered Framework for Automated Game UI Design with Structured Intermediate Representation
- WebGen-R1: Incentivizing Large Language Models to Generate Functional and Aesthetic Websites with Reinforcement Learning
- ReLook: Vision-Grounded RL with a Multimodal LLM Critic for Agentic Web Coding
- LLM Based Web Accessibility Repair: An Empirical Study of Detection, Remediation, and Cost
- UI-Bench: A Benchmark for Evaluating Design Capabilities of AI Text-to-App Tools
- Human or LLM? A Comparative Study on Accessible Code Generation Capability