Maybe Deep Neural Networks are the Best Choice for Modeling Source Code

By Rafael-Michael Karampatsis, Charles Sutton. 2019

56 citations recorded by the source corpus.

Statistical language modeling techniques have successfully been applied to source code, yielding a variety of new software development tools, such as tools for code suggestion and improving readability. A major issue with these techniques is that code introduces new vocabulary at a far higher rate than natural language, as new identifier names proliferate. But traditional language models limit the vocabulary to a fixed set of common words. For code, this strong assumption has been shown to have a significant negative effect on predictive performance. But the open vocabulary version of the neural network language models for code have not been introduced in the literature. We present a new open-vocabulary neural language model for code that is not limited to a fixed vocabulary of identifier names. We employ a segmentation into subword units, subsequences of tokens chosen based on a compression criterion, following previous work in machine translation. Our network achieves best in class performance, outperforming even the state-of-the-art methods of Hellendoorn and Devanbu that are designed specifically to model code. Furthermore, we present a simple method for dynamically adapting the model to a new test project, resulting in increased performance. We showcase our methodology on code corpora in three different languages of over a billion tokens each, hundreds of times larger than in previous work. To our knowledge, this is the largest neural language model for code that has been reported.

Subfields: Artificial Intelligence, Information Systems, Model Architectures, Code Generation & Program Synthesis

How researchers see this paper

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

In Artificial Intelligence

  1. Charles Sutton
  2. Miltiadis Allamanis
  3. Earl T. Barr
  4. Rafael-Michael Karampatsis
  5. Romain Robbes
  6. Hlib Babii
  7. Andrea Janes
  8. Georgios Gousios

In Information Systems

  1. Charles Sutton
  2. Miltiadis Allamanis
  3. Michael Pradel
  4. Rafael-Michael Karampatsis
  5. Romain Robbes
  6. Georgios Gousios
  7. Hlib Babii
  8. Earl T. Barr

In Model Architectures

  1. Andrea Janes
  2. Romain Robbes
  3. Hlib Babii
  4. Gabriele Bavota
  5. Matteo Ciniselli
  6. L. Pascarella
  7. Charles Sutton
  8. Tianyi Zhang

In Code Generation & Program Synthesis

  1. Michael Pradel
  2. Charles Sutton
  3. Miltiadis Allamanis
  4. Rafael-Michael Karampatsis
  5. Romain Robbes
  6. Hlib Babii
  7. Andrea Janes
  8. Earl T. Barr

Citations in the corpus