Transformer-Based OCR Text Correction for Noisy Documents

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing optical character recognition (OCR) technologies often produce erroneous text due to noise in old documents and variation in typesetting, leading to issues in downstream applications.

Innovation Solution

A bidirectional autoregressive transformer model is fine-tuned using datasets like token masking, sentence permutation, and document rotation to detect and correct errors such as oversegmentation, undersegmentation, misrecognized characters, missing characters, and hallucinations in OCR text.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional OCR technology is used to convert scanned images to text, then the process is simple and fast, but the resulting text contains errors due to noise in old documents and variation in typesetting

Engineering Contradiction:
Improvetext accuracyVSAvoidmodel complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The transformer model is pretrained on large corpora before being fine-tuned on OCR-specific tasks. This preliminary pretraining equips the model with general language understanding capabilities, which are then specialized for OCR error correction through fine-tuning on datasets containing OCR errors and their corrections

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

A transformer model serves as an intermediary between the noisy OCR output and the desired clean text. The model takes erroneous OCR text as input, processes it through its pretrained language understanding mechanisms, and outputs corrected text, effectively mediating the transformation from inaccurate to accurate text

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If OCR text is corrected using traditional methods, then the process requires multiple steps including error detection and separate correction, but this increases processing time and complexity

Engineering Contradiction:
Improvecorrection speedVSAvoiderror detection accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent combines error detection and correction into a single unified transformer model that performs both functions simultaneously. The model is trained to identify errors and generate corrections in one pass, eliminating the need for separate detection and correction steps while maintaining high accuracy through its pretrained language understanding

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS12456317B2Systems and methods for detection and correction of OCR text
Publication Date: 2025.10.28 ANCESTRY COM OPERATIONS INC
  • US12456317B2 patent drawing
  • US12456317B2 patent drawing
  • US12456317B2 patent drawing

AI summary

OCR-text correction system and method embodiments are described. The OCR-text correction embodiments comprise or cooperate with a transformer-based sequence-to-sequence language model. The model is pretrained to denoise corrupted text and is fine-tuned using OCR-correction-specific examples. Text obtained at least in part through OCR is applied to the fine-tuned pretrained transformer model to detect at least one error in a subset of the text. Responsive to detecting the at least one error, the fine-tuned pretrained transformer model outputs an updated subset of the text to correct the at least one error.