mlsanityData to 7 Oct 2026

Don't Complete It! Preventing Unhelpful Code Completion for Productive and Sustainable Neural Code Completion Systems

arXiv 2209.05948 ↗First posted 13 Sep 2022cs.SE cs.AIcited by 12

Not on the map. Why?

Abstract (arXiv)

Currently, large pre-trained language models are widely applied in neural code completion systems. Though large code models significantly outperform their smaller counterparts, around 70% of displayed code completions from Github Copilot are not accepted by developers. Being reviewed but not accepted, their help to developer productivity is considerably limited and may conversely aggravate the workload of developers, as the code completions are automatically and actively generated in state-of-the-art code completion systems as developers type out once the service is enabled. Even worse, considering the high cost of the large code models, it is a huge waste of computing resources and energy, which severely goes against the sustainable development principle of AI technologies. However, such waste has never been realized, not to mention effectively addressed, in the research community for neural code completion. Hence, preventing such unhelpful code completions from happening in a cost-friendly way is of urgent need. To fill this significant gap, we first investigate the prompts of unhelpful code completions, called "low-return prompts". We empirically identify four observable patterns in low-return prompts, each lacking necessary information, making it difficult to address through enhancements to the model's accuracy alone. This demonstrates the feasibility of identifying such low-return prompts based on the prompts themselves. Motivated by this finding, we propose an early-rejection mechanism to turn down low-return prompts by foretelling the code completion qualities. The prompts that are estimated to receive unhelpful code completions will not be sent to the model. Furthermore, we investigated five types of estimators to demonstrate the feasibility of the mechanism. The experimental results show that the estimator can reject 20% of code completion requests with a 97.4% Precision.

Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Builds on 29 of its 61 references that are in the map. First posted on arXiv 13 Sep 2022.

Builds on

29 of 61 references.

References · 29

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  5. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
  6. 2020Knowledge Distillation: A Surveycited by 1,578
  7. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  8. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  9. 2019Energy and Policy Considerations for Deep Learning in NLPcited by 1,242
  10. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  11. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  12. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
17 more
  1. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  2. 2022Efficient Training of Language Models to Fill in the Middlecited by 248
  3. 2022Grounded Copilot: How Programmers Interact with Code-Generating Modelscited by 216
  4. 2019Leveraging Pre-trained Checkpoints for Sequence Generation Taskscited by 182
  5. 2020You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completioncited by 112
  6. 2022Productivity Assessment of Neural Code Completioncited by 97
  7. 2022Natural Attack for Pre-trained Models of Codecited by 72
  8. 2022Out of the BLEU: how should we assess quality of the Code Generation models?cited by 65
  9. 2021Compute and Energy Consumption Trends in Deep Learning Inferencecited by 61
  10. 2019Pythia: AI-assisted Code Completion Systemcited by 54
  11. 2017Code Completion with Neural Attention and Pointer Networkscited by 49
  12. 2020Predicting Performance for Natural Language Processing Taskscited by 49
  13. 2016Compression of Neural Machine Translation Models via Pruningcited by 43
  14. 2021CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data Poisoningcited by 39
  15. 2019Scaling Video Analytics on Constrained Edge Nodescited by 36
  16. 2022On the Importance of Building High-quality Training Datasets for Neural Code Searchcited by 30
  17. 2021Efficient Neural Architecture Search with Performance Predictioncited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 4; 2025: 5; 2026: 3.

12 papers.