arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.07764cs.CV
收藏

PosFormer:基于位置森林Transformer的复杂手写数学表达式识别

PosFormer: Recognizing Complex Handwritten Mathematical Expression with Position Forest Transformer

Shanghai Jiao Tong University(上海交通大学);Paris Elite Institute of Technology, Shanghai Jiao Tong University(上海交通大学巴黎卓越工程师学院)

Tongkun Guan, Chengyu Lin, Wei Shen, Xiaokang Yang

AI总结:

针对现有手写数学表达式识别方法难以捕捉符号位置与层级关系的问题,提出融合位置森林与隐式注意力校正模块的PosFormer模型,在多类数据集上以无额外开销的表现超越现有最优方法。

摘要:

手写数学表达式识别(HMER)在数字化教育、自动化办公等人机交互场景中有着广泛应用。近年来,采用编码器-解码器架构的基于序列的模型被普遍用于该任务,可直接预测表达式图像的LaTeX序列。然而,这类方法仅隐式学习LaTeX提供的语法规则,由于表达式结构关系复杂、手写风格多样,可能无法准确描述符号间的位置与层级关系。为解决这一挑战,我们提出一种面向HMER的位置森林Transformer(PosFormer),该模型联合优化表达式识别与位置识别两个任务,以显式实现具备位置感知能力的符号特征表示学习。具体而言,我们首先设计了位置森林,将数学表达式建模为森林结构并解析符号间的相对位置关系;无需额外标注,每个符号都会在森林中被分配一个位置标识符,用于表示其相对空间位置。其次,我们提出了隐式注意力校正模块,可在基于序列的解码器架构中准确捕获适用于HMER的注意力。大量实验验证了PosFormer的优越性:在单行数据集CROHME 2014/2016/2019、多行数据集M2E以及复杂数据集MNE上,其性能分别优于当前最优方法2.03%/1.22%/2.00%、1.83%和4.62%,且未带来额外延迟或计算成本。代码可在https://github.com/SJTU-DeepVisionLab/PosFormer获取。

英文摘要:

Handwritten Mathematical Expression Recognition (HMER) has wide applications in human-machine interaction scenarios, such as digitized education and automated offices. Recently, sequence-based models with encoder-decoder architectures have been commonly adopted to address this task by directly predicting LaTeX sequences of expression images. However, these methods only implicitly learn the syntax rules provided by LaTeX, which may fail to describe the position and hierarchical relationship between symbols due to complex structural relations and diverse handwriting styles. To overcome this challenge, we propose a position forest transformer (PosFormer) for HMER, which jointly optimizes two tasks: expression recognition and position recognition, to explicitly enable position-aware symbol feature representation learning. Specifically, we first design a position forest that models the mathematical expression as a forest structure and parses the relative position relationships between symbols. Without requiring extra annotations, each symbol is assigned a position identifier in the forest to denote its relative spatial position. Second, we propose an implicit attention correction module to accurately capture attention for HMER in the sequence-based decoder architecture. Extensive experiments validate the superiority of PosFormer, which consistently outperforms the state-of-the-art methods 2.03%/1.22%/2.00%, 1.83%, and 4.62% gains on the single-line CROHME 2014/2016/2019, multi-line M2E, and complex MNE datasets, respectively, with no additional latency or computational cost. Code is available at https://github.com/SJTU-DeepVisionLab/PosFormer.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑