automatic-circuit-discovery

Automates circuit discovery in transformer models using computational graph editing and analysis.

75|7|Updated May 2, 2026
One-click install
npx skills add https://github.com/zjunlp/Mechanist --skill automatic-circuit-discovery-zjunlp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: automatic-circuit-discovery
Source: https://github.com/zjunlp/Mechanist/tree/main/skills/mechanism-skills/circuit-discovery/intervention-based-edge-search
Command: npx skills add https://github.com/zjunlp/Mechanist --skill automatic-circuit-discovery-zjunlp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires acdc, and includes scripts (resource) and references (resource) components.

What problem does it solve? Manually identifying which attention heads and MLP components inside a transformer are responsible for a specific behavior is slow and error-prone. This Skill automates circuit discovery by running the ACDC (Automatic Circuit Discovery) pipeline, which prunes a model's computational graph down to the edges that actually matter for a given task. ## Core Features & Use Cases - Automated Circuit Discovery: Runs the ACDC pipeline to iteratively remove edges from a transformer's computational graph and isolate the minimal circuit responsible for a behavior. - Computational Graph Manipulation: Provides API references for building, editing, and visualizing computational graphs with nodes (attention heads, MLPs) and typed edges. - Experiment Management: Supports loading models, constructing graphs from model hooks, running experiments, and saving or reloading results, with optional Weights & Biases logging. - Use Case: A mechanistic interpretability researcher studying indirect object identification (IOI) can run the demo script to launch the ACDC pipeline, then visualize the recovered circuit with Graphviz to verify which heads drive the behavior. ## Quick Start Run the ACDC demo script to launch the default automated circuit discovery pipeline on a transformer model.

Frequently Asked Questions about automatic-circuit-discovery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run automated circuit discovery on a transformer model?

Run the ACDC pipeline by executing the demo script, which calls the main entry point of the Automatic-Circuit-Discovery library with default configuration. The pipeline iteratively prunes edges from the model's computational graph to recover the circuit responsible for a target behavior.

What is ACDC in mechanistic interpretability?

ACDC (Automatic Circuit Discovery) is a method from the paper 'Towards Automated Circuit Discovery for Mechanistic Interpretability' that automates finding circuits in transformer models. It works by editing the computational graph and measuring the effect of removing edges on task performance.

What dependencies does the ACDC pipeline require?

The pipeline requires a Python 3.8+ environment with the Automatic-Circuit-Discovery repository installed via Poetry, plus system dependencies such as Graphviz for graph visualization. It also checks that the installed TransformerLens version meets its requirements.

Can I visualize the discovered circuit graph?

Yes, the TLACDCCorrespondence class provides a visualize method that renders the computational graph using Graphviz. You can display it directly or save the output to a file by passing a filename.

What are the limitations of automated circuit discovery?

ACDC requires a defined task metric and clean versus corrupted input pairs to score edge importance, so it does not apply to behaviors without measurable outputs. Results also depend on pruning thresholds, and experiments can be computationally expensive on large models.