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

Learning to Model Editing Processes

Machel Reid, Graham Neubig

Abstract

Most contemporary language models generate text in a single left-to-right pass. However, human content creation is inherently iterative, involving multiple rounds of refinement and revision. This paper introduces EDITPRO, a model designed to capture the entire multi-step editing process. By leveraging the history of previous revisions, EDITPRO predicts subsequent edits more accurately than traditional single-step models. We evaluate our approach on two new large-scale datasets, WIKIREVISIONS and CODEREVISIONS, demonstrating significant improvements in edit perplexity and generation quality.

Introduction

Standard sequence generation models typically produce output in a single execution. While edit-based models have been developed for tasks like grammar correction, they are generally "single-step" systems that transform one version of a document into another without considering the broader editing trajectory. This approach ignores the context of how a document has evolved over time.

The authors argue that the editing process itself contains valuable signals. A writer's previous changes inform their next steps. To address this, we propose treating document generation as a sequence of discrete, intelligent revisions.

Methodology: The EDITPRO Model

EDITPRO is a semi-autoregressive model that decomposes the editing task into three distinct stages:

  1. Edit Encoder: This component processes the current document alongside a compressed representation of previous edits. To manage computational costs, the model uses "edit-aware sequence compression" to summarize the history of changes.
  2. Edit Operation Prediction: An autoregressive tagger labels each token with one of four operations: KEEP, DELETE, REPLACE, or INSERT.
  3. Generation Decoder: For REPLACE or INSERT operations, a Transformer decoder generates new text spans in parallel, enhancing efficiency compared to word-by-word generation.
The EDITPRO architecture decomposes editing into encoding, operation prediction, and parallel span generation.

A key innovation is the use of a higher-order Markov assumption. Instead of looking only at the immediate predecessor, the model considers the last n revisions (e.g., a 3-order model) to determine the next set of edits.

Datasets

To support this research, two massive datasets were curated:

  • WIKIREVISIONS: 2.5 million sequential revisions from Wikipedia, capturing long-term article evolution.
  • CODEREVISIONS: 2.3 million revisions from 700 Python GitHub repositories, tracking iterative code updates through commits.

These datasets move beyond "atomic" single-sentence edits to focus on document-level changes over multiple iterations.

Results and Discussion

Experimental results indicate that modeling the editing history significantly improves performance.

Perplexity and Context

EDITPRO achieved a reduction in "edit perplexity" (ePPL) of up to 22.9% compared to state-of-the-art baselines like LEWIS. Notably, performance scaled with the history window: moving from a 1-order to a 3-order model consistently lowered perplexity across both natural language and code datasets.

Performance comparison across WikiRevisions and CodeRevisions datasets, showing perplexity (ePPL, gPPL, oPPL) improvements with higher-order models.

Human Evaluation and Downstream Tasks

In blind tests, human annotators rated EDITPRO’s multi-step edits as significantly more "natural" (3.2/5) than standard Seq2Seq models (1.7/5). Furthermore, the representations learned by EDITPRO proved beneficial for secondary tasks, such as generating commit messages and classifying edit intent (e.g., distinguishing between clarification and vandalism).

Conclusion

EDITPRO demonstrates that history is a powerful signal in text generation. By disentangling "what" to edit from "how" to generate the content, the model scales effectively to long documents. While the model currently faces challenges with semantic coherence over very long editing chains, future work involving larger architectures and more diverse data holds promise for interactive writing tools and automated programming assistants.

Summary updated

BibTeX
@inproceedings{reid2022learning,
  author = {Machel Reid and Graham Neubig},
  title = {{Learning to Model Editing Processes}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.findings-emnlp.280},
}
Figure