Mitigating Long-tail Distribution in Oracle Bone Inscriptions: Dataset, Model, and Benchmark

Jinhao Li, Zijian Chen, Runze Jiang, Tingzhu Chen, Changbo Wang, Guangtao Zhai

TL;DR

This paper introduces Oracle-P15K, the first large-scale, structure-aligned dataset for Oracle Bone Inscriptions (OBIs) featuring expert-annotated glyph pairs. Alongside the dataset, the authors present OBIDiff, a controllable diffusion-based generative model designed to synthesize realistic OBI rubbings, effectively mitigating the severe long-tail distribution problem that plagues ancient text recognition.

What Problem Does This Paper Address?

Oracle Bone Inscriptions (OBIs) carved on animal bones and turtle shells represent the earliest evidence of Chinese writing. Modern machine learning models hold immense promise for deciphering and recognizing these characters, but they face a massive roadblock: a severe long-tail distribution problem. For instance, in popular datasets, the most common character class might have over 51,000 samples, while the rarest has only two.

While generative data augmentation (like GANs or standard diffusion models) could theoretically synthesize training data for these rare classes, existing OBI datasets lack structure-aligned image pairs—meaning clean, black-and-white character outlines perfectly mapped to their weathered, noisy, real-world rubbing counterparts. Without precise alignment, generative models tend to alter or hallucinate strokes, which is unacceptable for precise historical and linguistic analysis.

Methods

The authors tackle this challenge with a two-pronged approach: a rigorous data collection pipeline and a novel conditional diffusion architecture.

1. Dataset Construction Pipeline

To build Oracle-P15K, the authors collected real OBI rubbing images showing four common types of degradation: broken strokes, cracked bones, edge noise, and dense white regions. OBI experts then manually traced clean, structure-aligned glyphs using digital calligraphy brushes. To guarantee quality, the dataset underwent strict human verification and an automated Intersection-over-Union (IoU) filtering process, ensuring a mean IoU alignment score of 0.865.

Figure 2: Construction pipeline of our Oracle-P15K. Step-1: We focus on four types of noise in OBI rubbings and take them as targets for source content sampling. Step-2: OBI experts are invited to create glyph images manually. Step-3: We conduct a post-quality examination to ensure the reliability and alignment of OBI image pairs.

2. OBIDiff: Controllable Pseudo-OBI Generator

Built upon ControlNet and Stable Diffusion, OBIDiff takes a clean glyph image and a target rubbing-style image to generate a realistic, weathered OBI character.

  • The Innovation: During training, because the style image naturally contains the same character as the glyph image, standard models tend to simply "copy-paste" the character from the style image rather than learning to generate it. To force the model to decouple style from structure, the authors introduced a masking mechanism that blanks out the glyph region within the style image during training. This forces the style encoder (leveraging a CLIP image encoder and a linear alignment layer) to learn pure texture and noise characteristics independently of the character's shape.

Datasets

The paper utilizes and introduces the following datasets:

  • Oracle-P15K (New): Contains 14,542 structure-aligned image pairs across 239 classes. It features a perfectly balanced training/validation split (60 samples per class) to prevent model bias.
  • OBC306: A large-scale OBI dataset used as the source for the style images and for evaluating downstream recognition tasks on rare tail classes.
  • RCRN: An existing, much smaller structure-aligned dataset used strictly as a baseline comparison for OBI denoising tasks.

Key Insights and Ideas

  • Disentangling Style via Masking: The "aha" moment of the architecture is the realization that generative models cheat when trained on paired style-structure data. Masking the character out of the style image forces the network to truly learn the domain noise (weathering, stone texture, ink bleeding) rather than shortcutting the task.
  • Bridging the Domain Disparity: Clean handprinted OBI characters look vastly different from real rubbings. OBIDiff acts as a bridge, allowing researchers to take clean, easily written digital glyphs and realistically "age" them by thousands of years to match authentic archaeological findings.
  • Dual-Purpose Utility: A structure-aligned dataset built for generation inherently serves as a gold standard benchmark for the inverse task: denoising (restoring damaged ancient texts).

Key Results

  • Superior Generation Quality: OBIDiff outperformed generic and specialized baselines (including ControlNet, AGTGAN, and STSN) across all low-level vision metrics (L1 Loss, RMSE, PSNR, SSIM, LPIPS, and FID) by a large margin.
  • Downstream Recognition Boost: Using OBIDiff to augment rare classes directly improved downstream OBI recognition accuracy. For zero-shot classes, OBIDiff improved Top-1 accuracy by 8.72% over standard ControlNet and 7.54% over STSN.
  • Fooling the Experts: In a user preference study involving 15 students majoring in Chinese language and literature, participants were asked to distinguish real rubbings from OBIDiff-generated images. The human F1 score was 0.53—indicating the generated images were practically indistinguishable from a random guess.

Limitations and Future Work

Despite its success, the authors note two primary limitations:

  1. Manual Input Dependency: The pipeline still requires a clean, handprinted glyph image as a structural guide, which demands initial manual effort from an expert.
  2. Bounding Box Inconsistencies: During inference, if the bounding box of the target style image doesn't align well with the input glyph, the masking mechanism can occasionally obscure critical style information, leading to occasional generation failures. Future work will look into automating bounding box alignment to enable fully automated, large-scale generation.

Summary updated

BibTeX
@inproceedings{li2025mitigating,
  author = {Jinhao Li and Zijian Chen and Runze Jiang and Tingzhu Chen and Changbo Wang and Guangtao Zhai},
  title = {{Mitigating Long-tail Distribution in Oracle Bone Inscriptions: Dataset, Model, and Benchmark}},
  booktitle = {ACM Multimedia},
  year = {2025},
}
Figure