arXiv:2611.05539cs.CLNov 2026

Manuscript Offprint

arXiv:2611.05539

Rewrite, Then Veto: Rewriter-Agnostic Edit Gating for LLM-Based Post-OCR Correction

Jorge Ramón Fonseca Cacho

Jorge Ramón Fonseca Cacho¹[0000-0001-7917-5169]

Department of Computer Science, University of Nevada, Las Vegas, NV, USA jorge.fonsecacacho@unlv.edu

Abstract. LLMs can repair noisy OCR transcripts of historical documents, but they also change text that was already correct. We propose EDITVETO, a veto gate placed after a full-context LLM rewrite. The rewrite is character-aligned to the OCR input, its differences are split into blocks, and a 0.6B-parameter gate keeps or reverts each block. An oracle analysis motivates the design: given the true error locations, per-span generation is worse than no correction, whereas vetoing a full rewrite's edits helps. Trained on rewrites by two Qwen3 models and evaluated, frozen, on the eight HIPE-OCRRepair-2026 test sets, the gate improves all five rewriters tested, two of them unseen in training: weighted cMER falls by 0.0026–0.0044 and the preference score rises by 0.15–0.25 (paired bootstrap, p≈0.0002p \approx 0.0002 each). On published competition outputs it lowers cMER for three of four teams but raises it for the winning run (0.0050 to 0.0065). In a second, disclosed test look, a retrained gate still improves LoRA-tuned rewriters (cMER −0.0011-0.0011 to −0.0021-0.0021), and an ensemble of their gated edits reaches a cMER of 0.0069 and a preference score of 0.928, mostly through fine-tuning and pooling rather than gating. Built only on public models and data, it is behind the winner (0.0050) and tied with the second-ranked run (0.0071), both from the only team using domain pre-training, and ahead of all other published runs. A third, secondary look shows the unchanged gate improving zero-shot Qwen3.8-27B (cMER 0.0114 to 0.0108) but only the preference score of its LoRA-tuned version.

Keywords: OCR post-correction · historical documents · large language models · edit gating · over-correction

1 Introduction

Libraries and archives hold large collections of historical newspapers and books whose text layer was produced by optical character recognition (OCR) years or decades ago. Re-digitizing these collections is rarely feasible, so their usefulness for search and text analysis depends on post-correction: improving an existing transcript without access to the page image [16,5]. Post-correction has moved from noisy-channel models [13] and neural sequence-to-sequence systems [1,24,21] to LLMs used zero-shot or after fine-tuning [2,26,12,3].

Post-correction is a constrained task: a system should restore the intended word forms and must not add, remove, or modernize content [5]. LLMs do not respect this constraint by default. The HIPE-OCRrepair-2026 competition at ICDAR 2026 [5] released a multilingual benchmark (English, French, German; 17th–20th century) scored by micro-averaged character match error rate (cMER) and a per-unit preference score that counts how often a system improves rather than degrades a unit. The organizers report over-correction of low-noise inputs as a recurring challenge and list methods to control over-correction and hallucination as future work [5]. The winning system adapted a 24B-parameter model with continued pre-training on roughly 80B tokens, fine-tuning, and multi-step inference, and reached a cMER of 0.0050 and a preference score of 0.9000 on the official test sets [5]. Such adaptation is likely beyond the compute budget of many libraries and archives.

We ask whether over-correction can be controlled after generation, independently of the model that corrects. Our starting point is a negative result. Given the exact error locations from the ground truth, a Qwen3-8B model that generates a replacement for each marked span is worse than no correction on the development set (cMER 0.0562 against 0.0275). By contrast, letting the same model rewrite the whole unit and then reverting every edit block that does not touch an oracle error span improves both metrics over the unfiltered rewrite. For this model and prompt, the useful role of an edit gate is therefore not to drive generation span by span but to veto the collateral edits of a full-context rewrite.

We build on this observation with EDITVETO. A rewriter proposes a corrected unit. We align the rewrite to the OCR input at the character level, split their differences into edit blocks, and let a small learned gate accept or veto each block. A vetoed block is restored to the OCR text, so the output contains only text that appears in the input or in the rewrite. The gate is trained once, on blocks from two Qwen3 rewriters on the training split, and then frozen. We call it rewriter-agnostic in a narrow sense: its text-only variant needs nothing from the rewriter but the output text, and we apply it without retraining to rewriters and published system outputs it never saw. It does not help every system; Sect. 8 shows where it hurts. In a second, disclosed test evaluation we combine a retrained gate with LoRA-tuned rewriters and an ensemble that pools their gated edits. This shows how far the approach goes with stronger rewriters, but it changes what is evaluated: the gains there come mostly from fine-tuning and pooling, and we report the gate's own share separately. A third, secondary look applies the same gate, unchanged, to a newer rewriter. Our contributions are:

– A formulation of post-correction as edit vetoing over an optimal character alignment, with an exact characterization of the vetoed output on raw strings and its consequences under the official normalized scorer (Sect. 3).

– An oracle analysis that separates knowing where to edit from the rewriter's ability to edit, with two negative results for per-span generation (Sect. 6).

– A block-level veto gate with a Qwen3-0.6B backbone, trained and selected on the training split only, in a full and a text-only variant, that transfers without retraining to rewriters outside its training pair (Sect. 7).

  • A first frozen evaluation on the eight HIPE-OCRrepair-2026 test sets: the gate improves all five rewriters on both metrics, and lowers cMER for every run of three of the four competition teams but raises it for two runs of the lowest-cMER team (Sect. 8).

  • A second, disclosed test evaluation of LoRA-tuned rewriters with a retrained gate and an edit-pool ensemble, which separates the gate's effect from that of fine-tuning and pooling, and two additions that gave no gated gain on development data, sampled candidates and synthetic training pairs, and a secondary third look with Qwen3.8-27B (Sect. 8.1).

References (28)