论文标题
复制!通过复制跨度编辑序列
Copy that! Editing Sequences by Copying Spans
论文作者
论文摘要
神经序列到序列模型正在发现越来越多的文档编辑使用,例如纠正文本文档或修复源代码。在本文中,我们认为常见的SEQ2SEQ模型(具有复制单个令牌的设施)并不适合此类任务,因为它们必须明确复制每个未改变的令牌。我们提出了能够将输入的整个跨度复制到输出的seq2Seq模型的扩展,从而大大减少了推理过程中所需的决策数量。此扩展意味着现在有许多产生相同输出的方法,我们通过得出一个新的训练目标和梁搜索的变化来处理的推理,以明确处理此问题。在我们对自然语言和源代码的一系列编辑任务的实验中,我们表明我们的新模型始终优于简单的基线。
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.