Stroke-Based Autoencoders: Self-Supervised Learners for Efficient Zero-Shot Chinese Character Recognition

Zongze Chen, Wenxia Yang, Xin Li

TL;DR

This paper introduces Stroke-Based Autoencoders (SAEs), a novel self-supervised learning approach for Chinese character recognition. By reconstructing stroke sequences, SAEs effectively capture the intricate morphological and spatial information of characters, leading to significant improvements in zero-shot recognition and richer character embeddings.

What Problem Does This Paper Address?

Chinese characters are rich in morphological and semantic information, making them ideal for applications like zero-shot character recognition (recognizing characters not seen during training) and generating better word embeddings for NLP tasks. However, existing methods often rely on radical or stroke-level decomposition, which struggle to fully capture the structural and spatial nuances of characters. This can lead to issues like class imbalance and an inability to represent the full complexity of character formation. The paper aims to address this by developing a self-supervised method that learns character structure directly from stroke sequences, avoiding manual decomposition and leveraging the inherent order of character writing.

Methods

The core of this work is the Stroke-Based Autoencoder (SAE). The SAE is a self-supervised learning model designed to reconstruct stroke image sequences of Chinese characters. It consists of two main components:

  • Encoder: This part processes input Chinese character images, breaking them down into patches and encoding them to capture their structural information. The paper proposes two encoder architectures:
  • Vision Transformer (ViT)-based: This architecture is applied to image patches of characters, treating the stroke sequence as a series of inputs. It's particularly suited for tasks where a single input image can predict the sequence.
  • ResNet and Transformer-based: This architecture treats the stroke sequence as a sentence, with each image being a "word." It's designed for sequence-to-sequence tasks and uses ResNet for feature extraction and Transformers for decoding.
  • Decoder: This component takes the encoded representations and reconstructs the original stroke sequence images.

The SAE is pre-trained using a self-supervised objective: reconstructing the stroke sequence of a character given its image. This allows the model to learn generalizable representations of character morphology without explicit labels.

For specific tasks, the pre-trained SAE is then fine-tuned:

  • Zero-Shot Chinese Character Recognition: The SAE is fine-tuned on existing stroke-based methods. A novel aspect here is how it handles "confusable sets" (characters with identical stroke sequences) by incorporating a similarity calculation between input and reference character embeddings.
  • Semantic Enhancement: The SAE is used to generate richer word embeddings by leveraging the learned morphological features.

Datasets

The paper utilizes several datasets:

  • Pre-training:
    • 3755 printed Chinese characters from Hanzi Writer [39]. This dataset provides stroke sequence images in two forms: one where each subsequent image contains previous stroke information, and another where each image contains only individual strokes.
  • Fine-tuning and Evaluation:
    • HWDB1.0-1.1 [40]: A large dataset of offline handwritten Chinese character images (2,678,424 images, 3881 classes) used for training.
  • ICDAR2013 [41]: A dataset of offline handwritten Chinese character images (224,419 images, 3755 classes) used for validation.
  • Printed artistic fonts: 105 printed artistic fonts for 3755 characters (394,275 samples) collected by Chen et al. [1] were also used.

Key Insights and Ideas

  • Stroke Sequence as a Rich Representation: The paper demonstrates that modeling Chinese characters as sequences of stroke images, rather than just radicals or individual strokes, captures crucial structural and spatial information that was previously overlooked.
  • Self-Supervision for Morphology: Self-supervised learning, specifically through stroke sequence reconstruction, is highly effective for learning the intricate morphology of Chinese characters without requiring extensive manual annotation.
  • Transfer Learning Power: A model pre-trained on a relatively small dataset of printed characters can significantly boost performance on large, complex datasets of handwritten characters, highlighting the generalizability of the learned representations.
  • Handling Ambiguity: The proposed method for zero-shot recognition effectively addresses the "one-to-many" problem of identical stroke sequences mapping to multiple characters by incorporating a similarity-based disambiguation step.
  • Dual-Architecture Approach: The paper successfully tailors two SAE architectures (ViT-based and ResNet/Transformer-based) to different forms of stroke image data and tasks, showcasing flexibility and optimized performance.

Key Results

  • Zero-Shot Recognition: The proposed SAE model, when fine-tuned, outperforms previous state-of-the-art methods on zero-shot Chinese character recognition tasks. For instance, on printed artistic fonts with 2755 seen classes, the SAE achieved 68.88% accuracy, significantly higher than DenseRAN (24.80%) and HDE (51.41%).
  • Handwritten Recognition: The pre-trained SAE also shows impressive performance on handwritten characters. With 2755 seen classes, the SAE achieved 40.22% accuracy, outperforming Stroke-based methods (37.91%).
  • Semantic Enhancement: The learned embeddings from the SAE exhibit higher cosine similarity between Chinese characters and their radical parts, indicating that the model effectively captures morphological relationships.
  • Reconstruction Accuracy: The pre-training stage demonstrates strong reconstruction capabilities, with validation losses significantly reduced by data augmentation.

Limitations and Future Work

  • Dataset Dependency: The SAE's reliance on stroke image sequences means that migrating the model to ancient Chinese characters or other hieroglyphs requires the availability of corresponding stroke sequence data, which can be challenging to obtain.
  • Reliance on Existing Methods: As a pre-training method, the SAE's performance in zero-shot recognition is somewhat dependent on the effectiveness of the fine-tuning methods it's combined with.
  • Future Work: The authors suggest exploring the migration of their model to other hieroglyphic scripts and facilitating related Chinese NLP tasks. Further exploration into replacing image representations with other methods or the Five-Stroke method is also mentioned as a potential avenue.

Summary updated

BibTeX
@inproceedings{chen2023stroke,
  author = {Zongze Chen and Wenxia Yang and Xin Li},
  title = {{Stroke-Based Autoencoders: Self-Supervised Learners for Efficient Zero-Shot Chinese Character Recognition}},
  booktitle = {Applied Sciences},
  year = {2023},
  doi = {10.3390/app13031750},
}
Figure