arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.28610cs.SE
收藏

InterWebCoder:通过强化学习从可执行测试中学习交互式网页生成

InterWebCoder: Learning Interactive Webpage Generation from Executable Tests via Reinforcement Learning

The Chinese University of Hong Kong(香港中文大学);Johns Hopkins University(约翰斯·霍普金斯大学);Singapore Management University(新加坡管理大学);Chongqing University(重庆大学)

Jingyu Xiao, Dasen Dai, Yuxuan Wan, Jen-tse Huang, Yintong Huo, Hongyu Zhang, Michael R. Lyu

AI总结:

本研究提出InterWebCoder框架,通过测试规范引导的数据合成与强化学习优化,实现交互式网页高效生成,在基准测试中性能优于多数大模型,且大幅降低训练成本与延迟。

摘要:

交互式网页是现代应用的基础,但多模态大语言模型(MLLMs)仍难以复现其视觉外观与多步骤行为。可扩展的训练数据需包含用户操作、状态转换与预期结果,而真实网页代码常与无关脚本和外部依赖纠缠。此外,现有基于GUI智能体的验证提供的功能反馈缓慢且可能不稳定。为解决这些挑战,我们提出InterWebCoder,一种用于交互式网页代码生成的高效框架。InterWebCoder引入测试规范引导且执行验证的数据合成流水线,记录真实交互轨迹并合成包含可执行测试脚本的独立网页代码。故障归因修复机制利用运行时证据定位并迭代修复网页代码或测试脚本中的错误。随后,我们结合测试ID加权的监督微调与组相对策略优化,通过测试通过率和状态级视觉相似度直接优化功能正确性与视觉保真度,以快速可复现的可执行反馈替代昂贵的GUI智能体验证。该流水线从2058个任务中生成1736个验证样本,实现84.35%的合成成功率。在IWR-Bench和Vision2Web上,采用9B主干模型的InterWebCoder分别取得48.54和48.42的最终分数,优于30B级模型与Gemini-3.7-Flash,同时与Claude-Sonnet-5具有竞争力。它将奖励计算延迟降低97%以上,消除外部MLLM验证成本,并将端到端训练加速最高1.4倍。

英文摘要:

Interactive webpages underpin modern applications, but reproducing both their visual appearance and multi-step behavior remains challenging for multimodal large language models (MLLMs). Scalable training data must capture user actions, state transitions, and expected outcomes, while real-world webpage code is often entangled with irrelevant scripts and external dependencies. Moreover, existing GUI-agent-based verification provides slow and potentially unstable functional feedback. To address these challenges, we propose InterWebCoder, an efficient framework for interactive webpage code generation. InterWebCoder introduces a Test-Specification-Guided and Execution-Verified Data Synthesis pipeline that records real-world interaction trajectories and synthesizes self-contained webpage code with executable test scripts. A failureattributed repair mechanism uses runtime evidence to locate and iteratively fix errors in either the webpage code or test script. We then combine test-ID-weighted supervised fine-tuning with group-relative policy optimization, directly optimizing functional correctness and visual fidelity using test pass rates and state-level visual similarity. This replaces costly GUI-agent verification with fast, reproducible executable feedback. Our pipeline produces 1,736 verified samples from 2,058 tasks, achieving an 84.35% synthesis success rate. On IWR-Bench and Vision2Web, InterWebCoder achieves final scores of 48.54 and 48.42 with a 9B backbone, outperforming 30B-level models and Gemini-3.7-Flash while remaining competitive with Claude-Sonnet-5. It reduces reward-computation latency by over 97%, eliminates external MLLM verification costs, and accelerates end-to-end training by up to 1.4x.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑