Generating Synthetic Data with Diffusion Models for Writer Identification

Hamza Yazbeck, Marco Peer, Andreas FischerarXiv 2026

TL;DR

Can AI forge someone’s handwriting convincingly enough to train a better handwriting detective? Researchers used diffusion models to generate synthetic, writer-specific word images to boost Automated Writer Identification—and discovered a fascinating catch about what neural networks actually look at when they read ink on a page. While fake data supercharges models that look purely at stroke shapes (especially when real samples are scarce), it actually trips up models that rely on subtle grayscale ink textures.

What Problem Does This Paper Address?

Handwriting is a behavioral biometric: the loops of your l’s and the slant of your t’s are shaped by unique motor habits, making it possible to identify an author from just a single isolated word. This task—offline word-level Writer Identification (WI)—is invaluable for forensic analysts and historians piecing together ancient, unsigned manuscripts.

However, deep learning models are notoriously data-hungry, and we rarely have thousands of labeled words for a historical scribe or a forensic suspect. Earlier attempts to pad training sets with GAN-generated handwriting flopped because GANs made plausible-looking words that completely lost the specific identity of the writer. Recent diffusion models preserve personal style much better, raising a natural question: can we finally use synthetic handwriting to train sharper writer-identification systems, including on messy historical documents?

Methods

Instead of inventing a new architecture from scratch, the authors build a clever data-augmentation pipeline combining two established heavyweights: DiffusionPen (a few-shot latent diffusion generator) and GR-RNN (a state-of-the-art writer classifier).

Fig. 1: Overview of our approach. We first generate handwriting with Diffusion- Pen [12] that is style-conditioned by forwarding images of a specific writer. Then, we use the synthetic data to augment the training process of our WI model.
  1. Generating Stylized Forgeries: DiffusionPen uses a lightweight style encoder (trained with triplet loss to cluster same-writer samples together) alongside a character-level text encoder. To synthesize a new word for Writer A, the authors feed the generator five random reference images from Writer A, paired with a text prompt borrowed from Writer B’s vocabulary. This forces the generator to invent words Writer A hasn't actually written in the dataset, boosting diversity.
  2. Identifying the Writer: The real and synthetic word images are fed into GR-RNN, which extracts global word features alongside local "fragment" features, linking them sequentially with gated recurrent units to predict the author's ID.

Crucially, the authors systematically test this pipeline across different image representations—RGB, grayscale, and binarized (pure black-and-white)—as well as varying ratios of real-to-synthetic data.

Datasets

The authors evaluate their pipeline across two distinct eras of handwriting (using an 80/20 train/test split per writer):

  • CVL Dataset: A standard contemporary benchmark featuring 310 writers and 99,904 modern handwritten word images.
  • BullingerDB (Subset): A challenging, newly emerging historical dataset of 16th-century correspondence. Removing the 200 most prolific writers left a subset of 596 writers and 452,640 words. Because these historical figures wrote over many years with varying quills and aging hands, a single person's style naturally drifts over time.
Fig. 3: Real handwriting samples (top row) and generated samples (rows 2–4) for three different writers.

Key Insights and Ideas

  • The "Ink Shortcut" Phenomenon: When a classifier trained on real CVL data was asked to identify synthetic samples, it scored 78.19% accuracy on binarized images—but plummeted to 9.17% on grayscale! Why? Grayscale and RGB classifiers "cheat" by memorizing pen types, paper grain, and ink flow rather than pure motor habits. Because the diffusion model renders words in a generic digital ink, it fools grayscale detectors while faithfully preserving the black-and-white stroke geometry.
  • Format Dictates Utility: Because of that ink shortcut, adding synthetic grayscale data to real grayscale data actually hurts performance, whereas adding synthetic data to binarized images consistently helps. (Interestingly, training DiffusionPen on RGB images before binarizing the output yielded the best synthetic strokes.)
  • The "Dilution" Sweet Spot: More fake data isn't endlessly better. Accuracy climbs as you add synthetic samples up to 200% of the real dataset size, after which the synthetic distribution overwhelms and dilutes the real signal.
  • A Lifeline for Low-Resource Archives: The less real data you have, the more diffusion shines. When real training data is choked down to just 10–20%, models trained exclusively on synthetic words actually beat models trained on the real data alone.

Key Results

  • Binarized Gains: Augmenting real training data with synthetic words boosts Top-1 accuracy on binarized images by up to 1.2 percentage points on CVL (reaching 84.07% at 200% synthetic volume vs. 82.87% real-only) and 1.33 percentage points on the historical BullingerDB (78.62% vs. 77.29%).
  • Grayscale Dominance: Pure real-data grayscale still reigns supreme overall (94.29% on CVL; 88.04% on BullingerDB), precisely because real-world pen and ink cues are massive giveaways when available.
  • Low-Data Boosts: Cutting real CVL training data in half (50%) yields an approximate 6% accuracy boost when augmented; at just 20% real data, mixing in synthetic samples opens up a massive ~11 percentage point lead (and up to a 28% relative gain) over the real-only baseline.

Limitations and Future Work

The elephant in the room is that diffusion models currently fail to replicate the microscopic ink-and-pen textures that make grayscale writer identification so accurate; consequently, synthetic augmentation doesn't improve the highest-performing (grayscale) pipeline. Furthermore, flooding the model with too much synthetic data (>300%) degrades accuracy below the unaugmented baseline.

Looking ahead, the authors plan to explore broader diffusion architectures and test style interpolation—blending the style embeddings of existing writers to dream up entirely new, synthetic writer identities from scratch.

Summary updated

BibTeX
@misc{yazbeck2026generating,
  author = {Hamza Yazbeck and Marco Peer and Andreas Fischer},
  title = {{Generating Synthetic Data with Diffusion Models for Writer Identification}},
  year = {2026},
  eprint = {2611.37507},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.37507},
}
Figure