Repetition Neurons: How Do Language Models Produce Repetitions?
Tatsuya Hiraoka, Kentaro Inui
TL;DR
Repetition in text generation under greedy decoding is analyzed by identifying repetition neurons—specific neurons in Transformer feed-forward blocks whose activations rise as repetition unfolds. The authors propose a simple, neuron-level method to identify them by comparing activations before and after repetition onset and use the score $Δ_n = \bar{a}_n - a_n$ to select top-$K$ neurons, validating the phenomenon across four languages/models. They show that deactivating these neurons reduces repetition by up to 25–35% with limited perplexity degradation, while activating them increases repetition and worsens perplexity, and they explore the relationship to induction and self-finding heads. The work provides a broad, cross-model view of repetition mechanisms, suggests practical mitigation via targeted neuron interventions, and highlights language- and model-size dependent differences.
Abstract
This paper introduces repetition neurons, regarded as skill neurons responsible for the repetition problem in text generation tasks. These neurons are progressively activated more strongly as repetition continues, indicating that they perceive repetition as a task to copy the previous context repeatedly, similar to in-context learning. We identify these repetition neurons by comparing activation values before and after the onset of repetition in texts generated by recent pre-trained language models. We analyze the repetition neurons in three English and one Japanese pre-trained language models and observe similar patterns across them.
