TL;DR
This paper investigates the internal "circuits" of GPT-2—specific subnetworks responsible for certain tasks—by attempting to rewrite the facts they contain. The researchers discovered that these knowledge-rich circuits exhibit a "confirmation bias," resisting edits more strongly than the rest of the model, and revealed that LayerNorm components play a surprisingly dominant role in these circuits compared to standard Attention or MLP layers.
What Problem Does This Paper Address?
In the field of mechanistic interpretability, researchers have identified "circuits": small, functional subnetworks within Large Language Models (LLMs) that appear to handle specific behaviors, like grammatical rules or factual recall. However, while we can find these circuits, we don't fully understand how knowledge is organized within them.
Are facts concentrated in a few "knowledge neurons," or are they spread thin? Is a circuit a rigid structure or a plastic one? Previous methods like ablation (cutting parts out) provide a coarse view, but they don't tell us how the subnetwork reacts when we try to update its internal "beliefs." This paper uses knowledge editing as a probe to see how these subnetworks are structured and how they interact with the rest of the model.
Methods
The authors employ a two-step approach:
- Circuit Extraction: Using a technique called differentiable masking, they identify subnetworks (at the parameter level) that are essential for specific tasks. They optimize a mask to find a subset of parameters (e.g., the top 5% or 50%) that maintains the model's performance on a task (Faithfulness) while remaining as small as possible (Sparseness).
- Knowledge Editing: Once a circuit is identified (e.g., a circuit for linguistic agreement), they attempt to edit a fact within it using fine-tuning. For example, they might try to change the model's internal association from "A British Shorthair is a cat" to "A British Shorthair is a dog."
- Comparative Analysis: They compare how easily the "circuit" accepts this new information versus its "complementary circuit" (the parameters not included in the subnetwork).
Datasets
The study utilizes a diverse range of datasets to extract and test circuits:
- HIERARCHY DATA: A dataset of 198 hierarchical facts (e.g., hypernyms like "is-a" relations) used for both circuit extraction and editing.
- BLiMP: Eight datasets focusing on linguistic knowledge, specifically determiner-noun agreement (e.g., "this cat" vs. "these cats").
- Safety Behavior: Five datasets from the "Model-Written Evaluations" suite, covering traits like risk aversion, extraversion, and the desire for resources.
Key Insights and Ideas
- The "Confirmation Bias" of Circuits: The most striking finding is that knowledge-intensive circuits are "stubborn." When the researchers tried to edit a fact, the primary circuit showed much higher resistance to the change than the rest of the model. This suggests that these circuits aren't just where knowledge is; they are where knowledge is anchored.
- The LayerNorm Surprise: Traditionally, researchers focus on Multi-Layer Perceptrons (MLPs) as "knowledge stores" and Attention heads as "information movers." However, this paper found that LayerNorm (LN) components constitute a disproportionately large share of the extracted circuits. This suggests LN is far more than just a preprocessing step; it may be critical for maintaining the structural stability of information.
- The "Goldilocks" Circuit Size: By testing circuits ranging from 5% to 50% of the model's parameters, the authors suggest the "ideal" knowledge-bearing circuit likely lies between these two bounds. A 5% circuit is highly concentrated and resistant to editing, while a 50% circuit starts to include too much "noise" from non-essential parameters.
- Cross-Task Overlap: Circuits aren't silos. There is a non-negligible overlap (13-18%) between linguistic circuits and factual knowledge circuits. This "spill-over" implies that the mechanisms GPT-2 uses to understand grammar are partially intertwined with how it stores facts.
Key Results
- Pre-Edit Performance: Extracted circuits (even at 5% size) demonstrated a significantly better "grasp" of facts (lower negative log probability) than their complementary counterparts.
- Editing Resistance: In post-edit tests, the complementary circuits were far more susceptible to being rewritten. For the
dna1task, the complementary 50% circuit was orders of magnitude easier to edit than the primary 50% circuit. - Architectural Breakdown: In the 5% circuit for linguistic tasks, LayerNorm accounted for 37% of the parameters, while Attention and MLP layers accounted for only 4% and 5%, respectively. This highlights a major gap in current interpretability literature which often overlooks LN.
Limitations and Future Work
- Model Constraints: The study was limited to the GPT-2 base model. While GPT-2 is a standard benchmark for interpretability, it remains to be seen if these patterns (especially the LayerNorm dominance) hold in much larger, modern models like Llama-3 or GPT-4.
- Editing Techniques: The authors primarily used fine-tuning for edits. They acknowledge that exploring more sophisticated editing methods like ROME (Rank-One Model Editing) or MEMIT on these specific circuits could yield deeper insights.
- The "Why" of LayerNorm: While the paper identifies LayerNorm's importance, the exact mechanism of how LN stores or organizes knowledge remains an open question for future research.
Summary updated