Understanding Gated Neurons in Transformers from Their Input-Output Functionality

Sebastian Gerstner, Hinrich Schütze
5/23/2025
cs.LGcs.CL

No confident code implementation found for this paper.

Abstract

Interpretability researchers have attempted to understand MLP neurons of language models based on both the contexts in which they activate and their output weight vectors. They have paid little attention to a complementary aspect: the interactions between input and output. For example, when neurons detect a direction in the input, they might add much the same direction to the residual stream ("enrichment neurons") or reduce its presence ("depletion neurons"). We address this aspect by examining the cosine similarity between input and output weights of a neuron. We apply our method to 12 models and find that enrichment neurons dominate in early-middle layers whereas later layers tend more towards depletion. To explain this finding, we argue that enrichment neurons are largely responsible for enriching concept representations, one of the first steps of factual recall. Our input-output perspective is a complement to activation-dependent analyses and to approaches that treat input and output separately.

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{gerstner2025understanding,
  title  = {Understanding Gated Neurons in Transformers from Their Input-Output Functionality},
  author = {Sebastian Gerstner and Hinrich Schütze},
  year   = {2025},
  eprint = {2505.17936},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.17936v1}
}

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

Discussion