2025-10-28 · 专家 · 计算机视觉 · 自然语言处理 · 机器学习

Code Aesthetics with Agentic Reward Feedback

本文提出了一种新的代码美学概念,通过构建大规模数据集和引入多智能体奖励反馈机制,显著提升了大型语言模型在视觉编程任务中的美学质量。

更新于 2025-10-29。作者:Bang Xiao、Lingjie Jiang、Shaohan Huang、Tengchao Lv、Yupan Huang、Xun Wu、Lei Cui、Furu Wei。

中文摘要

大型语言模型(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.

解读

一句话总结

本文提出了一种新的代码美学概念,通过构建大规模数据集和引入多智能体奖励反馈机制,显著提升了大型语言模型在视觉编程任务中的美学质量。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源