计算机科学
强化学习
水准点(测量)
正确性
编码(集合论)
编码器
人工智能
推论
语言模型
机器学习
程序设计语言
大地测量学
集合(抽象数据类型)
地理
操作系统
作者
H Le,Yue Wang,Akhilesh Gotmare,Silvio Savarese,Steven C. H. Hoi
出处
期刊:Cornell University - arXiv
日期:2022-01-01
被引量: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.
科研通智能强力驱动
Strongly Powered by AbleSci AI