Inferensys

Glossary

Causal Scrubbing

A formal hypothesis-testing framework that systematically replaces activations to verify if a proposed circuit explains a model's behavior by checking if the circuit's components are faithful under resampling.
Governance lead reviewing model governance framework on laptop, policy documents visible, executive office setup.
MECHANISTIC HYPOTHESIS TESTING

What is Causal Scrubbing?

A formal framework for rigorously testing hypothesized neural network circuits by systematically resampling activations to verify if the proposed components are faithful and sufficient to explain model behavior.

Causal Scrubbing is a hypothesis-testing methodology that evaluates a proposed mechanistic circuit by replacing specific internal activations of a model with activations drawn from a reference distribution, then measuring whether the model's output remains consistent with the circuit's predicted behavior. The core principle is that if a hypothesized circuit truly captures the causal mechanism, the model's performance on the target task should be preserved under resampling of activations that the circuit claims are irrelevant, while performance should degrade when resampling activations the circuit identifies as critical.

The technique operates by defining an interpretability hypothesis that specifies which components—such as attention heads, MLP neurons, or residual stream directions—form a minimal circuit for a behavior. The researcher then performs resampling ablations, replacing activations at specific token positions and layers with values from a corrupted or alternative forward pass. Unlike traditional ablation methods that zero out or add noise to activations, causal scrubbing preserves the statistical structure of the model's internal representations, producing more faithful evaluations of circuit necessity and sufficiency without introducing out-of-distribution artifacts that can trigger spurious compensation mechanisms.

MECHANISTIC VALIDATION

Key Characteristics of Causal Scrubbing

A rigorous hypothesis-testing framework that systematically replaces activations to verify if a proposed circuit explains a model's behavior by checking if the circuit's components are faithful under resampling.

01

Hypothesis-Driven Circuit Testing

Causal scrubbing operates by formalizing a mechanistic hypothesis about which computational subgraph implements a behavior. The hypothesis specifies exactly which nodes (attention heads, MLP neurons) and edges (connections between them) are necessary and sufficient. This hypothesis is then tested by resampling activations from a reference distribution—typically activations from other inputs where the hypothesized circuit should behave identically—and measuring whether the model's output remains invariant. If the circuit is correctly specified, the scrubbed model's behavior should match the original.

02

Resampling-Based Intervention

Unlike ablation methods that zero out or add noise to activations, causal scrubbing replaces activations with real activations drawn from other forward passes. This preserves the natural statistics of the activation distribution, avoiding out-of-distribution artifacts that can trigger spurious compensation mechanisms. The key insight: if a component is truly irrelevant to a behavior, replacing its activations with those from a different input should not change the output. The resampling is performed at specific token positions and layers according to the hypothesis tree.

03

Faithfulness Metric

The core quantitative output of causal scrubbing is a faithfulness score that measures how well the hypothesized circuit explains the model's behavior. This is computed by comparing the model's output distribution under the scrubbed activations against the original output:

  • Perfect faithfulness: The scrubbed model produces identical outputs to the original
  • Low faithfulness: The hypothesis misses important components or includes irrelevant ones
  • The metric can be decomposed to identify which specific nodes in the hypothesis are most responsible for faithfulness failures
04

Tree-Structured Hypothesis Representation

Hypotheses in causal scrubbing are represented as tree structures where each node corresponds to a computational component and its activation context. The tree encodes:

  • Which inputs should map to the same activation under the hypothesis
  • Equivalence classes of token positions that should share representations
  • Hierarchical dependencies between components This tree structure enables systematic testing of complex, multi-component circuits by specifying precisely how activations should be resampled across different inputs while preserving the hypothesized computational structure.
05

Distinction from Activation Patching

While both are causal intervention techniques, causal scrubbing differs fundamentally from activation patching:

  • Activation patching: Replaces a single activation with one from a specific counterfactual input to measure local causal effects
  • Causal scrubbing: Systematically resamples many activations simultaneously according to a global hypothesis about the entire circuit
  • Scrubbing tests joint faithfulness of all hypothesized components together, while patching measures individual causal contributions
  • Scrubbing uses distributional resampling rather than single-point interventions, making it more robust to polysemantic neurons
06

Iterative Hypothesis Refinement

Causal scrubbing enables a scientific loop for mechanistic interpretability:

  1. Propose an initial circuit hypothesis based on observational techniques like attention pattern analysis
  2. Scrub the model by resampling activations according to the hypothesis
  3. Measure faithfulness—identify where the scrubbed model diverges from the original
  4. Refine the hypothesis by adding missing components or removing unnecessary ones
  5. Repeat until the circuit achieves high faithfulness, indicating a complete mechanistic explanation This iterative process transforms interpretability from speculation into falsifiable science.
METHODOLOGY COMPARISON

Causal Scrubbing vs. Other Causal Techniques

A comparison of causal scrubbing with other intervention-based and attribution-based techniques used to validate mechanistic circuits in neural networks.

FeatureCausal ScrubbingActivation PatchingCausal Mediation Analysis

Core Mechanism

Systematically resamples activations from a distribution to test if a hypothesized circuit faithfully reproduces behavior

Replaces a single activation with a cached value from a counterfactual forward pass

Measures the average causal effect of a mediator by intervening on it while holding other paths constant

Hypothesis Testing

Handles Redundancy

Granularity

Subgraph-level (entire circuits)

Node-level (single activation)

Node-level (single neuron or attention head)

Output Metric

Faithfulness score (how well the circuit recovers original behavior under resampling)

Logit difference or probability change

Indirect effect (IE) as a percentage of total effect

Requires Counterfactual Dataset

Computational Cost

High (requires multiple resampling runs per hypothesis)

Low (single forward pass per intervention)

Medium (requires three forward passes per mediator: clean, corrupted, and restored)

Primary Use Case

Validating that a proposed circuit is both necessary and sufficient for a behavior

Quickly localizing which components are causally implicated in a behavior

Quantifying the contribution of a specific component to a known causal pathway

CAUSAL SCRUBBING EXPLAINED

Frequently Asked Questions

Clear answers to common questions about the causal scrubbing hypothesis-testing framework for validating mechanistic interpretability circuits.

Causal scrubbing is a formal hypothesis-testing framework that systematically replaces internal model activations to verify whether a proposed circuit faithfully explains a neural network's behavior. The core idea is to take a hypothesized circuit—a subgraph of the model's computational graph—and test it by resampling activations from a reference distribution of inputs where the circuit claims the behavior should be identical. If the circuit is correct, scrubbing (replacing) the activations of nodes outside the circuit with values from other inputs that share the same circuit-node activations should not change the model's output. If the output changes significantly, the hypothesis is falsified. This method moves beyond qualitative interpretability by providing a rigorous, quantitative test of whether a proposed mechanism is both necessary and sufficient for the behavior under study.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.