TL;DR
While Multimodal Large Language Models (MLLMs) excel at turning static visual designs into web code, they struggle to replicate the dynamic, multi-step interaction logic of real-world websites. This paper introduces WebIGBench, the first benchmark specifically designed to evaluate interactive webpage code generation, alongside an automated evaluation pipeline that uncovers a stark "looks-right-but-does-not-work" performance gap in state-of-the-art models.
What Problem Does This Paper Address?
Existing front-end code generation benchmarks (like Design2Code or Web2Code) primarily focus on static webpages. They judge a model's success based on visual fidelity and code structure. However, modern web applications are inherently dynamic, relying on continuous, state-dependent user interactions (e.g., typing a search query, seeing dropdown suggestions, and clicking a result).
Prior benchmarks either ignore these behaviors entirely or limit their scope to isolated, single-step events (like a single click). Furthermore, there has been a lack of automated evaluation frameworks capable of verifying whether a generated webpage actually behaves like the reference page.
Methods
To bridge this gap, the authors developed a hybrid benchmark construction framework and a novel automated evaluation pipeline.
- Benchmark Construction: Human annotators designed goal-oriented interaction tasks for real-world websites. An advanced MLLM-based UI agent (
browser-use) then executed these tasks in a closed-loop browser environment to automatically collect perfectly aligned behavioral logs and screenshots for every state transition. - Automated Evaluation Pipeline: To test a generated webpage, the pipeline serves the generated HTML locally via an HTTP server. The same UI agent attempts to execute the original human-authored task on the generated page, producing a sequence of actions and screenshots.
- Action Semantic Matching: Because a generated page might require slightly different steps or introduce redundancies, a deterministic LLM matcher aligns the generated action sequence with the reference sequence. This allows the framework to calculate both visual similarity metrics (CLIP, SSIM, BLEU) and functional metrics like Success Rate (SR) and Action Completion Rate (ACR).
Datasets
The authors introduced WebIGBench, which consists of:
- 103 unique interactive webpages sourced from popular real-world domains.
- 15 distinct categories (including E-commerce, Technology, and Video Streaming) to ensure diverse UI designs.
- 871 distinct interactive actions covering 5 popular action types: click, input, scroll, key press, and switch-tab.
- An average of ~8.5 actions per page, making it significantly more complex than prior interaction datasets (which averaged ~2.9 actions per page).
Key Insights and Ideas
- The "Looks-Right-But-Does-Not-Work" Gap: Top models achieve high visual similarity scores (Match-CLIP scores between 0.71–0.79), yet yield surprisingly low functional Success Rates (0.23–0.52). Models are excellent at copying the visual layout but fail to wire the underlying JavaScript logic correctly.
- Textual Guidance Trumps Visual Cues: Providing models with an explicit "Action" list (the sequence of intended user actions) dramatically improves functional success rates. Conversely, adding visual highlights or combining visual and textual cues can introduce ambiguity and degrade performance.
- Code Syntax is Not the Bottleneck: Error analysis revealed that Execution Failure (syntactically invalid code) is rare. Instead, the dominant failure modes are Step Limit Exceeded (the UI agent gets stuck in infinite corrective loops) and Functional Deviation (the page reacts incorrectly to an action).
Key Results
The authors evaluated six frontier MLLMs (including GPT-5, Gemini-2.5-Pro, and Grok-4) under two prompting strategies: "Direct" (textual instructions only) and "Action" (textual instructions + action list).
- Baseline Performance: Under the standard "Direct" prompt, even the best model (Gemini-2.5-Pro) only achieved a 52.4% Success Rate (SR) and an Action Completion Rate (ACR) of 75.4%.
- The Power of Action Prompts: Providing the action list boosted performance across almost all models. For instance, GPT-5's Success Rate jumped from 31.1% to 60.2%, and Gemini-2.5-Pro reached the top score of 69.9%.
- Open-Source vs. Closed-Source: Open-source models like Qwen-VL-Max (35.0% SR Direct / 49.5% SR Action) performed competitively, outperforming some closed-source alternatives but still trailing the frontier models in complex interaction logic.
Limitations and Future Work
- Scope Constraints: WebIGBench deliberately restricts code generation to self-contained, single-file HTML/CSS/JS outputs. It does not currently evaluate modern component frameworks (React, Vue), multi-page navigation, or backend state management.
- Linear Evaluation: The evaluation pipeline models interactions as a single linear sequence. Real-world interactions are often non-linear; the authors note that modeling equivalent interaction paths as a Directed Acyclic Graph (DAG) is an important next step.
Summary updated