에이전트 보상 피드백을 통한 코드 미학
Code Aesthetics with Agentic Reward Feedback
October 27, 2025
저자: Bang Xiao, Lingjie Jiang, Shaohan Huang, Tengchao Lv, Yupan Huang, Xun Wu, Lei Cui, Furu Wei
cs.AI
초록
대규모 언어 모델(LLM)은 코드 관련 작업에서 개발자에게 가치 있는 보조 도구로 자리 잡았습니다. LLM은 코드 생성 및 버그 수정과 같은 전통적인 프로그래밍 작업에서는 뛰어난 성능을 보이지만, 시각적으로 중점을 두는 코딩 작업에서는 어려움을 겪으며 종종 최적이 아닌 미적 결과물을 생성합니다. 본 논문에서는 LLM이 생성한 코드의 미적 품질을 향상시키기 위한 새로운 파이프라인을 소개합니다. 먼저 코드 미적 요소에 초점을 맞춘 대규모 지시 튜닝 데이터셋인 AesCode-358K를 구축합니다. 다음으로 실행 가능성, 정적 미적 요소, 상호작용적 미적 요소를 평가하는 다중 에이전트 시스템인 에이전트 기반 보상 피드백을 제안합니다. 이를 기반으로 GRPO 알고리즘에 이러한 신호를 통합하여 기능성과 코드 미적 요소를 공동으로 최적화하는 GRPO-AR을 개발합니다. 마지막으로 코드 미적 요소를 평가하기 위한 벤치마크인 OpenDesign을 개발합니다. 실험 결과, AesCode-358K에 대한 지도 미세 조정과 에이전트 기반 보상 피드백을 활용한 강화 학습을 결합하면 OpenDesign에서의 성능이 크게 향상되며, 기존의 PandasPlotBench와 같은 벤치마크에서도 결과가 개선되는 것으로 나타났습니다. 특히, 우리의 AesCoder-4B 모델은 GPT-4o 및 GPT-4.1을 능가하며, 480B-685B 매개변수를 가진 대형 오픈소스 모델에 버금가는 성능을 달성하여 우리 접근법의 효과성을 입증했습니다.
English
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.