Summary
This paper proposes a set of tests to evaluate how well a "circuit" meets its desired properties.
- Here a circuit refers to a subnetwork, which could be either synthetic (e.g. constructed according to RASP) or discovered in a trained model.
- The desired properties considered in this paper are:
- *faithfulness*, where the circuit should preserve the performance of the original model;
- *localization*, where removal of the circuit should alter the model's output;
- *minimality*, which says the edges in a circuit (treated as a computational graph) should not be redundant.
There are 3 "idealized tests" intended as necessary (but not sufficient) conditions:
- **Equivalence**, where the null hypothesis is that the circuit $C^*$ preserves the performance of the original model $M$.
- The test checks whether $C^*$ and $M$ have an equal chance of outperforming each other, which is a necessary condition (but not sufficient): rejecting the null means that $C^*$ necessarily does not preserve the performance.
- **Independence**, where the null hypothesis is that the output of the model after removing $C^*$ is independent of the output of the original model.
- The test computes the HSIC between the performance of $C^*$ and $M$.
- Note that this is a stringent requirement; this will later be modified into a "flexible" test.
- **Minimality**, where the null hypothesis is that all edges in $C^*$ are necessary and not redundant.
- The test checks whether the amount of performance change by removing an edge in $C^*$ is more than the amount of change caused by removing an edge that is believed to be redundant.
The paper also proposes 2 "flexible tests", where the difficulty of the test can be gradually varied by choosing different reference distributions when computing the test.
- **Sufficiency**, which computes the probability (over random circuits in a reference distribution) that $C^*$ is more faithful than a random circuit.
- **Partial necessity**, which checks whether with high probability, removing $C^*$ leads to a worse performance than removing a random circuit.
The paper then applies these tests on 2 synthetic circuits and 4 circuits manually discovered from trained Transformers.
- Synthetic circuits: for 2 types of the Tracr task, where the circuits are given as RASP programs.
- Discovered circuits: Indirect object identification (IOI), Induction, Docstring (DS), Greater-Than (G-T).
It finds that the synthetic circuits pass all 3 tests.
In contrast, the discovered circuits fail the test to various extents, but are still far from random.
Moreover, the flexible tests provide a more fine-grained understanding than the idealized tests (with binary outcomes).
Strengths
- The paper provides a quantitative way to evaluate the concept of "circuit" in models, by adopting the hypothesis testing framework. The proposed tests correspond to desired properties a circuit.
- The proposed tests are more thorough and fine-grained than some existing evaluation criteria, such as the knockdown effect.
- The paper are clearly written.
Weaknesses
- I'm concerned about the practical applicability of the tests.
As the paper also mentioned, the proposed tests are either too stringent, or can be sensitive to the circuit size and the choice of the reference distribution.
- The implications and use cases of the tests could be better discussed; e.g. please see questions below.
Questions
- About independency: neural networks are often overparameterized and hence likely contain a high level of redundancy. What if there are multiple circuits that are each faithful and minimal but are similar to each other? These seem to me should be considered as valid circuits, but they would violate independency.
- About minimality, I don't see why the randomly added edge would lead to a small $\delta(e^I, C^I)$: it's possible that adding a random connection would change the performance non-trivially (but likely negatively). For example, even a simple residual term would change the scale of the output and affect subsequent computations.
- Could you comment on the effect of different choices of activation patching?
- Could you comment on how the proposed tests can inform interventions on training (e.g. as regularization terms)? The hope is that this could make the trained networks more likely to contain circuits that more closely satisfy the desiderata.
- Can the proposed tests help with coming up a more precise definition of circuits, or inform how we should choose the granularity of the definition of "nodes"?
Minor clarifications:
- Eq (2): should the LHS be taking an absolute value?
- Line 246: not sure I understand what “a lucky draw” means; e.g. it could mean a draw that is better than q* fraction of random circuits?
- Line 250: what does "supersets of C" and "comparable to C" mean?
Limitations
The paper discusses the technical limitations.
There is no direct societal implication.