English

Detecting and Pruning Prominent but Detrimental Neurons in Large Language Models

Computation and Language 2025-07-15 v1 Machine Learning

Abstract

Large language models (LLMs) often develop learned mechanisms specialized to specific datasets, such as reliance on domain-specific correlations, which yield high-confidence predictions without generalizable reasoning. While beneficial in one setting, these dataset-specific mechanisms typically degrade performance when models encounter novel tasks or distributions. In this work, we introduce a fine-tuning approach designed to enhance generalization by identifying and pruning neurons associated with dataset-specific mechanisms in transformer-based LLMs. Our method employs Integrated Gradients to quantify each neuron's influence on high-confidence predictions, pinpointing those that disproportionately contribute to dataset-specific performance without supporting robust, transferable reasoning. Selectively pruning these neurons compels the model to depend on generalizable representations. Evaluated across multiple-choice benchmarks, our pruning-based fine-tuning significantly enhances performance, surpassing prior (non-pruning) adaptation methods.

Keywords

Cite

@article{arxiv.2507.09185,
  title  = {Detecting and Pruning Prominent but Detrimental Neurons in Large Language Models},
  author = {Ameen Ali and Shahar Katz and Lior Wolf and Ivan Titov},
  journal= {arXiv preprint arXiv:2507.09185},
  year   = {2025}
}