Mask & Match: Learning to Recognize Handwritten Math with Self-Supervised Attention
Not on the map. Why?
Abstract (arXiv)
Recognizing handwritten mathematical expressions (HMER) is a challenging task due to the inherent two-dimensional structure, varying symbol scales, and complex spatial relationships among symbols. In this paper, we present a self-supervised learning (SSL) framework for HMER that eliminates the need for expensive labeled data. Our approach begins by pretraining an image encoder using a combination of global and local contrastive loss, enabling the model to learn both holistic and fine-grained representations. A key contribution of this work is a novel self-supervised attention network, which is trained using a progressive spatial masking strategy. This attention mechanism is designed to learn semantically meaningful focus regions, such as operators, exponents, and nested mathematical notation, without requiring any supervision. The progressive masking curriculum encourages the network to become increasingly robust to missing or occluded visual information, ultimately improving structural understanding. Our complete pipeline consists of (1) self-supervised pretraining of the encoder, (2) self-supervised attention learning, and (3) supervised fine-tuning with a transformer decoder to generate LATEX sequences. Extensive experiments on CROHME benchmarks demonstrate that our method outperforms existing SSL and fully supervised baselines, validating the effectiveness of our progressive attention mechanism in enhancing HMER performance. Our codebase can be found here.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 21 of its 40 references that are in the map. First posted on arXiv 8 Aug 2025.
Builds on
21 of 40 references.
References · 21
- 2017Attention Is All You Needcited by 60,361
- 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 12,049
- 2018Representation Learning with Contrastive Predictive Codingcited by 7,777
- 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,513
- 2016Densely Connected Convolutional Networkscited by 6,720
- 2020Bootstrap your own latent: A new approach to self-supervised Learningcited by 4,750
- 2020Exploring Simple Siamese Representation Learningcited by 2,866
- 2021Barlow Twins: Self-Supervised Learning via Redundancy Reductioncited by 1,838
- 2018Unsupervised Representation Learning by Predicting Image Rotationscited by 1,591
- 2015Show, Attend and Tell: Neural Image Caption Generation with Visual Attentioncited by 1,423
- 2015Unsupervised Visual Representation Learning by Context Predictioncited by 1,066
- 2019On Variational Bounds of Mutual Informationcited by 559
9 more
- 2021Understanding Dimensional Collapse in Contrastive Self-supervised Learningcited by 378
- 2021On Feature Decorrelation in Self-Supervised Learningcited by 160
- 2017Focusing Attention: Towards Accurate Text Recognition in Natural Imagescited by 110
- 2022Syntax-Aware Network for Handwritten Mathematical Expression Recognitioncited by 68
- 2018Multi-Scale Attention with Dense Encoder for Handwritten Mathematical Expression Recognitioncited by 36
- 2021Handwritten Mathematical Expression Recognition with Bidirectionally Trained Transformercited by 34
- 2022CoMER: Modeling Coverage for Transformer-based Handwritten Mathematical Expression Recognitioncited by 24
- 2020Improving Attention-Based Handwritten Mathematical Expression Recognition with Scale Augmentation and Drop Attentioncited by 22
- 2024Overcoming Dimensional Collapse in Self-supervised Contrastive Learning for Medical Image Segmentationcited by 7
Built on by
Not cited yet.