[Paper Review] Improving Attention-Based Handwritten Mathematical Expression Recognition with Scale Augmentation and Drop Attention
This paper proposes a novel attention-based encoder-decoder model for handwritten mathematical expression recognition (HMER) that improves performance through scale augmentation and drop attention. Scale augmentation enhances robustness to variable symbol sizes by randomly rescaling ME images during training while preserving aspect ratios, and drop attention improves attention mechanism reliability by suppressing unreliable attention weights, achieving state-of-the-art results on CROHME 2014 and 2016 datasets without ensembling.
Handwritten mathematical expression recognition (HMER) is an important research direction in handwriting recognition. The performance of HMER suffers from the two-dimensional structure of mathematical expressions (MEs). To address this issue, in this paper, we propose a high-performance HMER model with scale augmentation and drop attention. Specifically, tackling ME with unstable scale in both horizontal and vertical directions, scale augmentation improves the performance of the model on MEs of various scales. An attention-based encoder-decoder network is used for extracting features and generating predictions. In addition, drop attention is proposed to further improve performance when the attention distribution of the decoder is not precise. Compared with previous methods, our method achieves state-of-the-art performance on two public datasets of CROHME 2014 and CROHME 2016.
Motivation & Objective
- To address the challenge of variable symbol sizes in handwritten mathematical expressions (MEs), which degrade model performance due to non-uniform scaling in 2D structures.
- To improve attention mechanism reliability in sequence generation, especially when attention focuses on irrelevant or noisy features.
- To develop a training-phase technique that enhances model generalization on MEs of diverse scales without requiring scale normalization.
- To achieve state-of-the-art performance on public HMER benchmarks using only standard offline image data and without ensemble methods.
Proposed method
- Scale augmentation randomly rescales ME images during training while preserving aspect ratios, followed by zero-padding to a fixed size, enabling the model to learn scale-invariant features.
- An attention-based encoder-decoder network is used, where the encoder processes the image and the decoder generates LaTeX tokens step-by-step using context-aware attention.
- Drop attention is applied during training to randomly suppress or abandon attention weights, forcing the model to rely on robust features even when attention is imprecise.
- The model uses a CNN-based encoder and an RNN-based decoder with an attention mechanism that computes alignment scores between decoder states and encoder features.
- The loss function is cross-entropy between ground-truth LaTeX sequences and predicted sequences, optimized via backpropagation.
- The method is trained end-to-end on offline ME images using only LaTeX-level labels, avoiding reliance on trajectory data or private training sets.
Experimental results
Research questions
- RQ1Can scale augmentation improve HMER performance on MEs with inconsistent symbol sizes due to 2D structural complexity?
- RQ2Does introducing a drop attention mechanism during training enhance model robustness when attention distributions are inaccurate or unstable?
- RQ3How does the proposed method compare to state-of-the-art HMER models in terms of accuracy and generalization without using model ensembling?
- RQ4Can the combination of scale augmentation and drop attention achieve SOTA results on standard benchmarks like CROHME 2014 and 2016 using only official training data?
Key findings
- On the CROHME 2014 test set, the proposed method achieves an accuracy of 56.59% without ensemble and 60.45% with ensemble, outperforming the previous SOTA PAL-v2 by 5.58% and 7.71% respectively.
- On the CROHME 2016 test set, the method achieves 54.58% accuracy without ensemble and 58.06% with ensemble, surpassing the previous SOTA PAL-v2 by 4.97% and 0.17% respectively.
- The model significantly outperforms the first-place Wiris system on CROHME 2016, achieving 54.58% ExpRate vs. Wiris’s 49.61% without using any private data.
- The ablation study confirms that both scale augmentation and drop attention contribute independently to performance gains, with scale augmentation improving robustness to size variation and drop attention enhancing attention reliability.
- The model generalizes well across diverse handwriting styles and complex 2D structures, correctly recognizing subscripts, superscripts, and nested expressions.
- Visualization shows that the model learns to focus on discriminative symbol features and can generate correct LaTeX sequences even when attention is distracted by grammar symbols like "{".
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.