# Render Structure Uncertainty for HTML Repair in MLLM-based UI-to-Code Generation

*Haoran Ma, Jiechao Gao, Shisong Tang, bing han, Jifeng Hu, Hechang Chen*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/154842) · [OpenReview](https://openreview.net/forum?id=AW3Yb9jstt) · [Open on the map](../papers.html#p154842)

Category: [LLM Agents, Evals & Benchmarks](../pcat/17.md) › [Multi-Framework UI Code Generation](../pgroup/54.md) · Type: new method · Keywords: UI code generation, DOM repair, uncertainty modeling, visual structure matching, global reranking

## Summary
Render Structure Uncertainty (RSU) introduces a browser-grounded uncertainty layer that repairs structural errors in generated UI code by exploring multiple local DOM candidates and performing global reranking.

## Explained to a 5-year-old
When a computer draws pictures of how a webpage should look, it sometimes makes mistakes in the code that makes the page. These mistakes can make the page look wrong, and the errors can keep getting bigger. We give the computer a new way to look at the picture and the code, find where they don't match, and think of many possible fixes. It then tries each fix in the whole page and picks the one that looks best. This helps the page look nicer and work better.

## Explained to a 5-year-old, longer
When a computer creates a picture of a website, it writes code to make the picture appear on the screen. Sometimes the code has mistakes, like wrong shapes or missing parts, which can cause the picture to look odd. These mistakes can spread and become worse if not fixed. The new method looks at both the picture and the code, finds where they do not match, and thinks of many ways to fix the code. For each possible fix, it runs the code in a browser and checks how the picture looks. It then groups similar fixes together and picks the best one to use. This process helps the website look correct and work smoothly, reducing errors that were hard to fix before.

## For a technical reader
The system adds an uncertainty layer to any existing UI-to-code generator. It converts the target screenshot into a visual graph and the generated code’s browser trace into a DOM-anchored graph, then aligns them to locate mismatches. Multiple local repair candidates are generated, clustered by layout and semantic signatures, and globally reranked to produce the final HTML. This uncertainty-guided search avoids early commitment to a single error location or repair, improving overall code quality.

## Problem
When large multimodal models generate interface code, they often contain structural errors that can propagate in later generations. There is a need to locate and repair unreliable local structures in the generated code without prematurely fixing a single error location.

## Method
The approach parses the target screenshot into a visual structure graph and aligns it with a DOM-anchored render structure graph derived from the browser's execution trace. It then detects mismatches, proposes multiple local repair candidates, clusters them using layout and semantic signatures, and reranks them globally to produce the final repaired code.

## Results
The approach improves generation quality over base models, yielding higher-quality code with better layout consistency and fewer local structural errors.

## Contributions
The paper introduces a post-generation repair framework that models uncertainty in DOM structure correction, enabling exploration of multiple repair candidates and global reranking. It also demonstrates improved layout consistency and reduced structural errors on existing UI code generation tasks.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/154842)
