ProtoSnap: Prototype Alignment For Cuneiform Signs

Rachel Mikulinsky, Morris Alper, Shai Gordin, Enrique Jiménez, Yoram Cohen, Hadar Averbuch-Elor

TL;DR

ProtoSnap is an unsupervised alignment tool that "snaps" idealized cuneiform font skeletons onto messy, real-world photographs of ancient clay tablets. By recovering the fine-grained internal structure of these signs, the method enables the creation of high-quality synthetic training data, nearly doubling classification accuracy for rare ancient signs.

What Problem Does This Paper Address?

Cuneiform is one of the world's oldest writing systems, consisting of complex wedge-shaped impressions in clay. For Assyriologists, the way a sign is written (its paleography) is just as important as what the sign says, as stroke variations reveal historical developments and cultural shifts.

Complex cuneiform tablet tracing

However, automating this analysis is incredibly difficult. Ancient tablets are often weathered, broken, or photographed under poor lighting. Existing AI approaches typically treat cuneiform signs as simple categories (e.g., "this is the sign for 'king'"), ignoring the internal configuration of the strokes. This "black box" approach fails to capture the nuances of handwriting and struggles with rare signs where training data is scarce.

Methods

The authors introduce ProtoSnap, a multi-stage unsupervised pipeline that aligns a "prototype" (a digital font version of a sign) to a target photograph.

  1. Feature Extraction (DIFT): Since standard computer vision models are trained on natural images (cats, cars, etc.), they perform poorly on clay tablets. The authors fine-tune Stable Diffusion on cuneiform scans and use Diffusion Iterative Feature Testing (DIFT) to extract deep, semantically meaningful features.
  2. Global Alignment: The system identifies "best-buddy" correspondences—pairs of regions in the prototype and the photo that are mutual nearest neighbors in feature space. It then uses RANSAC to fit a global affine transformation, roughly placing the prototype over the sign.
  3. Local Refinement (The "Snap"): This is the core innovation. Each individual stroke in the sign's skeleton is treated as a deformable object. The system optimizes a per-stroke projective transformation using a composite loss function:
  4. Featural Similarity: Matches the stroke to the most similar region in the photo.
  5. Saliency: Encourages strokes to align with actual "written" areas of the clay.
  6. Regularization: Prevents the strokes from deforming so much that they lose their original identity.
Skeleton snapped to a cuneiform sign

Datasets

  • eBL Dataset: Used for initial fine-tuning, containing nearly 35,000 cuneiform sign images.
  • New Expert Benchmark: The authors curated a new test set of 272 images across 25 sign types, manually annotated by expert archaeologists. This serves as a ground-truth "gold standard" for stroke alignment.
  • JOCCH Dataset: Used to test the model’s ability to generalize to the Hittite language, which was not seen during training.

Key Insights and Ideas

  • Generative Models as Priors: Instead of training a regressor to find strokes, the authors leverage the "knowledge" inside a fine-tuned generative model to understand what a cuneiform wedge should look like.
  • Structure Over Labels: The paper argues that for low-resource languages, structural information (skeletons) is more valuable than categorical labels. By "snapping" a skeleton to a real image, they can generate infinite, structurally correct synthetic variations using ControlNet.
  • Zero-Shot Generalization: Because the method relies on geometric alignment and general cuneiform features rather than memorizing specific signs, it can align signs it has never seen before, provided a font prototype exists.

Key Results

  • Superior Alignment: ProtoSnap achieved an F1@20 score of 27.14%, significantly outperforming generic correspondence baselines like DINOv2 (16.12%) and SIFT (2.56%).
  • OCR Boost: The most dramatic result was in sign recognition. By using ProtoSnap to generate synthetic training data, the authors improved classification accuracy for rare signs from 25.84% to 53.17%.
  • Expert Approval: In a survey of 12 Assyriologists, experts were twice as likely to prefer the ProtoSnap-aligned overlays for identifying difficult signs compared to unaligned versions.

Limitations and Future Work

While powerful, ProtoSnap has its hurdles:

  • Prototype Dependency: The method requires a font prototype that is reasonably close to the target. If a scribe used a radically different regional variant (allograph), the "snap" might fail.
  • Extreme Damage: Very weathered tablets where the 3D relief of the wedges is lost remain a challenge for 2D photograph-based methods.
  • Confidence Metrics: The authors note that the system currently lacks a way to "know when it's wrong," suggesting that future work should focus on calculating a confidence score to flag failed alignments for human review.

Ultimately, ProtoSnap represents a significant step toward "digital paleography," moving beyond simple text recognition to a deeper understanding of how ancient hands moved across clay.

Summary updated

BibTeX
@inproceedings{mikulinsky2025protosnap,
  author = {Rachel Mikulinsky and Morris Alper and Shai Gordin and Enrique Jiménez and Yoram Cohen and Hadar Averbuch-Elor},
  title = {{ProtoSnap: Prototype Alignment For Cuneiform Signs}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=XHTirKsQV6},
}
Figure