
SAN (Second-order Attention Network)
Diffusion and generative2,851 ops15.9M params
Encoder-decoder recognizer that turns handwritten math images into LaTeX by following grammar rules.
Documents and OCR · 1,255 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
SAN, the syntax-aware network, is an encoder-decoder model for handwritten mathematical expression recognition that builds grammar constraints into the network. The paper observes that earlier encoder-decoder recognizers predict one character after another, which produces errors on complicated structures and hard-to-read handwriting.
SAN instead uses a set of grammar rules to convert each expression's LaTeX markup into a parse tree, and treats recognition as a traversal of that tree. At each step the decoder scores the production rules of the grammar and selects the most probable one. The image encoder is a densely connected convolutional network (DenseNet). The decoder consists mainly of two GRU cells and a syntax-aware attention module.
The paper also introduces HME100K, a dataset of 100k handwritten expression images from ten thousand writers. On CROHME 2014, 2016 and 2019 it reports expression recognition rates above MAN by 3.1%, BTTR by 1.3% and BTTR by 0.5%, respectively. On an HME100K test set it measures SAN as 3.5 times faster than the tree decoder DWAP-TD.
Key idea. The paper builds grammar rules into an encoder-decoder recognizer so that LaTeX markup is predicted by traversing a parse tree instead of character by character.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{yuan2022syntaxawarenetworkhandwrittenmathematical,
title={Syntax-Aware Network for Handwritten Mathematical Expression Recognition},
author={Ye Yuan and Xiao Liu and Wondimu Dikubab and Hui Liu and Zhilong Ji and Zhongqin Wu and Xiang Bai},
year={2022},
eprint={2203.01601},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2203.01601},
}