Abstract
As Optical Character Recognition (OCR) technology advances, content piracy via automated screenshots has become a significant threat to digital publishers and document security. This paper, presented at ACM Multimedia (MM '23), introduces the Universal Defensive Underpainting Patch (UDUP), a novel adversarial defense that shifts the focus from text distortion to background manipulation. UDUP employs a small, tileable adversarial patch that effectively "blinds" OCR systems while preserving legibility for human readers. Through a dual-loss optimization strategy and scale-invariant training, UDUP demonstrates high effectiveness across diverse languages and commercial OCR platforms, offering a scalable and practical solution for document protection.
Introduction: The Challenge of Content Piracy
The rise of powerful, accessible OCR tools has facilitated a new form of "content piracy." Automated crawlers can now bypass traditional anti-scraping measures—such as disabling text selection or JavaScript—by simply capturing screenshots and extracting text via OCR. This poses a major threat to creators of paid novels, private documents, and exclusive web content.
Existing adversarial defenses typically involve adding noise or distortions directly to text characters. However, these approaches suffer from three primary drawbacks:
- Reduced Readability: Distorting characters often makes text difficult for humans to read.
- Lack of Scalability: Most adversarial perturbations are specific to a single image; changing resolutions or taking partial screenshots often breaks the defense.
- High Computational Cost: Generating unique adversarial masks for every page of a large document is impractical for real-world deployment.
Methodology: The "Canvas" Attack
The authors propose UDUP, which moves the adversarial attack from the foreground (text) to the background (underpainting). By turning the document's "canvas" into a noisy adversarial signal, the system can paralyze OCR detectors without altering the pixels of the letters themselves.
The Core Algorithm
The system optimizes a small, fixed-size patch (typically 30x30 pixels) designed to be tiled across a background of any size. This tiling approach ensures universality: whether a pirate captures a full screen or a small snippet, the adversarial texture remains present.
Key Technical Innovations
- Dual Loss Function: Optimization utilizes a Prediction Loss ($L^p$) to misguide text localization and a Multi-middle-layer Loss ($L^m$). The latter ensures the attack disrupts features at various depths of the neural network, enhancing transferability across different OCR models.
- Random Scaling Modules ($R_1, R_2$): To ensure the defense works regardless of font size or zoom level, the researchers incorporated random scaling into the training loop, making the patch scale-invariant.
- Mean Underpainting Intensity (MUI): A metric introduced to balance OCR blindness with human visibility. An MUI below 0.12 provides a subtle texture that does not hinder reading but effectively disrupts machine vision.
Results and Insights
The UDUP was trained against the CRAFT detector and tested for black-box transferability against several models, including commercial engines from Aliyun and Baidu.
Effectiveness and Transferability
On the white-box CRAFT model, a 30x30 UDUP reduced the recall ratio to 0.039, effectively making 96% of the text invisible. In black-box scenarios, it reduced the precision of DBNet by approximately 75%. When tested against commercial OCRs, UDUP caused significant spelling errors and induced "hallucinations" where systems detected text in blank areas, rendering the extracted data useless.
Language Agnosticism
Because the attack resides in the background, it is naturally agnostic to text content, color, font, and language. The researchers demonstrated successful protection across Chinese, Arabic, and Japanese text, despite the patch being trained primarily on English documents.
Conclusion and Future Work
UDUP represents a significant shift in document security, providing a scalable, content-agnostic defense against automated OCR piracy. While highly effective, the authors note that at higher intensity levels (MUI > 0.12), the background texture may become visually distracting. Future research will focus on refining the visual quality of the patches and improving resilience against the proprietary pre-processing techniques used by some advanced commercial OCR engines.
Summary updated