Math Neurosurgery: Isolating Language Models' Math Reasoning Abilities
  Using Only Forward Passes
Math reasoning is a highly active area of Large Language Model (LLM) research
because it is a hallmark of artificial intelligence. However, few works have
explored how math reasoning is encoded within LLM parameters and if it is a
skill that can be isolated within a model. 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 method for isolating 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 removing those important for general language
tasks. Pruning parameters MathNeuro identifies deletes a LLM's math reasoning
ability without destroying its general language ability. Scaling these
parameters by a small constant improves a pretrained or instruction-tuned LLM's
performance by 4-17% on GSM8K 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.
6718d37c5d7e17ad0d5cd5a2
Bryan R. Christ
claimed_verified
2024-10-23T15:06:48.048Z
64832043cb811166c6a2f4e3
/avatars/44889baaaa6b86468ff6635791b14959.svg
Bryan Christ
user
bryanchrist
6718d37c5d7e17ad0d5cd5a3
Zack Gottesman
admin_assigned
2024-10-24T08:37:56.718Z
644135e7bd0c97265297098e
/avatars/585c8cdc3136e22a0713fae9f6babb1d.svg
Zack Gottesman
user
zsg
6718d37c5d7e17ad0d5cd5a4
Jonathan Kropko
6718d37c5d7e17ad0d5cd5a5
Thomas Hartvigsen
Math Neurosurgery: Isolating Language Models' Math Reasoning Abilities
  Using Only Forward Passes
Math reasoning is a highly active area of Large Language Model (LLM) research
because it is a hallmark of artificial intelligence. However, few works have
explored how math reasoning is encoded within LLM parameters and if it is a
skill that can be isolated within a model. 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 method for isolating 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 removing those important for general language
tasks. Pruning parameters MathNeuro identifies deletes a LLM's math reasoning
ability without destroying its general language ability. Scaling these
parameters by a small constant improves a pretrained or instruction-tuned LLM's
performance by 4-17% on GSM8K 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.
MathNeurosurgery identifies and manipulates math-specific parameters in LLMs to improve math reasoning without affecting language skills.
LLM MathNeurosurgery parameter importance weights activations pruning GSM8K data efficiency intervention on math-specific parameters