WebGrader: Training LLMs for Web Development with Self-Evolving Programmatic Grader

WebGrader: Training LLMs for Web Development with Self-Evolving Programmatic Grader

WebGrader:利用自进化程序化评分器训练用于 Web 开发的大语言模型

Large language models increasingly generate complete websites from natural-language descriptions, and reinforcement learning has become a central approach to closing their remaining functional gap. This training regime is bottlenecked by reward design. Hand-authored browser scripts are executable yet costly to write for open-ended requirements, while VLM and GUI-agent graders scale but may issue verdicts before observing the decisive state.

大语言模型越来越多地能够根据自然语言描述生成完整的网站,而强化学习已成为弥补其剩余功能差距的核心方法。这种训练机制受限于奖励设计。人工编写的浏览器脚本虽然可执行,但针对开放式需求编写的成本很高;而视觉语言模型(VLM)和图形用户界面(GUI)智能体评分器虽然具有可扩展性,但可能会在观察到决定性状态之前就给出判定结果。

We propose WebGrader, a self-evolving programmatic grader that autonomously derives the required interaction flows from each website request, represents each flow as an executable Flow Contract, and uses its execution outcome as an RL reward. WebGrader materializes the generated project in a live browser, grounds target actions against the source code and live DOM, and collects visual, DOM, response, and persistent-state evidence along the same browser trajectory.

我们提出了 WebGrader,这是一个自进化的程序化评分器。它能从每个网站请求中自主推导出所需的交互流程,将每个流程表示为可执行的“流程契约”(Flow Contract),并将执行结果作为强化学习的奖励。WebGrader 在实时浏览器中呈现生成的项目,根据源代码和实时 DOM(文档对象模型)对目标操作进行定位,并沿同一浏览器轨迹收集视觉、DOM、响应和持久状态证据。

A residual-driven offline loop then discovers reusable verifier skills, screens them on disjoint validation pages, and freezes the promoted skill graph before policy training. By separating test planning, action grounding, evidence collection, and semantic judgment, WebGrader issues a Pass verdict only after observing the requested transition.

随后,一个基于残差驱动的离线循环会发现可重用的验证器技能,在不相交的验证页面上对其进行筛选,并在策略训练前冻结已提升的技能图谱。通过将测试规划、操作定位、证据收集和语义判断分离开来,WebGrader 仅在观察到所请求的转换后才会给出“通过”判定。

On WebGen-Bench, WebGrader trains an 8B policy to a 52.01% functional success rate, outperforming a matched appearance-plus-script reward by 7.88 points and surpassing o4-mini and DeepSeek-v4-flash. On WG-core-250, the policy reaches a Full Score of 44.953 and surpasses Qwen3-Coder-480B.

在 WebGen-Bench 测试中,WebGrader 将一个 8B 参数的策略训练到了 52.01% 的功能成功率,比匹配的外观加脚本奖励高出 7.88 个百分点,并超越了 o4-mini 和 DeepSeek-v4-flash。在 WG-core-250 测试中,该策略达到了 44.953 的满分,并超越了 Qwen3-Coder-480B。