CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learning

计算机科学 强化学习 水准点(测量) 正确性 编码(集合论) 编码器 人工智能 推论 语言模型 机器学习 程序设计语言 大地测量学 集合(抽象数据类型) 地理 操作系统
作者
H Le,Yue Wang,Akhilesh Gotmare,Silvio Savarese,Steven C. H. Hoi
出处
期刊:Cornell University - arXiv 被引量:59
标识
DOI:10.48550/arxiv.2207.01780
摘要

Program synthesis or code generation aims to generate a program that satisfies a problem specification. Recent approaches using large-scale pretrained language models (LMs) have shown promising results, yet they have some critical limitations. In particular, they often follow a standard supervised fine-tuning procedure to train a code generation model only from the pairs of natural-language problem descriptions and ground-truth programs. Such paradigm largely ignores some important but potentially useful signals in the problem specification such as unit tests, which thus often results in poor performance when solving complex unseen coding tasks. To address the limitations, we propose "CodeRL", a new framework for program synthesis tasks through pretrained LMs and deep reinforcement learning (RL). Specifically, during training, we treat the code-generating LM as an actor network, and introduce a critic network that is trained to predict the functional correctness of generated programs and provide dense feedback signals to the actor. During inference, we introduce a new generation procedure with a critical sampling strategy that allows a model to automatically regenerate programs based on feedback from example unit tests and critic scores. For the model backbones, we extended the encoder-decoder architecture of CodeT5 with enhanced learning objectives, larger model sizes, and better pretraining data. Our method not only achieves new SOTA results on the challenging APPS benchmark, but also shows strong zero-shot transfer capability with new SOTA results on the simpler MBPP benchmark.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
PDF的下载单位、IP信息已删除 (2025-6-4)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
SYLH应助小熊采纳,获得10
1秒前
妹妹发布了新的文献求助10
1秒前
1秒前
赘婿应助我必定发nature采纳,获得20
2秒前
Ava应助kofbird采纳,获得50
3秒前
zz完成签到,获得积分10
3秒前
星辰大海应助ybwei2008_163采纳,获得10
3秒前
5秒前
5秒前
QJYKKK完成签到,获得积分10
5秒前
composite66完成签到,获得积分10
5秒前
ccchao发布了新的文献求助30
6秒前
充电宝应助十三采纳,获得10
6秒前
大个应助橙橙橙采纳,获得10
6秒前
Dandanhuang完成签到,获得积分10
6秒前
FashionBoy应助孟孟采纳,获得30
8秒前
畅快的刚完成签到,获得积分10
10秒前
10秒前
xxxx完成签到,获得积分10
10秒前
vain发布了新的文献求助10
10秒前
李健应助芒果小鹌鹑采纳,获得10
10秒前
cc完成签到,获得积分10
11秒前
这个名字是不是独一无二完成签到,获得积分10
11秒前
颗粒完成签到,获得积分10
12秒前
12秒前
javeeen完成签到,获得积分10
13秒前
应俊完成签到 ,获得积分10
13秒前
1234完成签到 ,获得积分10
14秒前
轻松元柏完成签到,获得积分10
15秒前
WN发布了新的文献求助10
15秒前
15秒前
我必定发nature给我必定发nature的求助进行了留言
16秒前
组织因子发布了新的文献求助10
16秒前
17秒前
Sadgenius完成签到,获得积分10
19秒前
领导范儿应助妹妹采纳,获得10
20秒前
炒栗子发布了新的文献求助10
20秒前
llu关注了科研通微信公众号
21秒前
ly完成签到,获得积分10
22秒前
逍遥完成签到 ,获得积分20
23秒前
高分求助中
【提示信息,请勿应助】关于scihub 10000
Les Mantodea de Guyane: Insecta, Polyneoptera [The Mantids of French Guiana] 3000
徐淮辽南地区新元古代叠层石及生物地层 3000
The Mother of All Tableaux: Order, Equivalence, and Geometry in the Large-scale Structure of Optimality Theory 3000
Global Eyelash Assessment scale (GEA) 1000
Picture Books with Same-sex Parented Families: Unintentional Censorship 550
Research on Disturbance Rejection Control Algorithm for Aerial Operation Robots 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 生物化学 物理 内科学 纳米技术 计算机科学 化学工程 复合材料 遗传学 基因 物理化学 催化作用 冶金 细胞生物学 免疫学
热门帖子
关注 科研通微信公众号,转发送积分 4038569
求助须知:如何正确求助?哪些是违规求助? 3576279
关于积分的说明 11374944
捐赠科研通 3305979
什么是DOI,文献DOI怎么找? 1819354
邀请新用户注册赠送积分活动 892698
科研通“疑难数据库(出版商)”最低求助积分说明 815048