Knowledge-Enhanced Historical Document Segmentation and Recognition

En-Hao Gao, Yu-Xuan Huang, Wen-Chao Hu, Xin-Hao Zhu, Wang-Zhou DaiAAAI 2024

TL;DR

This paper introduces KESAR, a novel framework that enhances historical document segmentation and recognition by integrating expert knowledge with deep learning models. By leveraging Abductive Learning (ABL), KESAR effectively addresses the challenges of distorted images, vast character sets, and scarce labeled data, leading to significant improvements over existing state-of-the-art methods.

What Problem Does This Paper Address?

Analyzing historical documents presents a unique set of challenges for Optical Character Recognition (OCR) systems. Unlike modern documents, historical texts often feature distorted layouts, a much larger vocabulary of characters (sometimes exceeding 10,000), and a scarcity of meticulously labeled data. These issues make it difficult for standard deep learning-based OCR techniques, which rely heavily on large datasets, to achieve high accuracy. While human experts can effectively interpret these documents by drawing on their background knowledge, integrating this complex, often formalizable knowledge (like first-order logic rules) into deep learning models has been a significant hurdle due to the discrete nature of logical reasoning versus the continuous optimization of neural networks.

Methods

KESAR tackles these challenges through a three-stage learning process built upon the Abductive Learning (ABL) framework. ABL is a paradigm that bridges machine learning and symbolic reasoning by using abductive reasoning to revise machine learning model outputs based on a knowledge base.

  1. Segmentation with Structural Knowledge: The segmentation model is enhanced by incorporating structural knowledge about characters and text lines. This knowledge, expressed in First-Order Logic (FOL) rules (e.g., characters are square-shaped, characters in a line have similar aspect ratios), is used to refine pseudo-character bounding boxes generated by the model. Abductive reasoning corrects bounding boxes that are inconsistent with these rules, improving segmentation accuracy even with limited text-line level annotations.
  2. Recognition with Abductive Matching: To address the label scarcity for recognition, KESAR employs an "Abductive Matching" mechanism. This stage uses the knowledge base to generate more accurate character-level training data from text-line labels and predicted character bounding boxes. It aligns predicted character segments with ground-truth labels, even when the number of predicted segments doesn't perfectly match the ground truth, by leveraging abductive reasoning to infer correct pairings.
  3. Joint Optimization: This stage creates a feedback loop where knowledge learned by the recognition model (e.g., character glyph information) is used to further refine the segmentation model. Conversely, improved segmentation results provide better training data for the recognition model, leading to mutual enhancement of both components. An "Over-Segmentation and Recombination" (OSR) algorithm is introduced here to help the segmentation model leverage the recognition model's ability to differentiate characters.

Datasets

The paper evaluates KESAR on three historical document datasets:

  • TKH (Tripitaka Koreana): Contains both character and text-line annotations. A subset (600 images) was used for pre-training.
  • MTH (Ma et al.): Features text line distortions, intricate layouts, and occasional drawings. It has both character and text-line annotations, but only text-line annotations were used for evaluation. The dataset was split into training (70%) and testing (30%).
  • GBACHD (Greater Bay Area International Algorithm Case Competition): Described as the most challenging, with over 15,000 character categories, rare characters, variant forms, severe distortions, varying scales, and noise. It provides only text-line annotations. The dataset was split into training (1400 images) and testing.

Key Insights and Ideas

  • Bridging Logic and Learning: The core innovation is the effective integration of formal, symbolic knowledge (FOL rules) into deep learning pipelines for document analysis, overcoming the traditional difficulty of combining discrete reasoning with gradient-based optimization.
  • Abductive Learning as a Unifying Framework: ABL proves to be a powerful framework for handling data scarcity and incorporating prior knowledge, enabling models to learn from imperfect data and external constraints.
  • Knowledge for Segmentation: Structural knowledge about character shapes and text line regularity significantly improves segmentation accuracy, especially in challenging historical documents where precise bounding boxes are hard to obtain.
  • Abductive Matching for Recognition: The ability to infer correct character-label pairings even with mismatched segment counts is crucial for generating effective training data for the recognition model when only text-line labels are available.
  • Synergistic Joint Optimization: The feedback loop between segmentation and recognition models, facilitated by the OSR algorithm, leads to a significant performance boost for both, demonstrating the power of joint learning.

Key Results

  • Segmentation: KESAR (without joint optimization) achieved substantial improvements over baseline CRAFT on MTH and GBACHD datasets, with F-measures increasing by 3.6% and 6.0% respectively. When compared to state-of-the-art segmentation methods like PSENet and FCENet on MTH and GBACHD, KESAR achieved the highest F-measures (93.2% on MTH and 94.2% on GBACHD).
  • Recognition: KESAR demonstrated significant improvements in 1-N.E.D. (normalized edit distance) on MTH and GBACHD datasets, outperforming methods like RobustScanner and ABINet. For instance, on GBACHD, KESAR achieved 0.875 1-N.E.D., a substantial improvement over the initial performance and other methods.
  • Efficiency: The paper notes that KESAR maintains similar inference speeds to its baseline models, indicating that the knowledge integration does not introduce significant computational overhead.

Limitations and Future Work

  • Dataset Specificity: While KESAR shows strong performance, the effectiveness of the FOL rules is tied to the specific structural properties of historical documents (e.g., Chinese characters being square-shaped). Adapting these rules to different scripts or document types would be necessary.
  • Knowledge Base Construction: The paper relies on pre-defined FOL rules. Future work could explore methods for automatically learning or refining these knowledge bases from data, further enhancing the framework's adaptability.
  • Generalizability of Models: The paper uses ResNet-based models for segmentation and recognition. Future work could investigate replacing these with more advanced architectures to potentially achieve even higher performance.
  • Flexibility: The authors highlight KESAR's general-purpose nature, suggesting that the segmentation and recognition models can be swapped out, and the knowledge base modified for different application scenarios. This flexibility points towards broad applicability in various document analysis tasks.

Summary updated

BibTeX
@inproceedings{gao2024knowledge,
  author = {En-Hao Gao and Yu-Xuan Huang and Wen-Chao Hu and Xin-Hao Zhu and Wang-Zhou Dai},
  title = {{Knowledge-Enhanced Historical Document Segmentation and Recognition}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=UXNVGX4tQv},
}
Figure