SB
articles
Publication · Computer vision EUVIP · 2019 · 8 min read

Detecting handwriting anomalies with a convolutional autoencoder

Detecting that a portion of handwritten text was written by another hand — without any annotation, without a separate training set. Rather than recognising characters, I learn the **style** of a writer via a convolutional autoencoder, and let anomalies betray themselves as outliers.

The problem

A stylistic signature without a ground truth

Graphology relies on fine-grained measures: extent of vertical strokes above and below the baseline, letter slope, closure of "o" letters, roundness of curves. But these criteria differ from one writer to another — there is no absolute reference.

Problem setting: one sample of text, possibly containing an anomaly (a portion written by another hand), no annotation, no separate training and test sets. This is fully unsupervised outlier detection, where the algorithm has to learn an appropriate metric on its own.

Pipeline

From image to anomaly signal

1
Text image
baseline detected
2
Tile split
local tiles
3
Radon π/2
partial projection
4
Conv autoencoder
reconstruction
5
Error
anomaly score
Approach

Learned style, self-revealing anomaly

The idea: do not recognise characters. Instead, learn global stylistic features (shape, slope, closure) directly, and let whatever does not match flag itself.

  • Tile splitting: the text image is cut into tiles aligned on the baseline (detected by classic image processing). Each tile holds a local portion of writing.
  • Partial Radon transform on tiles (over a π/2 range): captures stylistic variations (slope, thickness, curvature) in a more abstract space than pixels — which makes the method robust to size and position shifts.
  • Convolutional autoencoder: learns to reconstruct the Radon projections of tiles. Outlier tiles reconstruct poorly — the reconstruction error becomes the anomaly score.
  • Training trick: at every epoch, tiles are shuffled across batches. Outliers, which reconstruct poorly, are discarded or flagged as epochs progress. Discrimination emerges during training, not after.
Results

What the method delivers

Label-free detection

No outlier annotation is needed. The method is fully unsupervised, in contrast with classical classification approaches that require a reference set per writer.

Spatial localisation

Outliers are not just detected as "present or absent": they are localised in the image (which area of the text is suspicious), thanks to tile granularity.

Robust to benign variation

Natural variations from a single writer (fatigue, ink, posture) still reconstruct well through the autoencoder. Only true stylistic variations (a different hand) stand out.

Validation on synthetic compositions

Tested on handwritten extracts where snippets from other writers are injected — the method isolates and locates the injected portions.

My contribution

What this publication brings

  • Reframing the graphology problem: moving from hand-crafted measures (extents, slope, closure) to a learned representation via a deep network.
  • Repurposing batch-to-batch shuffling: a standard training mechanism turned into a discrimination tool, without changing the architecture.
  • Unsupervised detection + localisation: combining both is rare in outlier detection — most methods only output a global score, not a map.
  • Transferable methodology: applicable to other unsupervised detection tasks where the anomaly is rare (intrusion detection, forgery detection, fraud).
More

Venue & context

  • Published at EUVIP 2019 (European Workshop on Visual Information Processing).
  • Work carried out during my research master's at MIA Laboratory · University of La Rochelle.
  • Keywords: deep learning, handwriting, outlier detection, convolutional autoencoder, Radon transform.