Math Neurosurgery: Isolating Language Models' Math Reasoning Abilities Using Only Forward Passes
Bryan R. Christ, Zachary Gottesman, Jonathan Kropko, Thomas Hartvigsen
Abstract
Math reasoning is an active area of Large Language Model (LLM) research because it is a hallmark of artificial intelligence and has implications in several domains, including math education. However, few works have explored how math reasoning is encoded within LLM parameters and if it is a skill that can be isolated within models. Doing so could allow targeted intervention to improve math performance without altering non-math behavior and foster understanding of how models encode math reasoning. We introduce Math Neurosurgery (MathNeuro), a computationally efficient method we use to isolate math-specific parameters in LLMs using only forward passes. MathNeuro builds on existing work by using weights and activations to calculate parameter importance, but isolates math-specific parameters by filtering out those important for general language tasks. Through pruning parameters MathNeuro identifies, we delete a LLM's math reasoning ability without significantly impacting its general language ability. Scaling the identified parameters by a small constant improves a pretrained or instruction-tuned LLM's performance by 4-17% on GSM8K and 5-35% on MATH while leaving non-math behavior unaltered. Math-Neuro is also data efficient: most of its effectiveness holds when identifying math-specific parameters using a single sample. MathNeuro highlights the potential for future work to intervene on math-specific parameters. 1
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
4 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Measuring Massive Multitask Language Understanding cites PIQA: Reasoning about Physical Commonsense in Natural Language
- L2V-CoT: Cross-Modal Transfer of Chain-of-Thought Reasoning via Latent Intervention cites Unlocking General Long Chain-of-Thought Reasoning Capabilities of Large Language Models via Representation Engineering
- Feature Extraction and Steering for Enhanced Chain-of-Thought Reasoning in Language Models cites Measuring Massive Multitask Language Understanding
- Feature Extraction and Steering for Enhanced Chain-of-Thought Reasoning in Language Models cites Unlocking General Long Chain-of-Thought Reasoning Capabilities of Large Language Models via Representation Engineering
Cited by top-tier papers4
- Feature Extraction and Steering for Enhanced Chain-of-Thought Reasoning in Language ModelsZihao Li, Xu Wang, Yuzhe Yang, Ziyu Yao et al.EMNLP 2025 · 14 citations
- L2V-CoT: Cross-Modal Transfer of Chain-of-Thought Reasoning via Latent InterventionYu-Liang Zhan, Xinyu Tang, Han Wan, Jian Li et al.AAAI 2026 · 2 citations
- ReasonAny: Incorporating Reasoning Capability to Any Model via Simple and Effective Model MergingJunyao Yang, Chen Qian, Wen Shen, Yong Liu et al.ACL 2026 · 1 citation
- Unlocking General Long Chain-of-Thought Reasoning Capabilities of Large Language Models via Representation EngineeringXinyu Tang, Xiaolei Wang, Zhihao Lv, Yingqian Min et al.ACL 2025
Builds on18
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
- PIQA: Reasoning about Physical Commonsense in Natural LanguageYonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao et al.AAAI 2020 · 2,916 citations
- Many-Shot In-Context LearningRishabh Agarwal, Avi Singh, Lei Zhang, Bernd Bohnet et al.NeurIPS 2024 · 271 citations
- How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language modelMichael Hanna, Ollie Liu, Alexandre VariengienNeurIPS 2023 · 251 citations
- How do Large Language Models Handle Multilingualism?Yiran Zhao, Wenxuan Zhang, Guizhen Chen, Kenji Kawaguchi et al.NeurIPS 2024 · 196 citations
Related papers
- Interpreting and Improving Large Language Models in Arithmetic CalculationWei Zhang, Chaoqun Wan, Yonggang Zhang, Yiu-ming Cheung et al.ICML 2024 · 47 citations
- MARIO: MAth Reasoning with code Interpreter Output - A Reproducible PipelineMinpeng Liao, Chengxi Li, Wei Luo, Jing Wu et al.ACL Findings 2024 · 2 citations
- MASS: Mathematical Data Selection via Skill Graphs for Pretraining Large Language ModelsJiazheng Li, Lu Yu, Qing Cui, Zhiqiang Zhang et al.ICML 2025
- Can MLLMs Absorb Math Reasoning Abilities from LLMs as Free Lunch?Yijie Hu, Zihao Zhou, Kaizhu Huang, Xiaowei Huang et al.NeurIPS 2025 · 3 citations
- Improving Rule-based Reasoning in LLMs using Neurosymbolic RepresentationsVarun Dhanraj, Chris EliasmithEMNLP 2025 · 2 citations
