StepCoder: Improving Code Generation with Reinforcement Learning from Compiler FeedbackShow others and affiliations
2024 (English)In: 62nd Annual Meeting of the Association for Computational Linguistics, ACL 2024 - Proceedings of the Conference, Association for Computational Linguistics (ACL) , 2024, p. 4571-4585Conference paper, Published paper (Refereed)
Abstract [en]
The advancement of large language models (LLMs) has significantly propelled the field of code generation. Previous work integrated reinforcement learning (RL) with compiler feedback for exploring the output space of LLMs to enhance code generation quality. However, the lengthy code generated by LLMs in response to complex human requirements makes RL exploration a challenge. Also, since the unit tests may not cover the complicated code, optimizing LLMs by using these unexecuted code snippets is ineffective. To tackle these challenges, we introduce StepCoder, a novel RL framework for code generation, consisting of two main components: CCCS addresses the exploration challenge by breaking the long sequences code generation task into a Curriculum of Code Completion Subtasks, while FGO only optimizes the model by masking the unexecuted code segments to provide Fine-Grained Optimization. In addition, we furthermore construct the APPS+ dataset for RL training, which is manually verified to ensure the correctness of unit tests. Experimental results show that our method improves the ability to explore the output space and outperforms state-of-the-art approaches in corresponding benchmarks.
Place, publisher, year, edition, pages
Association for Computational Linguistics (ACL) , 2024. p. 4571-4585
National Category
Software Engineering
Identifiers
URN: urn:nbn:se:kth:diva-354306DOI: 10.18653/v1/2024.acl-long.251Scopus ID: 2-s2.0-85204445491OAI: oai:DiVA.org:kth-354306DiVA, id: diva2:1902965
Conference
62nd Annual Meeting of the Association for Computational Linguistics, ACL 2024, Bangkok, Thailand, Aug 11 2024 - Aug 16 2024
Note
QC 20241003
Part of ISBN 9798891760943
2024-10-022024-10-022025-05-27Bibliographically approved