SELGApr 28, 2020

Fast and Memory-Efficient Neural Code Completion

arXiv:2004.13651v4104 citations
AI Analysis

This work addresses the issue of memory bloat in integrated development environments (IDEs) for developers, offering a more efficient solution, though it is incremental as it builds on existing neural approaches.

The paper tackles the problem of high memory consumption in neural code completion models by introducing a modular framework and a novel reranking model that combines static analysis with granular token encodings. The result is a model that uses only 6 MB of RAM (19x less than previous models), computes completions in 8 ms, and achieves 90% accuracy in its top five suggestions.

Code completion is one of the most widely used features of modern integrated development environments (IDEs). While deep learning has made significant progress in the statistical prediction of source code, state-of-the-art neural network models consume hundreds of megabytes of memory, bloating the development environment. We address this in two steps: first we present a modular neural framework for code completion. This allows us to explore the design space and evaluate different techniques. Second, within this framework we design a novel reranking neural completion model that combines static analysis with granular token encodings. The best neural reranking model consumes just 6 MB of RAM, - 19x less than previous models - computes a single completion in 8 ms, and achieves 90% accuracy in its top five suggestions.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes