Mechanistic Data Attribution: Tracing the Training Origins of Interpretable LLM Units
Jianhui Chen, Yuzhang Luo, Liangming Pan
TL;DR
This work introduces Mechanistic Data Attribution (MDA), a scalable framework that links the training data origins of interpretable LLM units to their functional emergence using Influence Functions with EK-FAC. Through causal interventions on the Pythia suite, it demonstrates that removing or duplicating a small fraction of high-influence samples can significantly modulate induction and previous-token heads, while random data changes have little effect. The study reveals that repetitive structural patterns (e.g., LaTeX, XML) catalyze induction head formation, that high-influence data transfer across heads, and that induction heads causally underpin In-Context Learning (ICL). It further provides a practical mechanistic data augmentation pipeline, enabling pattern extraction and synthetic data generation that accelerates circuit convergence across model scales, offering a principled approach to steer developmental trajectories of LLMs.
Abstract
While Mechanistic Interpretability has identified interpretable circuits in LLMs, their causal origins in training data remain elusive. We introduce Mechanistic Data Attribution (MDA), a scalable framework that employs Influence Functions to trace interpretable units back to specific training samples. Through extensive experiments on the Pythia family, we causally validate that targeted intervention--removing or augmenting a small fraction of high-influence samples--significantly modulates the emergence of interpretable heads, whereas random interventions show no effect. Our analysis reveals that repetitive structural data (e.g., LaTeX, XML) acts as a mechanistic catalyst. Furthermore, we observe that interventions targeting induction head formation induce a concurrent change in the model's in-context learning (ICL) capability. This provides direct causal evidence for the long-standing hypothesis regarding the functional link between induction heads and ICL. Finally, we propose a mechanistic data augmentation pipeline that consistently accelerates circuit convergence across model scales, providing a principled methodology for steering the developmental trajectories of LLMs.
