Transformer-Based Image-to-LaTeX Conversion: Improving Mathematical Equation Recognition with Self-Attention

Automating the transfer of mathematical equations from photos to LaTeX code is difficult because to handwriting diversity, formatting issues, and structural difficulties. Traditional CNN and RNN models struggle with long-term dependency and input variability. To overcome these challenges, we present a transformer-based encoder-decoder architecture that uses self-attention to increase contextual comprehension and sequence alignment. The model is trained on the im2latex dataset using token-level cross-entropy loss and sequence-level BLEU-based reinforcement learning, followed by Adam and beam search for inference. Compared to existing models, the proposed model has the greatest BLEU score, competitive MED performance, and better robustness against noisy and handwritten inputs, however the Exact Match (EM) score shows space for improvement. This study demonstrates the efficacy of transformer-based architectures for improving LaTeX conversion accuracy and mathematical document processing.

Authors

Publication Details

Journal
Journal of Information Systems Engineering & Management
Published
2025-02-10
DOI
https://doi.org/10.52783/jisem.v10i13s.2101
Primary Topic
Mathematics, Computing, and Information Processing
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Transformer-Based Image-to-LaTeX Conversion: Improving Mathematical Equation Recognition with Self-Attention

Neeta P. Patil
Journal of Information Systems Engineering & Management
Mathematics, Computing, and Information Processing
article

Transformer-Based Image-to-LaTeX Conversion: Improving Mathematical Equation Recognition with Self-Attention

Neeta P. Patil
article en

Abstract

Automating the transfer of mathematical equations from photos to LaTeX code is difficult because to handwriting diversity, formatting issues, and structural difficulties. Traditional CNN and RNN models struggle with long-term dependency and input variability. To overcome these challenges, we present a transformer-based encoder-decoder architecture that uses self-attention to increase contextual comprehension and sequence alignment. The model is trained on the im2latex dataset using token-level cross-entropy loss and sequence-level BLEU-based reinforcement learning, followed by Adam and beam search for inference. Compared to existing models, the proposed model has the greatest BLEU score, competitive MED performance, and better robustness against noisy and handwritten inputs, however the Exact Match (EM) score shows space for improvement. This study demonstrates the efficacy of transformer-based architectures for improving LaTeX conversion accuracy and mathematical document processing.

Journal of Information Systems Engineering & ManagementVol. 10(13s)
Openalex Percentile: Top 95%
Mathematics, Computing, and Information Processing
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.