arXiv(opens in a new tab)cs.CLOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.11543

Learning the Loop, Not Just the Page: Execution-Grounded Loop Learning for Web Generation

Yuxin Meng, Ruixu Zhang, Junjie Wang, Yuhan Suo, Yuhan Sun, Ruining Hu, Yiyao Yu, Yubin Wang, Shouwei Ruan, Bin Wang, Yue Liao, Yuxiang Zhang, Yujiu Yang

ABSTRACT

Functional Web generation is increasingly optimized with executable rewards, yet existing methods largely focus on the quality of the final page and leave the process of diagnosing and repairing imperfect implementations underexplored. We identify a central challenge in this setting: the Generator and Refiner produce executable artifacts with direct environment rewards, whereas the intermediate Critic influences downstream behavior without a directly executable outcome. We introduce WebLoop, an execution-grounded framework that jointly learns generation, critique, and refinement within a shared policy. WebLoop trains an execution-free Critic with complementary signals for requirement-level discriminability and downstream helpfulness, first establishing reliable diagnosis and then introducing consequence-aware credit, while all three roles are jointly optimized with group-relative policy learning. With Qwen3.5-9B, WebLoop reaches 41.5 Overall on WebRise and 38.9% accuracy on WebGen-Bench, improving the base model by 11.3 and 15.4 points, respectively. The gains transfer to first-pass generation, persist at 27B scale, and generalize from text-only training to multimodal inputs. Controlled analyses further show that the improvement cannot be explained by an additional refinement pass alone, highlighting the importance of learning the Critic and the loop itself.

1 INTRODUCTION

Large language models are rapidly moving Web generation from page-level code synthesis toward functional Web generation, where models must not only produce complete HTML/CSS/JavaScript but also satisfy natural-language requirements through correct interactions, state transitions, and persistent behaviors (Lu et al., 2025b; Meng et al., 2026). Unlike conventional code or text generation, generated Web pages are directly executable, allowing functional correctness to be verified through browser interactions and further optimized with reinforcement learning (Jiang et al., 2026; Chen et al., 2026). However, existing execution-based learning remains largely outcome-centric: it optimizes what the model ultimately generates, while paying considerably less attention to how the model should diagnose and repair an already imperfect implementation. In practical Web development, first-pass generation is rarely the end of the process, and reliable diagnosis and revision are equally critical to producing a functional page.

  • Equal contribution.

†^{\dagger} Corresponding authors.

Under Review.

(a) Generation-only RL

(b) Execution-guided RL

Figure

(c) WebLoop

Figure

Joint GRPO update

Figure 1: Conceptual comparison of execution-based learning paradigms for functional Web generation. (a) Generation-only RL optimizes executable outputs directly. (b) Execution-guided RL feeds external feedback back into the code policy. (c) WebLoop jointly learns Generator, Critic, and Refiner, assigning execution-derived credit to the intermediate Critic.

A natural direction is self-critique and refinement, where models inspect their own outputs and use the resulting feedback to guide subsequent revisions (Madaan et al., 2023; Shinn et al., 2023; Gou et al., 2024; Chen et al., 2024), with related paradigms increasingly adopted in Web generation (Lu et al., 2025a; Li et al., 2026). As shown in Fig. 1, execution supervision is typically used either to directly optimize generated Web pages, as in generation-only RL (Fig. 1(a)), or as external feedback for iterative editing (Fig. 1(b)). Neither formulation directly addresses how to optimize an intermediate Critic that guides subsequent refinement. From a reinforcement learning perspective, this introduces an intermediate credit-assignment problem: the Generator and Refiner produce executable artifacts and receive direct environment rewards, whereas the Critic influences downstream behavior without a directly executable outcome. An effective Critic must therefore learn both discriminability, which identifies satisfied and violated requirements, and helpfulness, which reflects whether its feedback improves subsequent refinement. Since accurate diagnosis does not necessarily lead to effective repair, the central challenge is how to assign reliable RL credit to the Critic from verifiable execution outcomes.

To address this challenge, we introduce WebLoop, an execution-grounded loop learning framework shown in Fig. 1(c). WebLoop jointly optimizes Generator, Critic, and Refiner as interdependent roles of a shared policy. The Generator first produces a candidate page and receives functional rewards from browser execution. The Critic then evaluates the task requirements and candidate source code without access to test results or execution traces. Conditioned on this critique, the Refiner revises the implementation and is evaluated in the same browser environment. WebLoop trains the Critic with two complementary signals: requirement-level execution labels supervise its discriminability, while the execution improvement induced by subsequent refinements measures its helpfulness. We first establish reliable diagnostic behavior and then introduce downstream improvement for consequence-aware optimization, while all three roles form separate comparison groups for group-relative advantage estimation and are jointly optimized through GRPO. The Critic therefore remains execution-free during inference while receiving execution-derived retrospective credit during training, turning a fixed self-refinement pipeline into a learnable RL loop.

We evaluate WebLoop on functional Web generation benchmarks across model scales and input modalities. With Qwen3.5-9B, WebLoop reaches 41.5 Overall on WebRise and 38.9% accuracy on WebGen-Bench, improving the corresponding base model by 11.3 and 15.4 points, respectively. The gains transfer to first-pass generation, persist at the 27B scale, and generalize from text-only training to Markdown, Sketch, Image, and Video inputs. Controlled ablations further show that the improvement cannot be attributed to an additional refinement pass alone: joint loop optimization consistently outperforms staged alternatives, while the Critic benefits from complementary discriminability and downstream helpfulness signals with staged credit assignment.

Our contributions are threefold. (1) We formulate functional Web self-refinement as a structured reinforcement learning problem and identify intermediate Critic credit assignment as a central chal-lenge under asymmetric reward observability. (2) We propose WebLoop, which learns an execution-free Critic through complementary discriminability and helpfulness signals and jointly optimizes the Generator, Critic, and Refiner through group-relative policy learning. (3) We conduct controlled evaluations across Web benchmarks, model scales, and input modalities, demonstrating consistent gains over generation-only and refinement-only alternatives and validating the role of Critic learning and loop-level optimization.

References (22)