arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2101.12087cs.LGcs.SE
收藏

通过增量树变换学习结构编辑

Learning Structural Edits via Incremental Tree Transformations

The Ohio State University(俄亥俄州立大学);Carnegie Mellon University(卡内基梅隆大学)

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑