TeXBLEU: Automatic Metric for Evaluate LaTeX Format
This addresses a domain-specific problem for researchers and practitioners using language models with LaTeX, but it is incremental as it adapts an existing metric to a new format.
The authors tackled the lack of proper evaluation metrics for mathematical expressions in LaTeX format by proposing TeXBLEU, a metric based on BLEU, which showed improvements of 86%, 121%, and 610% over traditional metrics like BLEU, sacreBLEU, and Rouge on the MathBridge dataset.
LaTeX is suitable for creating specially formatted documents in science, technology, mathematics, and computer science. Although the use of mathematical expressions in LaTeX format along with language models is increasing, there are no proper evaluation matrices to evaluate them. In this study, we propose TeXBLEU, a metric for evaluating mathematical expressions in the LaTeX format built on the n-gram-based BLEU metric widely used in translation tasks. The proposed TeXBLEU consists of a predefined tokenizer trained on the arXiv paper dataset and a fine-tuned embedding model with positional encoding. The TeXBLEU score was calculated by replacing BLUE's modified precision score with the similarity of n-gram-based tokens. TeXBLEU showed improvements of 86\%, 121\%, and 610\% over traditional evaluation metrics, such as BLEU, sacreBLEU, and Rouge, respectively, on the MathBridge dataset with 1,000 data points. The code is available at https://github.com/KyuDan1/TeXBLEU.