arXiv(opens in a new tab)cs.CVAug 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2608.24138

Rubrics as Visual-Repair Context for Self-Evolving UI-to-Code Generation

Tianyi Xiong, Zhengyuan Yang, Xiaofei Wang, Chung-Ching Lin, Ruichun Ma, Kevin Lin, Zhendong Wang, Linjie Li, Chenxi Liu, Ruibo Chen, Ramani Duraiswami, Heng Huang, Lijuan Wang

Abstract

Large vision-language models have shown strong progress in UI-to-code generation, yet their test-time self-evolution remains unstable. We first identify a fundamental obstacle, termed visual repair coupling: a local code edit may propagate through layout, style, and component dependencies, correcting one visual mismatch while degrading regions that were previously faithful. To address this issue, we present RubSE, a Rubric-guided Self-Evolution framework that uses rubrics to represent visual feedback as a structured visual-repair context. At each refinement round, RubSE generates typed candidate rubrics, selects one prioritized repair target, and stores previously selected rubrics as history, thereby steering each revision toward a well-scoped visual repair while discouraging repeated or over-broad changes. Evaluations across six VLMs and three UI-to-code benchmarks demonstrate that RubSE substantially outperforms naïve self-evolution in final-round and best-round settings, achieving more stable refinement trajectories and a higher trajectory-level performance ceiling. Further analysis shows that RubSE mitigates trajectory collapse by improving recovery from severe visual regressions, and that stronger rubric generators can transfer effective visual-repair guidance to weaker code improvers.

1 Introduction

Recent progress in large vision-language models (Hurst et al., 2024; Chen et al., 2024; Bai et al., 2025; Chen et al., 2025a; Li et al., 2024) has expanded their role from answering questions (Liu et al., 2023; Chen et al., 2023; Wang et al., 2025b; Xiong et al., 2025b) about images to producing structured, executable outputs grounded in visual inputs (Xiong et al., 2026; Azzolini et al., 2025; Ni et al., 2025a; Zhao et al., 2025a; Yu et al., 2025).

Figure

Left-align header branding

(layout_geometry):

Remove those left

margins and align the

brand block to the left;

adjust 'head' grid and

'.brand' padding so the

logo sits near the left

like the reference.

Naïve Self-Evolution

RubSE (ours)

Figure 1: Example of visual repair coupling. Naïve self-evolution fixes the gray bar assignment, but introduces errors in page scale and bar length. In contrast, RubSE correctly left-aligns the logo and tagline with the content edge while preserving the global layout.

UI-to-code generation (Beltramelli, 2018; Jiang et al., 2025; Chen et al., 2025b; Zhou et al., 2025) represents a concrete instance of this shift: given a screenshot, the model must generate web code that renders into a visually faithful reproduction of the target interface. This capability supports UI reproduction, design prototyping, and developer workflows by converting visual designs into executable implementation drafts. Despite its value, UI-to-code generation remains challenging because the quality of the generated code cannot be reliably judged from the code tokens alone. Instead, it must be rendered and evaluated against the target screenshot, requiring the model to align the resulting interface across multiple visual aspects (Si et al., 2025), including spatial layout, color, typography, component hierarchy, and visual density.

Existing methods have primarily improved performance through training-time interventions, such as scaling instruction-tuning data (Gui et al., 2025a; Yun et al., 2024; Calò and De Russis, 2026) or adopting stage-wise training pipelines (Ni et al., 2025a; Yang et al., 2026; Zhao et al., 2025b; Xu et al., 2025). In comparison, test-time improvement

*Work done during an internship at Microsoft. Project: https://tyxiong23.github.io/rubse remains less explored. This gap is notable because UI-to-code provides a natural source of test-time feedback: after a code draft is generated, it can be rendered and visually compared with the target screenshot. A straightforward strategy is therefore self-evolution, where the model iteratively critiques the rendered output and revises the code based on observed discrepancies. Such generate-critique-revise loops have been widely studied for text-generation tasks (Huang et al., 2023; Gou et al., 2024; Khattab et al., 2023; Zhang et al., 2025c,b; Liu et al., 2026), and are increasingly supported by general-purpose coding agents (Anthropic, 2025a; OpenAI, 2025a) (see Appendix E for discussion). However, in UI-to-code generation, naïve self-evolution does not reliably produce monotonic improvement.

The key obstacle is that UI code is visually coupled. Changing one CSS rule may shift the layout; modifying a parent container may affect its children; and adding a missing component may alter spacing, alignment, or visual density elsewhere. We refer to this phenomenon as visual repair coupling: code edits can induce non-local changes in the rendered interface through coupled layout, style, and component dependencies. Although we study this phenomenon in web UI coding, visual repair coupling reflects a broader challenge in structure–detail generation and agentic tasks, where local edits to implementation details can propagate through the global structure of the final artifact. As illustrated in Figure 1, naïve self-evolution is vulnerable to this coupling. An attempted repair may correct one visible error while damaging regions that were already faithful. Our preliminary analysis suggests that this leads to unstable refinement trajectories, where later iterations do not consistently improve over the initial draft and may even reduce overall visual fidelity.

This failure mode reveals a limitation of free-form visual feedback. A useful test-time critic should not merely tell the model what is wrong; it should also help constrain the repair so that correct regions are not unnecessarily disturbed. In other words, UI-to-code self-evolution must control both sides of visual repair: what should be changed and what should remain preserved. This requires feedback that is structured, localized, and persistent across iterations, rather than an unconstrained critique that may encourage broad code rewrites.

To this end, we propose RubSE, a rubric-guided self-evolution framework for UI-to-code generation. The central idea is to represent visual feedback as structured repair context. Each rubric describes a specific visual failure, assigns it to a predefined visual aspect, and specifies a targeted correction direction. Compared with free-form critique, this rubric-based representation provides soft control over the refinement process: it makes the repair objective explicit while allowing the code generator to determine how to implement the edit. To construct effective repair context across iterations, RubSE uses three atomic operations: EVOLVE, SELECT, and HISTORY. EVOLVE generates candidate rubrics that describe possible visual repairs for the current rendering. SELECT chooses a single prioritized rubric as the focus of the next revision, reducing the risk of broad, entangled edits. HISTORY carries selected rubrics forward across iterations, reminding the model of previous repair decisions and discouraging repeated failures or regressions. Together, these operations separate three roles that are often conflated in naïve self-evolution—discovering errors, choosing a focused repair target, and preserving repair context over time—retaining the flexibility of open-ended code revision while steering the model toward more localized and stable visual improvements.

Across six models and three benchmarks, RubSE improves both metrics over naïve self-evolution in 15/18 final-round settings, with average gains of +1.20 overall points and +0.11 aspect-mean score. It also achieves stronger best-round performance in 14/18 settings, with an average gain of +1.13 overall points, indicating both more stable refinement and a higher trajectory-level ceiling. Additional analysis reveals two key findings: (1) Rubric-guided repair stabilizes self-evolution by accelerating recovery from severe visual regressions and reducing collapse for stronger VLM executors. (2) High-quality rubrics transfer to weaker code improvers, as GPT-5.4-generated rubrics consistently improve Qwen self-evolution by providing perceptual, actionable, and well-scoped repair targets.

Our contributions are summarized as follows:

• We identify visual repair coupling, where local code edits induce non-local rendered changes, as a central failure mode behind unstable UI-to-code self-evolution.

• We propose RubSE, a rubric-guided self-evolution framework that turns visual feedback into structured visual-repair context through an EVOLVE–SELECT–HISTORY loop over typed rubrics, steering the model toward targeted and stable visual improvements.

• Experiments demonstrate that RubSE improves both final-round stability and best-round performance over naïve self-evolution across benchmarks, execution models and metrics. Further analyses show that rubrics help recover from severe visual regressions and provide transferable guidance to weaker code improvers.