PapersWithELO
← ICLR 2024 leaderboard

Learning UI-to-Code Reverse Generator Using Visual Critic Without Rendering

Davit Soselia, Khalid Saifullah, Tianyi Zhou

generative modelsMulti-modality alignmentvision-language modelcode generation
17.70100
Fused
band ≈ ±15 pct pts (from σ = 0.29)
17.80100
Mimo
band ≈ ±21 pct pts (from σ = 0.42)
18.80100
DeepSeek
band ≈ ±20 pct pts (from σ = 0.40)

OpenReview ground truth

Rejected

TL;DR — Introducing a novel vision-code transformer for automated HTML/CSS code generation from screenshots, leveraging an Encoder-Decoder architecture and visual critic fine-tuning, with evaluations on synthetic datasets of varied complexity.

Abstract

Automated reverse engineering of HTML/CSS code from UI screenshots is an important yet challenging problem with broad applications in website development and design. In this paper, we propose a novel vision-code transformer (ViCT) composed of a vision encoder processing the screenshots and a language decoder to generate the code. They are initialized by pre-trained models such as ViT/DiT and GPT-2/LLaMA but aligning the two modalities requires end-to-end finetuning, which aims to minimize the visual discrepancy between the code-rendered webpage and the original screenshot. However, the rendering is non-differentiable and causes costly overhead. We address this problem by actor-critic fine-tuning where a visual critic without rendering (ViCR) is developed to predict visual discrepancy given the original and generated code. To train and evaluate our models, we created two synthetic datasets of varying complexity, with over 75,000 unique (code, screenshot) pairs. We evaluate the UI-to-Code performance using a combination of automated metrics such as MSE, BLEU, IoU, and a novel htmlBLEU score. ViCT outperforms a strong baseline model DiT-GPT2, improving IoU from 0.64 to 0.79 and lowering MSE from 12.25 to 9.02. With much lower computational cost, it can achieve comparable performance as when using a larger decoder such as LLaMA.

Author context

Most prolific author: 13 submissions (credibility 0.92).

No mass-submission penalty for this paper (authors within normal submission volume).

Aggregate statistics only — no individual author rankings.

Ranking trajectory

Percentile by tournament round — convergence indicates rating stability.

Battle history — 34 comparisons

Ranked above opponent in 44% of matchups.

Judge assessments

Mean overall score 0.0 ± 0.0 (n = 34)