TL;DR
WebUIBench is a comprehensive new benchmark designed to evaluate Multimodal Large Language Models (MLLMs) on web application development by breaking the process down into software engineering sub-tasks. By testing 29 mainstream MLLMs across 21,793 question-answer pairs, the benchmark reveals that while top models excel at basic coding, they severely struggle with spatial layout, pixel-level visual grounding, and cross-modal debugging.
What Problem Does This Paper Address?
The promise of Multimodal Large Language Models (MLLMs) acting as autonomous front-end engineers—turning a webpage screenshot directly into clean, functional code (WebUI-to-Code)—is closer than ever. However, existing benchmarks treat this process as a black box, evaluating only the final generated webpage's visual similarity to the original design.
In real-world software engineering, building a website isn't a single monolithic step. It requires a pipeline of distinct sub-capabilities: parsing visual requirements (Needs Analysis), writing code (Construction), and mapping code back to visual elements to fix errors (Debugging). Without isolating these sub-capabilities, researchers cannot accurately diagnose why a model fails or how to systematically improve its front-end generation capabilities.
Methods
The authors introduce WebUIBench, an evaluation framework explicitly structured around the traditional software engineering lifecycle. As shown in the evaluation taxonomy, the benchmark splits the evaluation into four core dimensions across 9 distinct sub-tasks:
- WebUI Perception (Needs Analysis): Evaluates the model's ability to identify elements, recognize visual attributes (colors, fonts), locate elements spatially, and perform OCR within a webpage.
- HTML Programming (Software Construction): Tests pure coding skills, specifically syntax error correction and functional code editing based on natural language instructions.
- WebUI-HTML Understanding (Software Debugging): Measures cross-modality reasoning by asking models to match or retrieve HTML code snippets that correspond to specific visual sections of a screenshot.
- WebUI-to-Code (The Core Task): The end-to-end generation task, evaluated on both full webpages and smaller webpage slices.
To evaluate the end-to-end generation task without relying solely on coarse visual metrics like CLIP similarity, the authors developed a fine-grained evaluation pipeline. It simplifies the webpage's DOM tree, uses the Hungarian matching algorithm to evaluate element-level attributes (text, color), and extracts layout features from a simplified "sketch" of the webpage to isolate layout accuracy from content accuracy.
Datasets
WebUIBench is built from 719 real-world websites spanning five common categories: enterprise portals, background management systems, personal blogs, news sites, and e-commerce platforms.
To make the data manageable for MLLM context windows, the authors used a page-simplification algorithm and segmented the pages into 2,488 webpage slices. From these, they automatically generated and rigorously verified 21,793 high-quality question-answer pairs. Unlike synthetic datasets (e.g., WebSight), WebUIBench reflects the messy, complex reality of production-grade web design.
Key Insights and Ideas
- Personalized Model Strengths: MLLMs exhibit distinct "personalities." The Qwen2-VL series consistently performs better on visual perception tasks, whereas the InternVL2.5 series shows a pronounced advantage in pure HTML programming tasks.
- The Spatial Blindspot: MLLMs suffer from a severe lack of pixel-level spatial understanding. While many models can correctly identify which general grid region an element sits in, they fail dramatically when asked to provide precise bounding boxes.
- The Cross-Modal Debugging Bottleneck: Models under 40 billion parameters perform close to random guessing (≤ 50% accuracy) on Webpage-HTML matching tasks. Cross-modality reasoning—connecting a line of code to a visual block—remains a massive hurdle due to high information density.
- Small Model Generation Pitfalls: Smaller MLLMs (<40B) often pass instruction-following tests but fail during code compilation because they tend to generate repetitive or incomplete code, frequently forgetting to close HTML tags.
Key Results
The benchmark evaluated 29 mainstream MLLMs (7 closed-source, 22 open-source).
- The Leaders: Proprietary models still hold the crown for end-to-end generation. GPT-4o achieved the highest WebUI-to-Code score (82.0), followed closely by Claude-3.5-Sonnet (80.2) and the open-source Qwen2-VL-72B (77.3).
- The Grounding Failure: Fine-grained visual grounding (bounding box prediction) is incredibly difficult for all current models. As shown in the results, even the top-performing model, GPT-4o, barely scratches 2% accuracy on this task.
- Framework Trade-offs: In an auxiliary experiment using the Tailwind CSS framework, models saw their code compilation success rates jump drastically (from 47% to 92%). However, the overall visual quality of the pages actually declined because models frequently mixed Tailwind classes with raw HTML inconsistently.
Limitations and Future Work
The authors note three primary limitations of the current benchmark:
- Data Imbalance: Due to strict filtering, some sub-tasks have low representation (e.g., font-style questions make up only 0.67% of the dataset).
- Desktop-Centric: The dataset currently lacks mobile responsive layouts.
- Static Pages Only: WebUIBench focuses on HTML/CSS. It does not yet evaluate dynamic interactions or JavaScript functionality. Preliminary testing showed that even Claude-3.5-Sonnet and GPT-4o scored abysmally low (0.26 and 0.20, respectively) when tasked with generating interactive web code.
Summary updated