Diff-Oracle: Diffusion Model for Oracle Character Generation with Controllable Styles and Contents

Jing Li, Qiu-Feng Wang, Kaizhu Huang, Rui Zhang, Siyuan WangarXiv 2023 · DOI

Abstract

Deciphering Oracle Bone Script (OBS) is crucial for understanding ancient Chinese history, yet researchers face a severe scarcity of labeled data due to the weathered nature of the artifacts and the specialized knowledge required for annotation. This paper introduces Diff-Oracle, a novel generative framework based on controllable diffusion models designed to synthesize high-quality, realistic OBS images. By utilizing a dual-encoder architecture for style and content, Diff-Oracle generates diverse character samples that significantly enhance automated recognition systems. Experimental results demonstrate that data augmentation with Diff-Oracle achieves a state-of-the-art accuracy of 84.62% on zero-shot character classes, effectively addressing the "data desert" in ancient script research.

Introduction

Oracle bone script, dating back approximately 3,500 years, represents the earliest mature writing system in China. Despite its historical significance, the field suffers from a lack of large-scale, high-quality datasets. Inscriptions are typically found on weathered turtle shells or animal bones, leading to images characterized by noise, fractures, and missing components.

Ancient Oracle Bone Script inscribed on a turtle shell, illustrating the weathered and complex nature of the source material.

Existing datasets are small because collecting and annotating these ancient inscriptions requires rare expert knowledge. Furthermore, traditional data augmentation methods like GANs often struggle with training instability or "mode collapse," failing to capture the diverse writing styles and complex glyph structures needed to train robust AI recognition models.

Methodology

Diff-Oracle leverages the Stable Diffusion architecture, customized with two specialized encoders to handle the unique constraints of ancient scripts:

  1. Style Encoder: Since describing the specific texture or stroke thickness of a 3,000-year-old rubbing using natural language is difficult, the authors designed a style encoder. It uses a pretrained CLIP model to extract "style prompts" directly from existing scanned images, converting visual style into a text-embedding format.
  2. Content Encoder: To ensure the generated character represents the correct word, a content encoder extracts structural details (glyphs) from reference images.

Training follows a two-stage strategy: first optimizing style components, then training the content encoder while freezing style parameters. To overcome the lack of pixel-level paired training data, the authors employed Contrastive Unpaired Translation (CUT) to generate "pseudo-handprinted" versions of scanned rubbings to serve as training pairs.

Experimental Results

The framework was evaluated on datasets including OBC306 (306 classes, including zero-shot samples) and Oracle-241. Diff-Oracle demonstrated superior performance in both visual realism and recognition utility.

Comparison of modern Chinese characters, scanned oracle characters, handprinted versions, and the high-quality outputs generated by Diff-Oracle across different semantic classes.

Key Findings

  • Generation Quality: Diff-Oracle achieved significantly lower Fréchet Inception Distance (FID) scores compared to GAN-based baselines, indicating higher realism and diversity.
  • Recognition Accuracy: Incorporating generated images into the training set resulted in a 7.70% accuracy improvement for zero-shot classes on the OBC306 dataset.
  • State-of-the-Art Performance: The model established a new benchmark of 84.62% accuracy for recognizing unseen oracle characters, setting a new standard for the field.

Conclusion and Future Work

Diff-Oracle provides a robust solution for synthesizing rare ancient scripts, bypassing the need for subjective human descriptions of style. While current models do not fully account for the geometric discrepancies between idealized handprints and scanned rubbings distorted by physical bone surfaces, future work aims to incorporate deformable components. This will allow the model to simulate natural warping, leading to even more realistic training data for historians and linguists.

Summary updated

BibTeX
@misc{li2023diff,
  author = {Jing Li and Qiu-Feng Wang and Kaizhu Huang and Rui Zhang and Siyuan Wang},
  title = {{Diff-Oracle: Diffusion Model for Oracle Character Generation with Controllable Styles and Contents}},
  year = {2023},
  eprint = {2312.13631},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.13631},
}
Figure