Copy that! Editing Sequences by Copying Spans

Sheena Panthaplackel, Miltiadis Allamanis, Marc Brockschmidt
6/8/2020
cs.LGstat.ML

Official code: microsoft/aaai21-copy-that (13 stars, Python, MIT, last commit 2021-06-14).

Abstract

Neural sequence-to-sequence models are finding increasing use in editing of documents, for example in correcting a text document or repairing source code. In this paper, we argue that common seq2seq models (with a facility to copy single tokens) are not a natural fit for such tasks, as they have to explicitly copy each unchanged token.

Show full abstract

We present an extension of seq2seq models capable of copying entire spans of the input to the output in one step, greatly reducing the number of decisions required during inference. This extension means that there are now many ways of generating the same output, which we handle by deriving a new objective for training and a variation of beam search for inference that explicitly handles this problem. In our experiments on a range of editing tasks of natural language and source code, we show that our new model consistently outperforms simpler baselines.

View on arXivView PDF

Code Implementations(1)

MIT

Source code for the "Copy that! Editing Sequences by Copying Spans" AAAI'21 paper

137Python, MustacheJun 14, 20215 years agoMIT

Similar Papers

Cite this paper

@article{panthaplackel2020copy,
  title  = {Copy that! Editing Sequences by Copying Spans},
  author = {Sheena Panthaplackel and Miltiadis Allamanis and Marc Brockschmidt},
  year   = {2020},
  eprint = {2006.04771},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2006.04771}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2006.04771.svg)](https://codeofpaper.com/paper/2006.04771)

Discussion