Methods

How do researchers actually investigate a candidate feature? Mechanistic interpretability draws on a handful of recurring methods. Some are general-purpose techniques borrowed from XAI; others are MI-specific — developed for the purpose of reverse-engineering a network's internals.

MI Method families
MI Methods. [Source].

Method families

  • Perturbation-based methods: ablation, activation patching, causal tracing, path patching, and causal scrubbing.
  • Output attribution: logit difference, per-token loss, direct logit attribution, and logit lens.
  • Scoring and probing: scores such as induction or compositionality measures that summarize model behavior.
  • Visualization and interpretation: feature visualization and max-activating dataset examples.
  • Representation learning: dictionary learning and sparse autoencoders.
  • Architectural modifications: changes such as linearizing LayerNorm to make internal structure easier to analyze.
Feature visualization optimized to maximize a curve detector's activation, showing a curved edge at a preferred orientation
Feature visualization for curve detector neurons. [Source].

Feature visualization optimizes an input from scratch to make a chosen component fire as strongly as possible. Because every pixel in the resulting image was added by the optimization process in order to cause the neuron to fire, the result reflects what the component is sensitive to, rather than what happens to appear in any one photograph.

Grid of ImageNet dataset examples that most strongly activate a curve detector
Max-activating dataset examples for a curve detector. [Source].

Dataset examples take the opposite approach: instead of generating an input, search a real dataset for the examples that activate a component most strongly. This shows what actually activates the component under naturalistic conditions, which can differ from what an unconstrained optimizer finds.

Synthetic curve stimuli of varying curvature and orientation used to probe a curve detector's response
Synthetic curve stimuli that isolate orientation and curvature. [Source].

Synthetic examples replace natural images with stimuli the researcher builds by hand, varying one property at a time — orientation, curvature, color, scale. Because the experimenter controls every property of the input, this method can isolate a specific variable in a way that natural dataset examples usually cannot.

Joint tuning curve showing activation of neighboring orientation-selective detectors as a stimulus is rotated
Joint tuning across a family of orientation-selective curve detectors. [Source].

Joint tuning varies a stimulus continuously, such as rotating a shape through all orientations, while tracking several related components at once. This reveals how components in a family divide up a continuous variable between them, rather than characterizing any single component in isolation.

MI-specific methods

Feature visualization, dataset examples, synthetic examples, and joint tuning are behavioral: they characterize a component from its input-output responses without opening it up. The next three methods look inside the network itself.

Weight heatmap showing a circuit connecting earlier features to a later component
Feature implementation heatmap for the curve-detector circuit [Source].

Feature implementation inspects the circuit that constructs a component — the signed weights connecting it to earlier components. Reading those weights can reveal the algorithm a component computes from its inputs, rather than only describing what the component responds to from the outside.

Circuit diagram showing a component feeding into a downstream component
Downstream feature use by circle and curve-using features [Source].

Feature use looks the other direction: at the downstream components that read from a given component. Inspecting how those clients weight and combine the component's output can reveal what role the component plays in the larger computation, beyond what it responds to.

Handwritten circuits go a step further than inspecting weights: a researcher hand-sets every weight in a small circuit to implement a hypothesized algorithm from scratch, with no learned parameters. If the handwritten circuit reproduces the behavior of the trained network, the hypothesized algorithm is at least sufficient to explain it.

Build a Curve-Detection Circuit

Change the early edge detectors and step through the computation. Excitatory weights add compatible evidence; an inhibitory weight subtracts an opposing orientation.

1. Input evidence

left edge

0.85

right edge

0.75

opposing

0.20

curve = 0.65(0.85) + 0.65(0.75) - 0.70(0.20)

curve

0.90

circle client

0.97

A circuit explanation names the features, the signed connections between them, and the computation those connections implement.

Adjust the early edge detectors and step through implementation and use: weighted edges build the curve feature, which a downstream circle client then reads.

Checkpoint

A researcher wants to know how a component's output is actually used by the rest of the network, not just what makes the component fire. Which method addresses that question, and why don't feature visualization or dataset examples answer it?