TAMER: Tree-Aware Transformer for Handwritten Mathematical Expression Recognition

Jianhua Zhu, Wenqi Zhao, Yu Li, Xingjian Hu, Liangcai Gao
8/16/2024
cs.CV

No official code found. Best implementation: qingzhenduyu/TAMER (37 stars, last commit 2025-07-28).

Abstract

Handwritten Mathematical Expression Recognition (HMER) has extensive applications in automated grading and office automation. However, existing sequence-based decoding methods, which directly predict $\LaTeX$ sequences, struggle to understand and model the inherent tree structure of $\LaTeX$ and often fail to ensure syntactic correctness in the decoded results. To address these challenges, we propose a novel model named TAMER (Tree-Aware Transformer) for handwritten mathematical expression recognition. TAMER introduces an innovative Tree-aware Module while maintaining the flexibility and efficient training of Transformer. TAMER combines the advantages of both sequence decoding and tree decoding models by jointly optimizing sequence prediction and tree structure prediction tasks, which enhances the model's understanding and generalization of complex mathematical expression structures. During inference, TAMER employs a Tree Structure Prediction Scoring Mechanism to improve the structural validity of the generated $\LaTeX$ sequences. Experimental results on CROHME datasets demonstrate that TAMER outperforms traditional sequence decoding and tree decoding models, especially in handling complex mathematical structures, achieving state-of-the-art (SOTA) performance.

View on arXivView PDF

Code Implementations(1)

qingzhenduyu/TAMERCommunity100%

Official implementation for AAAI 2025 paper: TAMER: Tree-Aware Transformer for Handwritten Mathematical Expression Recognition

378Shell, PythonJul 25, 20241 years ago

Similar Papers

Cite this paper

@article{zhu2024tamer,
  title  = {TAMER: Tree-Aware Transformer for Handwritten Mathematical Expression Recognition},
  author = {Jianhua Zhu and Wenqi Zhao and Yu Li and Xingjian Hu and Liangcai Gao},
  year   = {2024},
  eprint = {2408.08578},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.08578v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2408.08578.svg)](https://codeofpaper.com/paper/2408.08578)

Discussion