mlsanityData to 7 Oct 2026

Toward Less Hidden Cost of Code Completion with Acceptance and Ranking Models

arXiv 2106.13928 ↗First posted 26 Jun 2021cs.SE cs.AI cs.PLcited by 4

Not on the map. Why?

Abstract (arXiv)

Code completion is widely used by software developers to provide coding suggestions given a partially written code snippet. Apart from the traditional code completion methods, which only support single token completion at minimal positions, recent studies show the ability to provide longer code completion at more flexible positions. However, such frequently triggered and longer completion results reduce the overall precision as they generate more invalid results. Moreover, different studies are mostly incompatible with each other. Thus, it is vital to develop an ensemble framework that can combine results from multiple models to draw merits and offset defects of each model. This paper conducts a coding simulation to collect data from code context and different code completion models and then apply the data in two tasks. First, we introduce an acceptance model which can dynamically control whether to display completion results to the developer. It uses simulation features to predict whether correct results exist in the output of these models. Our best model reduces the percentage of false-positive completion from 55.09% to 17.44%. Second, we design a fusion ranking scheme that can automatically identify the priority of the completion results and reorder the candidates from multiple code completion models. This scheme is flexible in dealing with various models, regardless of the type or the length of their completion results. We integrate this ranking scheme with two frequency models and a GPT-2 styled language model, along with the acceptance model to yield 27.80% and 37.64% increase in TOP1 and TOP5 accuracy, respectively. In addition, we propose a new code completion evaluation metric, Benefit-Cost Ratio(BCR), taking into account the benefit of keystrokes saving and hidden cost of completion list browsing, which is closer to real coder experience scenario.

Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 19 of its 41 references that are in the map. First posted on arXiv 26 Jun 2021.

Builds on

19 of 41 references.

References · 19

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  4. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
  5. 2016Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translationcited by 1,471
  6. 2020AutoGluon-Tabular: Robust and Accurate AutoML for Structured Datacited by 368
  7. 2018code2vec: Learning Distributed Representations of Codecited by 249
  8. 2020IntelliCode Compose: Code Generation Using Transformercited by 225
  9. 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
  10. 2016A Convolutional Attention Network for Extreme Summarization of Source Codecited by 90
  11. 2018Generative Code Modeling with Graphscited by 59
  12. 2019Pythia: AI-assisted Code Completion Systemcited by 54
7 more
  1. 2017Code Completion with Neural Attention and Pointer Networkscited by 49
  2. 2016Deep API Learningcited by 41
  3. 2020Fast and Memory-Efficient Neural Code Completioncited by 38
  4. 2018A General Path-Based Representation for Predicting Program Propertiescited by 28
  5. 2019A Self-Attentional Neural Architecture for Code Completion with Multi-Task Learningcited by 18
  6. 2020Sequence Model Design for Code Completion in the Modern IDEcited by 8
  7. 2015Parameter-Free Probabilistic API Mining across GitHubcited by 2

Built on by

Cited by year

Citing papers per year: 2023: 1; 2024: 1; 2025: 2.

4 papers.