How Truncating Weights Improves Reasoning in Language Models

Lei Chen, Joan Bruna, Alberto Bietti

TL;DR

Recent work showed that low-rank truncation of MLP weights via singular value decomposition (LASER) surprisingly boosts reasoning in LLMs, but why this happens remained mysterious. This paper shows that global, shallow associations (like bigrams such as "to the") are learned rapidly and localized into feed-forward (MLP) layers, effectively distracting the model from in-context reasoning. Selectively pruning or truncating these MLP components removes this global noise, allowing attention-driven in-context reasoning to dominate.

What Problem Does This Paper Address?

Language models are trained on next-token prediction, which forces them to balance two competing mechanisms:

  1. Global n-gram associations / memorization: predicting generic words from local context (e.g., following the preposition "to" or "in" with "the").
  2. In-context reasoning: aggregating long-range dependencies across the context to retrieve the true answer (e.g., matching a subject to an indirect object or retrieving a specific factual entity).

Earlier empirical work (LASER; Sharma et al., 2023) demonstrated that replacing certain deep MLP weight matrices with their low-rank approximations improves reasoning, often by suppressing generic words like "the". However, the theoretical and mechanistic reasons—specifically where and how these global shortcuts are stored during training, and why low-rank truncation works—remained unexplained.

Methods

The authors investigate this phenomenon empirically and theoretically across three complementary setups:

  • Pre-trained LLM Analysis: Evaluating checkpoints across training steps of Pythia models (and GPT-2 Small) on reasoning tasks to track the emergence of generic tokens versus reasoning targets before and after applying LASER (SVD truncation).
  • Two-Layer Transformer on Noisy In-Context Recall: A theoretical and synthetic framework where sequences require in-context copying ([... a b ... a] -> b), but outputs are perturbed with common noise token $N+1$ with probability $\alpha$. The authors analyze:
  • First-gradient-step dynamics from initialization to show feed-forward layers absorb noise much faster than attention layers.
  • Architectural ablation (dropping MLP layers $F_1, F_2$ or running low-rank approximations).
  • Linear Associative Memory Model: A simplified setting mapping input tokens to output tokens with a common noise label, trained via gradient descent/gradient flow. The authors analytically prove that the common noise maps onto a separable, rank-one subspace corresponding to the smallest non-zero singular value.

Datasets

  • Preposition & Generic Token Probing: A synthetic suite consisting of 30 English prepositions and 40 incomplete sentences ending in prepositions (generated with Claude 3) to test bigram association dynamics.
  • Indirect Object Identification (IOI): 100 synthetic sentences of the template "When Mary and John went to a store, John gave a drink to [IO]" with randomized names.
  • Factual Recall: Prompts such as "Madrid is located in [Spain]".
  • Synthetic Markov Sequences: Character-level sequences generated with unigram and bigram statistics from Tiny Shakespeare ($N=65$) augmented with a trigger token $q$ and noise token $N+1$.

Key Insights and Ideas

  • Speed Mismatch at Initialization: Theoretical analysis of the first gradient step (Theorem 1) proves that feed-forward weights update at a rate of $\Theta(1)$, while value weights in attention update at $\Theta(1/N)$. Consequently, MLPs quickly memorize frequent global associations (noise/bigrams) using very few samples ($\tilde{\Omega}(1)$ vs. $\tilde{\Omega}(N)$ for attention).
  • Attention Disentanglement: Once MLPs absorb the global noise, the attention mechanisms (specifically key-query interactions in second-layer induction heads) evolve to explicitly avoid attending to noise tokens, focusing purely on context-dependent signals.
  • MLP Truncation as High-Pass Reasoning Filter: Because the noisy global bias is localized in the feed-forward pathway (specifically deeper layers, e.g., $F_2$), zeroing or truncating MLP ranks removes the "generic" prediction path without harming the induction head's context retrieval.
  • Noise Concentrates in Low-Rank Subspaces: In linear associative memory, gradient flow concentrates the shared noise token into a single rank-one component. Truncating this singular value allows a model trained on noisy data to achieve clean, noise-free predictions as $t \to \infty$ (Theorem 2).

Key Results

  • Pythia-1B on IOI & Factual Recall:
  • Generic token prediction (e.g., predicting "the" after a preposition) emerges within the first ~10 training steps, whereas in-context reasoning tokens ([IO] or factual targets) only begin developing after 500–2,000 steps.
  • At 14K training steps, LASER boosted the probability ratio of the correct IO token over "the" from $2.3\times$ to $12.3\times$.
  • On factual recall ("Madrid is located in..."), LASER shifted the probability ratio of "Spain" over "the" from $0.16\times$ to $11.3\times$, cutting the probability of "the" from 0.499 down to 0.027 while raising "Spain" from 0.079 to 0.300.
  • Two-Layer Transformer:
  • When trained with a noise probability of $\alpha = 0.5$, completely dropping the second feed-forward layer ($F_2$, $\rho = 0$) increased the prediction probability of the ground-truth token $\bar{y}$ from ~0.5 to ~0.98.

Limitations and Future Work

  • Simplified Theoretical Models: The mathematical proofs rely on 1-step gradient updates or linearized associative memory settings with orthogonal embeddings, which do not capture full multi-layer non-linear SGD dynamics.
  • Architectural Variations: In certain transformer setups (such as networks without MLPs), global associations spill into attention value matrices ($W_V$). Low-rank truncation of attention weights yielded only marginal improvements compared to dropping MLPs, and aggressive truncation ($\rho = 0.01$) degraded performance.
  • Future Directions: Analyzing joint training dynamics over key-query matrices, investigating whether attention sinks or registers absorb global associations in vision/language transformers, and extending the framework to richer context-dependent multi-step reasoning.

Summary updated

BibTeX
@inproceedings{chen2024how,
  author = {Lei Chen and Joan Bruna and Alberto Bietti},
  title = {{How Truncating Weights Improves Reasoning in Language Models}},
  booktitle = {HiLD @ ICML},
  year = {2024},
  url = {https://openreview.net/forum?id=SaQMYYx9TJ},
}
Figure