Evaluation protocols for historical script classification: the cost of manuscript-level leakage and the role of soft labels

Daniil I. Naryzhnyi, Roman A. Popkov, Daniil A. BakalinarXiv 2026

This paper, titled "Evaluation protocols for historical script classification: the cost of manuscript-level leakage and the role of soft labels," provides a sobering reality check for the field of digital paleography. It investigates why script classification models that appear nearly perfect in the lab often fail when faced with a new, unseen manuscript.

TL;DR

The authors demonstrate that "data leakage"—testing models on different pages of manuscripts they have already seen during training—inflates accuracy by over 40 percentage points. By implementing more rigorous evaluation protocols and using expert "soft labels," they show how to build models that are better calibrated and more aligned with human expert judgment, even if they aren't necessarily more "accurate" in a traditional sense.

What Problem Does This Paper Address?

In digital paleography, researchers use Convolutional Neural Networks (CNNs) to classify the script type of historical documents (e.g., distinguishing between Ashkenazi and Sephardic styles). However, many standard evaluation protocols allow for manuscript-level leakage.

If a model is trained on Page 1 of Manuscript A and tested on Page 2 of the same manuscript, it might not be learning the script. Instead, it might be learning the unique background texture of the parchment, the specific ink color, or the idiosyncratic quirks of a single scribe. This leads to a "performance cliff" when the model is finally asked to classify a completely new manuscript. The authors set out to quantify this "cost of leakage" and explore whether soft labels (probabilistic distributions provided by experts) can mitigate the resulting model overconfidence.

Methods

The researchers compared several training and evaluation strategies using ResNet50 and ResNet18 architectures:

  • Splitting Protocols: They compared a "naive" page-level split (where pages from the same manuscript appear in both training and testing) against a "grouped" manuscript-level split (where a manuscript is either entirely in training or entirely in testing).
  • Hard vs. Soft Labels: They compared standard "hard" labels (e.g., "This is 100% Sephardic Square") against "soft" labels derived from expert assessments (e.g., "This is 70% Sephardic Square and 30% Sephardic Cursive").
  • Binarization: They tested whether removing the background (converting images to pure black and white ink) could stop the model from "cheating" by looking at parchment texture.
  • Calibration Metrics: They used Expected Calibration Error (ECE) to measure how well a model’s confidence matches its actual accuracy.

Datasets

The study utilizes the VML-HP-ext dataset, which consists of:

  • 715 page images.
  • 171 medieval Hebrew manuscripts.
  • 14 distinct script classes.
  • Expert-provided "soft" profiles for each manuscript.

Key Insights and Ideas

  • The Background is a Crutch: Even on patches of a page with no writing, a model that has seen other pages of that manuscript can "guess" the correct script type 73% of the time. This proves the model is over-relying on non-textual cues like paper grain or scanning conditions.
  • Binarization isn't a Silver Bullet: While binarizing images (removing background) reduces the accuracy gap, a significant gap remains. This suggests the model also learns scribe-specific features (like letter spacing or stroke thickness) that don't generalize to the broader script category.
  • The Overconfidence Trap: On unseen manuscripts, models become "confidently wrong." The gap between confidence and accuracy (ECE) jumps from a negligible 0.065 to a massive 0.444.
  • Soft Labels for Nuance: Training on expert soft labels doesn't necessarily boost top-1 accuracy, but it makes the model's predictions much closer to the expert's nuanced view, especially for "transitional" scripts that sit between two categories.

Key Results

  • The Accuracy Drop: When moving from a leaked (page-level) split to a rigorous (manuscript-level) split, accuracy plummeted from 97% to 54%.
  • The Leakage Cost: The "cost of leakage" is quantified as 40 to 47 percentage points.
  • Calibration Gain: Using soft labels or temperature scaling significantly improved calibration at the patch level, though the benefits were harder to confirm at the manuscript level.
  • Expert Alignment: Soft labels reduced the divergence between the model and the expert by 22% to 30% on difficult, transitional pages.

Limitations and Future Work

The authors acknowledge a few key limitations:

  • Small Sample Size for Transitions: The analysis of "transitional" pages relied on only 16 manuscripts, making some statistical conclusions tentative.
  • Causal Mechanisms: While they identified that leakage happens, they haven't fully isolated exactly which visual cues (scribe hand vs. imaging conditions) are the primary drivers of the leakage after binarization.
  • Pipeline Differences: Their absolute accuracy on the blind test set (39%) was lower than the 52% reported by the original dataset creators, likely due to differences in patch extraction and training duration.

Future work should focus on measuring these effects on other languages (like Slavonic scripts) and developing methods to force models to ignore manuscript-specific "fingerprints" in favor of generalizable paleographic features.

Summary updated

Abstract

A paleographer applies a script type classifier to unseen manuscripts. We measure how much testing on other pages of training manuscripts inflates accuracy. On VML-HP-ext (715 pages, 171 Hebrew manuscripts, 14 script classes) we compare page-level and manuscript-level splits. Page-level accuracy drops from 97% to 54% (59% at manuscript level), and is 39% on the official blind test set. The gap of 40 to 47 percentage points (pp) at patch, page and manuscript level is statistically significant and reproduces with ResNet18; on binarized patches (ink and background only) it is 34 to 42 pp, also significant. On unseen manuscripts the model is overconfident: mean confidence 70% against 54% correct pages; patch-level expected calibration error (ECE, mean gap between confidence and accuracy) rises from 0.065 to 0.444. Binarization leaves patch-level overconfidence but cuts it markedly at page level. Confidence still helps triage: in the more confident half of pages 67% are correct, 41% in the rest. Training on expert soft labels showed no evidence of an accuracy difference, though a small page-level loss cannot be ruled out. The predicted distributions are closer to the expert's assessment. ECE is lower at patch level (0.21 to 0.31) and in most runs at page level, but not significantly at manuscript level. Label smoothing (blurring the label, no expert input) also lowers ECE but comes no closer to the expert. Temperature scaling (post-training confidence correction) helps significantly only at patch level. On 97 pages of 16 manuscripts with mixed expert assessment, soft labels cut divergence from the expert by 22 to 30% (significant in four of five runs); the point estimate of accuracy is 16.5 to 23.7 pp below hard labels, but with 16 manuscripts the loss can neither be confirmed nor ruled out. We propose recommendations for the evaluation protocol; code will be released with the paper
BibTeX
@misc{naryzhnyi2026evaluation,
  author = {Daniil I. Naryzhnyi and Roman A. Popkov and Daniil A. Bakalin},
  title = {{Evaluation protocols for historical script classification: the cost of manuscript-level leakage and the role of soft labels}},
  year = {2026},
  eprint = {2611.12969},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.12969},
}
Figure