betaFeedback

WorksComputer Science

WebUIProof: Benchmarking WebUI Code Generators with UI-Agent Execution Harness

Abstract

Evaluating WebUI code generation at scale is difficult: outputs may compile and look plausible yet fail under user interaction, and prior benchmarks largely rely on free-form prompts with static checks (build success, screenshots) that miss functional correctness. We introduce WebUIProof, an execution-oriented benchmark that provides structured specifications and dense, executable interaction tests for WebUI generation across two task families: general WebUIs (e.g., dashboards, game, interactive tools) and 3D interactive simulation (e.g., particle/galaxy systems, physics dynamics). WebUIProof includes a UI-agent harness that runs executable interaction tests in a headless browser using an iterative plan–act–observe loop: it locates DOM elements, performs actions, observes resulting UI/DOM changes, and checks the specified assertions. We evaluate across eight commercial LLMs and observe frequent failures on interaction-based requirements even when pages render successfully, especially on 3D simulation interfaces. Finally, we show the UI-agent harness can provide outcome-level training signals. Training compact models (e.g., Qwen2.5 14B and MIMO 7B) with RL rewards derived from executable interaction tests improves functional completion while reducing build failures.

Introduction

With LLMs increasingly integrate into the software development cycles, reliable evaluation for code generation becomes critical, motivating the benchmarks for real-world GitHub issues [10], programming competitions [11], multilingual coding tasks [27], and interview coding problems [9]. Frontend code generation (WebUI generation) differs fundamentally from backend code synthesis and remains comparatively underexplored. The correctness depends not only on whether code compiles, but on what the UI renders and how it behaves under interaction.

Existing WebUI benchmarks only partially address this challenge. WebDev-Arena [26] provides a large set of web prompts, but instructions are largely free-form and evaluation relies on human preference rather than executable functional verification. WebGen-Bench [13] introduces test cases for web prompts, but many requirements stated in instructions are left unchecked, resulting in incomplete coverage of instruction-following. More broadly, many benchmarks [20, 24, 19] depend on static checks such as build success, lint/type checks, or screenshots, which are insufficient to validate interactive behavior.

We introduce WebUIProof, an execution-oriented benchmark designed to measure functional, interactive correctness of WebUI code generation. WebUIProof replaces free-form prompts with structured

Preprint. specifications (website summary and UI element requirements) and pairs them with executable interaction tests that drive the UI agent to verify expected behavior. WebUIProof contains 219 tasks (149 general + 70 3D) paired with 3k executable interaction tests, enabling functional evaluation at much higher granularity than prompt-only benchmarks. The tasks span two families that cover standard UI workflows and richer interactive behaviors, including dashboards/games/tools and interactive 3D simulations such as physics dynamics and 3D scenes (see Figure 1). Our evaluation protocol is automated and reproducible, with a fixed UI-agent execution harness that runs these tests in a headless browser by iteratively planning the next interaction, executing browser actions (e.g., click, select, type, scroll), observing DOM/visual state changes, and verifying test assertions.

Examples of WebUI outputs in WebUIProof

Figure 1. Examples of WebUI outputs in WebUIProof, spanning general applications (landing pages, code IDE, social/profile pages, games) and 3D simulation interfaces (physics dynamics, planetary scenes). These examples illustrate the benchmark’s emphasis on both visual fidelity and interaction-driven functionality. Each task is evaluated with executable interaction tests that check user actions (click/type/drag) and the resulting UI behavior.

While WebUIProof is primarily a benchmark contribution, the harness also provides outcome-level training signals by self-observing the rendered UI in training rollouts and deriving interactive tests from it. We therefore include VisRL (Visual-guided Reinforcement Learning), an execution-grounded RL approach that optimizes a compact model using composite rewards from build/runtime execution, visual quality, and UI-agent execution test success. In addition, we adopt several training strategies, such as multi-temperature sampling and fast-gate filtering, to improve rollout efficiency and stabilize learning under costly executable evaluation.

Our contributions are as follows:

  1. We introduce WebUIProof, an execution-oriented benchmark for WebUI code generation that pairs structured specifications with executable interaction tests and a fixed UI-agent evaluation protocol for functional correctness. It contains 219 tasks spanning (i) general WebUIs (e.g., dashboards, games, interactive tools) and (ii) 3D simulation WebUIs (e.g., physics-driven interactive scenes).

  1. We provide an agent-assisted construction pipeline for producing structured specs. and element-aligned executable tests at scale (§ 3).

  1. With our executable UI-agent protocol (DOM grounding + interaction execution + assertions), we benchmark eight commercial LLMs and show that many outputs build/render yet fail interaction requirements, especially on 3D simulation interfaces. (§ 4).

  1. We include VisRL as an execution-grounded RL approach enabled by the execution harness with composite rewards. Training compact model such as Qwen2.5 14B Instruct and MIMO 7B yield significant improvements of accuracy on general WebUI (+15.7% gain) and 3D simulation tasks (+4.9% gain) over SFT. We provide comprehensive ablations on evaluator robustness, benchmark quality analysis, and learning strategies (§ 5).

Related Works

Benchmark for Frontend Code Generation. Prior agentic SWE systems (e.g., SWE-Agent [8], SWE-bench [10], SWE-Gym [23], StackEval [25]) focus on repository-level editing and bug fixing, whereas we study end-to-end WebUI generation evaluated through buildability, visual fidelity, and UI-agent-tested interactivity. FrontendBench [29] first standardizes the pipeline for frontend code generation as: (1.) LLMs receive instructions for generating code, (2.) render the code in a controlled sandbox environment, (3.) automate test scripts, and let the agent provide feedback loops. WebDevArena [26] is a large-scale benchmark that contains over 10k instruction prompts collected from online sources. Models are evaluated through pairwise comparisons with human votes determining preference. While valuable for capturing human preference, the instructions are loosely structured and lack automated test cases. DesignBench [20] evaluates framework-based web development (e.g., React/Vue/Angular) across generation, editing, and repair. The key difference in their setting is the evaluation signal, which scores outputs based on screenshot-level visual similarity and code modification similarity via Jaccard similarity. In particular, it does not employ a UI agent to locate DOM elements and verify behavioral assertions via scripted test cases. WebGen-Bench [13] introduces web agents that take prompt instructions to generate a frontend project with full repository, and evaluate the website with executable web tasks in the sandbox build environment In contrast, our WebUIProof provides structured specifications (website summary, functional descriptions, and required UI elements) paired with executable test cases, and evaluates generations by a UI agent that interacts with the rendered page via DOM-level element localization and action execution (click/type/navigate) to verify test assertions. Table 1 provides a detailed comparison of benchmarks for WebUI code generation.

Benchmark#Instr.Instr. FormInstr. TypeInstr. LengthOutput ScopeUI TopicUI Agent Eval.#TestsTCR(%)
DesignBench [20]900NL promptsGen./Edit/Repair∼80–150Single file (HTML)General✗00%
WebDev-Arena [26]>10kNL promptsGen.∼60Repo (App)General✗00%
FrontendBench [29]148NL promptsGen.∼50–100Single file (HTML)General✓148∼90%
WebGen-Bench [13]101NL promptsGen.∼40–70Repo (App)General✓∼60049.24%
WebUIProof (Ours)219Structured Spec.Gen.∼270–550Repo (App)General+3D✓∼3k97.23%

Table 1. Benchmarks comparison for WebUI code generation. We compare the benchmark based on instruction number, form, type, length, and output scope. UI Topic indicates general WebUIs (dashboards/tools/games) or additionally includes 3D simulation interfaces (classical mechanics/particles simulation). UI Agent Eval. denotes whether the evaluation involves a UI agent that executes test suites. Test coverage rate (TCR) measures element-level coverage. Our WebUIProof provides diverse UI topics (general+3D) with rich test suites and high TCR.

Web-based Testing with UI Agents. WebUI evaluation commonly relies on headless browsers such as Playwright2 and Selenium WebDriver3, which supports reliable automated testing via DOM inspection, event simulation, and screenshot capture. Building on this, recent UI agents, such as WebVoyager [7], combine HTML and screenshots for end-to-end reasoning and action. In addition, WebArena [28] and BrowserGym [18] provide standardized environments for reproducible web-agent evaluation. Related benchmarks such as WebBench [6] and VisualWebBench [12] assesses UI-agent capability on webpage browsing, understanding, and grounding. In our work, we implement our evaluator based on WebVoyager for both general WebUI generation and 3D simulation.

Method

This section describes WebUIProof, including (1) the benchmark overview, (2) the UI-agent evaluation protocol used for scoring, and (3) the agent-assisted benchmark construction pipeline. Separately, we also present VisRL as a training approach to illustrate how the executable harness can provide outcome-level learning signals.

WebUIProof Benchmark Overview

Task Families and Scope. WebUIProof contains 219 tasks spanning two families: (i) General WebUIs (149) and (ii) 3D simulation WebUIs (70). General tasks cover five types of common web applications, such as dashboards and data analytics tools, social profile interfaces, and interactive games; 3D simulation tasks cover six types of interactive Three.js-style scenes, such as physics dynamics, fluid waves simulation, and astro particles visualizations. (Appendix § 8.§ 2 Figure 10 shows the category distribution).

Two pie charts showing WebUI category distributions. General WebUI (Total #samples=149): Creative Media 41.6%, Data Management 20.1%, Games Sports 12.8%, Social Interaction 16.1%, Learning Lifestyle 9.4%. 3D Simulation (Total #samples=70): Classical Mechanics 42.9%, Fluid Waves 24.3%, Astro Particles 12.9%, Dynamics Chaos 12.9%, Structural Physics 4.3%, Game Physics 2.9%.

Figure 10. WebUI Category Distribution for WebUIProof.

Data Sources. We collect seed prompts from WebGen-Bench [13] and WebDev-Arena [26], and we generate seed webpages with these prompts to drive agent-assisted structured specification and test generation. The 3D simulation WebUIs are built from Three.js4 example pages and similar public demo scenes, focusing on browser-based WebGL simulations with interactive user controls (See Appendix § 8.§ 1).

Benchmark Instance Format. Figure 2 illustrates the benchmark instance format of WebUIProof. Each task is packaged as (website_summary, element_requirement, test_cases). The website_summary describes appearance and functionality; element_requirement lists required UI elements with stable identifiers and locator hints; and test_cases are executable interaction tests with preconditions, procedure, and assertions. We group tests into three semantic types: Functionality, Data-display, and Design-validation tests. (Appendix § 8.§ 2 Figure 11 shows the test case distribution).

Benchmark instance format of WebUIProof

Figure 2. Benchmark instance format of WebUIProof. We show a structured spec. with paired test cases. Our benchmark construction pipeline first lets the UI agent collect a sequence of visual snapshots and HTML/DOM structure from the given seed webpage. Based on observations from webpages, the UI agent provides a website summary and test case recommendations. The red and blue boxes illustrate element-to-test alignment: a subset of entries in "element_requirement" is grouped and paired with executable test cases, making element-level coverage explicit.

Two pie charts showing test case distributions. General WebUI (Total: 2,328 testcases): Functionality Testing 58.4%, Data Display Testing 30.0%, UI Design Validation 11.6%. 3D WebUI (Total: 292 test cases): Functionality Testing 49.0%, Data Display Testing 24.0%, UI Design Validation 27.1%.

Figure 11. Test Case Distribution for WebUIProof.

UI-Agent Evaluation Protocol

WebUIProof uses a fixed UI-agent execution harness to score functional correctness via executable interaction tests. For each test case, the agent follows an iterative Plan→Action→Observation loop. Specifically, it observes DOM and visual state changes, thinks and plans the interaction for the next step, executes browser actions (e.g., click/type/hover/drag/scroll, etc.), and checks the test assertions. The final score aggregates test outcomes into Full/Partial/No completion based on passed assertions. This protocol is applied identically to all models and tasks during the evaluation.

Benchmark Construction Pipeline

We construct WebUIProof with an agent-assisted pipeline that produces structured specifications paired with executable test cases. The pipeline is designed to (i) scale to diverse webpages, (ii) maximize test coverage over UI elements and behaviors, and (iii) minimize manual annotation. Each benchmark instance is packaged as: (website_summary, element_requirement, test_cases).

Phase I: Seeding from static webpages. Given a target webpage, we first collect (1) a set of visual snapshots (multiple views if available) and (2) the HTML/DOM structure of the page. We prompt a UI agent to produce a website summary that includes appearance and functionality, and to propose a small set of seed test cases that cover common workflows (e.g., search/filter, navigation, form submission). This stage provides basic test cases for UI agent to start the interactive exploration.

Phase II: Interactive exploration and UI elements retrieval. The dynamic states, such as hidden panels, modal dialogs, pagination, and hover states, may exist but are underexplored. We therefore run the agent on the webpage with basic test cases for exploration. Specifically, the agent executes an iterative Plan→Action→Observation loop: (1.) Plan: The agent receives the test cases and plans the execution (e.g., open settings, trigger sorting, expand menus). (2.) Action: The agent makes decisions on the next action (e.g., click/type/hover/drag/scroll). (3.) Observation: The agent records state changes and extracts structured information: (i) newly discovered UI elements, (ii) updated DOM attributes, (iii) textual/UI feedback, (iv) intermediate task progress, and (v) test cases recommendation. We ask the LLMs to provide the test cases in three perspectives, including function accessibility, data display correctness, and UI design or style consistency.

VisRL overview showing instruction prompts, UI code generation, build/render, policy LLM, code, vision, and UI-agent rewards, followed by PPO update

Figure 3. VisRL Overview: Given instruction prompts, the Policy LLM generates UI code candidates, which are built and rendered to produce screenshots; rewards combination (i) code validity with error fixing loop, (ii) vision-based screenshot scoring, and (iii) UI-agent interaction tests (element detection, task proposal, and execution success), and are used to update the policy via PPO.

From these loop trajectories, we incrementally update our structured spec.: (i) element_requirement, a canonical list of required UI elements with stable identifiers and locator hints (text, role, class/id, hierarchical path); and (ii) test_cases, expanded to reflect newly discovered states.

Phase III: Test case synthesis and post-processing. After each agent loop, we parse the interaction trajectory and extract candidate test cases from step-wise observations. Each case is formatted with: test_name, coverage_element, preconditions, procedure, and assertions. We then perform element-level coverage checking to identify UI elements that never appear in interactions or assertions. For any uncovered elements, we prompt the UI agent to generate additional test cases. Finally, we de-duplicate near-identical cases by merging variants that differ only in constants (e.g., slider values or dropdown options). The resulting instance is stored as a JSON file containing the structured specification and executable test suite. In Appendix § 8.§ 3 and B.4, we provide more detail about collection pipeline and samples for structured specification.

VisRL: RL Training with Executable Harness

While WebUIProof is primarily an evaluation benchmark, the executable UI-agent harness can provide outcome-level training signals. We include VisRL (Visual-guided Reinforcement Learning) as a new training approach that optimizes a compact model using rewards computed from multiple outcomes: (i) build/runtime execution, (ii) rendered visual quality, and (iii) UI-agent interaction-test success. Concretely, given generated code cc and a task specification pp, we build and render the project and compute a composite reward r(c,p)=αvrv(I(c))+αuru(s(c),T(p))+αmrm(c)r(c,p) = \alpha_v r_v(I(c)) + \alpha_u r_u(s(c), T(p)) + \alpha_m r_m(c), where rvr_v scores rendered screenshots, rur_u is the interaction-test pass rate, and rmr_m is a lightweight analyzer penalty/bonus for common failure patterns. Full PPO details are provided in Appendix § 10.§ 2 § 10.§ 3, § 10.§ 4.

Design Insight. We observe that single-signal rewards are insufficient in WebUI generation. Optimizing interaction tests only tends to produce minimal but functional UIs, while optimizing visual scores only improves visual appearance quality without guaranteeing correct behavior. Thus, combining build/runtime, visual, and interaction signals yields the most balanced improvements across functionality and UI appearance, We provide comprehensive studies on reward decomposition and weight sensitivity in Appendix § 11.§ 2, § 11.§ 3.

Training Stability. Because rewards are only observed after build/render/test, we adopt two lightweight strategies to stabilize and reduce rollout cost: multi-temperature sampling to increase candidate diversity under a fixed best-of-NN budget, and fast-gate filtering to skip obviously invalid generations before expensive execution. Ablations in § 5.3 show both components matter for accuracy and build failure reduction.

Experiment

Experimental Setting

Model. We evaluate eight state-of-the-art LLMs spanning different architectures, scales, and training paradigms. Claude Sonnet 4 [3] and Gemini 2.5 Pro [4] represent strong closed-source reasoning-oriented models with multimodal capabilities. Qwen 3 Coder 480B Instruct5 [2] and Llama 4 Maverick [15] / Llama 3 405B [14] are open-source instruction-tuned models optimized for code synthesis and general reasoning. DeepSeek R1 [5] is an open-weight model emphasizing step-by-step “reasoning-first” training. Moonshot Kimi K2 [16] is a high-efficiency proprietary model designed for long-context understanding and structured output. Finally, GPT 4.1 [17] serves as a strong general-purpose baseline. Furthermore, we use two compact models Qwen 2.5 14B Instruct6 [1, 22] and MIMO 7B [21] as the base model for training. We compare the results of VisRL with two training variants (SFT baseline and PPO with Vision agent).

UI-agent Evaluator Setup. We evaluate functional correctness using a fixed UI-agent execution harness implemented with Playwright webdriver and a vision-language model (Qwen2.5-VL 72B) as the evaluator. The evaluator runs in a headless browser with a 1280×8001280 \times800 viewport, a per-task step budget of 15, and supports the actions {click, type, select, scroll, drag, hover, wait}. Each task is scored by executing its test suite and aggregating outcomes into Full/Partial/No completion. We keep this evaluator frozen and identical across all models and methods. Details of the execution environment, prompts, and failure handling are provided in Appendix A. We additionally validate evaluator robustness via expanded human–agent agreement (N=100 across multiple model families) and step-budget sensitivity analysis (5/10/15 steps) with failure-mode attribution (see § 5.1).

Training Details of VisRL. We use Qwen 2.5 14B Instruct [1] as our base model. We first launch the SFT training to establish a cold-start checkpoint. After that, we launch the PPO learning with LoRA adapters (r=16r=16, α=32\alpha=32 for general WebUI task), batch size 24, learning rate 2×10−72\times10^{-7}, and vLLM for off-policy generation with periodic adapter reloads. We use 4 H100-80 GB NVIDIA GPUs for training. We compare VisRL with two training variant, including pure SFT and PPO with vision agent. The baseline, PPO with vision agent, leverages the agent to score the WebUI screenshot with vision rubric (see Appendix § 10.7). We provide implementation details, including training hyperparameters, hardware resources, system configuration, and training infrastructure (see Appendix C.1). In Appendix D.1, we show the training curve analysis.

Training Data. For general WebUI task, we leverage the 6000 training set from webgen-bench [13] to do the SFT and PPO training. We de-duplicate the training data and also avoid using data that requires a login page first to facilitate our training process. For the 3D simulation task, we construct our own Three.js training dataset by scraping the official threejs.org examples. Using the files.json index, we crawl each demo and parse its HTML to extract metadata (title, description, tags), which we convert into instruction prompts. The resulting dataset covers a wide range of real-world Three.js patterns (e.g., animation, interactive controls, external assets, visual effects) and contains 1600+ prompts.

Experimental Results

Table 2 and Table 3 report WebUI generation performance on WebUIProof under the same fixed, executable UI-agent evaluation protocol across eight commercial models. We report (i) build failure rate (cannot build/render), and (ii) UI-agent verified task outcomes among build-successful generations (No/Partial/Full), summarized as Acc⁡=(#FULL+0.5⋅#PARTIAL)/N\operatorname{Acc} = (\#\mathrm{FULL} + 0.5 \cdot\#\mathrm{PARTIAL})/N with build failures counted as No. On General WebUI (Table 2), Claude Sonnet 4 performs best (46.10% acc.) but still fails to build in 30.37% of cases. The second-best models, Gemini 2.5 Pro (42.86% acc. and 32.21% build failure rate) and Qwen 3 Coder 480B (41.99% acc. and 33.05% build failure rate), form a tight cluster around 42% accuracy with similarly high build failures. On 3D simulation WebUIs (Table 3), Claude Sonnet 4 achieves 40.24% accuracy with 0% build failure, with Qwen 3 Coder 480B close behind at 37.67% (1.43% build failure), indicating that even frontier models leave substantial headroom on both of these interactive interfaces under executable UI-agent tests.

Model SourceModel Name / Training VariantBuild Failure Rate (%)Build Success – UI-Agent Verified Task Outcome (%) No CompletionBuild Success – UI-Agent Verified Task Outcome (%) Partial CompletionBuild Success – UI-Agent Verified Task Outcome (%) Full CompletionAccuracy (%) (Full + 0.5·Partial)
Proprietary (API)Claude Sonnet 4 [3]30.3712.5922.1035.0546.10
Gemini 2.5 Pro [4]32.2115.0220.3832.6742.86
Qwen 3 Coder 480B [2]33.0513.9220.7631.6241.99
DeepSeek R1 [5]32.8914.9120.5131.6541.90
GPT 4.1 [17]36.5811.6720.3031.2541.40
Llama 4 Maverick [15]46.642.5318.7231.4140.77
Kimi K2 [16]46.318.7011.9433.3339.30
Llama 3 405B [14]47.3210.1314.1829.1036.19
Self-TrainedQwen 2.5 14B [1] SFT56.2510.9711.8420.6626.08
+ PPO w/ Vision agent41.42 (-14.83)13.9611.6532.9738.79 (+12.71)
+ VisRL (Ours)36.10 (-20.15)13.7115.1334.2341.80 (+15.72)
MIMO 7B [21] SFT58.7112.157.3320.223.8
+ PPO w/ Vision agent51.44 (-7.27)15.3311.5221.327.06 (+3.26)
+ VisRL (Ours)40.22 (-18.49)17.4315.7125.6333.43 (+9.63)

Table 2. General WebUI generation on WebUIProof. We report the build failure rate (% of generations that fail to build/render), and the UI-agent verified task outcome among build-successful generations: No/Partial/Full completion rate (%). Overall Accuracy is computed as Acc=#Full+0.5⋅#PartialN×100\mathrm{Acc}=\frac{\#\mathrm{Full}+0.5\cdot\#\mathrm{Partial}}{N}\times100, where build failures are counted as No completion. Rows are grouped into eight proprietary (API) models and two self-trained models, including Qwen2.5 14B Instruct and MIMO 7B under three training variants: SFT, PPO w/ vision agent, and VisRL (ours).

Model SourceModel Name / Training VariantBuild Failure Rate (%)Build Success – UI-Agent Verified Task Outcome (%)Accuracy (%) (Full + 0.5·Partial)
No CompletionPartial CompletionFull Completion
Proprietary (API)Claude Sonnet 4 [3]0.0049.6620.2130.1440.24
Qwen 3 Coder 480B [2]1.4351.3717.1229.1137.67
Gemini 2.5 Pro [4]0.0054.7918.4926.7135.96
Kimi K2 [16]0.0054.7920.2125.0035.10
Llama 4 Maverick [15]0.0059.9315.7524.4332.19
DeepSeek R1 [5]11.4349.6617.1221.2329.79
GPT 4.1 [17]2.8565.4115.7515.0722.95
Llama 3 405B [14]2.8669.8613.7012.6719.52
Self-TrainedQwen 2.5 14B [1] SFT0.0055.6822.9420.9732.44
+ PPO w/ Vision agent0.0051.0026.3723.2836.47 (+4.03)
+ VisRL (Ours)0.0052.2419.3127.7337.38 (+4.94)
MIMO 7B [21] SFT4.7771.2413.3110.5417.20
+ PPO w/ Vision agent2.86 (-1.91)70.3014.8611.3218.75 (+1.55)
+ VisRL (Ours)0.00 (-4.77)69.2018.8610.6720.10 (+2.9)

Table 3. 3D simulation WebUI generation on WebUIProof. Same protocol as Table 2: we report build failure rate and UI-agent verified task outcomes (%), including No/Partial/Full completion rate, and compute Accuracy, counting build failures as No completion. Results compare eight proprietary (API) models and self-trained models, including Qwen2.5 14B Instruct and MIMO 7B under three training variants: SFT baseline, PPO w/ vision agent, and VisRL (ours).

We also report the results for compact open-sourced models trained under VisRL. On General WebUI, VisRL improves Qwen 2.5 14B Instruct from 26.08% to 41.80% accuracy while reducing build failures drop by 20.15%, and improves MIMO 7B from 23.80% to 33.43% while reducing build failures by 18.49% (Table 2). On 3D simulation WebUIs, VisRL improves Qwen 2.5 14B from 32.44% to 37.38% (build failures remain 0%), and improves MIMO 7B from 17.12% to 20.10% while reducing build failures by 4.77 points (Table 3). These results illustrate that the UI-agent harness provides a learnable signal for training compact baselines. Appendix E.1 provides per-category accuracy breakdowns (Table 10, Table 11, Table 12, Table 13).

Model NameBuild Failure Rate (%)Test CategoryNo CompletionPartial CompletionFull CompletionAccuracy (Cat. %)
Claude Sonnet 4 [3]30.37Functionality Testing10.1523.8630.2842.21
Claude Sonnet 4 [3]30.37Data Display Testing15.0415.7643.4151.29
Claude Sonnet 4 [3]30.37UI Design Validation18.5229.6337.0351.85
Gemini 2.5 Pro [4]32.21Functionality Testing16.1519.4422.4732.19
Gemini 2.5 Pro [4]32.21Data Display Testing12.8917.1951.5860.17
Gemini 2.5 Pro [4]32.21UI Design Validation14.8133.3335.1951.85
Qwen 3 Coder 480B [2]33.05Functionality Testing15.7821.5721.7732.56
Qwen 3 Coder 480B [2]33.05Data Display Testing12.8914.3250.1457.31
Qwen 3 Coder 480B [2]33.05UI Design Validation16.6733.3333.3350.00
DeepSeek R1 [5]32.89Functionality Testing15.9621.1426.2436.81
DeepSeek R1 [5]32.89Data Display Testing14.3217.1942.9851.58
DeepSeek R1 [5]32.89UI Design Validation11.1125.9329.6342.59
GPT 4.1 [17]36.58Functionality Testing7.4817.8429.9638.88
GPT 4.1 [17]36.58Data Display Testing18.6221.4935.8246.56
GPT 4.1 [17]36.58UI Design Validation14.8129.6325.9340.74
Llama 4 Maverick [15]46.64Functionality Testing1.3915.8730.9738.91
Llama 4 Maverick [15]46.64Data Display Testing4.3024.3634.3846.56
Llama 4 Maverick [15]46.64UI Design Validation3.7018.5225.9335.19
Kimi K2 [16]46.31Functionality Testing2.398.6734.9939.33
Kimi K2 [16]46.31Data Display Testing10.028.5935.8240.11
Kimi K2 [16]46.31UI Design Validation37.0437.0418.5237.04
Llama 3 405B [14]47.32Functionality Testing3.3715.4532.1739.89
Llama 3 405B [14]47.32Data Display Testing5.7314.3327.2234.38
Llama 3 405B [14]47.32UI Design Validation55.567.4018.5122.22

Table 10. Category accuracy of General WebUI task on Proprietary API.

Training Variants of Qwen 2.5 14B InstructBuild Failure Rate (%)Test CategoryNo CompletionPartial CompletionFull CompletionAccuracy (Cat. %)
Baseline SFT56.25Functionality Testing7.7510.7120.6626.01
Baseline SFT56.25Data Display Testing14.3314.3321.4928.65
Baseline SFT56.25UI Design Validation18.5211.1118.5224.07
PPO W/ Vision agent41.42Functionality Testing12.8711.0534.3839.90
PPO W/ Vision agent41.42Data Display Testing14.337.3028.6532.31
PPO W/ Vision agent41.42UI Design Validation18.5225.9337.0450.00
VisRL W/ UI agent36.10Functionality Testing11.7017.0835.8044.34
VisRL W/ UI agent36.10Data Display Testing15.7612.8928.6535.10
VisRL W/ UI agent36.10UI Design Validation18.5211.1140.7446.30

Table 11. Category accuracy of General WebUI task on Self-Trained Model.

Model NameBuild Failure Rate (%)Test CategoryNo CompletionPartial CompletionFull CompletionAccuracy (Cat. %)
Claude Sonnet 4 [3]0.00Functionality Testing53.1516.7930.0838.47
Claude Sonnet 4 [3]0.00Data Display Testing21.4342.8635.7157.14
Claude Sonnet 4 [3]0.00UI Design Validation68.356.3325.3225.32
Qwen 3 Coder 480B [2]1.43Functionality Testing55.2518.8727.2736.71
Qwen 3 Coder 480B [2]1.43Data Display Testing40.0025.7134.2947.14
Qwen 3 Coder 480B [2]1.43UI Design Validation54.436.3327.8531.01
Gemini 2.5 Pro [4]0.00Functionality Testing62.9315.3821.6729.36
Gemini 2.5 Pro [4]0.00Data Display Testing35.7128.5735.7150.00
Gemini 2.5 Pro [4]0.00UI Design Validation56.9615.1927.8535.44
Kimi K2 [16]0.00Functionality Testing56.5414.6928.6736.02
Kimi K2 [16]0.00Data Display Testing42.8640.0017.1437.14
Kimi K2 [16]0.00UI Design Validation62.0312.6625.3231.65
Llama 4 Maverick [15]0.00Functionality Testing67.137.6925.4129.25
Llama 4 Maverick [15]0.00Data Display Testing50.0028.5721.4335.71
Llama 4 Maverick [15]0.00UI Design Validation55.7018.9925.3234.81
DeepSeek R1 [5]11.43Functionality Testing34.2718.8722.3731.81
DeepSeek R1 [5]11.43Data Display Testing57.1421.4321.4332.14
DeepSeek R1 [5]11.43UI Design Validation70.8910.1318.9924.05
GPT 4.1 [17]2.85Functionality Testing67.8312.5811.8918.18
GPT 4.1 [17]2.85Data Display Testing50.0028.5721.4335.71
GPT 4.1 [17]2.85UI Design Validation74.6810.1315.1920.25
Llama 3 405B [14]2.86Functionality Testing65.0313.9913.2820.28
Llama 3 405B [14]2.86Data Display Testing74.298.5717.1421.43
Llama 3 405B [14]2.86UI Design Validation74.6817.727.5916.46

Table 12. Category accuracy of 3D WebUI task on Proprietary API.

Training Variants of Qwen 2.5 14B InstructBuild Failure Rate (%)Test CategoryNo CompletionPartial CompletionFull CompletionAccuracy (Cat. %)
Baseline SFT0.00Functionality Testing52.1612.8219.7426.16
Baseline SFT0.00Data Display Testing48.5725.7125.7138.57
Baseline SFT0.00UI Design Validation68.3512.6618.9925.32
PPO w/ Vision agent0.00Functionality Testing59.3827.9720.9634.95
PPO w/ Vision agent0.00Data Display Testing21.4335.7128.5746.43
PPO w/ Vision agent0.00UI Design Validation62.0315.1922.7830.38
VisRL w/ UI agent0.00Functionality Testing53.5314.9530.0537.53
VisRL w/ UI agent0.00Data Display Testing42.8628.5728.5742.86
VisRL w/ UI agent0.00UI Design Validation58.2318.9922.7832.28

Table 13. Category accuracy of 3D WebUI task on Self-Trained Model.

Ablation Studies

Evaluator Reliability and Failure Modes

Since WebUIProof relies on a UI-agent execution harness to run interaction tests, we quantify evaluator reliability by reporting (i) human-agent agreement on the FULL/PARTIAL/No labels across multiple model families, and (ii) sensitivity to the evaluator step budget with failure attribution.

• Human–agent agreement across model families. We annotate N=100N = 100 General WebUI samples and compare the UI agent’s labels against human judgments for three model families (Claude Sonnet 4, Gemini 2.5 Pro, and self-trained Qwen 2.5 14B with VisRL). Table 4 reports agreement rates and confusion matrices. Overall agreement is consistently above ∼80%\sim80\%, suggesting that the evaluator provides a reasonably stable signal across different generation styles.

Model FamiliesTotal Agree.N–NP–PY–YAdj.Far
Claude Sonnet 486183038131
Gemini 2.5 Pro82143137153
Qwen2.5 14B (VisRL)85183235105

Table 4. Human–agent agreement (N=100 on General WebUI). We report overall agreement rate, full agreement breakdown (N–N, P–P, Y–Y), and disagreement breakdown (Adjacent v.s. Far). "Adjacent" (Adj.) counts No↔Partial and Partial↔Yes confusions; "Far" counts No↔Yes confusions.

• Step budget sensitivity and failure attribution. Evaluator errors can arise from limited interaction budget or brittle element grounding. To characterize this, we vary the per-task step budget (5/10/15) on the same N=100N = 100 samples and attribute disagreements to concrete failure modes: timeout/step-limit, interaction failure (action executed but UI does not respond as expected), and element-locator failure (target cannot be grounded). Table 5 shows agreement increases with larger budgets while timeouts decrease, indicating that a meaningful portion of disagreement is due to resource/grounding limitations rather than systematic scoring bias.

# StepTotal Agree.TimeoutInteraction fail.Element Loc. fail.
580.06.710.03.3
1084.03.36.76.7
1586.70.04.39.0

Table 5. Step budget sensitivity of the UI-agent evaluator (N=100, General WebUI). Increasing the step budget improves human–agent agreement and reduces timeouts; remaining errors are primarily interaction and element-locator failures.

Analysis on Benchmark Quality

• Sensitivity to instruction complexity. To quantify how functional requirements scale with instruction difficulty, we define an instruction complexity index (ICI) that captures more than prompt length. ICI aggregates two factors, including Size SS (number of required elements and tests), Interactivity II (interaction verbs/actions): ICI = 0.5S+0.5I0.5S + 0.5I. While increasing the step, we increment the instruction with more requirements. The generation of each step is built sequentially; that is, the model will generate the code for the current step based on the code generated from prior steps. In Figure 4 (left side subgraph), we show the commercial models’ performance. When increasing the step from 1 to 9, the ICI score increases up to 68 (red dotted line), and the accuracy of the three frontier models gradually drops. On the right side subgraph, we show the accuracy of our self-trained model, including baseline SFT and VisRL (PPO with UI agent). The trend is similar to the frontier models.

Sensitivity analysis of model robustness versus instruction complexity

Figure 4. Sensitivity analysis of model robustness vs. instruction complexity. Commercial models exhibit superior accuracy retention (Claude Sonnet 4: 100% to 40%) compared to our trained models Qwen 2.5 14B (VisRL), which drops from 100% to 21.4% across 9 steps, with ICI scores increasing from 19.5 to 68.4 (red margin with dotted line).

• Test coverage rate of WebUIProof. We assess benchmark quality using TCR, the fraction of required UI elements exercised by the test suite. For each task, a UI element is counted as covered if it is referenced by any test case as an interaction target or assertion. We compare TCR between free-form instruction prompts collected from WebGen-Bench [13] and structured specs. from WebUIProof (ours). We report two metrics: model accuracy and build failure rate. High TCR paired with low accuracy indicates that the instruction provides dense, informative tests that remain challenging. Figure 5 shows TCR increases from 30.71% (free-form) to 97.23% (structured spec.); the resulting drop in accuracy suggests that WebUIProof is more challenging.

Benchmark quality analysis via test coverage

Figure 5. Benchmark quality analysis via test coverage. We compare free-form vs. structured specifications on General WebUI. Dashed lines indicate the average TCR. Structured specs. increase coverage (30.71%→97.23%) and yield a more discriminative evaluation.

Analysis of Learning Strategies in VisRL

We study learning strategies to improve rollout efficiency in VisRL. Table 6 provides two analyses: (i) the effect of multi-temperature candidate sampling (MTS) and fast-gate filtering (FGF). (ii) the effect of sampling budget and temperature. The upper sub-table shows that removing either MTS or FGF increases build failures and reduces overall accuracy, showing both are important for stable and efficient RL training. The lower sub-table analyzes the budget of best-of-NN sampling under different sampling numbers (N=1,2,3N = 1, 2, 3), with multi-or single temperature (τ\tau indicates temperature set). For the same NN, multi-temperature achieves higher accuracy than the same temperature, indicating that the gain comes from diversity, not just more sampling attempts.

Learning strategyBuild fail. (%)Acc. (%)
VisRL (Ours)36.1041.80
w/o MTS (τ=0.7\tau=0.7)46.3136.76
w/o FGF49.5339.00
w/o MTS & FGF50.3232.12
Best-of-NNτ\tauAcc. (%)
N=3N=3{0.3,0.45,0.7}\{0.3, 0.45, 0.7\}41.80
N=2N=2{0.3,0.7}\{0.3, 0.7\}41.53
N=2N=20.339.00
N=1N=10.736.76
N=1N=10.335.28

Table 6. VisRL learning-strategy ablations. The upper table shows that MTS and FGF improve UI stability/efficiency; Lower table shows that multi-temperature out-performs single-temperature under the same best-of-NN.

Visualization of Tasks and UI-Agent Execution Traces

Figure 6 visualizes six WebUIProof tasks and the corresponding UI-agent execution traces. The top row shows general WebUI applications (e.g., dashboards and interactive widgets), while the bottom row shows 3D simulation interfaces (e.g., object collisions). The UI agent localizes task-relevant elements by cropping their bounding regions from the rendered page and marking them with colored boxes and index labels, making the executed interaction targets explicit. Additional visualization of UI-agent execution traces and task samples for both domains is provided in Appendix E.2.

Figure 6. UI-agent execution examples on WebUIProof. Top: general WebUIs (e.g., interactive dashboards and widgets). Bottom: 3D simulation WebUIs (e.g., physics-driven interactive scenes). In all cases, the UI agent executes interaction tests by grounding to DOM/UI elements and performing actions (click/type/drag) to validate functional behavior.

Conclusion

We introduce WebUIProof, an execution-oriented benchmark for WebUI code generation that pairs structured specifications with executable interaction tests spanning general WebUIs and 3D simulation interfaces. WebUIProof includes a reproducible UI-agent harness for automated evaluation, enabling functional verification beyond build success or static visual checks. Using this protocol, we benchmark eight frontier models and find that interactive WebUI generation remains challenging in both domains, with substantial headroom on 3D tasks. We also show that the same harness can provide outcome-level training signals by including VisRL, an execution-grounded RL approach that optimizes compact models with composite rewards from build/runtime execution, rendered visual quality, and UI-agent test success. VisRL improves both functional completion and reliability compared to SFT and vision-only baselines. Our ablation suggests that performance remains bottlenecked by complex instruction and multi-step requirements, motivating future work on reward assignment, richer executable signals, and robust evaluation agents for dynamic 3D WebUI. Overall, our work shed light on the importance of outcome-grounded, executable evaluation and training signals for reliable code generation beyond static correctness and visual-only metrics.

Reproducibility and Evaluation Protocol

Execution Environment

In the main paper § 4, we introduce the evaluation setup for WebUIProof, including model details, UI-agent evaluator setup. Here, we provide additional detail on the execution environment for evaluation.

Web Framework and Build Process We use React, Next.js, and Node.js to build the web app during the evaluation. We transform the React codes generated from LLMs into a fully functional Next.js web application via a specific build process:

(1.) JSON code files parsing: At the beginning, the LLM generates codes and saves them in the JSON files. We extract TSX/React code from the JSON payload (e.g., payload.get("metadata", {}).get("code"))

(2.) Code Sanitization: we find valid TSX code with export default using a regex search. (3) Web Project Scaffolding: we create a completely new Next.js project with npm build commands, such as npm init -y for project initialization, npm install [email protected] [email protected] for react/next.js installation, npm install -D typescript @types/react @types/node tailwindcss@3 postcss to setup libraries for UI style. (4) Files Generation: After all the dependency installation, we create a repo structure for web app with several files (as shown in Figure 7). The Next.js web app includes one file for dynamically inserting the LLM-generated code (index.tsx), and several fixed structure files with pre-built templates to ensure static export for deployment (5) Build the Repo: after constructing the repo structure, we run npm run build, which triggers Next.js static export. The build script will finally output an out/ folder with index.html, 404.html, _next/ that contain all the Next.js static build assets (JavaScript bundles, compiled css files, build manifest files) for us to directly render in the browser using the command npx serve out.

Repository Structure: repo/ with next.config.mjs, next.env.d.ts, tsconfig.json, tailwind.config.js, style/globals.css, pages/_app.tsx, pages/index.tsx, pages/404.tsx, and scripts/after-export.cjs

Figure 7. Next.js project structure

UI-agent Evaluator Setup

Our evaluation pipeline is built upon the existing UI agent evaluator Webvoyager [7]. a vision-language web agent that automate browser interaction through a combination of visual perception and DOM analysis. The web agent uses Selenium as a Webdriver with our own configured Chrome/Chromium browser (Chrome driver version 119.0.6045.105).

The agent operates through a number of iteration steps, where each step follows a thinking loop: (1.) Selenium takes UI screenshots and parses the DOM interactive web elements via executable JavaScript code snippets. (2.) LLMs reason from the visual information in the UI screenshots and provide "Thought" and "Action" responses. The actions are predefined under an action space (e.g., click/type/scroll/select/hover...) (see Table 7). LLMs will choose one action for each step, and the action is executed by Selenium. The UI state will update for the next iteration, and at the final step, we ask LLMs to assess task completion, including three answer options: "FULL", "NO", and "PARTIAL" completion. In our experiment, we set the maximum iteration step as 15. (Mentioned in § 3.1 as well)

Action TypeDetail
ClickClick any web element identified by its numerical label (e.g., Click [0])
TypeClear textbox and input content (automatically hits ENTER) (e.g., Type [0])
ScrollScroll specific element or entire window (e.g, Scroll WINDOW up / down)
HoverHover for tooltips/effects, with precise coordinate positioning for charts (e.g., Hover [0:75,50] for 75% from left, 50% from top)
WaitPause for 5 seconds (for loading processes)
GoBackNavigate to previous webpage
AnswerProvide final task result (terminates interaction) (e.g., FULL/PARTIAL/NO)

Table 7. Action space of UI agent

For visual understanding, the agent supports multiple vision-language models (VLMs), either via the API (e.g., GPT-4O from OpenAI), HuggingFace endpoints, or open-source VLMs hosted locally. In our evaluation, we chose to use the Qwen2.5-VL-72B⁷, a powerful open-source VLM.

System Prompt for Code Generation (General + 3D WebUI)

To ensure reproducibility and make our evaluation pipeline fully auditable, we disclose the exact system prompts used for our two task families: (i) General WebUI generation and (ii) 3D WebUI simulation (As shown in Figure 8 and Figure 9). These two settings require different code formats and runtime assumptions, and we therefore use task-specific prompts to standardize model outputs. For General WebUI tasks (Figure 8), models are instructed to generate a single-file React/TypeScript component compatible with a Next.js (pages router) scaffold, with strict output constraints (default export only, no surrounding text) and styling constraints (Tailwind classes without arbitrary values). In contrast, 3D simulation tasks (Figure 9) require a self-contained HTML document that renders an interactive Three.js scene. The prompt fixes the Three.js version and enforces verified CDN imports to avoid dependency drift, and additionally emphasizes runtime robustness (error handling, interactivity checks) and output formatting (start from <!DOCTYPE html> and return HTML only). By explicitly specifying the target artifact (pages/index.tsx React code vs. standalone HTML), these prompts reduce formatting variance across models and ensure that downstream building, rendering, and UI-agent testing are applied consistently.

System prompt for General WebUI task

Figure 8. System prompt for General WebUI task. Models generate React code generation with strict styling and output constraints.

System prompt for Three.js HTML simulation generation

Figure 9. System prompt for Three.js HTML simulation generation.

Evaluation Metrics and Failure Handling

For each task, we categorize the outcome into four mutually exclusive cases: (i) Full Success, (ii) Partial Success, (iii) No Success, and (iv) Build Failure.

Build Failure covers build-time or launch-time failures (e.g., compilation errors, runtime crashes, or timeouts) where the generated project cannot be executed for UI-agent testing. Importantly, we average Full/Partial/No Success over all tasks by treating build failure with no credit. As a result, the corresponding rates satisfy Full + Partial + No Success + Build failure ≈\approx 100%.

WebUIProof: Benchmark Construction

Data Source and Task Scope

General WebUI In the main paper, Sec. 3, we mention that the data collection process for structured specification requires seed pages. Here, we describe how we collect the seed pages. For the general WebUI task, we collect seed instructions mainly from two data sources: WebGen Bench [13] and WebDev-Arena [26]. We use 101 instructions from the WebGenBench testset and 48 instructions from WebDev-Arena-10k as our seed instructions and generate seed webpages using DeepSeek R1 model.

This collection encompasses five main application domains, including creative media, business data, game sports, social interaction, and learning style. For example, social media platforms (reddit clone, social profile like Twitter, dating app), interactive gaming platforms (chess applications, 2048 games, wheel of fortune), chat interface (mail box with chat function) sports analytics systems (basketball betting analysis, baseball simulation), business applications (credit repair lead generation, clinical office websites), data visualization tools (regulatory policy dashboards, stock report generators), and complex strategy games (text-based browser games with resource management).

Our collected instructions emphasize both frontend user experience elements and backend functionality, requiring implementations that support real-time interactions, data visualization via charts and dashboards, user authentication systems, and responsive design patterns compatible with modern web development frameworks. We show more sample visualization in E.3

3D WebUI Simulation The 3D simulation test instruction dataset features advanced Three.js-based interactive visualizations and simulations derived from Three.js opensource website examples and community contributions. This specialized collection contains 70 sophisticated 3D programming challenges that span astronomical simulations (particle galaxy formations with spiral arms, black hole visualizations with event horizon effects), geometric animations (tesseract rotations with collision detection, merry-go-round mechanics with adjustable parameters), physics-based demonstrations (bouncing ball dynamics within complex 3D shapes), and interactive exploration systems that allow users to navigate through immersive 3D environments using JavaScript controls. Each instruction demands implementation of complex mathematical concepts including 3D transformations, particle systems, collision detection algorithms, and real-time rendering optimizations, while maintaining smooth 60fps performance and responsive user interaction capabilities.

The tasks require understanding of WebGL fundamentals, Three.js scene graph management, camera controls, lighting systems, material properties, and animation loops, with many instructions specifically requesting single HTML file implementations that demonstrate advanced computer graphics concepts through browser-based 3D experiences. These instructions evaluate both technical proficiency in 3D programming and creative problem-solving abilities in translating complex visual concepts into interactive web-based simulations. We show more sample visualization in E.3.

WebUI Categories and Test Case Distribution

In Figure 10, we provide the category distribution of two distinct WebUI tasks in WebUIProof: General WebUI applications (149 samples) and 3D Simulation applications (70 samples). General WebUI is dominated by Creative Media applications (41.6%), followed by Data Management (20.1%) and Social Interaction (16.1%). The remaining categories include Learning & Lifestyle (12.8%) and Games & Sports (9.4%). 3D Simulation shows a more balanced distribution with Classical Mechanics leading at 42.9%, Fluid Waves at 24.3%, and equal representation of Astro Particles and Dynamics Chaos (both 12.9%). Structural Physics (4.3%) and Game Physics (2.9%) represent smaller segments.

In Figure 11, we further provide the test cases distribution on two main tasks, we categorize the test cases into three categories, including functionality testing, data display testing, and design validation testing. In the later section Section E.1, we show additional experimental results on category accuracy for each test case across multiple proprietary models.

Data Collection Pipeline and Detail Prompt

Although we have already described how we collect the data in the main paper, we would like to provide more detail, including the data collection flow, and the system prompt we provide to UI agent for WebUI exploration. As Figure 12 shows, the UI agent receives the webpages screenshots and html file as input at the first step. Then it summarizes the UI functionality, and provides the basic test cases for later exploration. At the second step, it starts the thinking loop, and each loop it will provide the UI observation, newly discovered element, and test case recommendations based on the updated UI state at every iteration.

Benchmark Collection Pipeline

Figure 12. Benchmark Collection Pipeline.

Benchmark Collection Prompt In Figure 13, we show the detail prompt that we provide to WebUI agent to let them explore the seed webpages. As the prompt shows, we give the agent three inputs, including website seed instruction, screenshots of webpages, and an HTML file. Model will provide a JSON file with certain schema.

Multimodal prompt showing instructions, screenshots, and HTML used for WebUI test-case generation

Figure 13. Multimodal prompt (instructions + screenshots + HTML) used for WebUI test-case generation.

WebUI Test Generation Prompt

You are an expert test engineer. Follow the instructions carefully.

Input context:
• Website generation instructions: {website_seed_instructions}
• {N} screenshots showing different views and interactions
• HTML structure of the webpage

Task: Given the instructions, screenshots, and HTML structure, analyze the website using both visual evidence and DOM structure.
• First, summarize the website with:
– a short name (e.g., Stock Report Generator)
– a one-sentence description of the overall look and purpose
– a category from: Content Presentation / User Interaction / Data Management / Animation Simulation / Game Design
• Then, write two detailed descriptions:
– How the website looks: concrete visual layout and design elements (e.g., charts, cards, tables, navigation).
– What functions it has: core interactions and workflows (e.g., search, filter, submit, download).

Generate test cases across three dimensions:
• Functionality testing (≥ 2 cases): core user interactions
• Data display testing (≥ 1 case): verify displayed values and updates
• Design validation testing (≥ 1 case): confirm key UI design requirements

Output format (MUST follow):
• Return a single JSON object (no markdown, no extra text).
• Use the exact schema fields: website_summary, test_cases, element_requirement.

Sample of Structured Specification in WebUIProof

We show two samples of structured specifications in our WebUIProof benchmark (the first one for General WebUI and the second one for 3D WebUI). We totally have 219 structured specifications. During the evaluation, we provide the model with the specification and let it follow the structured instructions to generate WebUI code.

Structured Specification for General WebUI

{
  "website_summary": {
    "name": "Stock Report Generator",

    "description": "The website displays dynamic stock information and
    offers analytical tools with a clean, professional design.",

    "category": "Data Management",

    "appearance": "The website has a clear and organized layout with
    distinct sections. It features a navigation header with \"Stock Report
    Generator\" prominently displayed. Below this, there’s a section for
    stock information which includes a live price update, volume, and
    market cap. The \"Historical Data\" section showcases price and volume
    over time with a line graph. Additionally, the \"Financial Metrics\"
    and \"Financial Summary\" tables present key financial indicators and
    revenue details in a tabular format. The \"Ownership Distribution\"
    offers a pie chart for visualizing investor distribution, while the \"
    Stock Performance\" shows a line graph of price trends. The footer
    includes a customizable report section with checkboxes for content
    selection (e.g., Overview, Financials) and a \"Download Report\" button.
    The background is white, and various components utilize navy blue for
    text and buttons, ensuring a consistent color scheme and modern
    appearance."
  },
  "test_cases": {
    "functionality_testing": [
      {
        "id": "TC001",
        "name": "Download Button Test",
        "objective": "To verify that the Download Button triggers the report
        download process, providing complete standardized or customized report
        data.",
        "coverage_element": "Download Button",
        "preconditions": "The page is loaded, and a report is ready to be
        downloaded.",
        "expected_results": "The downloading process visually starts,
        leading to successfully downloading a report file reflecting data on
        the UI.",
        "procedure": [
          "Click on the Download Button and confirm a download concern
          initiating accordingly."
        ]
      } // ... (the rest of test cases)] }
  "element_requirement": {
    "1. Company Selector : Button for selecting different companies, currently
    set to \"Apple Inc.\"",
    "2. Summary Tab : Button that likely switches the display to a summary
    view",
    "3. Download Button : Button likely for downloading the current or
    customized report",
    "4. Stock Information : Card displaying current price, volume, and market
    cap data for Apple Inc.",
    "5. Historical Data Card : Contains a historical data chart with price and
    volume over time",
    "6. Financial Metrics Card : Displays key financial indicators",
"7. Financial Summary : Card with revenue and income data"
}
}

Structured Specification for 3D WebUI Simulation

{
  "website_summary": {
    "name": "3D Spiral Galaxy Simulation",

    "description": "The website features a dark-themed background to
    emphasize the 3D spiral galaxy simulation.",

    "category": "Astro Particles",

    "appearance": "At the top of the page, there is a centered text
    informing the user how to interact with the simulation: \"Spiral Galaxy
    Simulation - Use mouse to rotate, scroll to zoom\". The galaxy is
    displayed in full screen within a canvas, creating a visually immersive
    experience with thousands of small, colored particles representing
    stars forming spiral arms around a central core. The website allows
    users to interact with a 3D spiral galaxy simulation using mouse
    controls. Users can:\n- Rotate the view of the galaxy by clicking and
    dragging the mouse.\n- Zoom in and out using the mouse scroll wheel.\n-
    Experience a visualization of spiral galaxy formation with realistic
    star positioning and colors."
  },
  "test_cases": {
    "functionality_testing": [
      {
        "id": "TC001",
        "name": "Rotate Galaxy View",
        "objective": "To verify that the user can rotate the galaxy view
        using the mouse.",
        "preconditions": "The website is loaded and the galaxy is visible.",
        "expected_results": "The galaxy rotates smoothly and interactively
        in real-time with the mouse movements, allowing the user to explore
        different angles.",
        "procedure": [
          "Open the website in a supported web browser.",
          "Click and hold the left mouse button on the galaxy display.",
          "Drag the mouse to the left and right."
        ]
      }
      // ... (the rest of test cases)
    ]
  },
  "element_requirement": {
    "1. Canvas Element : Full-screen 3D rendering canvas displaying the
    spiral galaxy simulation with thousands of star particles",
    "2. Instructional Text : Centered white text at the top reading \"
    Spiral Galaxy Simulation - Use mouse to rotate, scroll to zoom\"",
    "3. Mouse Rotation Control : Interactive mouse click-and-drag
    functionality for rotating the galaxy view in real-time",
    "4. Mouse Scroll Zoom Control : Mouse wheel scroll functionality for
    zooming in and out of the galaxy simulation",
    "5. Star Particles : Thousands of colored particles representing stars
    with varying colors (blue-white, yellow-white, redder) and sizes",
    "6. Spiral Galaxy Structure : 3D particle system forming realistic
    spiral arms around a central galactic core",
    "7. Real-time Animation : Smooth, interactive rendering system
    maintaining 60fps performance during user interactions",
    "8. Camera Controls : Three.js camera system enabling 360-degree
    exploration of the galaxy from different angles",
    "9. Particle Color System : Randomized star coloring system creating
    realistic stellar color distribution throughout the galaxy"
  }
}

VisRL: Training Detail

We provide algorithm details and implementation-level details for our sequence-level PPO training, including reward computation, candidate selection, and efficiency heuristics.

Implementation Detail

Cold Start from Supervised Fine-Tuning (SFT) We finetune Qwen2.5-14B-Instruct on a curated dataset of 6000 high-quality webUI generation samples. We use the 6k training set from WebGen-Bench as our seed instruction and generate code snippets using DeepSeek-R1. Our model is trained with distributed training across 4 NVIDIA H100 GPUs (80 GB each) with full parameter tuning. To handle long code sequences, we employ dynamic RoPE scaling with a factor of 2.0, extend the context window to 65536 tokens, and apply a chunking strategy that segments sequences into 1792-token windows with 128-token overlap. The model is trained under 8 epochs with a learning rate 8×10−68 \times10^{-6} and an effective batch size of 256 (per-device batch size of 1 with 64 gradient accumulation steps across 4 GPUs). Other training hyperparameters, hardware configuration are shown in Table 8. We apply chat template formatting where only assistant responses are supervised (prompt tokens masked with -100). Training converges in approximately 8 hours after eight training epochs.

Training Hyperparameters
Base ModelQwen2.5-14B-InstructHardware & Resources
Training Samples6,000GPUs4× H100 (80GB)
Train/Val Split95% / 5%per GPU Memory Usage∼60GB
Epochs8System RAM256GB
Learning Rate8×10−68 \times10^{-6}Storage1TB
LR ScheduleCosine (5% warmup)Training Time∼8 hours
OptimizerAdamWSystem Configuration
Batch Size (per-device)1Training FrameworkHuggingFace TRL
Gradient Accumulation64PrecisionBF16 mixed
Effective Batch Size256ParallelizationDeepSpeed ZeRO-2
Weight Decay0.07AttentionFlash Attention 2
Gradient Clipping1.0Gradient Ckpt.Enabled
Max Sequence Length65,536Distributed TrainingDDP (4 GPUs)
Chunk Length1,792LoggingWandB
Chunk Overlap128
RoPE ScalingDynamic (2.0×)
Save FrequencyEvery 100 steps

Table 8. Supervised Fine-Tuning Configuration and Resource Usage

Training Curve of SFT In Figure 14, we show the training curve of SFT for general WebUI. We finetune a Qwen 2.5 VL Instruct with the hyperparameter mentioned in Table 8.

Visualization of SFT Training Curve

Figure 14. Visualization of SFT Training Curve

• VisRL Training and Implementaiton Detail After using SFT to train a cold-starting model, we start to use PPO with a hybrid on/off-policy approach that leverages vLLM for fast generation while maintaining near-on-policy learning through frequent adapter reloading. Unlike prior SFT training, which distributes the model across 4 GPUs, we allocate 4 H100 GPUs: GPU-0 fully loads the model to serve as the vLLM inference server (generating code snippets), and other three GPUs run distributed PPO optimization via DeepSpeed ZeRO-2 for policy learning. Due to the memory constraint, we apply LoRA adapters to all attention and MLP projection layers for PPO tuning, where we set the rank-8 and α\alpha-16 for general WebUI task. Since the 3D Simulation requires a higher learning capacity, we further set a larger rank-128 with α\alpha-256 for the 3D simulation task. To make the model loaded on GPU-0 synchronize with the on-policy model, we reload the latest adapter every training step to minimize off-policy lag. Training proceeds for 100 steps with a conservative learning rate of 2×10−72 \times10^{-7}, batch size is 8 per device (effective batch of 24 across 3 GPUs). In Figure 15, we illustrate the training infrastructure of VisRL. In addition, we show the detailed training hyperparameters of VisRL in Table 9. Training completes in approximately 24-48 hours with checkpoints saved every step for reproducibility. In the later Sec. D.1, we provide the training curve analysis for different PPO strategies.

Training HyperparametersHardware & Resources
Base ModelSFT Qwen2.5-14BTotal GPUs4× H100 (80GB)
Training Steps100 stepsTraining GPUs3× H100 (GPUs 1-3)
LoRA Rank (General WebUI)8Inference GPU1× H100 (GPU 0)
LoRA Alpha (General WebUI)16GPU Memory (training)~70GB/device
Trainable Params (General WebUI)~4.2M (0.03%)GPU Memory (vLLM)~75GB
LoRA Rank (3D WebUI)128System RAM256GB
LoRA Alpha (3D WebUI)256Storage1TB
Trainable Params (3D WebUI)~598M (4.3%)Training Time~24-48 hours
LoRA Dropout0.05Time per Step15-30 minutes
LoRA Targetsq,k,v,o,gate,up,down
Learning Rate2×10−72 \times10^{-7}System Configuration
Batch Size (per-device)8RL FrameworkTRL + Custom PPO
Effective Batch Size24 (3 GPUs)Inference EnginevLLM (version 0.6+)
Mini-batch Size8PrecisionBF16 mixed
PPO Clip Range0.05ParallelizationDeepSpeed ZeRO-2
Entropy Coefficient0.005Distributed StrategyDDP (3 GPUs)
Value Loss Coefficient1.0Adapter MethodLoRA
Gradient Clipping1.0Adapter Reload Freq.Every 1 step
Advantage Clipping±2.0
Reward NormalizationEnabledTimeouts & Limits for Execution Harness
Reward Componentsnpm Install300s
Vision Weight (αv\alpha_v)0.6Next.js Build360s
UI-Agent Weight (αu\alpha_u)0.3Dev Server Load60s
Analyzer Weight (αm\alpha_m)0.1vLLM Request600s
Invalid Penalty−0.2Step Timeout7,200s (2 hours)
External Image Penalty−0.05
Keyword Bonus0.20
Auto-Fix Bonus0.3
Sampling StrategySystem Configuration
Num Candidates3 (best-of-3)RL FrameworkTRL + Custom PPO
Keep Top-KK=1Inference EnginevLLM (version 0.6+)
Generation Temp.[0.7, 0.45, 0.3]PrecisionBF16 mixed
Max Gen Tokens7,000ParallelizationDeepSpeed ZeRO-2
Max Context Tokens2,048Distributed StrategyDDP (3 GPUs)
Adapter MethodLoRA
Adapter Reload Freq.Every 1 step
Timeouts & Limits for Execution Harness
npm Install300s
Next.js Build360s
Dev Server Load60s
vLLM Request600s
Step Timeout7,200s (2 hours)

Table 9. PPO Training Configuration and Resource Usage

Training Infrastructure of VisRL

Figure 15. Training Infrastructure of VisRL.

Training Infrastructure of VisRL We provide the implementation flow of the training infrastructure to ensure reproducibility in Figure 15.

Sequence-Level Rollout and Probability

Given a prompt pp, the policy generates a complete code sequence c={ct}t=1Tc = \{c_t\}_{t=1}^{T}. We compute sequence log-probability via the chain rule:

log⁡πθ(c∣p)=∑t=1Tlog⁡πθ(ct∣c<t,p).(1)\log\pi_{\theta}(c \mid p) = \sum_{t=1}^{T} \log\pi_{\theta}(c_t \mid c_{<t}, p). \tag*{(1)}

The PPO importance ratio is computed at the sequence level:

ρ(θ)=exp⁡(log⁡πθ(c∣p)−log⁡πθold(c∣p)).(2)\rho(\theta) = \exp\left(\log\pi_{\theta}(c \mid p) - \log\pi_{\theta_{\mathrm{old}}}(c \mid p)\right). \tag*{(2)}

Advantage and Loss Terms Because the environment returns a single outcome reward after execution, we use a prompt-conditioned baseline Vϕ(c,p)V_{\phi}(c,p) and compute one advantage per sequence:

A(p,c)=r(c,p)−Vϕ(c,p).(3)A(p,c) = r(c,p) - V_{\phi}(c,p). \tag*{(3)}

We normalize advantages within each batch B\mathcal{B}:

A^(c,p)=A(c,p)−μBσB+ϵnorm.(4)\hat{A}(c,p) = \frac{A(c,p) - \mu_{\mathcal{B}}}{\sigma_{\mathcal{B}} + \epsilon_{\mathrm{norm}}}. \tag*{(4)}

The clipped PPO objective is applied once per sequence:

LCLIP(θ)=E(c,p)∼B[min⁡(ρ(θ)A^(c,p),clip⁡(ρ(θ),1−ϵ,1+ϵ)A^(c,p))].(5)\mathcal{L}^{\mathrm{CLIP}}(\theta) = \mathbb{E}_{(c,p)\sim\mathcal{B}}\left[\min\left(\rho(\theta)\hat{A}(c,p),\operatorname{clip}(\rho(\theta),1-\epsilon,1+\epsilon)\hat{A}(c,p)\right)\right]. \tag*{(5)}

We optimize the standard combined loss:

L(θ,ϕ)=−LCLIP(θ)+cVE(c,p)∼B[(Vϕ(c,p)−r(c,p))2]−cϵH[πθ],(6)\mathcal{L}(\theta,\phi) = -\mathcal{L}^{\mathrm{CLIP}}(\theta) + c_V \mathbb{E}_{(c,p)\sim\mathcal{B}}\left[(V_{\phi}(c,p)-r(c,p))^2\right] - c_{\epsilon}\mathcal{H}[\pi_{\theta}], \tag*{(6)}

where H[πθ]\mathcal{H}[\pi_{\theta}] is token-entropy computed from the model’s next-token distributions to encourage exploration.

Reward Definition

We compute the outcome reward only after generating cc, building/running it, and rendering a screenshot I(c)\mathcal{I}(c). The total reward aggregates complementary signals:

r(c,p)=αmrmetrics(c)+αvrvision(I(c))+αurUI agent(c,I(c))+rpenalty(c).(7)r(c,p) = \alpha_m r_{\mathrm{metrics}}(c) + \alpha_v r_{\mathrm{vision}}(\mathcal{I}(c)) + \alpha_u r_{\mathrm{UI\ agent}}(c,\mathcal{I}(c)) + r_{\mathrm{penalty}}(c). \tag*{(7)}

Vision score rvision∈[0,1]r_{\mathrm{vision}} \in[0,1]. A vision evaluator scores the rendered UI for overall layout quality and visual polish (e.g., hierarchy, spacing, typography, color coherence). This provides dense feedback even when task success is hard to verify.

UI-agent interaction reward rUI agent≥0r_{\mathrm{UI\ agent}} \ge0. A UI agent performs lightweight interaction tests (e.g., form filling, clicking, navigation) on the rendered page and returns a success rate. This signal directly captures functional correctness beyond static appearance.

Code metrics bonus rmetrics≥0r_{\mathrm{metrics}} \ge0. We award small bonuses for richer, more realistic implementations, such as non-trivial component structure and interactive behaviors (state/event handling). This discourages overly minimal outputs that “look okay” but are not functional.

Additional Learning Strategies

Multi-Temperature Candidate Sampling and Selection (Best-of-NN) For each prompt, we generate a small set of candidates with different temperatures to balance exploration and quality:

ci∼πθold(⋅∣p,τi),τi∈{τlow,τhigh},i=1,…,N.(8)c_i \sim\pi_{\theta_{\mathrm{old}}}(\cdot\mid p,\tau_i), \qquad\tau_i \in\{\tau_{\mathrm{low}},\tau_{\mathrm{high}}\}, \qquad i=1,\ldots,N. \tag*{(8)}

We execute all candidates and keep the best one under a minimum-quality constraint:

c∗=arg⁡max⁡ci r(ci,p)s.t. r(ci,p)≥rmin⁡.(9)c^*=\underset{c_i}{\arg\max}\ r(c_i,p) \quad\text{s.t. } r(c_i,p)\ge r_{\min}. \tag*{(9)}

This increases the diversity of UI Generation, and also preserves the good enough samples such that the model can learn to generate more advanced UI templates without forgetting the old format of template it already learn before.

Fast-gate pre-build filter. Before expensive build/render, we skip candidates that are almost surely invalid (e.g., missing export default, clearly malformed structure, excessive length of code that highly possible truncated). This saves compute by avoiding costly failures.

Pseudo Algorithm for Training Procedure

Algorithm 1 Sequence-Level PPO Training for WebUI Code Generation

Require: Prompts D\mathcal{D}, initial policy πθ\pi_{\theta}, value VϕV_{\phi}, temperatures {τi}i=1N\{\tau_i\}_{i=1}^{N}

  1. for each PPO iteration do

  2. Sample a batch of prompts B⊂D\mathcal{B} \subset\mathcal{D}

  3. for each prompt p∈Bp \in\mathcal{B} do

  4. Sample candidates {ci}i=1N\{c_i\}_{i=1}^{N} with temperatures {τi}\{\tau_i\}

  5. Apply fast-gate filter; build, run, and render remaining candidates

  6. Compute rewards r(ci,p)r(c_i,p)

  7. Select c∗=arg⁡max⁡ir(ci,p)c^*=\arg\max_i r(c_i,p) (optionally thresholded)

  8. Store (p,c∗,r∗)(p,c^*,r^*) for PPO update

  9. end for

  10. Compute advantages A(p,c)=r(c,p)−Vϕ(p)A(p,c)=r(c,p)-V_{\phi}(p) and normalize within batch

  11. Update θ,ϕ\theta,\phi using clipped PPO objective and value regression

  12. end for

UI Agent Task Execution in VisRL

We integrate a vision-grounded UI agent that tests functional correctness by proposing and executing interactions (clicks, form fills) on rendered UIs, computing a success rate that contributes to the composite reward with weight αu=0.3\alpha_u = 0.3 alongside vision quality and code metrics. We describe every step as follows:

UI-Agent Task Execution (Playwright + Vision)

Step 1 -- Element Detection (DOM Scanning). Enumerate interactive elements via JS injection and assign stable element IDs.

  • Candidate tags: INPUT, TEXTAREA, SELECT, BUTTON, A

  • Also include nodes with onclick or cursor:pointer

  • Filtering: remove nested clickables; enforce minimum area threshold

  • Visualization: render a labeled screenshot with red dashed borders and IDs

Scanning output (example):

1 [0]: <input> "Product Name"
2 [1]: <input> "Price"
3 [2]: <button> "Submit"

Step 2 -- Vision-Guided Task Proposal. Send the labeled screenshot + element list to the vision model to propose executable test actions.

Prompt to vision model:

1 Available elements:
2 [0]: <input> "Product Name"
3 [1]: <input> "Price"
4 [2]: <button> "Submit"
5
6 Suggest actions to test UI functionality.
7 Return a JSON action list with element_id and (optional) value.

Returned task proposal (example JSON):

1 {
2   "actions": [
3     {"action": "fill", "element_id": 0, "value": "Test Product"},
4     {"action": "fill", "element_id": 1, "value": "19.99"},
5     {"action": "click", "element_id": 2}
6   ]
7 }

Step 3 -- Action Execution by Element ID. Execute the proposed actions using stored DOM references:

  • Fill: INPUT/TEXTAREA (type() + input event)

  • Select: SELECT (match by text/value + change event)

  • Click: BUTTON/A (check for navigation / DOM change)

Step 4 -- Multi-Strategy Verification. Determine success/failure using observable UI signals:

  • Success if expected text appears, key elements change, or DOM count updates

  • Failure if error keywords appear, exceptions occur, or no observable change is detected

Step 5 -- UI-Agent Scoring. Compute per-task success rate as:

score=successful_actionstotal_actions.\mathrm{score} = \frac{\mathrm{successful\_actions}}{\mathrm{total\_actions}}.

Vision Agent – Evaluation Rubric

The vision evaluator assesses UI quality and the visual presence of interactive UI components (buttons, forms, charts, modals) based on screenshot analysis, providing a proxy signal for interface complexity. Complementary to this, the UI-Agent performs functional verification by executing interactions and measuring actual success rates, ensuring the model learns both visual appeal and operational correctness." We provide the rubric detail as follows:

Vision-Agent Rubric (0–5)

Step 0: Hard-gate failures (Score = 0). Assign 0 if any of the following occur:

  • Build/runtime error messages are visible.

  • Completely blank/white page (no rendered UI).

  • Browser/system error page (e.g., navigation failure).

Step 1: Base score (0.0–4.0) = Design (0–2) + Interactivity (0–2).

A) Visual design & complexity (0–2).

  • 0.0–0.5: Plain/text-only layout; minimal styling.

  • 0.5–1.0: Basic styled components (color, spacing) with simple layout.

  • 1.0–1.5: Clear hierarchy, multiple sections/cards, consistent typography and spacing.

  • 1.5–2.0: Polished UI with advanced styling (shadows/gradients), cohesive theme, animations where appropriate.

B) Visual Presence of UI Components. (0–2).

  • 0.0–0.5: Static content only; no executable UI components interaction.

  • 0.5–1.0: Basic UI components (e.g., 1–3 buttons/inputs) with simple layout.

  • 1.0–1.5: Multiple UI sections (4–8 components) with clear visual organization and variety.

  • 1.5–2.0: Rich component ecosystem (tables, charts, tabs, filters, modals, cards) with sophisticated visual structure.

Step 2: Excellence tier (4.0–5.0). After computing the base score, assign a bonus within [0, 1] based on overall polish:

  • 4.0–4.3: Good UI -- professional palette, consistent spacing, feature-complete.

  • 4.3–4.6: Outstanding UI -- smooth transitions, advanced components, production-ready details.

  • 4.6–5.0: Near-perfect UI (rare) -- exceptional hierarchy, cohesive design language, flawless execution.

Step 3: Mandatory deductions (apply after Steps 1–2).

  • Missing buttons/links: −0.3

  • Inconsistent spacing or misalignment: −0.3

  • Broken images / missing assets: −0.3

VisRL: Training Reward and Hyparameter Analyses

Training Curve for Different PPO Strategies

Figure 16 shows that incorporating the UI agent substantially improves PPO training stability and efficiency. In Figure 16 a, we show the training curve for PPO learning w/ vision agent only. The average reward increases only gradually and remains noisy; the vision score fluctuates with no clear upward trend, and the invalid action rate stays relatively high throughout training. In contrast, VisRL adopts the UI agent (Figure 16 b), the reward rises sharply in the early phase and maintains a consistently higher level. This improvement is accompanied by a strong increase in vision score and a steady reduction in invalid actions, indicating that agent-based interaction feedback provides a cleaner learning signal and guides the policy toward more executable, UI-consistent code.

Comparison of PPO training dynamics with and without a UI agent

Figure 16. Comparison of PPO training dynamics with and without a UI agent. Top: average reward (with 7-step moving average). Bottom: vision score and invalid action rate.

Reward Decomposition Analysis

To better understand the effectiveness of each reward component, we present a reward decomposition analysis. Figure 17 shows a radar plot analysis comparing reward components across different training strategies for both General WebUI and 3D WebUI Simulation tasks. We evaluate five metrics: Build Success (compilation rate), Average Vision Score (aesthetic quality from GPT-4o-mini), UI Agent Test Full Success (all proposed interactions succeed), UI Agent Test Half Success (≥50%\ge50\% interactions succeed). The analysis compares: (1) SFT baseline without RL (gray), (2) PPO with analyzer-only reward (rmr_m, orange), (3) PPO with vision-only reward (rvr_v, blue), (4) PPO with UI-agent-only reward (rur_u, green), and (5) VisRL with the full composite reward (rm+rv+rur_m + r_v + r_u, red).

Radar plot comparing reward components across General WebUI and 3D WebUI Simulation tasks

Figure 17. Radar plot for reward decomposition analysis

Results demonstrate that single-component rewards lead to unbalanced optimization: vision-only PPO achieves high aesthetic scores but poor functional correctness, UI-agent-only PPO maximizes interaction success but produces visually simplistic interfaces, and analyzer-only PPO maintains build success but lacks both visual appeal and interactivity. In contrast, VisRL with the composite reward (αv=0.6,αu=0.3,αm=0.1\alpha_v = 0.6, \alpha_u = 0.3, \alpha_m = 0.1) achieves the most balanced performance, excelling across all dimensions simultaneously. Notably, for 3D simulation tasks, the balanced reward maintains high build success (>0.9>0.9) while significantly improving both vision scores and UI agent test success rates compared to single-component baselines, validating the necessity of multi-component reward design for holistic web UI generation quality.

Reward Weight Analysis – Sensitivity

In Figure 18, we study the sensitivity of VisRL to the composite reward weights (αv,αu,αm)(\alpha_v, \alpha_u, \alpha_m) by sweeping αv\alpha_v (vision) and αu\alpha_u (UI-agent). We keep the analyzer weight fixed (αm=0.1\alpha_m = 0.1), and evaluate four outcome metrics, including average vision score, build success, UI-agent full success, and UI-agent half success.

Sensitivity analysis of alpha configuration

Figure 18. Sensitivity analysis of α\alpha Configuration

The different combination of α\alpha shows a clear visual quality-functionality trade-off. When placing more weight on the vision term yields higher visual scores (e.g., ∼\sim0.70 at (0.8, 0.1, 0.1)), and shifting weight toward the UI-agent term increases functional correctness (UI-agent full success rises from ∼\sim0.28 to ∼\sim0.37). Notably, build success also improves with larger αu\alpha_u (from ∼\sim0.58 to ∼\sim0.64), suggesting that emphasizing executable, interaction-grounded rewards encourages more compilable implementations rather than just changing surface-level UI appearance.

As a result, we set the weight at the point α=[0.6,0.3,0.1]\alpha= [0.6, 0.3, 0.1] that preserves strong visual quality while maintaining build success and performance gains in UI-agent-testing correctness.

Extended Results and Diagnostics

Additional Experimental Results (per-Test Category Results)

In Sec. B.2, we provide the test case distribution of WebUIProof, including functionality testing, data display testing, UI design validation testing. Here, we present the per-test category results for both proprietary API models and our self-trained models. For each model, we show the No/Partial/Full completion scores and accuracy by test category (test-category distribution shown in Figure 11). For example, the accuracy of functionality testing (FT) for a certain model is computed as:

#Full completion in FT+0.5×#Partial completion in FTTotal#FT(10)\frac{\#\text{Full completion in FT} + 0.5 \times\#\text{Partial completion in FT}}{\text{Total}\#\text{FT}} \tag*{(10)}

In Table 10 and Table 11, we show the category accuracy on the general WebUI task for proprietary API and self-trained models. In Table 12 and Table 13, we show the category accuracy on the 3D WebUI task.

Visualization of UI Agent Traces

WebUI interaction examples showing UI agent traces for two samples

Figure 19. WebUI interaction examples (sample 1 and 2). Each row shows a full UI state transition with agent-labeled elements and executed actions.

WebUI interaction examples for samples 3 to 5

Figure 20. WebUI interaction examples (sample 3 to 5). Each row shows a full UI state transition with agent-labeled elements and executed actions.

Sample 1: WebGPU Compute simulation

(a) Sample 1. (a) WebGPU Compute

Sample 2: Jolt Physics Instancing simulation

(b) Sample 2. (b) Jolt Physics Instancing

Sample 3: CSS3D Mixed simulation

(c) Sample 3. (c) CSS3D Mixed

Sample 4: Inverse Kinematics simulation

(d) Sample 4. (d) Inverse Kinematics

Sample 6: Dynamic Lighting simulation

(e) Sample 6. (e) Dynamic Lighting

Figure 21. Six simulation samples. Each subfigure shows the UI state and interaction annotation for one sample.

More Visualization

Sample Visualization for general WebUI Figure 22, Figure 23, Figure 24, Figure 25, Figure 26 show the general WebUI samples under different UI categories, including creative media, data management, games, social interaction, and e-commerce platforms.

Three webpages: a music band showcase portal, a codecraft editor, and an AI website showdown

Figure 22. We present three webpages generated from self-trained model Qwen 2.5 14B w/ VisRL. The left-most webpage is a music band showcase portal. The upper-right webpage is a codecraft editor. The lower-right webpage is a AI website showdown.

Two social media viewer webpages

Figure 23. Two webpages generated from self-trained model Qwen 2.5 14B w/ VisRL. Both of them are the social media viewer.

Two webpages generated from self-trained model Qwen 2.5 14B w/ VisRL

Figure 24. Two webpages generated from self-trained model Qwen 2.5 14B w/ VisRL. The left side is a 2048 game interface and the right side is a chess game simulator.

Two webpages generated from self-trained model Qwen 2.5 14B w/ VisRL

Figure 25. Two webpages generated from self-trained model Qwen 2.5 14B w/ VisRL. Both of them are the stock report generator.

Three webpages generated from self-trained model Qwen 2.5 14B w/ VisRL

Figure 26. Three webpages generated from self-trained model Qwen 2.5 14B w/ VisRL. The left side is a travel accommodation finder, the upper-right side is an AI agent workflow manager, and the lower-right side is a landing page for tech. company.

Sample Visualization for 3D WebUI Simulation Figure 27, Figure 28, and Figure 29 show the 3D WebUI samples under different categories.

Four webpage demos showing a circular island, jelly cubes, an aquarium, and a sail boat

Figure 27. Four webpage demo generated from self-trained model Qwen 2.5 14B w/ VisRL. We provide simple prompt for each to showcase how they are generated. (1.) The upper-left demo: Create a 3D animation of a circular island that has multiple trees on it and a river flowing within. (2.) The upper-right demo: Create a 3D simulation of jelly cubes bouncing in a box. (3.) The lower-left demo: Create a 3D aquarium with fishes that swim around and avoid collisions with the tank walls. (4.) The lower-right demo: Create a 3D animation of a sail boat floating in the sea.

Four webpage demos showing a Mars rover, a double pendulum, paper lanterns, and an ocean scene

Figure 28. Same as prior figure, we provide simple prompt for each to showcase how they are generated. (1.) The upper-left demo: Create a 3D simulation of a mars rover moving on the surface of Mars. Users should be able to accelerate and control the direction of the car. Incorporate accurate suspension dynamics as the car moves on the rugged Mars surface. (2.) The upper-right demo: Create a visually engaging animation of a double pendulum using JavaScript. The animation should demonstrate the chaotic motion of two pendulums connected together. (3.) The lower-left demo: Simulate 3D paper lanterns rising into the night sky during a festival, with buoyancy and wind physics, above a reflective lake. (4.) The lower-right demo: Create a realistic 3D ocean scene with: dynamic water movement, accurate wave simulations, and reflective surface effects.

Four generated demos: a 3D solar system, a breakout-style game, a spinning top, and a dinosaur running game

Figure 29. Same as prior figure, we provide simple prompt for each to showcase how they are generated. (1.) The upper-left demo: Create a 3D solar system simulation using Three.js with realistic planet orbits, textures, and lighting effects. (2.) The upper-right demo: Create a breakout-style game where a paddle at the bottom of the screen reflects a bouncing ball toward a grid of colored blocks above. The paddle moves left and right with arrow keys, and blocks disappear when hit by the ball. Each block is worth different points based on its color, and the game ends when all blocks are cleared or the ball falls below the paddle. (3.) The lower-left demo: Create a 3D animation of a top spinning. Use accurate physics to demonstrate its movements. (4.) The lower-right demo: Create a dinosaur running game where: (i) A dinosaur character can jump using spacebar/up arrow, (ii) Cacti and birds appear as obstacles from the right side, (iii) Ground moves continuously to create running effect (iv) Game ends when dinosaur hits an obstacle, (v) Simple pixel art style, and (vi) Day/night cycle every 500 points.

Analysis of Build Failure Taxonomy

To investigate the build failure reason, we categorize build-time errors into four primary types based on failure patterns observed during Next.js execution logs. Module Not Found errors occur when Webpack cannot resolve imported packages (e.g., @heroicons/react, react-icons, or react-dnd), typically due to missing installations, incorrect import paths, or renamed files. Syntax errors arise when the TypeScript/JavaScript parser encounters malformed code (e.g., missing braces, parentheses, or template literal errors), preventing the compilation stage from completing. Default Export errors (happen when a Next.js page compiles but fails during the static generation stage because some certain file do not contain a valid default React component export (e.g., pages/modelOutputPage.tsx). Finally, Reference errors occur at runtime during server-side rendering or static generation, often due to accessing variables before initialization or circular imports. In Table 30, we show the four dominant failure counts on eight models, providing insight into the generation ability of each model.

Breakdown of build-time errors across models in our WebUI generation benchmark

Figure 30. Breakdown of build-time errors across models in our WebUI generation benchmark. Bars show the number of failures by error type, including missing dependencies, syntax mistakes, reference issues, and invalid default exports. Higher stacks indicate more frequent build failures.

References

  1. [1]Owen Team Alibaba Cloud. Qwen2.5: A party of foundation models, September 2024.
  2. [2]Qwen Team Alibaba Cloud. Qwen 3 Coder: Agentic code-generation model. https://github.com/QwenLM/Qwen3-Coder, 2025. Accessed 2025-10-29.
  3. [3]Anthropic. Claude Sonnet 4: Advanced reasoning & coding model. https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/claude/sonnet-4, 2025. Accessed 2025-10-29.
  4. [4]Google DeepMind. Gemini 2.5 Pro: Multimodal reasoning & coding model. https://ai.google.dev/gemini-api/docs/models, 2025. Accessed 2025-10-29.
  5. [5]DeepSeek. DeepSeek-R1: Reasoning-optimized open-weight llm. https://github.com/deepseek-ai/DeepSeek-R1, 2025. Accessed 2025-10-29.
  6. [6]Halluminate and Skyvern. Webbench: Ai web browsing agent benchmark, 2025. https://webbench.ai/.
  7. [7]Hongliang He, Wenlin Yao, Kaixin Ma, Wenhao Yu, Yong Dai, Hongming Zhang, Zhenzhong Lan, and Dong Yu. Webvoyager: Building an end-to-end web agent with large multimodal models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (ACL), volume 1, pages 6864–6890, 2024. Also arXiv preprint arXiv:2401.13919.arxiv.org/abs/2401.13919
  8. [8]Hongyu He, Yixuan Tang, Yizhe Zheng, Haotian Zhang, Yihan Huang, Yizhou Wang, Jifan Chen, Xinyun Wang, Dawn Song Zhou, and Muhao Li. Agent-computer interfaces enable automated software engineering. In Advances in Neural Information Processing Systems (NeurIPS), 2024.
  9. [9]Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring coding challenge competence with apps. In Advances in Neural Information Processing Systems (NeurIPS), 2021.arxiv.org/abs/2105.09938
  10. [10]Carlos Jimenez, Tri Nguyen, Xinyun Wang, Quoc Le, and et al. Swe-bench: Can language models resolve real-world github issues? In Advances in Neural Information Processing Systems (NeurIPS), 2023.arxiv.org/abs/2310.06770
  11. [11]Yujia Li, David Choi, Junyoung Chung, Nate Kushman, Julian Schrittwieser, Rémi Leblond, and et al. Competition-level code generation with alphacode. Science, 378(6624):1092–1097, 2022.DOI
  12. [12]Junpeng Liu, Yifan Song, Bill Yuchen Lin, Wai Lam, Graham Neubig, Yuanzhi Li, and Xiang Yue. Visualwebbench: How far have multimodal llms evolved in web page understanding and grounding?, 2024.arxiv.org/abs/2404.05955
  13. [13]Yuxuan Liu, Chen Huang, Wen Li, Jialu Wang, and Hu Xu. Webgen-bench: Benchmarking webui code generation with structured test cases. arXiv preprint arXiv:2408.01839, 2024.
  14. [14]Meta. Llama 3.1 405B: Large-scale open foundation model. https://developer.nvidia.com/blog/creating-synthetic-data-using-llama-3-1-405b/, 2024. Accessed 2025-10-29.
  15. [15]Meta. Llama 4 Maverick: Next-gen multimodal/multilingual foundation model. https://llama.com/models/llama-4/, 2025. Accessed 2025-10-29.
  16. [16]Moonshot. Kimi K2: Trillion-parameter moe model for agentic tasks. https://moonshotai.github.io/Kimi-K2/, 2025. Accessed 2025-10-29.
  17. [17]OpenAI. GPT 4.1: Enhanced context & instruction-following model. https://platform.openai.com/docs/models/gpt-4.1, 2025. Accessed 2025-10-29.
  18. [18]Pratyusha Raman, Ziyi Wang, Yue Deng, Karthik Narasimhan, and Ahmad Beirami. Browsergym: A browser interaction simulation environment for training and evaluating web agents. arXiv preprint arXiv:2311.05657, 2023.
  19. [19]E2B.ai Team. Reacteval: A benchmark for evaluating llms on react front-end development. https://e2b.dev/blog/reacteval-building-llm-benchmark-for-frontend, 2024. Accessed: 2025-10-05.
  20. [20]Jingyu Xiao, Ming Wang, Man Ho Lam, Yuxuan Wan, Junliang Liu, Yintong Huo, and Michael R. Lyu. Designbench: A comprehensive benchmark for llm-based front-end code generation. arXiv preprint arXiv:2506.06251, 2025. multi-framework, multi-task front-end benchmark.arxiv.org/abs/2506.06251
  21. [21]LLM-Core-Team Xiaomi. Mimo: Unlocking the reasoning potential of language model – from pretraining to posttraining, 2025.
  22. [22]An Yang, Baosong Yang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Zhou, Chengpeng Li, Chengyuan Li, Dayiheng Liu, Fei Huang, Guanting Dong, Haoran Wei, Huan Lin, Jialong Tang, Jialin Wang, Jian Yang, Jianhong Tu, Jianwei Zhang, Jianxin Ma, Jin Xu, Jingren Zhou, Jinze Bai, Jinzheng He, Junyang Lin, Kai Dang, Keming Lu, Keqin Chen, Kexin Yang, Mei Li, Mingfeng Xue, Na Ni, Pei Zhang, Peng Wang, Ru Peng, Rui Men, Ruizе Gao, Runji Lin, Shijie Wang, Shuai Bai, Sinan Tan, Tianhang Zhu, Tianhao Li, Tianyu Liu, Wenbin Ge, Xiaodong Deng, Xiaohuаn Zhou, Xingzhang Ren, Xinyu Zhang, Xipin Wei, Xuancheng Ren, Yang Fan, Yang Yao, Yichang Zhang, Yu Wan, Yunfei Chu, Yuqiong Liu, Zeyu Cui, Zhenru Zhang, and Zihao Fan. Qwen2 technical report. arXiv preprint arXiv:2407.10671, 2024.arxiv.org/abs/2407.10671
  23. [23]Yizhe Yang, Yanzhe Sun, Jiacheng Wang, Xin Guo, Hao Zhou, Jie Chen, and Di He. Swe-gym: Training software engineering agents and verifiers. arXiv preprint arXiv:2412.21139, 2024.
  24. [24]Chenchen Zhang, Yuhang Li, Can Xu, Jiacheng Liu, Ao Liu, Shihui Hu, Dengpeng Wu, Guanhua Huang, Kejiao Li, Qi Yi, et al. Artifactsbench: Bridging the visual-interactive gap in llm code generation evaluation. arXiv preprint arXiv:2507.04952, 2025.arxiv.org/abs/2507.04952
  25. [25]Ruidong Zhang, Yizhou Chen, Kai Zhao, Wei Zhou, and Muhao Li. Stackeval: Benchmarking llms in coding assistance. arXiv preprint arXiv:2412.05288, 2024.
  26. [26]Kaixuan Zheng, Runzhe Fang, Weize Qian, Xinyun Wang, Tianyi Zhang, Shunyu Zhao, Yiran Chen, Dawn Song, Hu Xu, and et al. Webdev-arena: Benchmarking llm agents for web development. arXiv preprint arXiv:2407.15066, 2024.
  27. [27]Qinkai Zheng, Renjie Wang, Yiming Xu, Yuxiao Chen, Shunyu Zhang, Di He, and Zhiyuan Liu. Codegeex: A pre-trained model for code generation with multilingual evaluations. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2023.arxiv.org/abs/2303.17568
  28. [28]Yujia Zhou, Yue Deng, Yujia Chen, Tianyi Zhang, Tianyu Gao, Karthik Narasimhan, Ahmad Beirami, and Muhao Li. Webarena: A realistic web environment for building autonomous agents. In Advances in Neural Information Processing Systems (NeurIPS), 2023.arxiv.org/abs/2307.13854
  29. [29]Hongda Zhu, Yiwen Zhang, Bing Zhao, Jingzhe Ding, Siyao Liu, Tong Liu, Dandan Wang, Yanan Liu, and Zhaojian Li. Frontendbench: A benchmark for evaluating llms on front-end development via automatic evaluation. arXiv preprint arXiv:2506.13832, 2025. 148 prompt–test pairs, automatic sandboxed evaluation.arxiv.org/abs/2506.13832

Paper details

vlnc:W_j8e7yeyr
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents