[Paper Review] Lights, Camera, Action! A Framework to Improve NLP Accuracy over OCR documents
This paper proposes a framework to improve NLP accuracy on OCR-processed documents using a synthetic data generation pipeline (Genalog) and a text restoration model based on action prediction. The method significantly reduces NER accuracy degradation—up to 73% gap reduction—by restoring clean text from OCR errors, even generalizing to out-of-domain data.
Document digitization is essential for the digital transformation of our societies, yet a crucial step in the process, Optical Character Recognition (OCR), is still not perfect. Even commercial OCR systems can produce questionable output depending on the fidelity of the scanned documents. In this paper, we demonstrate an effective framework for mitigating OCR errors for any downstream NLP task, using Named Entity Recognition (NER) as an example. We first address the data scarcity problem for model training by constructing a document synthesis pipeline, generating realistic but degraded data with NER labels. We measure the NER accuracy drop at various degradation levels and show that a text restoration model, trained on the degraded data, significantly closes the NER accuracy gaps caused by OCR errors, including on an out-of-domain dataset. For the benefit of the community, we have made the document synthesis pipeline available as an open-source project.
Motivation & Objective
- Address the scarcity of labeled, degraded OCR documents for training NLP models by generating synthetic, realistic OCR-affected documents with preserved NER annotations.
- Mitigate the negative impact of OCR errors on downstream NLP tasks, particularly Named Entity Recognition (NER), which suffers from accuracy drops due to text degradation.
- Develop a generalizable text restoration model that reconstructs clean text from OCR output, improving downstream NER performance without relying on task-specific fine-tuning.
- Evaluate the framework’s effectiveness across varying OCR degradation levels and on out-of-domain datasets to assess robustness and generalization.
- Make the synthetic document generation pipeline (Genalog) publicly available as open-source to support future research in document intelligence and OCR error mitigation.
Proposed method
- Design and implement Genalog, a pipeline that generates synthetic document images from plain text, applies realistic OCR degradations (e.g., blur, noise, bleed), runs OCR on the images, and propagates NER labels from the original text to the OCR output.
- Train a sequence-to-sequence action prediction model that learns to map noisy OCR text to clean text by predicting corrective actions (e.g., insertions, deletions, substitutions) at the token level.
- Use a multi-task Bi-LSTM model for NER that operates at both token and character levels, ensuring robustness to subword-level errors introduced by OCR.
- Align clean and noisy text pairs using dynamic programming to preserve label consistency during model training.
- Apply the action prediction model to restore OCR output before feeding it to the NER model, enabling end-to-end error correction.
- Evaluate the framework using multiple datasets (CoNLL-2003, CoNLL-2012, CNN) and degradation levels, measuring F1 score improvements in NER performance.
Experimental results
Research questions
- RQ1To what extent does OCR degradation degrade NER performance across different document quality levels?
- RQ2Can a text restoration model trained on synthetic, degraded OCR data effectively recover NER accuracy on real-world OCR outputs?
- RQ3How well does the action prediction model generalize to out-of-domain documents not seen during training?
- RQ4What is the relative improvement in NER F1 score when using restored text versus raw OCR output across varying degradation intensities?
- RQ5Does the action prediction approach outperform conventional seq2seq models in handling alignment mismatches caused by OCR errors?
Key findings
- OCR degradation causes significant NER accuracy drops, with F1 scores decreasing from 0.860 on clean CoNLL-2003 text to 0.820 on noisy text, a 4.6 percentage point drop.
- The action prediction model restores up to 73% of the NER accuracy gap on CoNLL-2012 and 52% on CoNLL-2003 when using light degradations, demonstrating strong performance on standard datasets.
- On the CNN dataset, which lacks human-annotated NER labels and uses model-generated ground truth, the NER F1 score drops from 0.989 to 0.590 on noisy text, and the restoration model recovers 76% of the accuracy gap.
- The model performs best at moderate degradation levels, achieving up to 77% gap reduction for phantom and all-degradation (light) settings, but performance degrades slightly under heavy, combined degradations.
- The action prediction model reduces the NER accuracy gap by 19% on the most severe degradation setting (all degradations in heavy mode), indicating robustness even under extreme OCR noise.
- The framework generalizes effectively to out-of-domain data, with the restoration model improving NER performance on unseen CNN articles despite no fine-tuning on that domain.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.