atlas

Research map / Large language models / Instruction and fine-tuning

Interpreting and Improving Large Language Models in Arithmetic Calculation

ICML 2024 · Large language models › Instruction and fine-tuning · approach: Fine-tuning generalization and delta compression · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Identifies sparse attention heads and MLPs in LLaMA2 that carry out two-operand arithmetic via path patching, and fine-tunes only 32 key heads (precise SFT) to improve math benchmarks while preserving generic performance.

Problem

Arithmetic calculation in LLMs is poorly understood mechanistically, making reliability hard to ensure; it is unclear which internal components perform calculation and whether they can be selectively tuned to improve math ability.

Approach

Use path patching with counterfactual prompts (operators/operands obfuscated) to locate sparse calculation-related attention heads and MLPs, validate them via mean-ablation knockout and attention/embedding analysis, then fine-tune only those heads (precise SFT) instead of the full model.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
fine-tune the top 32 key attention heads instead of leaving LLaMA2-7B unchangedLLaMA2-7B · GSM8Kaccuracy: 14.6 -> 27.4Helped
fine-tune the top 32 key attention heads instead of leaving LLaMA2-7B unchangedLLaMA2-7B · AddSubaccuracy: 30.5 -> 50.6Helped
fine-tune the top 32 key attention heads instead of leaving LLaMA2-7B unchangedLLaMA2-7B · SingleEqaccuracy: 65.4 -> 69.7Helped
fine-tune the top 32 key attention heads instead of leaving LLaMA2-7B unchangedLLaMA2-7B · SVAMPaccuracy: 34.7 -> 55.8Helped
fine-tune the top 32 key attention heads instead of leaving LLaMA2-7B unchangedLLaMA2-7B · MMLUaccuracy: 46.0 -> 46.4Helped
fine-tune the top 32 key attention heads instead of leaving LLaMA2-7B unchangedLLaMA2-7B · CSQAaccuracy: 59.8 -> 59.6Hurt
fine-tune the top 32 key attention heads instead of leaving LLaMA2-13B unchangedLLaMA2-13B · GSM8Kaccuracy: 28.7 -> 46.3Helped
fine-tune the top 32 key attention heads instead of leaving LLaMA2-13B unchangedLLaMA2-13B · SVAMPaccuracy: 45.7 -> 66.6Helped
fine-tune all parameters instead of leaving LLaMA2-7B unchangedLLaMA2-7B · MMLUaccuracy: 46.0 -> 40.5Hurt
fine-tune all parameters instead of leaving LLaMA2-7B unchangedLLaMA2-7B · CSQAaccuracy: 59.8 -> 54.0Hurt
fine-tune top 8 heads rather than top 32 heads (ablation)Precise SFT on LLaMA2-7B · GSM8Kaccuracy: 27.4 -> 25.4Hurt
fine-tune top 16 heads rather than top 32 heads (ablation)Precise SFT on LLaMA2-7B · GSM8Kaccuracy: 27.4 -> 26.5Hurt

Surprising findings

Limitations

Experimental setup

Datasets: GSM8K AddSub SingleEq SVAMP MMLU CSQA MMLU-Humanities

Benchmarks: GSM8K AddSub SingleEq SVAMP MMLU CSQA

Metrics: accuracy training speed (samples/sec) tuned parameters

Baselines: Full SFT

Builds on: path patching causal mediation analysis mean ablation LLaMA2

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy