让AI生成代码时精准定位问题,提升网页应用质量
Rubric-to-Code Credit Assignment for Reinforcement Learning

- 将评分标准转化为代码局部优化信号,实现精准反馈
- 在MiniAppBench上达41.25分,比Ling-3.0-Flash高32.20分
- 适合需要高质量可运行代码的开发场景
交互式网页应用生成要求模型从自然语言请求中生成可用的HTML、CSS和JavaScript应用。与传统代码生成不同,应用质量依赖多个用户可见的功能需求,这些需求通常与特定代码区域(如事件处理、状态更新、DOM片段或CSS选择器)相关。标准GRPO将这些结构化结果压缩为单一序列级奖励,并对所有标记统一应用优势,削弱了责任分配。我们提出鲁棒性至代码信用分配(RCCA),一种强化学习框架,将评分标准级别的功能反馈转换为生成代码的局部优化信号。RCCA围绕明确的功能评分标准构建训练任务,使用分层奖励分离格式、源码、运行时和功能失败,并将评估者生成的文本归因与对应代码段及生成标记对齐。所得模型Ling-RCCA-Flash在MiniAppBench上得分为41.25,相比Ling-3.0-Flash提升32.20分,略高于Claude Opus 4.5。在ArtifactsBench上达到76.19分,较SFT模型提高4.48分,在官方排行榜设置下超越GPT-5得分3.64分,表明其具备可迁移的实现层面优势。
原文摘要 · Abstract (English)
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 \textbf{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, \textbf{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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。