NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Encode, Tag, Realize: High-Precision Text Editing

Eric Malmi, Sebastian Krause, Sascha Rothe, Daniil Mirylenka, Aliaksei Severyn

Introduction

Standard neural sequence-to-sequence (seq2seq) models, while powerful, often prove inefficient for tasks where the output significantly overlaps with the input, such as grammatical error correction or sentence fusion. These models typically generate text token-by-token from scratch, a process that is computationally expensive, slow at inference time, and prone to "hallucinations"—the generation of factually incorrect or irrelevant content.

To address these challenges, the LASERTAGGER framework reframes text generation as a text-editing task. By predicting edit operations rather than individual words, LASERTAGGER achieves state-of-the-art results with significantly higher speed and data efficiency.

The LASERTAGGER Framework

The core of LASERTAGGER is a three-step pipeline: Encode, Tag, and Realize.

  1. Encode: A BERT-based encoder produces a rich contextual representation of the input sequence.
  2. Tag: The model assigns an edit tag to each input token from a small, optimized vocabulary. Primary operations include KEEP (retain the token), DELETE (remove the token), and ADD (insert a specific phrase before the token).
  3. Realize: A rule-based "realizer" executes the predicted tags to construct the final output string.
The LASERTAGGER pipeline: Encoding the input, tagging tokens with edit operations, and realizing the final output.

By constraining the model to a small set of edit tags (typically around 500 phrases), the search space is drastically reduced. This prevents the model from generating nonsensical words and makes the learning process more robust, especially on smaller datasets.

Model Architecture

The authors propose two primary variants of the model:

  • LASERTAGGER-FF: A feed-forward model that predicts all tags in parallel, offering extreme inference speed.
  • LASERTAGGER-AR: An autoregressive model that uses a lightweight decoder to model dependencies between edits, providing higher accuracy.
The LASERTAGGER-AR architecture, featuring a 12-layer BERT encoder and a single-layer Transformer decoder.

The use of a single-layer Transformer decoder in the AR variant allows the model to account for previous tagging decisions while remaining significantly faster than traditional seq2seq models that use deep decoders.

Performance and Efficiency

LASERTAGGER was evaluated across four English-language tasks: Sentence Fusion, Split and Rephrase, Abstractive Summarization, and Grammatical Error Correction. Key findings include:

  • Speed: LASERTAGGER-FF is up to 100x faster than BERT-based seq2seq models, while the AR version is approximately 10x faster.
  • Data Efficiency: The model performs remarkably well with limited training data. In "Split and Rephrase" tasks, it outperformed seq2seq models even when trained on only a few hundred examples.
  • Robustness: Because it is physically constrained by the input text, LASERTAGGER is much less likely to suffer from common errors like repeated phrases or hallucinations.

Limitations and Future Work

While highly effective, the current tagging approach has limitations. It struggles with arbitrary word reordering, though a custom SWAP tag was introduced for sentence fusion. Additionally, the model's ability to add text is strictly limited by its pre-computed phrase vocabulary. Future work may involve developing more sophisticated realizers for morphologically rich languages where word case and gender changes are required during editing.

Summary updated

BibTeX
@inproceedings{malmi2019encode,
  author = {Eric Malmi and Sebastian Krause and Sascha Rothe and Daniil Mirylenka and Aliaksei Severyn},
  title = {{Encode, Tag, Realize: High-Precision Text Editing}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2019},
  doi = {10.18653/v1/d19-1510},
}
Figure