DesignCoder: Hierarchy-Aware and Self-Correcting UI Code Generation with Large Language Models
Yunnong Chen, Shixian Ding, YingYing Zhang, Wenkai Chen, Jinzhou Du, Lingyun Sun, Liuqing Chen

TL;DR
DesignCoder is a hierarchical-aware, self-correcting framework that improves UI code generation from multimodal large language models, achieving higher accuracy, visual similarity, and code quality in front-end development.
Contribution
It introduces UI Grouping Chains and a hierarchical divide-and-conquer approach, along with a self-correction mechanism, to enhance code quality and understanding in automated UI code generation.
Findings
Outperforms state-of-the-art baselines in React Native code generation
Achieves significant improvements in visual similarity metrics (MSE, CLIP, SSIM)
Enhances code structure similarity metrics (TreeBLEU, Container Match, Tree Edit Distance)
Abstract
Multimodal large language models (MLLMs) have streamlined front-end interface development by automating code generation. However, these models also introduce challenges in ensuring code quality. Existing approaches struggle to maintain both visual consistency and functional completeness in the generated components. Moreover, they lack mechanisms to assess the fidelity and correctness of the rendered pages. To address these issues, we propose DesignCoder, a novel hierarchical-aware and self-correcting automated code generation framework. Specifically, we introduce UI Grouping Chains, which enhance MLLMs' capability to understand and predict complex nested UI hierarchies. Subsequently, DesignCoder employs a hierarchical divide-and-conquer approach to generate front-end code. Finally, we incorporate a self-correction mechanism to improve the model's ability to identify and rectify errors…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsWeb Applications and Data Management · Model-Driven Software Engineering Techniques · Software Engineering Techniques and Practices
