Inferensys

Glossary

Causal Scrubbing

A mechanistic interpretability technique that tests a hypothesized circuit by resampling activations from a corrupted dataset and verifying that the model's behavior is fully mediated by the identified subgraph.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
MECHANISTIC INTERPRETABILITY

What is Causal Scrubbing?

A hypothesis-driven validation technique for testing whether a specific subgraph of a neural network fully mediates a behavior by replacing activations with samples from a corrupted distribution.

Causal Scrubbing is a mechanistic interpretability method that evaluates a hypothesized circuit by resampling the activations of specific model components from a "corrupted" dataset and verifying that the network's output is entirely determined by the identified subgraph. The core premise is that if a circuit is truly responsible for a behavior, then replacing all other activations with values from inputs where the behavior is absent should not alter the model's performance on the original task.

The technique operates by performing a tree-based search over the model's computational graph, systematically replacing node activations with samples drawn from a reference distribution where the causal variable of interest has been randomized. A successful scrub—where performance remains high despite the corruption of irrelevant pathways—provides strong evidence that the hypothesized circuit is both necessary and sufficient for the behavior, distinguishing genuine mechanistic understanding from spurious correlational explanations.

MECHANISTIC INTERPRETABILITY

Key Characteristics of Causal Scrubbing

Causal scrubbing is a rigorous falsification test for hypothesized circuits in neural networks. It verifies that a proposed subgraph fully mediates a specific behavior by resampling activations from a corrupted dataset and checking if the model's performance is preserved.

01

The Core Hypothesis Test

Causal scrubbing operates on a simple principle: if a hypothesized circuit is correct, replacing all other activations with noise should not degrade performance. The method resamples activations from a 'corrupted' distribution where the key causal factors are broken, but only for nodes outside the proposed circuit. If the model's loss on the original task is recovered when the circuit's activations are patched in, the hypothesis is validated. This directly tests the completeness of the proposed subgraph.

02

Resampling & Activation Patching

The technique relies on activation patching across multiple forward passes:

  • Clean Pass: Run the model on the original input to capture the 'correct' activations for the hypothesized circuit nodes.
  • Corrupted Pass: Run the model on a perturbed input (e.g., shuffled tokens, noise) to capture 'incorrect' activations for all other nodes.
  • Patched Pass: Run a third pass where the circuit nodes use the clean activations, and all other nodes use the corrupted activations. The model's output is then evaluated.
03

Distinction from Ablation

Causal scrubbing is fundamentally different from ablation (zeroing or mean-replacing activations):

  • Ablation removes information, creating out-of-distribution states that can cause unpredictable model failures.
  • Causal Scrubbing replaces information with a valid, in-distribution alternative from a corrupted dataset. This preserves the model's typical activation statistics while breaking the specific causal relationship under investigation, providing a more faithful test of the circuit's role.
04

Iterative Refinement of Circuits

The process is inherently iterative and serves as a debugging tool for mechanistic interpretability:

  1. Propose: An initial circuit is hypothesized based on attention patterns or weight analysis.
  2. Scrub: The scrubbing test is applied. If performance drops significantly, the circuit is incomplete.
  3. Revise: The researcher analyzes the nodes where the patched activations failed to recover performance, identifying missing components (e.g., a forgotten attention head or MLP neuron).
  4. Repeat: The expanded circuit is tested again until the scrubbing test is passed, confirming the hypothesis.
05

Formalizing the Falsification Criterion

A successful causal scrubbing test provides strong evidence that the identified subgraph is a faithful causal model of the behavior. The criterion is formalized as: for a given behavior B and a hypothesized circuit C, the model's performance on B should be statistically indistinguishable when running the full model versus running the model where only C receives clean activations and all other nodes receive activations from a distribution that breaks B. This moves interpretability from correlational observation to interventional proof.

06

Relationship to Other Methods

Causal scrubbing integrates concepts from several interpretability techniques:

  • Activation Patching: It is a systematic, hypothesis-driven application of patching, rather than an exploratory one.
  • Causal Mediation Analysis: It directly tests for a perfect mediation condition, where the indirect effect through the circuit fully explains the total effect.
  • Mechanistic Interpretability: It serves as the gold-standard end-to-end validation step after discovering circuits via other means like sparse autoencoders or probing. It answers the question: 'Have we found the entire algorithm, or just a part of it?'
CAUSAL SCRUBBING EXPLAINED

Frequently Asked Questions

Clear, technical answers to the most common questions about the causal scrubbing technique for mechanistic interpretability.

Causal scrubbing is a mechanistic interpretability technique that tests a hypothesized circuit in a neural network by resampling activations from a corrupted dataset and verifying that the model's behavior is fully mediated by the identified subgraph. The process works by first proposing a specific computational subgraph (a circuit) believed to be responsible for a particular behavior. Then, it systematically replaces activations at nodes outside this circuit with activations derived from a 'corrupted' or baseline dataset where the relevant feature is destroyed. If the model's performance on the task remains unchanged after this intervention, the hypothesized circuit is validated as both necessary and sufficient. If performance degrades, the hypothesis is falsified, revealing that the circuit is incomplete or incorrect. This method provides a rigorous, causal test rather than a mere correlational observation.

MECHANISTIC INTERPRETABILITY COMPARISON

Causal Scrubbing vs. Other Interpretability Methods

Comparing Causal Scrubbing against other key interpretability techniques across dimensions of rigor, scope, and computational cost.

FeatureCausal ScrubbingIntegrated GradientsLIME

Primary Objective

Hypothesis testing of circuits

Feature attribution

Local surrogate modeling

Interpretability Paradigm

Mechanistic

Attribution-based

Attribution-based

Requires Internal Access

Model-Agnostic

Evaluates Causal Fidelity

Computational Cost

High

Medium

Medium

Typical Granularity

Neuron/circuit

Input feature

Superpixel/word

Satisfies Completeness Axiom

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.