Pythia: AI-assisted Code Completion System
By Alexey Svyatkovskiy, Ying Zhao, Shengyu Fu, Neel Sundaresan. 2019
181 citations recorded by the source corpus.
In this paper, we propose a novel end-to-end approach for AI-assisted code completion called Pythia. It generates ranked lists of method and API recommendations which can be used by software developers at edit time. The system is currently deployed as part of Intellicode extension in Visual Studio Code IDE. Pythia exploits state-of-the-art large-scale deep learning models trained on code contexts extracted from abstract syntax trees. It is designed to work at a high throughput predicting the best matching code completions on the order of 100 ms. We describe the architecture of the system, perform comparisons to frequency-based approach and invocation-based Markov Chain language model, and discuss challenges serving Pythia models on lightweight client devices. The offline evaluation results obtained on 2700 Python open source software GitHub repositories show a top-5 accuracy of 92%, surpassing the baseline models by 20% averaged over classes, for both intra and cross-project settings.
Subfields: Computer Networks and Communications, Information Systems, Software, Natural Language Processing, Software Engineering
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Computer Networks and Communications
- Miltiadis Allamanis
- Charles Sutton
- Petros Maniatis
- Percy Liang
- Xinyun Chen
- Ge Li
- Zhi Jin
- Marc Brockschmidt
In Information Systems
In Software
- Nan Duan
- Daya Guo
- Charles Sutton
- Alexey Svyatkovskiy
- Marc Brockschmidt
- Xinyun Chen
- Rishabh Singh
- Miltiadis Allamanis
In Natural Language Processing
- Charles Sutton
- Miltiadis Allamanis
- Rishabh Singh
- Nan Duan
- Marc Brockschmidt
- Ge Li
- Xinyun Chen
- Zhi Jin
In Software Engineering
Citations in the corpus
- IntelliCode compose: code generation using transformer (2020, methodology): “There are numerous code completion systems capable of effectively recommending method and API calls [6, 9–11], or finding the correct argument [12–14].”
- Unit Test Case Generation with Transformers (2020, background): “Deep learning techniques have shown the potential of learning from real-world examples, and have been employed in several software engineering tasks, such as code completion [17], automated patch generation [18], [19], comment generation [20], and many others [21].”
- WILDS: A Benchmark of in-the-Wild Distribution Shifts (2020, neutral): “Machine learning can aid programming and software engineering in various ways: automatic code completion (Raychev et al., 2014; Svyatkovskiy et al., 2019), program synthesis (Bunel et al., 2018; Kulal et al., 2019), program repair (Vasic et al., 2019; Yasunaga and Liang, 2020), code search (Husain…”
- Learning Autocomplete Systems as a Communication Game (2019, background): “Existing left-to-right autocomplete systems [1, 32] can often be inefficient, as the prefix of a sentence (e.”
- SpreadsheetCoder: Formula Prediction from Semi-structured Context (2021, methodology): “, 2018) and source code completion (Raychev et al., 2014; Li et al., 2018; Svyatkovskiy et al., 2019).”
- Multi-task Learning based Pre-trained Language Model for Code Completion (2020, methodology): “l code completion. Kim et al. [26] presented a transformer model for code predictionandincorporatedsyntacticstructureintothetransformer to further improve the model’s performance. Svyatkovskiy et al. [44] proposed a code completion system based on LSTM for recommending Python method calls. Their sys”
- Learning to Generate Code Sketches (2021, background): “One of the most successful applications of LMCs is code completion [33, 15] and transformer language models have been recently shown exceptional performance at the task being able to predict relatively long sequences of code tokens [34].”
- CodeFill: Multi-token Code Completion by Jointly learning from Structure and Naming Sequences (2022, methodology): “[51] integrated Pythia, an LSTM model, to IntelliCode, an extension to Microsoft VS Code IDE.”
- AudioGPT: Understanding and Generating Speech, Music, Sound, and Talking Head (2023, background): “…language processing and demonstrated remarkable abilities for tasks such as machine translation (Gulcehre et al., 2017; Baziotis et al., 2020), open-ended dialogue modeling (Hosseini-Asl et al., 2020; Thoppilan et al., 2022), and even code completion (Svyatkovskiy et al., 2019; Liu et al., 2020).”
- Code Prediction by Feeding Trees to Transformers (2020, methodology): “For (2), their attention is applied within a fixed-sized window on top of LSTM outputs, whereas our Transformer-based models use stacked layers of attentions as the key mechanism for computing throughout the network.”
- Training and Evaluating a Jupyter Notebook Data Science Assistant (2022, background): “…and more recently in code synthesis from natural language and examples (Chen et al. 2021; Austin et al. 2021; Clement et al. 2020), code completion (Svyatkovskiy et al. 2020, 2019; Raychev, Vechev, and Yahav 2014; Bruch, Monperrus, and Mezini 2009), code search (Husain et al. 2019; Feng et al.…”