Learning to Align: Addressing Character Frequency Distribution Shifts in Handwritten Text Recognition

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Kaliosis, Panagiotis, Pavlopoulos, John
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912595094536192
author Kaliosis, Panagiotis
Pavlopoulos, John
author_facet Kaliosis, Panagiotis
Pavlopoulos, John
contents Handwritten text recognition aims to convert visual input into machine-readable text, and it remains challenging due to the evolving and context-dependent nature of handwriting. Character sets change over time, and character frequency distributions shift across historical periods or regions, often causing models trained on broad, heterogeneous corpora to underperform on specific subsets. To tackle this, we propose a novel loss function that incorporates the Wasserstein distance between the character frequency distribution of the predicted text and a target distribution empirically derived from training data. By penalizing divergence from expected distributions, our approach enhances both accuracy and robustness under temporal and contextual intra-dataset shifts. Furthermore, we demonstrate that character distribution alignment can also improve existing models at inference time without requiring retraining by integrating it as a scoring function in a guided decoding scheme. Experimental results across multiple datasets and architectures confirm the effectiveness of our method in boosting generalization and performance. We open source our code at https://github.com/pkaliosis/fada.
format Preprint
id arxiv_https___arxiv_org_abs_2506_09846
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Learning to Align: Addressing Character Frequency Distribution Shifts in Handwritten Text Recognition
Kaliosis, Panagiotis
Pavlopoulos, John
Computer Vision and Pattern Recognition
Artificial Intelligence
Handwritten text recognition aims to convert visual input into machine-readable text, and it remains challenging due to the evolving and context-dependent nature of handwriting. Character sets change over time, and character frequency distributions shift across historical periods or regions, often causing models trained on broad, heterogeneous corpora to underperform on specific subsets. To tackle this, we propose a novel loss function that incorporates the Wasserstein distance between the character frequency distribution of the predicted text and a target distribution empirically derived from training data. By penalizing divergence from expected distributions, our approach enhances both accuracy and robustness under temporal and contextual intra-dataset shifts. Furthermore, we demonstrate that character distribution alignment can also improve existing models at inference time without requiring retraining by integrating it as a scoring function in a guided decoding scheme. Experimental results across multiple datasets and architectures confirm the effectiveness of our method in boosting generalization and performance. We open source our code at https://github.com/pkaliosis/fada.
title Learning to Align: Addressing Character Frequency Distribution Shifts in Handwritten Text Recognition
topic Computer Vision and Pattern Recognition
Artificial Intelligence
url https://arxiv.org/abs/2506.09846