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 · 37 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
Conference Aug 2026

Hierarchical Repository-Level Code Summarization with Quantized Small Language Model and Graph-Guided Context

Despite recent progress in function-level docstring generation, code summarization systems have mostly focused on creating concise descriptions for individual functions using automatically generated docstrings, leaving the difficult task of generating structured repository-level summaries unaddressed. We propose a nove...

Eric Binu Koshy, Sunitha E. V. · 0 citations
#artificial intelligence Preprint Sep 2026

FeatLens: Feature-Guided Dynamic Code Graph Construction and Retrieval for Repository-Level Code Generation

FeatLens builds a feature index that links natural-language feature descriptions to function-level code entities and dynamically constructs a task-specific seed graph from the feature index and applies semantic-structural graph reasoning with personalized PageRank to select a compact reasoning graph.

Xu-Tian Li, Bo Xiong, Yi-Feng Zhu et al. · 0 citations
Preprint Sep 2026

Beyond Repository Boundaries: Cross-Repository Graph Retrieval for Code Generation

CrossCoder is proposed, a cross-repository code generation framework that explicitly incorporates external libraries into the retrieval context through a unified knowledge graph over repository and library entities that consistently improves both functional correctness and robustness to dependency-version changes.

Minh Le-Anh, Nam Le Hai, Quyen Tran et al. · 0 citations
Preprint Aug 2026

Towards Automated Domain Model Extraction from Source Code using Heuristics and Open-Source LLMs

This paper proposes an automated approach to extract domain models from source code using lightweight, locally deployable LLMs and achieves high F1-scores on a dataset of ten projects, each comprising a curated domain model and its corresponding implementation, while remaining fully executable on locally deployable LLM...

Alessandra Mancas, Mounir Ammam, Hyacinth Ali et al. · 1 citation

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