Abstract
Traditional mechanistic interpretability suggests that induction heads—circuits that copy patterns from earlier context—are the fundamental drivers of In-Context Learning (ICL). This study introduces HAPAX, a training intervention that masks the loss for repeated tokens, effectively removing the incentive for verbatim copying. Our results demonstrate that models can develop superior abstractive reasoning and translation capabilities even when their copying mechanisms are crippled, suggesting that the "repetition curse" of standard training may hinder true semantic learning.
Introduction: The Induction Head Hypothesis
Large Language Models (LLMs) excel at In-Context Learning (ICL), the ability to pick up patterns from a few examples in a prompt. Research has identified "induction heads" as the primary mechanism for this behavior. These circuits perform a "copy-paste" operation: they identify a prefix pattern, find its previous occurrence, and increase the probability of the token that followed it.
However, a critical question remains: is this copying mechanism a necessary scaffold for more complex, abstractive ICL tasks where the answer is not present in the prompt? The authors investigate whether the prevalence of repetition in training data forces models into a copying habit that is distinct from, and potentially detrimental to, semantic reasoning.
Methodology: The HAPAX Training Regime
To test the necessity of copying, the researchers developed HAPAX (named after hapax legomena, words appearing only once). In a standard language modeling objective, every token contributes to the loss. In the HAPAX regime, the loss is masked for any token that is part of a repeated $n$-gram within the current context window.
By removing the gradient signal for tokens that can be predicted by "looking back," the model is forced to rely on internal knowledge and semantic patterns rather than simple repetition. A stricter variant, Thresholded-HAPAX, also masks tokens with high semantic similarity to previous context, preventing "fuzzy" copying.
Key Results and Insights
The Collapse of Copying
As expected, HAPAX models showed a dramatic reduction in their ability to perform verbatim repetition. Accuracy on synthetic and natural text repetition tasks dropped significantly compared to vanilla models. Mechanistic analysis confirmed that these models developed fewer and weaker induction heads, with some heads even evolving to actively suppress repeated tokens.
Superiority in Abstractive Tasks
Despite losing their "copying crutch," HAPAX models excelled at abstractive reasoning. In a suite of 26 tasks (e.g., mapping countries to capitals), HAPAX outperformed vanilla models on the majority of benchmarks. This effect was even more pronounced when controlling for cases where the answer might have accidentally appeared in the prompt; in those instances, HAPAX won on 24 out of 25 tasks.
Enhanced Translation Performance
One of the most significant findings was in word-level translation. By forcing the model to learn robust internal representations instead of relying on pattern matching, HAPAX models consistently achieved higher accuracy across multiple language pairs.
Fluency and the Repetition Curse
Vanilla LLMs often suffer from a "repetition curse," where they get stuck in incoherent loops. Because HAPAX models were never rewarded for repetition during training, they produced more diverse and natural-sounding text. Human-like fluency evaluations found that HAPAX models generated fluent narratives 70% more often than their vanilla counterparts, which frequently devolved into repetitive gibberish.
Conclusion and Future Work
This research challenges the assumption that induction heads are the essential building blocks of all in-context learning. By decoupling copying from reasoning, the authors show that abstractive capabilities can emerge—and even improve—without the ability to repeat. While this study focused on 1B parameter models, it opens the door for new training objectives that could mitigate repetitive behaviors and enhance the reasoning depth of much larger LLMs. Future work will explore the impact of HAPAX on long-range dependencies and its potential as a fine-tuning strategy for existing models.
Summary updated