TL;DR
When designers review a website, they rarely write a paragraph like "move the top-right button 12 pixels left." Instead, they grab a digital pen, circle the button, and draw an arrow—a process known as redlining. UI-Redline-bench is the first benchmark designed to test whether Vision-Language Models (VLMs) can read these messy, intuitive visual annotations directly on a screenshot and translate them into working HTML/CSS code edits. While top models like Gemini 3.1 Pro and GPT-5 score well overall, they still stumble when they have to connect spatially distant clues, like following an arrow from a rough sketch to its destination.
What Problem Does This Paper Address?
Most benchmarks for UI code generation and editing rely on clean, natural-language instructions (e.g., "change the header background to blue"). But in real-world software development, language is often a clumsy tool for spatial intent. A quick sketch, an enclosure, or a freehand arrow communicates layout tweaks far more naturally than words.
If VLMs are going to be genuinely useful collaborators in front-end development, they need to understand these non-linguistic, human-crafted marks. Existing benchmarks either ignore visual prompts, focus only on general VQA/object localization, or use machine-generated shapes (like neat rectangles) rather than authentic human redlines. This paper fills that gap by asking: Can a VLM look at a redlined screenshot alongside its source code and actually implement the requested UI changes?
Methods
The authors formalize the redlining task as follows: a VLM is given the original HTML/CSS source code ($C_{src}$) and a rendered screenshot overlaid with human-drawn visual instructions ($A_{vis}$). The model must output the modified code ($C_{tgt}$) so that its rendered appearance reflects the visual instructions.
Because manually grading thousands of rendered webpages is expensive, the authors use an automated 3-judge VLM median (combining GPT-5, Gemini 2.5 Pro, and Claude Sonnet 4) to score each output on a three-point scale:
- Success (100): The visual instruction is accurately reflected.
- Partial Success (50): The change is incomplete or introduces side effects like a broken layout.
- Failure (0): The instruction is ignored or the code fails to render.
To ensure this automated judge is trustworthy, the authors validated it against human annotators on 128 sampled cases, achieving substantial agreement (Cohen's $\kappa = 0.699$, with human-to-human Fleiss' $\kappa = 0.853$).
Datasets
UI-Redline-bench consists of two complementary subsets, totaling 472 instances:
- Synthetic Subset (350 instances): Using GPT-5, the authors generated base websites across three types (Portfolio, Online Store, News) and three CSS configurations (Vanilla CSS, Bootstrap, Tailwind CSS), along with localized revision proposals across five categories (layout, color contrast, text readability, button usability, and learnability). Four human annotators verified 175 valid cases and drew visual instructions in two styles: handwritten (freehand arrows, enclosures, and text) and digital (clean shapes and text boxes).
- Real-World Subset (122 instances): To ensure the findings weren't biased toward GPT-5-generated code, the authors collected 61 before-and-after commit pairs from 61 distinct, permissively licensed (MIT/Apache-2.0) GitHub repositories, and annotated each in both handwritten and digital styles. Because real-world sites involve multiple files, models were evaluated using a search-and-replace edit format rather than outputting full files.
Key Insights and Ideas
- Arrows + rough sketches are a major bottleneck: When annotators drew a rough sketch of a new UI element away from the target location and connected it with an arrow, pooled model performance plummeted to 61.2 (compared to 81.5 when the sketch was drawn right next to the target without an arrow). Models struggle to integrate spatially separated marks into a single semantic instruction.
- Enclosures help: Explicitly circling or boxing the target area boosted pooled scores by +15.9 points (80.0 vs. 64.0), giving the model a clear anchor.
- Image resolution silently breaks some models: Claude Sonnet 4 scored poorly on full-page screenshots (37.3), but when the authors cropped the images tightly around the annotated regions, its score jumped by +27.0 points (to 64.3). Because Claude Sonnet 4 automatically downscales images whose long edge exceeds 1,568 px, fine handwritten details were simply being blurred away.
- Frameworks and layout complexity matter: Models performed best on Vanilla CSS and Tailwind, but struggled more with Bootstrap—likely because Bootstrap often requires writing separate CSS selector overrides rather than just adding utility classes in HTML. Similarly, Layout revisions and complex News sites (with asymmetrical grids and deep nesting) were consistently harder than local Text Readability or Color tweaks.
Key Results
Across the 7 evaluated VLMs on the synthetic dataset:
- Top Performers: Gemini 3.1 Pro led with an overall score of 89.0, followed by GPT-5 (85.0), Claude Sonnet 5 (83.9), and GPT-5.4 (82.6).
- Other Models: Gemini 2.5 Pro scored 80.4, the open-weight Qwen3-VL-32B-Thinking scored 64.0, and Claude Sonnet 4 scored 37.3 (due to downscaling).
- Real-World Generalization: Model rankings on the real-world GitHub subset closely mirrored the synthetic subset (Spearman's $\rho = 0.86$), with Gemini 3.1 Pro (89.3) and GPT-5.4 (84.8) remaining at the top.
Limitations and Future Work
The authors note several limitations:
- Scale and Complexity: At 236 unique cases (472 instances), the dataset is modest in size—a trade-off for high-quality manual annotation—and the real-world sites are relatively small static pages (median of 3 files, ~500 lines) rather than massive production codebases.
- Model Coverage: Only one open-weight model (Qwen3-VL-32B) was tested alongside six proprietary APIs.
- Diagnostic Granularity: The evaluation measures whether a model implements the requested change, not whether it misunderstood the visual mark versus failed to write the code.
For future work, the authors highlight the need to improve VLMs' spatial reasoning—specifically their ability to group spatially distributed visual marks (like an arrow pointing from a distant sketch) into a unified, actionable intent.
Summary updated