Learning Structural Edits via Incremental Tree Transformations
Ziyu Yao, Frank F. Xu, Pengcheng Yin, Huan Sun, Graham Neubig
摘要
While most neural generative models generate outputs in a single pass, the human creative process is usually one of iterative building and refinement. Recent work has proposed models of editing processes, but these mostly focus on editing sequential data and/or only model a single editing pass. In this paper, we present a generic model for incremental editing of structured data (i.e. ''structural edits''). Particularly, we focus on tree-structured data, taking abstract syntax trees of computer programs as our canonical example. Our editor learns to iteratively generate tree edits (e.g. deleting or adding a subtree) and applies them to the partially edited data, thereby the entire editing process can be formulated as consecutive, incremental tree transformations. To show the unique benefits of modeling tree edits directly, we further propose a novel edit encoder for learning to represent edits, as well as an imitation learning method that allows the editor to be more robust. We evaluate our proposed editor on two source code edit datasets, where results show that, with the proposed edit encoder, our editor significantly improves accuracy over previous approaches that generate the edited program directly in one pass. Finally, we demonstrate that training our editor to imitate experts and correct its mistakes dynamically can further improve its performance.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 11 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- A Deep Dive into Large Language Models for Automated Bug Localization and Repair 引用了 Hoppity: Learning Graph Transformations to Detect and Fix Bugs in Programs
- A Deep Dive into Large Language Models for Automated Bug Localization and Repair 引用了 KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program Repair
- Multilingual Code Co-evolution using Large Language Models 引用了 CoditT5: Pretraining for Source Code and Natural Language Editing
- A structural model for contextual code changes 引用了 Global Relational Models of Source Code
- A structural model for contextual code changes 引用了 CC2Vec: distributed representations of code changes
- A structural model for contextual code changes 引用了 Hoppity: Learning Graph Transformations to Detect and Fix Bugs in Programs
- Graph-based, Self-Supervised Program Repair from Diagnostic Feedback 引用了 Hoppity: Learning Graph Transformations to Detect and Fix Bugs in Programs
- KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program Repair 引用了 Hoppity: Learning Graph Transformations to Detect and Fix Bugs in Programs
- KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program Repair 引用了 A structural model for contextual code changes
- CoditT5: Pretraining for Source Code and Natural Language Editing 引用了 A structural model for contextual code changes
- Aligning LLM Agents by Learning Latent Preference from User Edits 引用了 A structural model for contextual code changes
- Aligning LLM Agents by Learning Latent Preference from User Edits 引用了 CoditT5: Pretraining for Source Code and Natural Language Editing
引用它的顶会 Paper11
- Aligning LLM Agents by Learning Latent Preference from User EditsGe Gao, Alexey Taymanov, Eduardo Salinas, Paul Mineiro 等NeurIPS 2024 · 102 次引用
- CoditT5: Pretraining for Source Code and Natural Language EditingJiyang Zhang, Sheena Panthaplackel, Pengyu Nie, Junyi Jessy Li 等ASE 2022 · 81 次引用
- A Deep Dive into Large Language Models for Automated Bug Localization and RepairSoneya Binta Hossain, Nan Jiang, Qiang Zhou, Xiaopeng Li 等FSE 2024 · 60 次引用
- KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program RepairNan Jiang, Thibaud Lutellier, Yiling Lou, Lin Tan 等ICSE 2023 · 55 次引用
- Multilingual Code Co-evolution using Large Language ModelsJiyang Zhang, Pengyu Nie, Junyi Jessy Li, Milos GligoricFSE 2023 · 34 次引用
它引用的 Paper11
- Global Relational Models of Source CodeVincent J. Hellendoorn, Charles Sutton, Rishabh Singh, Petros Maniatis 等ICLR 2020 · 252 次引用
- Hoppity: Learning Graph Transformations to Detect and Fix Bugs in ProgramsElizabeth Dinella, Hanjun Dai, Ziyang Li, Mayur Naik 等ICLR 2020 · 212 次引用
- Graph-based, Self-Supervised Program Repair from Diagnostic FeedbackMichihiro Yasunaga, Percy LiangICML 2020 · 198 次引用
- CC2Vec: distributed representations of code changesThong Hoang, Hong Jin Kang, David Lo, Julia LawallICSE 2020 · 169 次引用
- A structural model for contextual code changesShaked Brody, Uri Alon, Eran YahavOOPSLA 2020 · 36 次引用
相关 Paper
- Learning to Model Editing ProcessesMachel Reid, Graham NeubigEMNLP Findings 2022 · 19 次引用
- An Imitation Learning Curriculum for Text Editing with Non-Autoregressive ModelsSweta Agrawal, Marine CarpuatACL 2022
- Diffusion On Syntax Trees For Program SynthesisShreyas Kapur, Erik Jenner, Stuart RussellICLR 2025
- NextCoder: Robust Adaptation of Code LMs to Diverse Code EditsTushar Aggarwal, Swayam Singh, Abhijeet Awasthi, Aditya Kanade 等ICML 2025
- Towards Robust Sequential Decomposition for Complex Image EditingZilai Zeng, Mingdeng Cao, Zijie Li, Xiaochen Lian 等CVPR 2026
