What problem does it solve? Correlation-based analyses like magnitude analysis cannot distinguish components that merely activate strongly from those that actually drive model behavior. This Skill provides causal attribution methods that intervene on internal model objects to determine which attention heads, MLP layers, and edges are causally responsible for specific behaviors in transformer models like GPT-2 and GPT-J. ## Core Features & Use Cases - Patching: Replace activations from a clean run with counterfactual activations to localize where task-specific information (e.g., factual knowledge) is introduced, including causal tracing and Rank-One Model Editing (ROME) demos. - Ablation: Zero out attention or MLP sublayers and measure performance drops to determine causal necessity, with demos for dissecting factual recall via attention knockout and hidden state analysis. - Attribution Patching: Approximate full patching with a single backward pass using the inner product of gradients and activation differences, enabling fast circuit discovery and edge attribution across heads and MLP layers. - Use Case: A researcher investigating how GPT-2 recalls "The capital of France is Paris" can run sublayer knockout experiments to find critical layers, then use attribution patching to efficiently map the responsible circuit before applying ROME to edit the factual association. ## Quick Start Ask the agent to run a causal tracing experiment on GPT-2 to localize which layers are responsible for a factual prediction like "The capital of France is Paris".