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

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

Abstract

Oracle Bone Inscriptions (OBIs) represent the earliest known form of Chinese writing, providing invaluable insights into ancient history. However, the development of automated recognition systems is severely hampered by the extreme long-tail distribution of existing datasets, where rare characters lack sufficient training samples. This paper introduces Oracle-P15K, a large-scale, expert-annotated dataset comprising 14,542 structure-aligned image pairs that bridge the gap between clean character glyphs and noisy ancient rubbings. Alongside this dataset, we propose OBIDiff, a specialized diffusion model that disentangles character structure from weathering styles. By leveraging a novel masking mechanism during training, OBIDiff enables the generation of highly realistic and controllable OBI images. Our experiments demonstrate that data augmentation with OBIDiff significantly improves recognition accuracy for minority classes and provides a robust benchmark for OBI denoising tasks.

Introduction

Oracle Bone Inscriptions (OBIs) date back over 3,000 years to the Shang Dynasty. As the progenitor of modern Chinese characters, they are essential for historical and linguistic research. Despite their importance, the digitization and automated recognition of OBIs face a significant hurdle: the "long-tail" problem. In standard datasets like OBC306, the distribution of character samples is highly imbalanced. A few common characters have thousands of samples, while the vast majority—the "tail"—have fewer than ten, or even just two. This imbalance causes deep learning models to overfit on common classes and fail on rare ones.

Overview of the Oracle-P15K dataset and the OBIDiff framework for addressing long-tail distribution in OBI recognition.

To address this, researchers have turned to generative AI to synthesize training data for rare characters. However, generating realistic OBIs is non-trivial. It requires combining the precise structural semantics of a character (the glyph) with the complex, non-uniform weathering of ancient bone (the style). Training such models requires large-scale, paired datasets—clean glyphs perfectly aligned with real-world rubbings—which were non-existent due to the high level of expertise required for annotation.

The Oracle-P15K Dataset

The primary contribution of this work is the creation of Oracle-P15K, the first large-scale, structure-aligned OBI dataset. The authors sampled real rubbings from the OBC306 dataset, covering four prevalent noise types: stroke-broken, bone-cracked, edge noise, and dense white regions. To create the corresponding clean glyphs, OBI experts used digital tablets to meticulously trace the characters, ensuring that every stroke was both historically accurate and perfectly aligned with the original rubbing.

The three-stage pipeline for creating Oracle-P15K: source content collection, expert-led glyph creation using digital tools, and rigorous quality control.

The resulting dataset contains 14,542 pairs across 239 classes. Unlike previous datasets, Oracle-P15K is distribution-balanced, providing a high-quality foundation for training generative models and evaluating denoising algorithms. The expert-guided quality control process involved multiple rounds of revision to ensure character completeness and stroke correctness, making it a gold-standard resource for the field.

OBIDiff: Controllable OBI Generation

To synthesize new OBI samples, the authors developed OBIDiff, a conditional diffusion model built upon the Stable Diffusion framework. OBIDiff utilizes two distinct encoders to process input:

  1. Glyph Encoder: This component extracts the structural semantics from a clean input character image, ensuring the generated output maintains the correct historical form.
  2. Style Encoder: Recognizing that ancient weathering is too complex for text prompts, the authors used a CLIP-based image encoder. This allows the model to extract latent style embeddings directly from a reference rubbing, capturing the unique "texture" of the bone.

A critical innovation in OBIDiff is the "Masking Trick." During training, the model is presented with a clean glyph and a noisy rubbing of the same character. To prevent the model from simply copying the rubbing (a form of "cheating" that hinders learning), the authors applied a bounding-box mask over the character in the style image. This forces the diffusion process to derive the character's structure solely from the glyph encoder while learning the background texture and noise patterns from the unmasked portions of the style image.

Experimental Results

The effectiveness of Oracle-P15K and OBIDiff was evaluated across several benchmarks:

  • Generation Quality: OBIDiff achieved a Fréchet Inception Distance (FID) of 72.8 in zero-shot generation, significantly outperforming general-purpose models like ControlNet (FID 100.0).
  • Recognition Accuracy: When used to augment training data for rare characters, OBIDiff-generated images led to a zero-shot recognition accuracy (Acc@1) of 78.77%. This represents an 8.72% improvement over augmentation with ControlNet, proving that the realism of the generated data directly translates to better model performance.
  • Denoising and Restoration: The dataset also serves as a benchmark for OBI denoising. Models trained on Oracle-P15K learned to remove noise while preserving delicate strokes, leading to a 4.70% boost in downstream recognition accuracy compared to models trained on less realistic data.
  • Human Perception: In a blind study, participants were unable to reliably distinguish between real rubbings and OBIDiff-generated images, with a success rate of only 52%—effectively a random guess.

Conclusion and Future Work

This research provides a comprehensive solution to the long-tail distribution problem in OBI recognition. By combining the expert-curated Oracle-P15K dataset with the specialized OBIDiff model, the authors have enabled the generation of high-quality, realistic training data for rare ancient characters. While the current pipeline requires a manual glyph input for new characters, it significantly reduces the overall labor required for dataset expansion. Future work will focus on automating glyph generation and developing methods to safeguard historical records against AI-generated misinformation.

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