1D-Bench: 一个用于具有实时反馈的现实世界迭代UI代码生成的基准
1D-Bench: A Benchmark for Iterative UI Code Generation with Visual Feedback in Real-World
AI总结:
1D-Bench通过现实电商工作流提供迭代UI代码生成基准,测试模型在中间表示缺陷下的鲁棒性,实验表明迭代编辑能提升渲染成功率和视觉相似性。
摘要:
设计到代码将高保真度的UI设计转换为可执行的前端实现,但进展难以比较,因为数据集、工具链和评估协议不一致。我们介绍了1D-Bench,一个基于现实电子商务工作流的基准,其中每个实例提供一个参考渲染和一个导出的中间表示,后者可能包含提取错误。1D是“一天”的缩写,代表在不到一天的时间内高效完成设计到代码任务。模型将两者作为输入,使用中间表示作为结构提示,同时被评估与参考渲染对比,这测试了模型对中间表示缺陷的鲁棒性,而不是字面忠实度。1D-Bench要求在固定的工具链下生成可执行的React代码库,并定义一个多轮设置,在此设置中模型迭代应用组件级编辑,利用执行反馈。在商业和开源多模态模型上的实验表明,迭代编辑通常通过提高渲染成功率和经常改善视觉相似性来提高最终性能。我们进一步在合成修复轨迹和基于强化学习的编辑上进行了试点研究,并观察到有限且不稳定的收益,这可能源于稀疏终端奖励和高方差的文件级更新。
英文摘要:
Design-to-code translates high-fidelity UI designs into executable front-end implementations, but progress remains hard to compare due to inconsistent datasets, toolchains, and evaluation protocols. We introduce 1D-Bench, a benchmark grounded in real e-commerce workflows, where each instance provides a reference rendering and an exported intermediate representation that may contain extraction errors. 1D is short for one day, representing the efficient completion of design-to-code tasks in less than one day. Models take both as input, using the intermediate representation as structural cues while being evaluated against the reference rendering, which tests robustness to intermediate representation defects rather than literal adherence. 1D-Bench requires generating an executable React codebase under a fixed toolchain with an explicit component hierarchy, and defines a multi-round setting in which models iteratively apply component-level edits using execution feedback. Experiments on commercial and open-weight multimodal models show that iterative editing generally improves final performance by increasing rendering success and often improving visual similarity. We further conduct a pilot study on post-training with synthetic repair trajectories and reinforcement learning based editing, and observe limited and unstable gains that may stem from sparse terminal rewards and high-variance file-level updates. The data and scripts used in this study are available in an anonymized repository at https://anonymous.4open.science/r/d2c-benchmark-A9C4/.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。