Skip to content
Book Open access

Component-based Reusable UI Code Generation for Complex Websites via Semantic Segmentation and Fine-grained Feedback

Aug 2026 · Proceedings of the 32nd ACM SIGKDD Conference on Knowledge Discovery and Data Mining V.2 · pp. 5638-5649 · 1 citation · 14 references

TL;DR

This work proposes ComUICoder, a component-based UI code generation framework that emphasizes semantic-aware segmentation, code reuse, and fine-grained refinement and significantly improves overall generation quality and code reusability on complex multipage websites.

Abstract

Multimodal Large Language Models (MLLMs) have demonstrated strong performance on the UI-to-code task, which aims to generate UI code from design mock-ups. However, when applied to long and complex websites, they often struggle with fragmented segmentation, redundant code generation for repetitive components, and frequent UI inconsistencies. To systematically investigate and address these challenges, we introduce ComUIBench, a new multi-page complex webpage benchmark with component annotations, designed to evaluate MLLMs' ability to generate reusable UI code in realistic website scenarios. Building upon this benchmark, we propose ComUICoder, a component-based UI code generation framework that emphasizes semantic-aware segmentation, code reuse, and fine-grained refinement. Specifically, ComUICoder incorporates (1) Hybrid Semantic-aware Block Segmentation for accurate UI semantic coherent block detection, (2) Visual-aware Graph-based Block Merge to consolidate structurally similar components within and across webpages for reusable implementation, and (3) Priority-based Element-wise Feedback to refine generated code and reduce element-level inconsistencies. Extensive experiments demonstrate that ComUICoder significantly improves overall generation quality and code reusability on complex multipage websites. Our datasets and code are publicly available at https://github.com/WebPAI/ComUICoder.

Read PDF

Similar papers

#small language model Book Open access Aug 2026

Extracting Logical Structure in Code Documents via Semantic Segmentation and Language Models

Two language-model-based strategies are proposed for semantic code document segmentation, including a line-by-line approach that classifies each line of code separately before grouping the results into functional units, and a range-based approach that aims to directly determine groups of code lines from the input.

A. Dahou, A. Scherp, Sebastian Kurten et al. · 0 citations
Preprint Aug 2026

Fusing UI Structure&Semantics for Feature-Oriented App Screen Retrieval&Clustering

Across three benchmarks, FRAME outperforms strong baselines by up to 13% MRR in search and 7.6 percentage points in clustering accuracy, demonstrating FRAME's potential for enhancing automated UI design and testing tools.

Arun Krishna Vajjala, Yanfu Yan, Ajay Krishna Vajjala et al. · 0 citations
Preprint Aug 2026

Effective and Efficient Context Retrieval via Partial Dependency Graph for Repository-Level Code Generation

DyRetriever is an efficient context retrieval method via partial dependency graphs that uses an LLM to first select a set of entry-point functions and then perform multi-hop reasoning along the code dependency graph, eliminating manually designed rules and enabling flexibility across scenarios.

Zhongxin Liu, Zhonghao Jiang, Zhi-Fan Ye et al. · 1 citation
#computer vision Jul 2026

UI2App: Benchmarking Visual Interaction Inference in Executable Web Application Generation

UI2App is the first benchmark targeting interaction inference, the ability to recover application behavior from screenshots alone, without any textual or behavioral guidance, and designs an end-to-end pipeline that evaluates each artifact along four dimensions: executability, navigation reachability, visual fidelity, a...

Grace Man Chen, Litao Guo, Yifan Wu et al. · 0 citations
Jul 2026

MV-Bench: Benchmarking Multimodal Large Language Models for Coordinated Multi-View Interface Construction

It is shown that current MLLMs can reproduce visual appearance but remain limited in generating the data semantics and interactive logic required by coordinated multi-view interfaces, and Iterative refinement improves code executability but does not substantially reduce the gap in data binding and interaction generatio...

Yue Zhao, Hongxu Liu, Feiyu Wang et al. · 0 citations
Open access Aug 2026

Chat2Map: A ReAct-based Agent Framework for Automated Web Map Generation from Natural Language Instructions

Chat2Map is presented, an agent framework for automated web map generation from natural-language instructions that integrates skill and tool grounding, runtime schema construction for uploaded GeoJSON and JSON files, and an iterative generate-execute- diagnose-repair loop based on runtime and visual feedback.

Hong-Ping Zhang, Peilong Ma, Cong Wang et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.