TopoAlign: A Framework for Aligning Code to Math via Topological Decomposition
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) excel at both informal and formal (e.g. Lean 4) mathematical reasoning but still struggle with autoformalisation, the task of transforming informal into formal mathematical statements. Yet, the performance of current Math LLMs is constrained by the scarcity of large-scale corpora, particularly those containing pairs of informal and formal statements. Interestingly, the formal languages used in autoformalisation share structural similarities with programming languages, and code data is available at scale. However, current models trained on code do not transfer effectively to formal math, due to structural and syntactic differences between them. To address this, we propose TopoAlign, a framework that unlocks widely available code repositories as training resources for Math LLMs. TopoAlign decomposes code into docstrings, main functions, and dependency functions, and reassembles these components into analogues that structurally mirror formal statements. We train three state-of-the-art models, DeepSeek-Math, Qwen-3 and Herald, and evaluate them on the MiniF2F, Putnam, and ProofNet benchmarks. TopoAlign provides substantial gains for DeepSeek-Math, improving performance by 17.77% on BEq@10 and 68.82% on typecheck@10, and also measurably improves Herald by 0.12% on BEq@10 and 1.09% on typecheck@10 despite introducing no new mathematical knowledge.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 23 of its 47 references that are in the map. First posted on arXiv 13 Oct 2025.
Builds on
23 of 47 references.
References · 23
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2024A Survey on LLM-as-a-Judgecited by 1,384
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
- 2021MiniF2F: a cross-system benchmark for formal Olympiad-level mathematicscited by 380
- 2021Graph Neural Networks with Learnable Structural and Positional Representationscited by 326
- 2024Large Language Models for Mathematical Reasoning: Progresses and Challengescited by 283
- 2022Autoformalization with Large Language Modelscited by 252
- 2025Kimina-Prover Preview: Towards Large Formal Reasoning Models with Reinforcement Learningcited by 173
- 2024PutnamBench: Evaluating Neural Theorem-Provers on the Putnam Mathematical Competitioncited by 153
- 2019The Lean mathematical librarycited by 127
11 more
- 2024Herald: A Natural Language Annotated Lean 4 Datasetcited by 54
- 2018First Experiments with Neural Translation of Informal to Formal Mathematicscited by 52
- 2024Autoformalize Mathematical Statements by Symbolic Equivalence and Semantic Consistencycited by 39
- 2024Better Synthetic Data by Retrieving and Transforming Existing Datasetscited by 36
- 2023LLMSTEP: LLM proofstep suggestions in Leancited by 32
- 2025PDE-Controller: LLMs for Autoformalization and Reasoning of PDEscited by 23
- 2025ATLAS: Autoformalizing Theorems through Lifting, Augmentation, and Synthesis of Datacited by 23
- 2024Consistent Autoformalization for Constructing Mathematical Librariescited by 20
- 2025StepFun-Formalizer: Unlocking the Autoformalization Potential of LLMs through Knowledge-Reasoning Fusioncited by 15
- 2024GFLean: An Autoformalisation Framework for Lean via GFcited by 9
- 2025Lean-ing on Quality: How High-Quality Data Beats Diverse Multilingual Data in AutoFormalizationcited by 4
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025FormalMATH: Benchmarking Formal Mathematical Reasoning of Large Language Models
- 2025MegaMath: Pushing the Limits of Open Math Corpora
- 2023Llemma: An Open Language Model For Mathematics
- 2025Autoformalization in the Era of Large Language Models: A Survey
- 2025DRIFT: Decompose, Retrieve, Illustrate, then Formalize Theorems
- 2025A Compute-Matched Re-Evaluation of TroVE on MATH
- 2026Beyond the Library: An Agentic Framework for Autoformalizing Research Mathematics
- 2025Evaluating Intermediate Reasoning of Code-Assisted Large Language Models for Mathematics