Big Code != Big Vocabulary: Open-Vocabulary Models for Source Code

By Rafael-Michael Karampatsis, Hlib Babii, Romain Robbes, Charles Sutton, Andrea Janes. 2020

235 citations recorded by the source corpus.

Statistical language modeling techniques have successfully been applied to large source code corpora, yielding a variety of new software development tools, such as tools for code suggestion, improving readability, and API migration. 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. Both large vocabularies and out-of-vocabulary issues severely affect Neural Language Models (NLMs) of source code, degrading their performance and rendering them unable to scale. In this paper, we address this issue by: 1) studying how various modelling choices impact the resulting vocabulary on a large-scale corpus of 13,362 projects; 2) presenting an open vocabulary source code NLM that can scale to such a corpus, 100 times larger than in previous work; and 3) showing that such models outperform the state of the art on three distinct code corpora (Java, C, Python). To our knowledge, these are the largest NLMs for code that have been reported. All datasets, code, and trained models used in this work are publicly available.

Subfields: Artificial Intelligence, Information Systems, 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 Artificial Intelligence

  1. Graham Neubig
  2. Uri Alon
  3. Nan Duan
  4. Miltiadis Allamanis
  5. Mohit Bansal
  6. Jianfeng Gao
  7. Prem Devanbu
  8. Charles Sutton

In Information Systems

  1. Prem Devanbu
  2. Miltiadis Allamanis
  3. Uri Alon
  4. Charles Sutton
  5. Baishakhi Ray
  6. Ge Li
  7. Nan Duan
  8. Daya Guo

In Natural Language Processing

  1. Prem Devanbu
  2. Graham Neubig
  3. Nan Duan
  4. Uri Alon
  5. Miltiadis Allamanis
  6. Ge Li
  7. Zhi Jin
  8. Charles Sutton

Citations in the corpus