paper-with-me

홈 › Papers

Learning to Complete Code with Sketches

2021-06-18 · ICLR 2022 4 · 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.

📄 PDF Abstract BibTeX arXiv:2106.10158

Code (0)

등록된 구현이 없습니다.

Tasks

Code CompletionCode GenerationLanguage Modelling

Similar Papers 제목 키워드 기반

AniFaceDrawing: Anime Portrait Exploration during Your Sketching

2023-06-13 · Zhengyu Huang, Haoran Xie, Tsukasa Fukusato, Kazunori Miyata

In this paper, we focus on how artificial intelligence (AI) can be used to assist users in the creation of anime portraits, that is, converting rough sketches into anime portraits during their sketching process. The inpu…

Conditional Image GenerationDisentanglementImage Generation

Multi-granularity Association Learning Framework for on-the-fly Fine-Grained Sketch-based Image Retrieval

2022-01-13 · Dawei Dai, Xiaoyu Tang, Shuyin Xia, Yingge Liu 외

Fine-grained sketch-based image retrieval (FG-SBIR) addresses the problem of retrieving a particular photo in a given query sketch. However, its widespread applicability is limited by the fact that it is difficult to dra…

Image RetrievalRetrievalSketch-Based Image Retrieval

Towards Interactive Image Inpainting via Sketch Refinement

2023-06-01 · Chang Liu, Shunxin Xu, Jialun Peng, Kaidong Zhang 외

One tough problem of image inpainting is to restore complex structures in the corrupted regions. It motivates interactive image inpainting which leverages additional hints, e.g., sketches, to assist the inpainting proces…

Image Inpainting

Sketch Then Generate: Providing Incremental User Feedback and Guiding LLM Code Generation through Language-Oriented Code Sketches

2024-05-07 · Chen Zhu-Tian, Zeyu Xiong, Xiaoshuo Yao, Elena Glassman

Crafting effective prompts for code generation or editing with Large Language Models (LLMs) is not an easy task. Particularly, the absence of immediate, stable feedback during prompt crafting hinders effective interactio…

Code Generation

Deep Generation of Face Images from Sketches

2020-06-01 · Shu-Yu Chen, Wanchao Su, Lin Gao, Shihong Xia 외

Recent deep image-to-image translation techniques allow fast generation of face images from freehand sketches. However, existing solutions tend to overfit to sketches, thus requiring professional sketches or even edge ma…

Image-to-Image TranslationTranslation