Abstract
Disentangling polysemantic neurons is at the core of many current approaches to interpretability of large language models. Here we attempt to study how disentanglement can be used to understand performance, particularly under weight sparsity, a leading post-training optimization technique. We suggest a novel measure for estimating neuronal entanglement: the Wasserstein distance of a neuron's output distribution to a Gaussian. Moreover, we show the existence of a small number of highly entangled "Wasserstein Neurons" in each linear layer of an LLM, characterized by their highly non-Gaussian output distributions, their role in mapping similar inputs to dissimilar outputs, and their significant impact on model accuracy. To study these phenomena, we propose a new experimental framework for disentangling polysemantic neurons. Our framework separates each layer's inputs to create a mixture of experts where each neuron's output is computed by a mixture of neurons of lower Wasserstein distance, each better at maintaining accuracy when sparsified without retraining. We provide strong evidence that this is because the mixture of sparse experts is effectively disentangling the input-output relationship of individual neurons, in particular the difficult Wasserstein neurons.
Introduction: The Challenge of Sparsity
As Large Language Models (LLMs) scale, efficiency through weight sparsity—setting most weights to zero—becomes critical for deployment. However, a persistent mystery in model compression is why certain neurons are easily pruned while others act as "load-bearers," where even minor alterations lead to model collapse. This paper identifies the root of this sensitivity in polysemanticity: the phenomenon where a single neuron responds to multiple, unrelated features. Such "entangled" neurons perform complex mappings that standard pruning techniques fail to preserve.
Measuring Entanglement via Wasserstein Distance
The authors introduce a novel metric for entanglement: the 1-Wasserstein distance (WD). This metric quantifies how much a neuron's output distribution deviates from a standard Gaussian distribution.
As shown in the figure above, "Random Neurons" exhibit Gaussian-like distributions and are robust to pruning. In contrast, "Entangled Neurons" display highly non-Gaussian, multi-modal distributions. These "Wasserstein Neurons" are rare—comprising roughly 3% of a layer—but are critical for accuracy. Pruning just this small subset causes a massive spike in perplexity, whereas pruning a random 3% has negligible impact.
Sparse Expansion: Disentangling through Specialization
To address the fragility of entangled neurons, the researchers propose Sparse Expansion, a one-shot framework that converts dense layers into a Mixture of Experts (MoE) without retraining. The process involves clustering input embeddings and creating specialized sparse experts for each cluster.
By narrowing the scope of each expert to a specific input subset, the individual neurons within those experts become less entangled. This "specialization" reduces the Mapping Difficulty (MD) of the neurons, making them more robust to high levels of sparsity. The clustering effectively decomposes the complex, multi-modal output distribution of an entangled neuron into simpler, more manageable components, as illustrated in the figure above.
Key Results and Performance
Sparse Expansion significantly outperforms state-of-the-art one-shot pruning methods like Wanda and SparseGPT across various model families (Pythia, Llama-2, Llama-3).
- Accuracy Recovery: At 50% sparsity, Sparse Expansion on Llama-2-7B achieved a perplexity of 5.58, notably better than SparseGPT (5.70) and Wanda (6.77).
- Efficiency: Utilizing optimized GPU kernels, the method achieves up to a 4.8x speedup over dense baselines.
- Robustness: The benefits scale from 70M to 70B parameter models and hold across diverse benchmarks including MMLU, GSM8K, and SQuAD 2.0.
Conclusion
This work establishes the Wasserstein distance as a powerful predictor of neuronal importance and pruning sensitivity. By identifying and disentangling "Wasserstein Neurons" through Sparse Expansion, LLMs can achieve higher levels of sparsity with minimal performance loss. Future research may explore the specific linguistic features these neurons represent or integrate entanglement-aware objectives directly into the training process.
Summary updated