arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2510.23272cs.CL
收藏

代码美学与智能体奖励反馈

Code Aesthetics with Agentic Reward Feedback

Microsoft Research Asia(微软亚洲研究院);Zhiyuan College(智远学院);Shanghai Jiao Tong University(上海交通大学);Peking University(北京大学)

Bang Xiao, Lingjie Jiang, Shaohan Huang, Tengchao Lv, Yupan Huang, Xun Wu, Lei Cui, Furu Wei

AI总结:

本文提出结合AesCode-358K数据集监督微调与智能体奖励反馈强化学习(GRPO-AR)的流程,提升LLM生成代码的美学质量,并构建基准OpenDesign,使AesCoder-4B超越GPT-4o等模型。

摘要:

大型语言模型(LLMs)已成为开发者在代码相关任务中的宝贵助手。虽然LLMs在代码生成和错误修复等传统编程任务中表现出色,但它们在面向视觉的编码任务中往往力不从心,常常产生次优的美学效果。在本文中,我们引入了一种新的流程来提升LLM生成代码的美学质量。我们首先构建了AesCode-358K,一个专注于代码美学的大规模指令调优数据集。接下来,我们提出了智能体奖励反馈,这是一个多智能体系统,用于评估可执行性、静态美学和交互美学。在此基础上,我们开发了GRPO-AR,它将这些信号整合到GRPO算法中,以实现功能性和代码美学的联合优化。最后,我们开发了OpenDesign,一个用于评估代码美学的基准。实验结果表明,将AesCode-358K上的监督微调与使用智能体奖励反馈的强化学习相结合,显著提升了在OpenDesign上的性能,同时也增强了在现有基准(如PandasPlotBench)上的结果。值得注意的是,我们的AesCoder-4B超越了GPT-4o和GPT-4.1,并达到了与具有480B-685B参数的大型开源模型相当的性能,这凸显了我们方法的有效性。

英文摘要:

Large Language Models (LLMs) have become valuable assistants for developers in code-related tasks. While LLMs excel at traditional programming tasks such as code generation and bug fixing, they struggle with visually-oriented coding tasks, often producing suboptimal aesthetics. In this paper, we introduce a new pipeline to enhance the aesthetic quality of LLM-generated code. We first construct AesCode-358K, a large-scale instruction-tuning dataset focused on code aesthetics. Next, we propose agentic reward feedback, a multi-agent system that evaluates executability, static aesthetics, and interactive aesthetics. Building on this, we develop GRPO-AR, which integrates these signals into the GRPO algorithm for joint optimization of functionality and code aesthetics. Finally, we develop OpenDesign, a benchmark for assessing code aesthetics. Experimental results show that combining supervised fine-tuning on AesCode-358K with reinforcement learning using agentic reward feedback significantly improves performance on OpenDesign and also enhances results on existing benchmarks such as PandasPlotBench. Notably, our AesCoder-4B surpasses GPT-4o and GPT-4.1, and achieves performance comparable to large open-source models with 480B-685B parameters, underscoring the effectiveness of our approach.

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

↑