Encoding CNN Activations for Writer Recognition

Vincent Christlein, Andreas MaierarXiv 2017

TL;DR

This paper optimizes the pipeline for offline writer recognition by effectively encoding local CNN features into global document descriptors. By combining deep residual networks with refined VLAD encoding and Exemplar SVMs, the authors established new state-of-the-art performance on major handwriting benchmarks.

What Problem Does This Paper Address?

Writer recognition—identifying or retrieving documents written by a specific individual—is a critical task for forensic science and historical document analysis. The core challenge lies in creating a robust "signature" for a writer from variable-length handwriting samples.

While Deep Convolutional Neural Networks (CNNs) are excellent at extracting local features from small patches of text, there is no standard way to aggregate these thousands of local descriptors into a single, fixed-length global descriptor for an entire document. The authors set out to determine which combination of network architecture, encoding method (like VLAD), and pooling strategy yields the most accurate results.

Methods

The authors propose a multi-stage pipeline:

  1. Feature Extraction: They extract 32x32 pixel patches from the contours of handwritten text. These patches are fed into a CNN (comparing LeNet and ResNet architectures) to produce 64-dimensional activation vectors from the penultimate layer.
  2. Encoding: These local vectors are aggregated into a global descriptor. The authors compare the established VLAD (Vector of Locally Aggregated Descriptors) with the more recent Triangulation Embedding.
  3. Aggregation & Normalization: They investigate Generalized Max Pooling (GMP) as an alternative to standard sum pooling to mitigate "visual burstiness"—the tendency for common, uninformative features to dominate the descriptor. They also apply PCA whitening to decorrelate features.
  4. Classification: For retrieval, they compare simple cosine similarity against Exemplar SVMs (ESVM), where a unique classifier is trained for every query document to find its most similar matches in a dataset.
Fig. 1: Encoding of local descriptors to form a global representation which can be compared.

Datasets

The study evaluates performance across three diverse, publicly available datasets:

  • ICDAR13: Contains samples from 350 writers in both English and Greek.
  • CVL: Features 310 writers contributing texts in English and German.
  • KHATT: A large-scale dataset of 1000 writers writing in Arabic, providing a test for cross-linguistic robustness.

Key Insights and Ideas

  • Depth is Beneficial: Moving from a shallow LeNet to a 20-layer ResNet significantly reduced patch-level classification error (below 50%), which directly translated to better global document descriptors. Test error comparison showing ResNet-22 significantly outperforming LeNet.

  • Whitening Trumps Algorithm Choice: Interestingly, the specific choice of encoding algorithm mattered less than the use of proper decorrelation. When PCA whitening (specifically Local Coordinate Systems or LCS) was applied, the "older" VLAD method actually outperformed the more modern Triangulation Embedding. Table showing VLAD with LCS whitening outperforming Triangulation Embedding (T-Emb).

  • The Power of Exemplar SVMs: One of the biggest performance gains came from using Exemplar SVMs. By treating the query document as a single positive instance and the training set as negatives, the system learns a highly specific similarity metric for every search.

Fig. 2: Test error of the different architectures using the ICDAR13 training data (subset).
TABLE II: Comparison of VLAD in combination with LCS with triangulation embedding (avg. of 5 runs, ICDAR13 test set).

Key Results

The optimized pipeline (ResNet-20 + VLAD + LCS + GMP + ESVM) achieved state-of-the-art results across all tested datasets. On the ICDAR13 benchmark, it reached a mean Average Precision (mAP) of 93.2%, a significant jump over previous methods. It also showed near-perfect "Top-1" identification rates (the probability that the very first result is correct) exceeding 99% on both ICDAR13 and CVL.

TABLE VI: Comparison with the state of the art.

Limitations and Future Work

The authors acknowledge a few areas for further exploration:

  • Layer Selection: This study focused on the penultimate CNN layer; exploring activations from different depths might capture different stylistic nuances of handwriting.
  • Patch Size: The 32x32 patch size is relatively small. Larger patches might capture more structural information (like character connections) at the cost of computational complexity.
  • Pen Sensitivity: While binarization helps, the system can still be influenced by the specific pen used. Developing more pen-invariant features remains a goal for future research.

Summary updated

BibTeX
@misc{christlein2017encoding,
  author = {Vincent Christlein and Andreas Maier},
  title = {{Encoding CNN Activations for Writer Recognition}},
  year = {2017},
  eprint = {1712.07923},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1712.07923},
}
Figure