Copy That! Editing Sequences by Copying Spans

Authors

  • Sheena Panthaplackel The University of Texas at Austin
  • Miltiadis Allamanis Microsoft Research
  • Marc Brockschmidt Microsoft Research

DOI:

https://doi.org/10.1609/aaai.v35i15.17606

Keywords:

Applications, (Deep) Neural Network Algorithms, Software Engineering

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. 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.

Downloads

Published

2021-05-18

How to Cite

Panthaplackel, S., Allamanis, M., & Brockschmidt, M. (2021). Copy That! Editing Sequences by Copying Spans. Proceedings of the AAAI Conference on Artificial Intelligence, 35(15), 13622-13630. https://doi.org/10.1609/aaai.v35i15.17606

Issue

Section

AAAI Technical Track on Speech and Natural Language Processing II