Detecting and Pruning Prominent but Detrimental Neurons in Large Language Models

Ameen Ali, Shahar Katz, Lior Wolf, Ivan Titov
7/12/2025
cs.CLcs.LG

No confident code implementation found for this paper.

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.

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. Any repos shown below are weak matches — 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{ali2025detecting,
  title  = {Detecting and Pruning Prominent but Detrimental Neurons in Large Language Models},
  author = {Ameen Ali and Shahar Katz and Lior Wolf and Ivan Titov},
  year   = {2025},
  eprint = {2507.09185},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.09185v1}
}

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/2507.09185.svg)](https://codeofpaper.com/paper/2507.09185)

Discussion