Uncovering Intermediate Variables in Transformers using Circuit Probing

Neural network models have achieved high performance on a wide variety of complex tasks, but the algorithms that they implement are notoriously difficult to interpret. It is often necessary to hypothesize intermediate variables involved in a network's computation in order to understand these algorithms. For example, does a language model depend on particular syntactic properties when generating a sentence? Yet, existing analysis tools make it difficult to test hypotheses of this type. We propose a new analysis technique - circuit probing - that automatically uncovers low-level circuits that compute hypothesized intermediate variables. This enables causal analysis through targeted ablation at the level of model parameters. We apply this method to models trained on simple arithmetic tasks, demonstrating its effectiveness at (1) deciphering the algorithms that models have learned, (2) revealing modular structure within a model, and (3) tracking the development of circuits over training. Across these three experiments we demonstrate that circuit probing combines and extends the capabilities of existing methods, providing one unified approach for a variety of analyses. Finally, we demonstrate circuit probing on a real-world use case: uncovering circuits that are responsible for subject-verb agreement and reflexive anaphora in GPT2-Small and Medium.

Paper

References (69)

Scroll for more · 38 remaining

Similar papers

Reviewer Dcii6/10 · confidence 3/52024-05-10

Summary

This paper presents a novel technique called circuit probing for identifying and analyzing intermediate variables in Transformer models. Circuit probing optimizes a binary mask over model weights to uncover a circuit that computes a hypothesized intermediate variable, then tests if the variable is represented in the model and causally implicated in model behavior, and look for model components whose outputs are partitioned according to the variable. The authors conduct four experiments that demonstrate circuit probing's ability to identify intermediate variables, differentiate between algorithms, and evaluate modularity, outperforming existing probing techniques.

Rating

6

Confidence

3

Ethics flag

1

Reasons to accept

1. Novelty: Circuit probing is a valuable and innovative contribution to the field of interpretability research, offering a method to understand intermediate variables in Transformer models more effectively than traditional probing methods, • Faithful to model's computation than probing or causal abstraction analysis; • Not require full causal graph specification like causal abstraction analysis; • Uncover development of circuits during training unlike other methods. 2. Diverse Experimentation: The authors validate their methodology with comprehensive experimentation. Applying circuit probing across different tasks, including simple arithmetic tasks and real-world language models, highlights the robustness and versatility of the method. 3. Strong Comparative Analysis: Comparing circuit probing to existing probing methods helps establish its efficacy. The ability to ablate specific circuits and demonstrate causal changes in model behavior is a notable advantage.

Reasons to reject

1. Accessibility and Clarity: The paper's complexity may limit understanding for researchers not specialized in interpretability or Transformer models. Providing more intuitive explanations and detailed visualizations could enhance accessibility. 2. Generalization: While the experiments are comprehensive, additional work applying circuit probing to different neural network architectures or more complex, real-world tasks would reinforce the paper's claims. 3. Computational Efficiency: Discussing the computational requirements of circuit probing would provide practical insights for broader application. An analysis of scalability could strengthen the paper.

Questions to authors

1. What is the scalability of circuit probing when applied to larger, state-of-the-art models used in complex real-world applications? The current study focuses on relatively small models and straightforward tasks like arithmetic. 2. How robust are the identified circuits to variations in hyperparameters, such as optimization functions, regularization methods, learning rate schedules, etc.?

Reviewer XRXi5/10 · confidence 3/52024-05-10

Summary

This paper proposes a method for finding subnetworks (called "circuits") in transformers that calculate intermediate variables in a hypothesized causal model. The method is evaluated in terms of two goals. First, if a variable is part of the true causal graph, the method should find a subnetwork that calculates it reliably, and if the variable is not part of the causal graph, the method should return an empty subnetwork. Second, if a subnetwork is found, ablating the subnetwork should harm the performance of the model. The method is compared to probing methods (for the first goal) and causal analysis methods (for the second goal) and generally agrees with existing methods or compares favorably.

Rating

5

Confidence

3

Ethics flag

1

Reasons to accept

- This paper brings together ideas from pruning, circuit discovery, probing, and causal analysis. Causal analysis methods are designed to test whether neural network representations can be abstracted as high-level variables in a causal model, whereas circuit discovery methods can help characterize the mechanisms the model uses to compute these variables. This kind of combined approach could be a promising tool for understanding transformers at different levels of abstraction. - The paper includes experiments in a variety of different settings and compares circuit probing to a number of sensible baselines. The experiments suggest that circuit probing can help answer a variety of different interpretability questions. - The experiments indicate that circuit probing generally agrees with existing methods and in some cases performs better, in the sense that circuit probing agrees more with our expectations. For example, in section 4.3, circuit probing seems to be work than other probing methods as an explanation for "grokking" training dynamics.

Reasons to reject

- One of the proposed benefits of this approach is that it enables a form of causal analysis, but it is not clear to me how much the method actually reveals about the causal model implicit in the network. In particular, the causal analysis involves ablating the identified circuit, and the paper states that "this ablation is equivalent to asking the counterfactual question 'How does the model’s output change if it does not compute a particular intermediate variable in a particular block?'" However, I do not see how these are equivalent. The question assumes that the chosen subnetwork (a) computes a particular intermediate variable, and (b) does not do anything else. That is, ablating the subnetwork could have other effects on the model that are not related to the intermediate variable. More generally, the paper would be stronger if claims about causality could be stated more formally. For example, existing work on causal analysis (e.g. [1]) uses a more more formal definitions of the sense in which the method can support claims about the causal structure of the neural network. It would be helpful if this paper could be more precise in explaining the type of causal claims that could be supported by the method. - The paper argues that circuit probing is better than existing probing methods because it is more "faithful" to the original model but it does not provide a clear definition of faithfulness, and it is not clear to me how the experiments demonstrate that circuit probing is more faithful than other methods. In the introduction, faithfulness is defined parenthetically as "it only provides evidence in support of causal variables that are actually represented by the model," but I do not see how there is any ground-truth way of knowing what causal variables the model actually represents. (One possible approach would be to include experiments with networks where the ground truth causal structure is known, e.g. using [Tracr](https://arxiv.org/abs/2301.05062) [2].) - I do not always find the experiments to be very compelling. Three of the four experiments study one-layer networks trained on very simple tasks, which do not clearly demonstrate that this is an appropriate method for analyzing transformer language models. The fourth experiment studies language modeling tasks, but I am not entirely convinced by the conclusions. Section 4.4 states that "the dependency is computed in layer 6's attention block", but this seems to overstate the result. From Appendix Figure 15, it seems that ablating a subnetwork in this block leads to a larger drop in performance relative to other layers. However, the drop still isn't especially large (e.g. ~95% to ~80% on SV agreement), and ablating circuits in other components also induces a drop in accuracy, albeit not as large. Even if the effect could be entirely localized to this component, it is not clear to me how significant this type of insight is. - I find the description of the method in section 2 to be somewhat vague. It would be helpful to start with a more formal statement of the problem, and describe the method more formally. One particular point that confused me: When the method is applied to some component C, does this mean that the mask is learned only to the parameters in C? Or is the mask learned for all components prior to C in the computation graph, but using the representations from C to calculate the loss? Is there any justification for one or the other? Without explaining these details, it is difficult to understand how the method works, or even the exact problem it is meant to solve. - The method involves two ideas: one is to use pruning/subnetwork analysis as a probing method, and the other is to find these subnetworks by optimizing a nearest neighbor loss. These ideas seem to be distinct to me, and I think it would make sense to evaluate these two components of the method individually, that is: (a) the same approach but replacing the nearest neighbor objective with a standard linear probing method; and (b) training a linear probe on the network representations, but using the nearest neighbor objective. Overall, I think the paper introduces an interesting approach to interpretability, but I think a number of the key points need to be formulated more precisely to be able to determine the types of questions this method is capable of answering. *References:* [1] Geiger et al., 2021. Causal Abstractions of Neural Networks. [2] Lindner et al., 2023. Tracr: Compiled Transformers as a Laboratory for Interpretability. *Update:* After reading the rebuttal, I still have some doubts about the significance of the method and findings, but the authors have promised to address some of my concerns about clarity and presentation, so I am increasing my score from 4 to 5.

Questions to authors

I have no additional questions

Reviewer UN6h7/10 · confidence 3/52024-05-11

Summary

The paper proposes a methodology for assessing the presence of intermediate variables in transformers. Assume you have a dataset of examples, which are labelled with the intermediate variable for a particular phenomenon. Prior work would use this data to train linear/non-linear probing classifiers on the hidden states of the transformer. This paper suggests that we should prune the model with these labels to discover a sub-circuit and that the sub-circuit allows us to discover the intermediate variables more easily. The authors explore this technique in four experimental settings and empirically validate that the discovered circuit components play an important part in the circuit.

Rating

7

Confidence

3

Ethics flag

1

Reasons to accept

- The authors study four applications for circuit probing in experimental setting ranging from toy experiments on specially small models (Experiments 1 and 2), a study of training dynamics (Experiments 3), and interpretability on a pre-trained language model with millions of parameters (Experiment 4) - The paper proposes imaginative new experimental settings (Experiments 1 and 2) that illustrate the role of intermediate variables and how they can lead to better understanding - The empirical analysis is very thorough and leverages a number of related works (amnesic probing, causal abstractions, linear probing, non-linear probing)

Reasons to reject

- The main method could be better motivated, presented and ablated. How important is the contrastive similarity loss? Would the method still work with a standard cross-entropy loss over the intermediate labels? How important is pruning as opposed to standard fine-tuning or PEFT? What if we performed prior probing methods on residual stream updates as opposed to hidden states? - The causal analysis in Experiments 2-4 is weak, as it relies too heavily on performance drops under targeted ablations compared to random ablation. Rather, the authors should consider activation patching and more targeted interventions to demonstrate causality. - While the paper makes a good case for the limitations of linear and non-linear probing in Experiments 1-3, Experiment 4 seems to lack these simple baselines.

Questions to authors

It seems like the main caption for what should be Figure 2 does not exist?

Reviewer XRXi2024-06-04

Thank you to the authors for the detailed response. I think better formalizing the claims about causality and presenting the method more clearly will strengthen the paper, and I am increasing my score accordingly. Regarding my comment about the experiments, thank you for pointing me to the example Appendix Table 8. This example is interesting and worth highlighting, although it doesn't entirely address my concerns---for example, from Fig. 14, a number of other components are also associated with substantial drops in ablated accuracy, so might have similar effects. Regarding my suggestion (b), my point was to separate the nearest neighbor objective from pruning--so training on the same objective, but optimizing a linear projection matrix rather than a parameter mask.

Reviewer Dcii2024-06-05

Thanks for the clarification. I would like to keep my rating the same.

Reviewer UN6h2024-06-06

Reviewer response

Thank you for the clear response! Since the authors committed to including the additional baselines in the final version, I will increase my score. Along with reviewer XRXi I would encourage the authors to add clarifications regarding the claims of causality and add a limitations section. A quick clarification: > Computing the CE loss When I suggested the alternative method of training with CE loss instead of a contrastive loss, I was thinking of initializing a new classification head to compute the CE loss. However, I agree that the lack of newly initialized parameters is an advantage of the contrastive loss!

Program Chairsdecision2024-07-10

Decision

Accept

© 2026 NYSGPT2525 LLC