UI2Code^N: UI-to-Code Generation as Interactive Visual Optimization

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Yang, Zhen, Hong, Wenyi, Xu, Mingde, Fan, Xinyue, Wang, Weihan, Cheng, Jiale, Gu, Xiaotao, Tang, Jie
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866911650965094400
author Yang, Zhen
Hong, Wenyi
Xu, Mingde
Fan, Xinyue
Wang, Weihan
Cheng, Jiale
Gu, Xiaotao
Tang, Jie
author_facet Yang, Zhen
Hong, Wenyi
Xu, Mingde
Fan, Xinyue
Wang, Weihan
Cheng, Jiale
Gu, Xiaotao
Tang, Jie
contents UI-to-code aims to translate UI screenshots into executable front-end code. Despite progress with vision-language models (VLMs), most existing methods formulate UI-to-code as a single-pass generation, which mismatches real-world UI development that is inherently iterative and feedback-driven. We reformulate UI-to-code as an interactive visual optimization problem, where code generation is embedded in a closed-loop process of execution, visual inspection, and iterative refinement driven by rendered visual feedback. To address the non-differentiability of visual objectives and the noise of absolute visual evaluators, we propose Relative Visual Policy Optimization (RVPO), a preference-based reinforcement learning method that optimizes relative visual rankings among rendered candidates under execution feedback. We instantiate this paradigm in UI2Code^N, an open-source 9B model trained via continual pre-training, supervised fine-tuning, and reinforcement learning. Experiments demonstrate state-of-the-art performance on UI drafting, UI polishing, and UI editing benchmarks, even outperforming larger models, with performance consistently improving through iterative visual optimization. Our code and models are available at https://github.com/zai-org/UI2Code_N.
format Preprint
id arxiv_https___arxiv_org_abs_2511_08195
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle UI2Code^N: UI-to-Code Generation as Interactive Visual Optimization
Yang, Zhen
Hong, Wenyi
Xu, Mingde
Fan, Xinyue
Wang, Weihan
Cheng, Jiale
Gu, Xiaotao
Tang, Jie
Computer Vision and Pattern Recognition
UI-to-code aims to translate UI screenshots into executable front-end code. Despite progress with vision-language models (VLMs), most existing methods formulate UI-to-code as a single-pass generation, which mismatches real-world UI development that is inherently iterative and feedback-driven. We reformulate UI-to-code as an interactive visual optimization problem, where code generation is embedded in a closed-loop process of execution, visual inspection, and iterative refinement driven by rendered visual feedback. To address the non-differentiability of visual objectives and the noise of absolute visual evaluators, we propose Relative Visual Policy Optimization (RVPO), a preference-based reinforcement learning method that optimizes relative visual rankings among rendered candidates under execution feedback. We instantiate this paradigm in UI2Code^N, an open-source 9B model trained via continual pre-training, supervised fine-tuning, and reinforcement learning. Experiments demonstrate state-of-the-art performance on UI drafting, UI polishing, and UI editing benchmarks, even outperforming larger models, with performance consistently improving through iterative visual optimization. Our code and models are available at https://github.com/zai-org/UI2Code_N.
title UI2Code^N: UI-to-Code Generation as Interactive Visual Optimization
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2511.08195