arXiv:2506.09846cs.CVcs.AI2025-06EMNLP被引 2

通过对齐字符频率分布提升手写识别模型的泛化能力

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

  • 用Wasserstein距离约束预测文本与目标字符分布的一致性
  • 在多个数据集上显著提升模型在时间/地域变化下的准确率
  • 可无需重训练,通过解码阶段优化现有模型性能

手写文本识别旨在将视觉输入转化为机器可读文本,但因书写风格随时间与语境演变而面临挑战。字符集合随时间变化,字符频率分布也在不同时期或地区发生偏移,导致在广泛异构语料上训练的模型在特定子集上表现下降。为此,我们提出一种新型损失函数,利用预测文本与基于训练数据经验推导的目标字符频率分布之间的Wasserstein距离进行惩罚,以减少分布偏差。该方法提升了模型在时间与上下文内部数据集偏移下的准确率与鲁棒性。此外,我们证明字符分布对齐也可在推理阶段通过引导解码中的评分函数实现,无需重新训练即可改进现有模型。多数据集与架构的实验结果验证了方法的有效性。代码已开源:https://github.com/pkaliosis/fada。

原文摘要 · Abstract (English)

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.

手写识别分布对齐Wasserstein鲁棒性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。