Aligning Crowd-sourced Human Feedback for Reinforcement Learning on Code Generation by Large Language Models
Man Fai Wong, Chee Wei Tan
TL;DR
This work addresses aligning crowd-sourced human feedback with reinforcement learning for text-to-code generation by large language models. It introduces cRLHF, a Bayesian-inference-based framework that aggregates multi-annotator feedback to compute an aligned reward score $s$ without training an extra reward model, and uses PPO-based optimization to fine-tune code-generating LLMs. Key contributions include a formal problem formulation, a probabilistic method for annotator reliability, and an optimization perspective leveraging proximal gradient methods with $\ell_1$ regularization, demonstrated on HumanEval and MBPP benchmarks with diverse baselines. The results show modest yet consistent improvements, especially for larger models, and the framework offers extensibility to domain-specific languages, potentially broadening the impact of AI-assisted programming.
Abstract
This paper studies how AI-assisted programming and large language models (LLM) improve software developers' ability via AI tools (LLM agents) like Github Copilot and Amazon CodeWhisperer, while integrating human feedback to enhance reinforcement learning (RLHF) with crowd-sourced computation to enhance text-to-code generation. Additionally, we demonstrate that our Bayesian optimization framework supports AI alignment in code generation by distributing the feedback collection burden, highlighting the value of collecting human feedback of good quality. Our empirical evaluations demonstrate the efficacy of this approach, showcasing how LLM agents can be effectively trained for improved text-to-code generation. Our Bayesian optimization framework can be designed for general domain-specific languages, promoting the alignment of large language model capabilities with human feedback in AI-assisted programming for code generation.
