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