基于视觉原型与需求的可部署网站的状态感知生成
State-Aware Generation of Deployable Websites from Visual Prototypes and Requirements
AI总结:
针对从视觉原型和需求生成网站时的原型到项目状态漂移问题,提出VisStateCoder框架,通过项目状态图维持对应关系,在Vision2Web数据集上显著提升了交互前端和全栈网站任务的性能并降低状态漂移。
摘要:
借助多模态模型,从视觉原型和文本需求生成可部署网站的可行性日益提升,但生成项目与原型保持一致仍具挑战。原型规定布局和视觉元素,需求描述交互工作流与部署约束。现有UI转代码方法及编码智能体常将布局重建、交互实现与项目编辑分开处理,导致视觉元素、文件、工作流、依赖项与渲染证据在生成、验证和更新过程中失去对应关系,我们称此问题为原型到项目的状态漂移。我们提出VisStateCoder,一个状态感知框架,通过项目状态图维持这些对应关系。该图通过类型化链接连接四类状态节点,支持原型接地、图引导生成及渲染证据引导的范围更新,可将失败检查映射到受影响文件,同时保留更新范围外的文件。我们在Vision2Web数据集上,使用五个基础模型对VisStateCoder在静态网页、交互前端和全栈网站任务中进行评估。跨模型平均来看,VisStateCoder在交互前端和全栈网站任务上,较各模型最强基线分别提升26.1和22.6分;与其他状态表示相比,它还降低了验证状态漂移(定义为在一轮更新中通过但后续失败的检查)。对50个任务的标注研究发现,构建的图达到95.6%的边级F1值。
英文摘要:
Generating deployable websites from visual prototypes and textual requirements is increasingly feasible with multimodal models, yet keeping generated projects consistent with their prototypes remains challenging. Prototypes specify layouts and visual elements, while requirements describe interaction workflows and deployment constraints. Existing UI-to-code methods and coding agents often treat layout reconstruction, interaction implementation, and project editing separately, allowing visual elements, files, workflows, dependencies, and render evidence to lose their correspondence across generation, verification, and update. We call this problem prototype-to-project state drift. We propose VisStateCoder, a state-aware framework that maintains these correspondences in a Project State Graph. The graph connects four types of state nodes through typed links and supports prototype grounding, graph-guided generation, and render-evidence-guided scoped updates that map failed checks to affected files while preserving files outside the update scope. We evaluate VisStateCoder on Vision2Web using five foundation models across Static Webpage, Interactive Frontend, and Full-Stack Website tasks. Averaged across models, VisStateCoder improves overall scores over the strongest baseline for each model by 26.1 and 22.6 points on Interactive Frontend and Full-Stack Website tasks, respectively. It also reduces verified-state drift, measured by checks that pass in one update round but fail later, compared with alternative state representations. An annotation study of 50 tasks finds that the constructed graphs achieve 95.6% edge-level F1.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。