paper-with-me

홈 › Papers

A Structural Model for Contextual Code Changes

2020-05-27 · Shaked Brody, Uri Alon, Eran Yahav

We address the problem of predicting edit completions based on a learned model that was trained on past edits. Given a code snippet that is partially edited, our goal is to predict a completion of the edit for the rest of the snippet. We refer to this task as the EditCompletion task and present a novel approach for tackling it. The main idea is to directly represent structural edits. This allows us to model the likelihood of the edit itself, rather than learning the likelihood of the edited code. We represent an edit operation as a path in the program's Abstract Syntax Tree (AST), originating from the source of the edit to the target of the edit. Using this representation, we present a powerful and lightweight neural model for the EditCompletion task. We conduct a thorough evaluation, comparing our approach to a variety of representation and modeling approaches that are driven by multiple strong models such as LSTMs, Transformers, and neural CRFs. Our experiments show that our model achieves a 28% relative gain over state-of-the-art sequential models and 2x higher accuracy than syntactic models that learn to generate the edited code, as opposed to modeling the edits directly. Our code, dataset, and trained models are publicly available at https://github.com/tech-srl/c3po/ .

📄 PDF Abstract BibTeX arXiv:2005.13209

Code (1)

tech-srl/c3po 공식 구현 pytorch

Tasks

EditCompletionmodel

Similar Papers 제목 키워드 기반

Investigating the Contextualised Word Embedding Dimensions Specified for Contextual and Temporal Semantic Changes

2024-07-03 · Taichi Aida, Danushka Bollegala

The sense-aware contextualised word embeddings (SCWEs) encode semantic changes of words within the contextualised word embedding (CWE) spaces. Despite the superior performance of SCWEs in contextual/temporal semantic cha…

Change DetectionWord Embeddings

Unsupervised Distillation of Syntactic Information from Contextualized Word Representations

2020-10-11 · EMNLP (BlackboxNLP) 2020 11 · Shauli Ravfogel, Yanai Elazar, Jacob Goldberger, Yoav Goldberg

Contextualized word representations, such as ELMo and BERT, were shown to perform well on various semantic and syntactic tasks. In this work, we tackle the task of unsupervised disentanglement between semantics and struc…

DisentanglementMetric Learning

CSF-Net: Context-Semantic Fusion Network for Large Mask Inpainting

2025-11-11 · Chae-Yeon Heo, Yeong-Jun Cho arxiv

In this paper, we propose a semantic-guided framework to address the challenging problem of large-mask image inpainting, where essential visual content is missing and contextual cues are limited. To compensate for the li…

Image Inpainting

Examining Cross-lingual Contextual Embeddings with Orthogonal Structural Probes

2021-09-10 · EMNLP 2021 11 · Tomasz Limisiewicz, David Mareček

State-of-the-art contextual embeddings are obtained from large language models available only for a few languages. For others, we need to learn representations using a multilingual model. There is an ongoing debate on wh…

Link Prediction with Contextualized Self-Supervision

2022-01-25 · Daokun Zhang, Jie Yin, Philip S. Yu

Link prediction aims to infer the link existence between pairs of nodes in networks/graphs. Despite their wide application, the success of traditional link prediction algorithms is hindered by three major challenges -- l…

AttributeInductive Link PredictionLink PredictionPrediction+1