[Paper Review] Fooling OCR Systems with Adversarial Text Images
This paper demonstrates that deep learning-based OCR systems, specifically Tesseract, are vulnerable to adversarial attacks that subtly alter printed text images to cause the system to output semantic opposites of the original words. By applying small, localized perturbations to specific words, the attack changes the OCR output to misrecognize words as their antonyms—completely altering document meaning—while remaining visually imperceptible to humans and effective even after scanning physical documents.
We demonstrate that state-of-the-art optical character recognition (OCR) based on deep learning is vulnerable to adversarial images. Minor modifications to images of printed text, which do not change the meaning of the text to a human reader, cause the OCR system to "recognize" a different text where certain words chosen by the adversary are replaced by their semantic opposites. This completely changes the meaning of the output produced by the OCR system and by the NLP applications that use OCR for preprocessing their inputs.
Motivation & Objective
- To investigate the vulnerability of deep learning-based OCR systems to adversarial examples that alter semantic meaning without changing visual appearance.
- To develop a targeted attack that causes OCR systems to misrecognize specific words as their semantic opposites using minimal, localized image perturbations.
- To evaluate the impact of such adversarial OCR outputs on downstream NLP applications, including document categorization and sentiment analysis.
- To explore the physical realizability of adversarial text images, testing whether perturbations survive scanning and printing processes.
- To examine transferability of adversarial examples across different OCR models, particularly between modern and legacy versions of Tesseract.
Proposed method
- The attack targets Tesseract OCR by generating adversarial perturbations on individual words using a gradient-based optimization method to minimize the difference between the target word and the OCR output.
- Perturbations are constrained to a small subregion of the image corresponding to the target word, ensuring minimal visual change to the human observer.
- The method leverages linguistic knowledge by selecting word pairs that are visually similar but semantically opposite (e.g., 'yes' vs. 'no') to maximize semantic impact.
- The attack is extended to full documents by modifying key data elements (dates, numbers, addresses) and replacing selected words with their antonyms.
- The adversarial images are tested after physical printing and scanning to assess real-world feasibility and robustness to image degradation.
- The impact on downstream NLP models is evaluated by feeding adversarially altered OCR outputs into models for document categorization and sentiment analysis.
Experimental results
Research questions
- RQ1Can adversarial perturbations be crafted to cause OCR systems to misrecognize a word as its semantic opposite while preserving visual similarity to a human?
- RQ2How effective are these adversarial examples in changing the meaning of entire documents after OCR processing?
- RQ3To what extent do adversarial OCR outputs degrade or manipulate the performance of downstream NLP applications such as document categorization and sentiment analysis?
- RQ4Are the adversarial perturbations physically realizable—can they survive printing and scanning without being rejected by the OCR system?
- RQ5Does the attack transfer across different OCR models, particularly between modern deep learning-based OCR and legacy character-based OCR systems?
Key findings
- The attack successfully causes Tesseract to misrecognize target words as their semantic opposites with minimal, localized perturbations that are imperceptible to humans.
- The adversarial perturbations affect only a tiny fraction of pixels and are confined to a small subregion of the image, preserving visual fidelity.
- The attack remains effective even after the adversarial image is printed on paper and rescanned, demonstrating physical realizability for certain cases.
- The OCR output, when fed into NLP models, leads to incorrect predictions with high confidence, enabling full control over the NLP model’s output class.
- The attack can poison sentiment analysis models by introducing adversarial training examples, degrading model performance over time.
- Adversarial examples do not transfer to the legacy version of Tesseract, indicating a fundamental difference in architecture and vulnerability between deep learning-based and character-based OCR systems.
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.