Interpreting Language Model Parameters
Organizations: Goodfire · MATS · Independent
Abstract
Mechanistic interpretability aims to uncover how neural networks use their parameters to implement their impressive neural algorithms. Although previous work has uncovered substantial structure in the intermediate representations that networks use, little progress has been made to understand how the parameters and nonlinearities of networks perform computations on those representations. In this work, we present a method that brings us closer to this understanding by decomposing a language model's parameters into subcomponents that each implement only a small part of the model's learned algorithm, while simultaneously requiring only a small fraction of those subcomponents to account for the network's behavior on any input. The method, adVersarial Parameter Decomposition (VPD), optimizes for decompositions of neural network parameters into simple subcomponents that preserve the network's input-output behavior even when many subcomponents are ablated, including under ablations that are adversarially selected to destroy behavior. This encourages learning subcomponents that provide short, mechanistically faithful descriptions of the network's behavior that should aggregate appropriately into more global descriptions of the network's learned algorithm. We study how sequences of interactions between these parameter subcomponents produce the network's output on particular inputs, enabling a new kind of 'circuit' analysis. While more work remains to be done to deepen our understanding of how neural networks use their parameters to compute their behavior, our work suggests an approach to identify a small set of simple, mechanistically faithful subcomponents on which further mechanistic analysis can be based.
Figures & tables
| Attributes of our target model | |
|---|---|
| Layers | 4 |
| Residual stream dimension | 768 |
| MLP intermediate dimension | 3072 |
| Attention heads | 6 |
| Attention head dimension | 128 |
| Context length | 512 |
| Layer | Alive | Mean L0 | L0/Alive | |
|---|---|---|---|---|
| Layer 0 | ||||
| Layer 1 | ||||
| Layer 2 | ||||
| Layer 3 | ||||
| Total |
| Masking mode (excluding -components) | Validation CE Loss | Pretraining Compute Recovered (%) |
|---|---|---|
| Target Model | 2.71 | 100% |
| Unmasked (All masks(=)1) | 2.72 | 82.4% |
| Stochastic Masks | 2.84 | 26.9% |
| Rounded Masks (Mask(=)1 if CI(>)0) | 2.94 | 11.8% |
| Rounded Masks (Mask(=)1 if CI(>)0.1) | 2.95 | 11.3% |
| Causal Importance values (CIs) used as Masks | 2.99 | 9.4% |
| Adversarial optimization steps | KL divergence to target model | |
|---|---|---|
| 20 | 0.8280 | |
| 40 | 1.3539 | |
| 80 | 3.8381 | |
| 160 | 25.2560 | |
| 320 | 40.2200 |
Appendix figures & tables33 assets
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Value |
|---|---|
| CI model dimension ( ) | 2048 |
| Transformer layers ( ) | 8 |
| Attention heads | 16 |
| Head dimension | 128 |
| FFN hidden dimension ( ) | 8192 |
| Positional encoding | RoPE (base , max length ) |
| Loss term | Reference | Coefficient |
|---|---|---|
| (auxiliary loss; a.k.a. parameter-faithfulness) | Equation 1 | |
| (stochastic KL) | Equation 2 | |
| (persistent PGD KL) | Equation 8 | |
| ( on CI values) | Section 2.3 | |
| (superlinear CI frequency penalty) | Equation 3 |
| Module type | Subcomponents ( ) per layer |
|---|---|
| c_fc (MLP Up-projection, ) | 3072 |
| down_proj (MLP Down-projection, ) | 3584 |
| q_proj (query projection, ) | 512 |
| k_proj (key projection, ) | 512 |
| v_proj (value projection, ) | 1024 |
| o_proj (output projection, ) | 1024 |
| Loss | Value |
|---|---|
| Total | |
| Delta-L2 (MSE) | |
| StochasticReconSubsetLoss (KL) | |
| PersistentPGDReconLoss (KL) | |
| ImportanceMinimalityLoss |
| Loss | Value |
|---|---|
| StochasticReconSubsetLoss (KL) | |
| PGDReconLoss (KL) | |
| StochasticHiddenActsReconLoss (MSE) | |
| CIHiddenActsReconLoss (MSE) |
| Used in | What | WandB link |
|---|---|---|
| Figure 4 ; Figure 35 | PLT/CLT, local-MSE objective, | dict_4k , dict_32k |
| Figure 34 | PLT/CLT, end-to-end KL objective, , three training modes ( cascading = error-propagating, parallel = clean-input, independent = single-layer) | dict_4k , dict_32k |
| Table 11 — PLT/CLT seed runs | 5 seeds {PLT local-MSE, PLT e2e-independent, CLT local-MSE, CLT e2e-parallel}, , 4k dict | multiseed |
| Table 11 — VPD seed runs | 5 VPD seed runs (otherwise identical to the main decomposition) | VPD multiseed |
| Table 11 — hidden-activation aux-loss VPD | VPD trained with an auxiliary stochastic-forward-pass hidden-activation MSE loss | VPD hidden-act run |
| Figure 7 ; Figure 35 | VPD capacity sweep ( , , , subcomponents); is the main run above | capacity_sweep |
| Method | Cross-seed Mean Max Cos Sim |
|---|---|
| VPD U vectors | 0.4808 |
| VPD V vectors | 0.5156 |
| PLT (e2e) | 0.4390 |
| CLT (e2e, parallel) | 0.3468 |
| TC (local MSE) | 0.8063 |
| CLT (local MSE) | 0.6078 |
| Rank | Comp | Alignment | Label |
|---|---|---|---|
| 1 | v.22 | 74.9453 | punctuation, syntax, and formatting tokens |
| 2 | v.984 | 68.3169 | fires on punctuation and symbols |
| 3 | v.1000 | 64.4708 | fires on punctuation, delimiters, and structural boundaries |
| 4 | v.346 | 62.6574 | distinguishes function words (positive) and content words (negative) |
| 5 | v.568 | 59.1917 | fires on word prefixes and partial words |
| Rank | Comp | Alignment | Label |
|---|---|---|---|
| 1 | o.923 | 231.5484 | first token of the sequence |
| 2 | o.411 | 203.4490 | code, markup, and technical formatting syntax |
| 3 | o.630 | 191.1107 | punctuation, symbols, and syntax in technical text |
| 4 | o.753 | 181.5993 | closing parentheses and brackets in code and math |
| 5 | o.300 | 173.9110 | code and structured text syntax/indentation |
| Rank | Comp | Alignment | Label |
|---|---|---|---|
| 1 | v.984 | 59.9101 | fires on punctuation and symbols |
| 2 | v.346 | 56.6177 | distinguishes function words (positive) and content words (negative) |
| 3 | v.22 | 52.5358 | punctuation, syntax, and formatting tokens |
| 4 | v.1000 | 52.4579 | fires on punctuation, delimiters, and structural boundaries |
| 5 | v.946 | 45.8153 | distinguishes content words from function words/symbols |
| Rank | Comp | Alignment | Label |
|---|---|---|---|
| 1 | o.362 | 167.0992 | fires on names, citations, proper nouns and formatting tokens |
| 2 | o.490 | 164.5913 | line start and indentation tokens |
| 3 | o.337 | 149.7576 | fires inside parentheses or mathematical formulas |
| 4 | o.895 | 132.7422 | variables, math symbols, and syntax in technical text |
| 5 | o.986 | 116.9061 | sentence/paragraph boundaries and transition words |
| Rank | Comp | Alignment | Label |
|---|---|---|---|
| 1 | v.984 | 83.9813 | fires on punctuation and symbols |
| 2 | v.22 | 79.5923 | punctuation, syntax, and formatting tokens |
| 3 | v.346 | 69.2600 | distinguishes function words (positive) and content words (negative) |
| 4 | v.1000 | 68.2968 | fires on punctuation, delimiters, and structural boundaries |
| 5 | v.531 | 66.0043 | opening parentheses, brackets, braces, and quotes |
| Rank | Comp | Alignment | Label |
|---|---|---|---|
| 1 | o.923 | 432.9877 | first token of the sequence |
| 2 | o.578 | 249.4896 | heterogeneous subcomponent / lack of clear pattern |
| 3 | o.180 | 227.2081 | diffuse firing on tokens within words/phrases |
| 4 | o.866 | 208.1991 | predicts newlines and separators at line ends |
| 5 | o.336 | 205.5378 | diverges between function words and complex technical terms |
| Rank | Comp | Alignment | Label |
|---|---|---|---|
| 1 | v.984 | 70.1569 | fires on punctuation and symbols |
| 2 | v.745 | 57.7404 | formatting symbols, operators, and spatial alignment |
| 3 | v.946 | 53.8508 | distinguishes content words from function words/symbols |
| 4 | v.494 | 53.3743 | predicts line breaks or indentation in formatted text |
| 5 | v.346 | 52.9415 | distinguishes function words (positive) and content words (negative) |
| Rank | Comp | Alignment | Label |
|---|---|---|---|
| 1 | o.311 | 333.3696 | fires universally on most tokens |
| 2 | o.630 | 263.6867 | punctuation, symbols, and syntax in technical text |
| 3 | o.37 | 257.2931 | continuations of multi-token entities and compound words |
| 4 | o.300 | 251.2589 | code and structured text syntax/indentation |
| 5 | o.180 | 177.4386 | diffuse firing on tokens within words/phrases |
| Rank | Comp | Alignment | Label |
|---|---|---|---|
| 1 | v.346 | 146.1802 | distinguishes function words (positive) and content words (negative) |
| 2 | v.22 | 145.5668 | punctuation, syntax, and formatting tokens |
| 3 | v.984 | 142.4020 | fires on punctuation and symbols |
| 4 | v.745 | 129.9418 | formatting symbols, operators, and spatial alignment |
| 5 | v.1000 | 116.1570 | fires on punctuation, delimiters, and structural boundaries |
| Rank | Comp | Alignment | Label |
|---|---|---|---|
| 1 | o.753 | 832.6620 | closing parentheses and brackets in code and math |
| 2 | o.630 | 591.0163 | punctuation, symbols, and syntax in technical text |
| 3 | o.411 | 538.0296 | code, markup, and technical formatting syntax |
| 4 | o.860 | 522.9536 | structural and formatting markers vs content words |
| 5 | o.292 | 503.4616 | fires broadly on various tokens, promoting line breaks and punctuation |
| Rank | Comp | Alignment | Label |
|---|---|---|---|
| 1 | v.1000 | 57.2500 | fires on punctuation, delimiters, and structural boundaries |
| 2 | v.946 | 56.3107 | distinguishes content words from function words/symbols |
| 3 | v.346 | 53.8432 | distinguishes function words (positive) and content words (negative) |
| 4 | v.428 | 51.4916 | fragments of proper nouns, foreign, and technical words |
| 5 | v.984 | 50.2268 | fires on punctuation and symbols |
| Rank | Comp | Alignment | Label |
|---|---|---|---|
| 1 | o.923 | 227.1903 | first token of the sequence |
| 2 | o.311 | 178.6259 | fires universally on most tokens |
| 3 | o.630 | 160.5296 | punctuation, symbols, and syntax in technical text |
| 4 | o.180 | 156.3924 | diffuse firing on tokens within words/phrases |
| 5 | o.300 | 144.0436 | code and structured text syntax/indentation |
Mechanistic Interpretability
Mechanistic interpretability studies how neural networks implement behaviors through internal features, circuits, and causal information flow.
See all 388 papers