MAMUT: A Novel Framework for Modifying Mathematical Formulas for the Generation of Specialized Datasets for Language Model Training

Jonathan Drechsel, Anja Reusch, Steffen Herbold
2/28/2025
cs.CLcs.LG

Official code: aieng-lab/math-mutator (6 stars, Apache-2.0, last commit 2026-03-19). 3 more implementations below.

Abstract

Mathematical formulas are a fundamental and widely used component in various scientific fields, serving as a universal language for expressing complex concepts and relationships. While state-of-the-art transformer models excel in processing and understanding natural language, they encounter challenges with mathematical notation, which involves a complex structure and diverse representations. This study focuses on the development of specialized training datasets to enhance the encoding of mathematical content. We introduce Math Mutator (MAMUT), a framework capable of generating equivalent and falsified versions of a given mathematical formula in LaTeX notation, effectively capturing the mathematical variety in notation of the same concept. Based on MAMUT, we have generated four large mathematical datasets containing diverse notation. Experiments show that models trained on these datasets exhibit new SoTA performance on mathematical retrieval tasks. We publish our code, generated datasets, and pretrained mathematical models: https://github.com/aieng-lab/math-mutator.

View on arXivView PDF

Code Implementations(4)

Apache-2.0

Math Mutator (MAMUT): A framework for generating specialized math datasets for language model training (TMLR 2025)

61PythonFeb 11, 20257 months agoApache-2.0

A computer algebra system written in pure Python with a randomized LaTeX Formula Generator

20Java, PerlOct 9, 20231 years agoNOASSERTION
Apache-2.0
20PythonApr 16, 20251 years agoApache-2.0
Apache-2.0

Framework to pretrain mathematical aware transformer models using MAMUT datasets

10Shell, PythonApr 16, 20251 years agoApache-2.0

Similar Papers

Cite this paper

@article{drechsel2025mamut,
  title  = {MAMUT: A Novel Framework for Modifying Mathematical Formulas for the Generation of Specialized Datasets for Language Model Training},
  author = {Jonathan Drechsel and Anja Reusch and Steffen Herbold},
  year   = {2025},
  eprint = {2502.20855},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.20855v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.20855.svg)](https://codeofpaper.com/paper/2502.20855)

Discussion