Lune

AAAI2021Top-tier venue

Copy That! Editing Sequences by Copying Spans

Sheena Panthaplackel, Miltiadis Allamanis, Marc Brockschmidt

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • A Deep Dive into Large Language Models for Automated Bug Localization and Repair cites Learning Structural Edits via Incremental Tree Transformations
  • CoditT5: Pretraining for Source Code and Natural Language Editing cites Learning Structural Edits via Incremental Tree Transformations
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. SPT-Code: Sequence-to-Sequence Pre-Training for Learning Source Code RepresentationsChangan Niu, Chuanyi Li, Vincent Ng, Jidong Ge et al.ICSE 2022 · 99 citations
  2. CoditT5: Pretraining for Source Code and Natural Language EditingJiyang Zhang, Sheena Panthaplackel, Pengyu Nie, Junyi Jessy Li et al.ASE 2022 · 81 citations
  3. A Deep Dive into Large Language Models for Automated Bug Localization and RepairSoneya Binta Hossain, Nan Jiang, Qiang Zhou, Xiaopeng Li et al.FSE 2024 · 60 citations
  4. Sequence-to-Sequence Learning with Latent Neural GrammarsYoon KimNeurIPS 2021 · 44 citations
  5. Learning Structural Edits via Incremental Tree TransformationsZiyu Yao, Frank F. Xu, Pengcheng Yin, Huan Sun et al.ICLR 2021 · 32 citations

Related papers

  1. Seq2Edits: Sequence Transduction Using Span-level Edit OperationsFelix Stahlberg, Shankar KumarEMNLP 2020 · 1 citation
  2. Recurrent Inference in Text EditingNing Shi, Ziheng Zeng, Haotian Zhang, Yichen GongEMNLP Findings 2020 · 3 citations
  3. Sequence-to-Action: Grammatical Error Correction with Action Guided Sequence GenerationJiquan Li, Junliang Guo, Yongxin Zhu, Xin Sheng et al.AAAI 2022 · 29 citations
  4. Improving Sequence-to-Sequence Pre-training via Sequence Span RewritingWangchunshu Zhou, Tao Ge, Canwen Xu, Ke Xu et al.EMNLP 2021 · 9 citations
  5. Learning to Model Editing ProcessesMachel Reid, Graham NeubigEMNLP Findings 2022 · 19 citations
Dusk over the sea between two cliffs drawn in fine vertical lines