Unsupervised Feature Learning for Writer Identification and Writer Retrieval

Vincent Christlein, Martin Gropp, Stefan Fiel, Andreas MaierarXiv 2017 · DOI

This paper presents a clever workaround for one of the biggest headaches in document analysis: the lack of massive, labeled datasets for historical handwriting. By combining "old school" computer vision (SIFT) with "new school" deep learning (ResNet), the authors demonstrate that you don't actually need human-labeled data to train a state-of-the-art writer identification system.

TL;DR

The authors propose an unsupervised method to learn powerful handwriting features by using clustered SIFT descriptors as "surrogate labels" to train a deep Residual Network (ResNet). This approach outperforms both traditional handcrafted features and supervised deep learning methods on historical document benchmarks, proving that the network can learn to identify scribes without ever being told who wrote what.

What Problem Does This Paper Address?

Deep Convolutional Neural Networks (CNNs) are the gold standard for image tasks, but they are notoriously data-hungry. In fields like paleography (the study of ancient writing), we rarely have the luxury of thousands of labeled examples per writer. Furthermore, in writer identification, the "classes" (writers) you see during training are completely different from the ones you encounter during testing.

Traditional methods often rely on handcrafted features like SIFT or Zernike moments. While robust, these don't always capture the nuanced "texture" of a specific scribe's hand as well as a deep network might. The challenge is: How do we train a deep network to learn these nuances when we don't have enough labels?

Methods

The core innovation is the use of surrogate classes for unsupervised feature learning. The pipeline works as follows:

  1. Keypoint Extraction: They use SIFT to identify "blobs" of interest (ink strokes) and extract $32 \times 32$ image patches around them.
  2. Clustering (The "Aha!" Moment): Instead of using writer IDs as labels, they cluster the SIFT descriptors of the training set using k-means. Each cluster index (e.g., Cluster #42) becomes a pseudo-label or "surrogate class."
  3. CNN Training: They train a ResNet-20 to classify the $32 \times 32$ patches into these surrogate classes. This forces the network to learn visual features that are discriminative enough to reconstruct the SIFT-based clusters.
  4. Feature Extraction: Once trained, they discard the final classification layer. The activations from the penultimate layer serve as the new, learned local descriptors.
  5. Global Encoding: These local descriptors are aggregated into a single global vector for the entire document page using m-VLAD (multiple codebook Vector of Locally Aggregated Descriptors).
  6. Refinement: To further boost performance, they use Exemplar SVMs (E-SVM). At query time, the system treats the query image as the sole positive sample and the entire training set as negatives, learning a custom weight vector that acts as a highly specific feature encoder.
Fig. 1: Overview of the unsupervised feature learning. At SIFT keypoint locations, SIFT descriptors and image patches are extracted. The cluster indices of the clustered SIFT descriptors represent the targets and the corresponding patches as input for the CNN training.

Datasets

The method was evaluated on two major historical benchmarks:

  • Historical-WI (ICDAR 2017): A competition dataset for writer identification containing 3,600 test images from 720 different writers, spanning the 13th to 20th centuries.
  • CLaMM16 (ICFHR 2016): A dataset of 3,000 images of medieval Latin scripts (dated 500–1600 CE) used for script type classification (e.g., Carolingian, Gothic).

Key Insights and Ideas

  • Unsupervised > Supervised: Surprisingly, training on SIFT clusters (unsupervised) yielded better results than training on actual writer labels (supervised). This suggests that SIFT clusters provide a more granular and transferable set of "visual primitives" for handwriting than the broad category of a single writer's hand.
  • Binarization is Beneficial: The authors found that training on binarized (black and white) patches resulted in better feature representations than grayscale, likely because it removes background noise and focuses the network purely on stroke morphology.
  • Robustness to Cluster Count: The system is remarkably robust to the number of surrogate classes. As shown in Figure 3, performance plateaus after about 1,000 clusters, with 5,000 being the sweet spot.
Fig. 3: Evaluation of the number of surrogate classes (clusters) using the Historical-WI test data.

Key Results

  • Writer Identification: On the Historical-WI dataset, the proposed method (Cl-S) achieved a Top-1 accuracy of 88.6% and a Mean Average Precision (mAP) of 74.8%, significantly outperforming previous state-of-the-art methods like SIFT+Fisher Vectors (62.2% mAP).
  • E-SVM Boost: Adding the Exemplar SVM stage pushed the mAP even higher to 76.2%.
  • Script Classification: On CLaMM16, the method achieved 84.1% accuracy, slightly edging out the competition winner (83.9%).

Limitations and Future Work

  • Non-Text Elements: The authors noted that historical documents often contain decorations or illuminations. Since the current method doesn't segment text, these non-text elements can "pollute" the feature learning process.
  • Granularity: Future work could involve evaluating features from single handwritten lines rather than full paragraphs to better understand the impact of inter-linear spacing.
  • Pipeline Integration: The authors suggest that since VLAD encoding itself relies on cluster memberships, the CNN's final layer (the predicted cluster) could potentially be integrated directly into the encoding pipeline for better efficiency.

Summary updated

BibTeX
@misc{christlein2017unsupervised,
  author = {Vincent Christlein and Martin Gropp and Stefan Fiel and Andreas Maier},
  title = {{Unsupervised Feature Learning for Writer Identification and Writer Retrieval}},
  year = {2017},
  eprint = {1705.09369},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1705.09369},
}

Loading related content...

Figure