Math Neurosurgery: Isolating Language Models' Math Reasoning Abilities Using Only Forward Passes

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Christ, Bryan R., Gottesman, Zack, Kropko, Jonathan, Hartvigsen, Thomas
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866909651663060992
author Christ, Bryan R.
Gottesman, Zack
Kropko, Jonathan
Hartvigsen, Thomas
author_facet Christ, Bryan R.
Gottesman, Zack
Kropko, Jonathan
Hartvigsen, Thomas
contents 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. MathNeuro 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.
format Preprint
id arxiv_https___arxiv_org_abs_2410_16930
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Math Neurosurgery: Isolating Language Models' Math Reasoning Abilities Using Only Forward Passes
Christ, Bryan R.
Gottesman, Zack
Kropko, Jonathan
Hartvigsen, Thomas
Computation and Language
Artificial Intelligence
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. MathNeuro 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.
title Math Neurosurgery: Isolating Language Models' Math Reasoning Abilities Using Only Forward Passes
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2410.16930