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:
- 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.
- Edit Operation Prediction: An autoregressive tagger labels each token with one of four operations:
KEEP,DELETE,REPLACE, orINSERT. - Generation Decoder: For
REPLACEorINSERToperations, a Transformer decoder generates new text spans in parallel, enhancing efficiency compared to word-by-word 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.
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