Text Change Detection in Multilingual Documents Using Image Comparison

Doyoung Park, Naresh Reddy Yarram, Sunjin Kim, Minkyu Kim, Seongho Cho, Taehee Lee

Abstract

Traditional document comparison methods rely heavily on Optical Character Recognition (OCR), which often fails in multilingual contexts or with distorted scans. This paper presents a language-independent Text Change Detection (TCD) model that identifies differences by comparing document images directly. By utilizing a novel correlation marginalization technique, the model achieves robustness against scanning distortions and misalignments, outperforming state-of-the-art segmentation models across diverse scripts.

Introduction

Comparing document versions—such as legal contracts, financial reports, or technical manuals—to identify edits is a critical task in document auditing. The conventional approach involves converting images to text via OCR and performing a text-based comparison. However, OCR-based systems suffer from three primary limitations:

  1. Language Dependency: OCR systems require pre-defined language models. Multilingual documents or rare scripts often lead to significant recognition errors.
  2. Noise Sensitivity: Real-world scans frequently contain "bleed-through," blur, and background artifacts that degrade OCR accuracy.
  3. Alignment Sensitivity: Minor variations in rotation or scale between a printed original and a scanned copy can break pixel-to-pixel comparison methods.

To address these challenges, this research proposes a system that detects text changes (additions, deletions, or modifications) without linguistic interpretation, treating text as a visual pattern rather than a sequence of characters.

Methodology

The proposed TCD model utilizes an encoder-decoder architecture specifically designed for robust image-to-image comparison.

Architecture Overview

Overview of the Text Change Detection (TCD) architecture, featuring multi-scale feature extraction and correlation marginalization. Source, p. 4

Overview of the Text Change Detection (TCD) architecture, featuring multi-scale feature extraction and correlation marginalization.
  • Feature Extraction: The model employs a ResNet backbone integrated with a Feature Pyramid Network (FPN) to extract multi-scale features. This allows the system to capture both the fine details of individual characters and the broader structural context of the document.
  • Correlation Marginalization: This core innovation replaces simple image subtraction. The model constructs a 4D correlation map comparing every pixel in a neighborhood of the source image to the target image. To maintain computational efficiency, these maps are marginalized into 3D tensors. This enables the model to match characters even when they have shifted or scaled slightly, providing inherent resistance to misalignment.
  • Multi-scale Attention: Cross-self attention mechanisms, inspired by Transformer architectures, refine feature representations. This helps the decoder focus on regions where significant visual discrepancies occur.
  • Bidirectional Segmentation: The system generates two distinct change maps: Source → Target and Target → Source. This bidirectional approach allows the model to clearly distinguish between added and deleted text segments.

Experimental Setup and Datasets

The model was evaluated using a combination of synthetic and real-world benchmarks:

  • Multilingual Benchmark: A new dataset of 80,000 word-level image pairs was constructed, featuring English, Korean, Chinese, Russian, Arabic, Hindi, and various special symbols. This dataset includes both identical pairs (to test for false positives under distortion) and modified pairs.
  • Public Benchmarks: Performance was further validated on the DDI-100 (Distorted Document Images) and the LRDE Document Binarization Dataset.
  • Synthetic Training: To ensure robustness, the training phase included simulated real-world distortions such as Gaussian noise, motion blur, non-linear scaling, and underlining.

Results and Discussion

The TCD model was benchmarked against state-of-the-art (SotA) semantic segmentation models (e.g., U-Net, SegFormer) and change detection models (e.g., BIT-CD).

Multilingual text comparison examples showing source/target images and the resulting bidirectional change detection masks.

Performance Metrics

The TCD model achieved an average F1 score of 71.5% and an overall accuracy of 86.3% across all tested languages. Notably, while baseline models showed high variance in performance depending on the script, the TCD model maintained consistent accuracy across diverse languages like Arabic and Hindi. When compared to high-end OCR systems such as Tesseract and TrOCR, the TCD model provided comparable change detection performance without the need for language-specific configurations.

Key Conceptual Breakthroughs

  • Text as Texture: By treating text as a complex visual texture, the model becomes truly language-agnostic. It identifies changes in any script it encounters, even those not explicitly present in the training data.
  • Neighborhood Matching: Shifting from pixel-level matching to neighborhood correlation provides the necessary "jitter" resistance required for processing scanned documents.

Conclusion and Future Work

The TCD model demonstrates that image-based comparison can effectively bypass the limitations of OCR for document auditing. While the current iteration focuses on unit-level comparison (words or phrases) and requires a separate pre-processing step for cropping, it establishes a robust foundation for universal text change detection. Future research will focus on developing an end-to-end full-page comparison model to eliminate the need for initial unit detection and further streamline the document comparison pipeline.

Summary updated

Abstract

Document comparison typically relies on optical character recognition (OCR) as its core technology. However, OCR requires the selection of appropriate language models for each document and the performance of multilingual or hybrid models remains limited. To overcome these challenges, we propose text change detection (TCD) using an image comparison model tailored for multilingual documents. Unlike OCR-based approaches, our method employs word-level text image-to-image comparison to detect changes. Our model generates bidirectional change segmentation maps between the source and target documents. To enhance performance without requiring explicit text alignment or scaling preprocessing, we employ correlations among multi-scale attention features. We also construct a benchmark dataset comprising actual printed and scanned word pairs in various languages to evaluate our model. We validate our approach using our benchmark dataset and public benchmarks Distorted Document Images and the LRDE Document Binarization Dataset. We compare our model against state-of-the-art semantic segmentation and change detection models, as well as to conventional OCR-based models.
BibTeX
@inproceedings{park2025text,
  author = {Doyoung Park and Naresh Reddy Yarram and Sunjin Kim and Minkyu Kim and Seongho Cho and Taehee Lee},
  title = {{Text Change Detection in Multilingual Documents Using Image Comparison}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2025},
  doi = {10.1109/wacv61041.2025.00510},
}
Figure