Layer Importance for Mathematical Reasoning is Forged in Pre-Training and Invariant after Post-Training

Aadim Nepal, Safal Shrestha, Anubhav Shrestha, Minwu Kim, Jalal Naghiyev +2 more
6/27/2025
cs.LGcs.AI

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

Large language models improve at math after instruction tuning, reinforcement learning, or knowledge distillation. We ask whether these gains come from major changes in the transformer layers or from smaller adjustments that keep the original structure. Using layer-wise ablation on base and trained variants, we find that math reasoning depends on a few critical layers, which stay important across all post-training methods. Removing these layers reduces math accuracy by as much as 80%, whereas factual recall tasks only show relatively smaller drops. This suggests that specialized layers for mathematical tasks form during pre-training and remain stable afterward. As measured by Normalized Mutual Information (NMI), we find that near these critical layers, tokens drift from their original syntactic clusters toward representations aligned with tokens less syntactically related but potentially more useful for downstream task.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{nepal2025layer,
  title  = {Layer Importance for Mathematical Reasoning is Forged in Pre-Training and Invariant after Post-Training},
  author = {Aadim Nepal and Safal Shrestha and Anubhav Shrestha and Minwu Kim and Jalal Naghiyev and Ravid Shwartz-Ziv and Keith Ross},
  year   = {2025},
  eprint = {2506.22638},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.22638v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.22638.svg)](https://codeofpaper.com/paper/2506.22638)

Discussion