InCoder: A Generative Model for Code Infilling and Synthesis

By Daniel Fried, Armen Aghajanyan, Jessy Lin, Sida I. Wang, Eric Wallace, Freda Shi, Ruiqi Zhong, Wen-tau Yih, Luke S. Zettlemoyer, Michael Lewis. 2022

909 citations recorded by the source corpus.

Code is seldom written in a single left-to-right pass and is instead repeatedly edited and refined. We introduce InCoder, a unified generative model that can perform program synthesis (via left-to-right generation) as well as editing (via infilling). InCoder is trained to generate code files from a large corpus of permissively licensed code, where regions of code have been randomly masked and moved to the end of each file, allowing code infilling with bidirectional context. Our model is the first generative model that is able to directly perform zero-shot code infilling, which we evaluate on challenging tasks such as type inference, comment generation, and variable re-naming. We find that the ability to condition on bidirectional context substantially improves performance on these tasks, while still performing comparably on standard program synthesis benchmarks in comparison to left-to-right only models pretrained at similar scale. The InCoder models and code are publicly released. https://sites.google.com/view/incoder-code-models

Subfields: Information Systems, Software, Large Language Models, Natural Language Processing

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. Percy Liang
  2. Luke S. Zettlemoyer
  3. Uri Alon
  4. Chun Xia
  5. Lingming Zhang
  6. Charles Sutton
  7. Koushik Sen
  8. Prem Devanbu

In Software

  1. Lingming Zhang
  2. Koushik Sen
  3. Chun Xia
  4. Michael Pradel
  5. Mark Harman
  6. Armando Solar-Lezama
  7. Yinlin Deng
  8. Prem Devanbu

In Large Language Models

  1. Luke S. Zettlemoyer
  2. Noah A. Smith
  3. Graham Neubig
  4. Michael Lewis
  5. Hannaneh Hajishirzi
  6. Percy Liang
  7. Caiming Xiong
  8. Yejin Choi

In Natural Language Processing

  1. Luke S. Zettlemoyer
  2. Graham Neubig
  3. Percy Liang
  4. Mohit Bansal
  5. Hannaneh Hajishirzi
  6. Jianfeng Gao
  7. Caiming Xiong
  8. Noah A. Smith

Citations in the corpus