Wasserstein Distances, Neuronal Entanglement, and Sparsity

Shashata Sawmya, Linghao Kong, Ilia Markov, Dan Alistarh, Nir Shavit

TL;DR

Researchers have identified "Wasserstein Neurons"—a small subset of highly entangled, non-Gaussian neurons in Large Language Models (LLMs) that are critical for accuracy but collapse under standard pruning. By introducing Sparse Expansion, a framework that disentangles these neurons into a mixture of sparse experts, they demonstrate a way to achieve high sparsity while preserving the complex logic these neurons perform.

What Problem Does This Paper Address?

As Large Language Models (LLMs) grow, weight sparsification (pruning) has become a vital tool for making them efficient enough to run on consumer hardware. However, standard pruning techniques often hit a "performance wall" at high sparsity levels.

The authors argue this is because of neuronal entanglement. In modern architectures, neurons are often "polysemantic"—they represent multiple, unrelated features simultaneously (a state called superposition). While efficient for representation, this makes them incredibly difficult to prune. If a single neuron is doing three different jobs, cutting its connections likely breaks at least one of them. The paper seeks to quantify this entanglement and find a way to prune these "difficult" neurons without destroying model intelligence.

Methods

The authors introduce two novel metrics and a new experimental framework:

  1. Wasserstein Distance (WD): They measure the 1-Wasserstein distance between a neuron’s normalized output distribution and a standard Gaussian. They found that while most neurons are "boring" (Gaussian-like), a few "Wasserstein Neurons" have highly irregular, multi-modal distributions.
  2. Mapping Difficulty (MD): A metric that quantifies how much a neuron struggles to differentiate similar inputs. High MD means a neuron must map very similar input vectors to very different output values—a hallmark of high entanglement.
  3. Sparse Expansion: Instead of pruning a dense layer into a single sparse layer, they expand it into a Mixture of Sparse Experts.
  4. They cluster the input space (using PCA and K-means).
  5. For each cluster, they create a specialized sparse version of the original weights using the SparseGPT algorithm.
  6. During inference, an input is routed to the specific sparse expert that was optimized for its "neighborhood" in the input space.

Datasets

The study evaluates several model families, including Pythia (70M to 12B), Llama-2 (7B to 70B), and Llama-3 (8B).

  • Calibration: Wikitext-2.
  • General Benchmarks: SQuAD 2.0, TriviaQA, GSM8K, MMLU, and Big Bench Hard (BBH).
  • Out-of-Distribution (OOD): ARC-e, ARC-c, Lambada, and SciQ.

Key Insights and Ideas

  • The 3% Rule: In models like Llama-3-8B, sparsifying just the top 3% of Wasserstein neurons causes a total collapse in reasoning and math capabilities, whereas sparsifying 3% of random neurons has almost no effect.
  • Sparsity Induces Normality: As you prune a neuron, its complex, specialized output distribution tends to "decay" toward a simple Gaussian. This loss of "distributional shape" is exactly why performance drops.
  • Disentanglement via Specialization: Sparse Expansion works because it effectively "untangles" the neuron. By giving different sparse weights to different input clusters, the model no longer requires a single set of weights to handle multiple unrelated features simultaneously.
Figure 1: The output distributions of neurons in Llama-2-7B computed densely and at 90% sparsity on Wikitext-2. WD refers to the Wasserstein distance of the output distribution to a Gaussian. RI refers to the relative improvement of Sparse Expansion over SparseGPT. (a) The dense output dis- tribution of a random neuron with a WD of 0.050 is well captured by SparseGPT, and (b) expanding this neuron via Sparse Expansion imparts only a small (18%) increase in performance. (c) The clus- ter outputs are all concentrated in close proximity to each other. (d) SparseGPT struggles to capture the dense distribution of an entangled neuron with a WD of 0.524. (e) Following expansion, the sparse output of the entangled neuron is much better captured, leading to more improvement (77%). (f) Each expert specializes over a different portion of the distribution.

Key Results

  • Superior Accuracy: Sparse Expansion consistently outperforms state-of-the-art one-shot pruning methods like Wanda and SparseGPT. At 50% sparsity, it approaches dense model performance even as models scale up.
  • Efficiency Gains: By using optimized Sparse Marlin kernels (combining 2:4 structured sparsity with 4-bit quantization), the authors demonstrated up to a 4.8x speedup over dense baselines on an RTX 3090.
  • Predictive Power: The Wasserstein distance proved to be a much better predictor of which neurons would benefit from "expansion" than traditional metrics like weight magnitude or output variance.

Limitations and Future Work

  • Memory Footprint: While Sparse Expansion is fast during inference, it increases the model's memory footprint because it stores multiple sparse versions of the same layers. The authors suggest that future work could optimize this by only "expanding" the most entangled neurons.
  • Retraining: This study focused on one-shot (post-training) methods. The authors note that exploring how these Wasserstein neurons behave during active sparse training could yield even better results.
  • Mechanistic Interpretability: While we now know which neurons are entangled, we don't yet fully understand the specific "circuits" or human-understandable concepts these Wasserstein neurons are processing.

Summary updated

BibTeX
@inproceedings{sawmya2025wasserstein,
  author = {Shashata Sawmya and Linghao Kong and Ilia Markov and Dan Alistarh and Nir Shavit},
  title = {{Wasserstein Distances, Neuronal Entanglement, and Sparsity}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=cnKhHxN3xj},
}
Figure