MathScrub: Single-Pipeline Strikeout Removal and LaTeX Generation for Handwritten Calculus Expressions
MathScrub: Single-Pipeline Strikeout Removal and LaTeX Generation for Handwritten Calculus Expressions
Sen Shen,Ning Liu,Lintao Song,Dongkun Han
Abstract
With the rapid development of large language models (LLMs), image-to-LaTeX conversion has shown great potential for applications such as automated grading and mathematical expression recognition in educational and assessment settings. However, real-world handwritten Science, Technology, Engineering, and Mathematics (STEM) manuscripts often contain strikeouts, overwrites, and other markings that disrupt handwritten content structure, reducing recognition accuracy and compilability. In this article, we present MathScrub, a single-pipeline multimodal framework that cleans and transcribes handwritten calculus expressions by grouping connected components with geometry-constrained clustering, detecting deletions via an early-fusion vision transformer, applying geometry-aware inpainting, and generating compilable LaTeX with a parameter-efficiently adapted open-source multimodal vision-language model (VLM). To support this task, we introduce Math-Strike, a dataset of handwritten calculus answers with real and synthetic strikeouts, component-level annotations, and aligned LaTeX. Experiments show that MathScrub outperforms open-source baselines on component detection and image-to-LaTeX tasks while remaining robust in real strikeout scenarios, providing a reliable preprocessing stage for LLM-based grading and formula recognition.
