MailLeak: Obfuscation-Robust Character Extraction Using Transfer Learning

Wei Wang, Emily Sallenback, Zeyu Ning, Hugues Nelson Iradukunda, Wenxi Lu, Qingquan Zhang, Ting Zhu · DOI

Abstract

The following work presents a new algorithm for character recognition from obfuscated images. The presented method is an example of a potential threat to current postal services. This paper both analyzes the efficiency of the given algorithm and suggests countermeasures to prevent such threats from occurring.

Introduction

Despite the digital age, physical mail remains a primary carrier for sensitive documents like credit cards, checks, and Social Security numbers. To protect this data from "man-in-the-middle" attacks (e.g., someone holding an envelope up to a light), postal services use security patterns to obfuscate the text.

The authors identify a critical flaw: these patterns are recurring and predictable. While they successfully confuse the human eye, they provide a structured "noise" that machine learning models can learn to ignore. The challenge lies in the variety of patterns used; a model trained on one specific pattern usually fails on another. This paper seeks to create a robust, generalized extraction method that works across different obfuscation styles.

Methodology

The researchers developed an algorithm that moves away from traditional, rigid OCR toward a more flexible deep learning architecture based on inductive transfer.

Inductive Transfer and Architecture

Instead of training from scratch, the authors used an open-source OCR model pre-trained on the Synth 90k dataset. They then "fine-tuned" this model using smaller sets of images obscured by specific security patterns. This allowed the model to learn the "essence" of characters beneath the noise by constraining the hypothesis search space.

Comparison between standard inductive learning and inductive transfer, illustrating how the search space is constrained.

The pipeline consists of 4 CNN layers for feature extraction, fed into a 2-layer Attention Network. Interestingly, the authors discarded the LSTM (Long Short-Term Memory) layers typically found in such models to improve training speed, finding that the attention mechanism alone was sufficient for mapping sequential image inputs to character outputs.

Data and Obfuscation Patterns

The study utilized three main types of data: synthetic pre-training sets, man-made obfuscated sets created by stacking common security patterns over text, and real-world photos of semi-transparent envelopes.

Common security patterns used to obfuscate sensitive information in physical mail.

Because these security patterns are repetitive and periodic, they are mathematically distinct from the unique strokes of characters. This periodicity makes them "easy" for a CNN to filter out once it has seen enough examples through the transfer learning process.

Key Insights and Results

  • The 30% Accuracy Threshold: The authors discovered that the grammar/spell-check module only improves results if the base character recognition accuracy is above 30%. Below this threshold, the grammar model often "hallucinates" incorrect words.
  • Attention > Recurrence: For this specific task, the attention mechanism proved more vital than LSTMs, allowing the model to focus on relevant pixel clusters regardless of surrounding noise.
  • Real-World Success: In tests on actual envelopes, the model successfully deciphered words that were otherwise unreadable to the naked eye. Adding a domain-specific grammar check significantly increased the success rate when the attacker had prior knowledge of the likely contents.

Countermeasures and Future Work

The paper suggests that the best defense isn't a static pattern, but a dynamic one. They propose a "context-aware" shader using light-sensitive ink that creates noise based on the specific text inside the envelope, effectively filling blank spaces with noise that mimics the characters themselves.

Future research directions include incorporating a confidence score for each character guess to assist the grammar module and moving beyond single-word extraction to analyze full-sentence context.

Summary updated

Abstract

The following work presents a new algorithm for character recognition from obfuscated images. The presented method is an example of a potential threat to current postal services. This paper both analyzes the efficiency of the given algorithm and suggests countermeasures to prevent such threats from occurring.
BibTeX
@misc{wang2020mailleak,
  author = {Wei Wang and Emily Sallenback and Zeyu Ning and Hugues Nelson Iradukunda and Wenxi Lu and Qingquan Zhang and Ting Zhu},
  title = {{MailLeak: Obfuscation-Robust Character Extraction Using Transfer Learning}},
  year = {2020},
  eprint = {2012.11775},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.11775},
}

Loading related content...

Figure