Lune

ICLR2022顶会

Learning to Complete Code with Sketches

Daya Guo, Alexey Svyatkovskiy, Jian Yin, Nan Duan, Marc Brockschmidt, Miltiadis Allamanis

摘要

Code completion is usually cast as a language modelling problem, i.e., continuing an input in a left-to-right fashion. However, in practice, some parts of the completion (e.g., string literals) may be very hard to predict, whereas subsequent parts directly follow from the context. To handle this, we instead consider the scenario of generating code completions with "holes" inserted in places where a model is uncertain. We develop GRAMMFORMER, a Transformer-based model that guides code generation by the programming language grammar, and compare it to a variety of more standard sequence models. We train the models on code completion for C# and Python given partial code context. To evaluate models, we consider both ROUGE as well as a new metric REGEXACC that measures success of generating completions matching long outputs with as few holes as possible. In our experiments, GRAMMFORMER generates 10-50% more accurate completions compared to traditional generative models and 37-50% longer sketches compared to sketch-generating baselines trained with similar techniques.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 17 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Large Language Models of Code Fail at Completing Code with Potential Bugs 引用了 Global Relational Models of Source Code
  • Large Language Models of Code Fail at Completing Code with Potential Bugs 引用了 ReACC: A Retrieval-Augmented Code Completion Framework
  • Large Language Models of Code Fail at Completing Code with Potential Bugs 引用了 Code Prediction by Feeding Trees to Transformers
  • ReACC: A Retrieval-Augmented Code Completion Framework 引用了 Code Prediction by Feeding Trees to Transformers
  • ReACC: A Retrieval-Augmented Code Completion Framework 引用了 Big code != big vocabulary: open-vocabulary models for source code
  • A Token-level Reference-free Hallucination Detection Benchmark for Free-form Text Generation 引用了 On Faithfulness and Factuality in Abstractive Summarization
  • Code Prediction by Feeding Trees to Transformers 引用了 Global Relational Models of Source Code
  • Code Prediction by Feeding Trees to Transformers 引用了 Big code != big vocabulary: open-vocabulary models for source code
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper17

  1. CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement LearningHung Le, Yue Wang, Akhilesh Deepak Gotmare, Silvio Savarese 等NeurIPS 2022 · 571 次引用
  2. Grounded Copilot: How Programmers Interact with Code-Generating ModelsShraddha Barke, Michael B. James, Nadia PolikarpovaOOPSLA 2023 · 408 次引用
  3. ReACC: A Retrieval-Augmented Code Completion FrameworkShuai Lu, Nan Duan, Hojae Han, Daya Guo 等ACL 2022 · 208 次引用
  4. Repair Is Nearly Generation: Multilingual Program Repair with LLMsHarshit Joshi, José Pablo Cambronero Sánchez, Sumit Gulwani, Vu Le 等AAAI 2023 · 182 次引用
  5. Large Language Models of Code Fail at Completing Code with Potential BugsTuan Dinh, Jinman Zhao, Samson Tan, Renato Negrinho 等NeurIPS 2023 · 59 次引用

它引用的 Paper6

  1. Global Relational Models of Source CodeVincent J. Hellendoorn, Charles Sutton, Rishabh Singh, Petros Maniatis 等ICLR 2020 · 252 次引用
  2. A Token-level Reference-free Hallucination Detection Benchmark for Free-form Text GenerationTianyu Liu, Yizhe Zhang, Chris Brockett, Yi Mao 等ACL 2022 · 194 次引用
  3. Code Prediction by Feeding Trees to TransformersSeohyun Kim, Jinman Zhao, Yuchi Tian, Satish ChandraICSE 2021 · 179 次引用
  4. Big code != big vocabulary: open-vocabulary models for source codeRafael-Michael Karampatsis, Hlib Babii, Romain Robbes, Charles Sutton 等ICSE 2020 · 140 次引用
  5. On Faithfulness and Factuality in Abstractive SummarizationJoshua Maynez, Shashi Narayan, Bernd Bohnet, Ryan T. McDonaldACL 2020 · 54 次引用

相关 Paper

  1. CodeFill: Multi-token Code Completion by Jointly learning from Structure and Naming SequencesMaliheh Izadi, Roberta Gismondi, Georgios GousiosICSE 2022 · 79 次引用
  2. Language Models for Code Completion: A Practical EvaluationMaliheh Izadi, Jonathan Katzy, Tim van Dam, Marc Otten 等ICSE 2024 · 51 次引用
  3. Empirical study of transformers for source codeNadezhda Chirkova, Sergey TroshinFSE 2021 · 53 次引用
  4. Long-Range Modeling of Source Code Files with eWASH: Extended Window Access by Syntax HierarchyColin B. Clement, Shuai Lu, Xiaoyu Liu, Michele Tufano 等EMNLP 2021 · 11 次引用
  5. Fine-tuning Language Models for Joint Rewriting and Completion of Code with Potential BugsDingmin Wang, Jinman Zhao, Hengzhi Pei, Samson Tan 等ACL Findings 2024 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖