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

By Hung Le, Yue Wang, Akhilesh Deepak Gotmare, Silvio Savarese, Steven C. H. Hoi. 2022

502 citations recorded by the source corpus.

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.

Subfields: Information Systems, Software, Large Language Models, Reinforcement Learning

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Information Systems

  1. Jianfeng Gao
  2. Denny Zhou
  3. Josh Tenenbaum
  4. Yelong Shen
  5. Gabriel Synnaeve
  6. Weizhu Chen
  7. Karthik Narasimhan
  8. Armando Solar-Lezama

In Software

  1. Yiming Yang
  2. Gabriel Synnaeve
  3. Josh Tenenbaum
  4. Armando Solar-Lezama
  5. Xinyun Chen
  6. Maxwell Lin
  7. Yejin Choi
  8. Jianfeng Gao

In Large Language Models

  1. Jianfeng Gao
  2. Yejin Choi
  3. Weizhu Chen
  4. Nan Duan
  5. Yiming Yang
  6. Thomas Scialom
  7. Alexis Conneau
  8. Jian-Guang Lou

In Reinforcement Learning

  1. Sergey Levine
  2. Danijar Hafner
  3. Jimmy Ba
  4. Josh Tenenbaum
  5. Pieter Abbeel
  6. Karthik Narasimhan
  7. Yuke Zhu
  8. Timothy P. Lillicrap

Citations in the corpus