arXiv(opens in a new tab)cs.AIAug 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2608.27906

Rubric-to-Code Credit Assignment for Reinforcement Learning

Rui Jin, Jikai Chen, Yihan Chen, Hao Zhou, Demin Zhu, Kaichen Yang, Dong Wang, Chenyi Zhuang

Abstract

Interactive web application generation requires models to produce usable HTML, CSS, and JavaScript applications from natural language requests. Unlike conventional code generation, application quality depends on multiple user-facing functional requirements, each often tied to localized code regions such as event handlers, state updates, DOM fragments, or CSS selectors. Standard GRPO collapses these structured outcomes into a single sequence-level reward and applies the resulting advantage uniformly to all tokens, weakening credit assignment. We propose Rubric-to-Code Credit Assignment (RCCA), a reinforcement learning framework that converts rubric-level functional feedback into localized optimization signals over generated code. RCCA builds training tasks around explicit functional rubrics, uses a hierarchical reward to separate format, source-code, runtime, and functional failures, and aligns evaluator-generated textual attributions with responsible code spans and generated tokens. The resulting model, Ling-RCCA-Flash, scores 41.25 on MiniAppBench, improving Ling-3.0-Flash by 32.20 points and slightly surpassing Claude Opus 4.5. It also reaches 76.19 on ArtifactsBench, improving the SFT model by 4.48 points and establishing a new top score under the official ArtifactsBench leaderboard setting by surpassing the GPT-5 score by 3.64 points, suggesting transferable implementation-level gains.

1 Introduction

Large language models are increasingly used to generate software that users can directly see and operate, rather than only text answers or isolated code snippets (Si et al., 2025; Liu et al., 2026). In interactive web application generation, a model takes a natural language request and produces com-

∗^{*}Equal contributions. †\daggerCorresponding Authors.

plete HTML, CSS, and JavaScript code for a usable interface (Zhang et al., 2026b, 2025). This setting introduces a form of correctness that is both user-facing and structured: an application is judged by whether it implements a set of requested behaviors, such as opening a panel after a button click, updating displayed content from an input field, or triggering the correct state transition after an interaction.

This setting also reflects a broader shift from agent infrastructure to model training. Systems such as AWorld (Xie et al., 2025) provide the harnesses needed to execute agents in realistic environments, observe their behavior, and evaluate task outcomes. In this work, we treat such harnesses not only as evaluation infrastructure, but also as sources of environment-mediated training signals. Interactive web application generation is a natural testbed for this view, because user-visible behaviors can be executed, checked, and often traced back to localized implementation choices. Once an environment exposes interaction traces, requirement-level outcomes, and diagnostic evidence, the central question becomes how to convert these structured signals into effective model updates.

Standard GRPO, however, discards much of this structure (DeepSeek-AI et al., 2025). As illustrated in Figure 2, it collapses multiple functional outcomes into a single sequence-level reward and propagates the resulting group-relative advantage uniformly across all generated tokens, although only a subset of the code may be responsible for a particular success or failure. This creates a mismatch between the granularity of user-facing feedback and the granularity of policy optimization: the model observes whether an application works, but receives little signal about which implementation choices caused it to work or fail.

We address this mismatch with Rubric-to-Code Credit Assignment (RCCA), a reinforcement learning framework that turns user-facing functional rubrics into localized optimization signals over generated code. RCCA is built around task-specific rubrics, where each rubric describes a concrete functional requirement that can be evaluated through interaction. These rubrics serve two roles. First, they guide the construction of RL training tasks with explicit and verifiable behavioral objectives. Second, they provide the evaluation units from which application-level quality can be decomposed into requirement-level outcomes.

To make these outcomes useful for GRPO,

Why standard GRPO loses local supervision

Figure

Figure 2: Motivation of RCCA. Standard GRPO collapses rubric-level outcomes into scalar rewards and applies each advantage uniformly to all tokens. RCCA preserves rubric feedback, localizes responsible code spans, and converts them into targeted token weights.

RCCA combines sample-level reward discrimination with code-level credit assignment. At the sample level, we design a hierarchical reward that evaluates generated applications through progressively more semantic stages: output-format validity, source-code validity, runtime validity, and rubric-level functional correctness. This hierarchy separates invalid artifacts, broken programs, runtime failures, and partially correct applications, giving group-relative optimization a clearer reward structure than a single holistic score.

At the token level, RCCA further uses textual feedback from the evaluator to identify which code regions are responsible for observed failures or successes. The evaluator not only determines whether each rubric is satisfied, but also attributes the corresponding functional outcome to concrete implementation regions such as event handlers, state updates, DOM fragments, and CSS selectors. RCCA then aligns these attributed code spans with generated tokens and uses them to weight the GRPO objective. As a result, tokens in code regions responsible for functional outcomes receive stronger optimization signals, while unrelated regions are down-weighted. In this way, RCCA restores the missing link between requirement-level feedback and token-level policy updates.

Using the proposed rubric-driven data construction pipeline and RCCA objective, we train Ling-RCCA-Flash for interactive web application generation. As summarized in Figure 1, it achieves 41.25 on MiniAppBench, improving Ling-3.0-Flash by 32.20 points and slightly surpassing Claude Opus 4.5. It also reaches 76.19 on ArtifactsBench, improving the SFT model by 4.48 points and surpassing the official GPT-5 leaderboard score by 3.64 points. These cross-benchmark gains suggest transferable implementation behavior beyond a single benchmark.

Our contributions are summarized as follows:

• We construct a high-quality RL dataset for interactive web application generation using a rubric-driven synthesis pipeline, grounding each training task in explicit user-facing functional requirements.

• We design a hierarchical reward for interactive applications that improves sample-level reward discrimination by separating format, source-code, runtime, and functional failures.

• We propose Rubric-to-Code Credit Assignment (RCCA), which converts rubric-level functional feedback into localized token-level optimization signals for GRPO through evaluator-generated textual attribution.

• Using the proposed data and RCCA, we train Ling-RCCA-Flash, which achieves 41.25 on MiniAppBench and 76.19 on ArtifactsBench, demonstrating both target-benchmark gains and cross-benchmark transfer.

References (15)