CircuitKIT: Circuit Discovery, Evaluation, and Application Toolkit for Mechanistic Interpretability
Abstract
Beyond explaining a model, circuit analysis can drive downstream interventions such as pruning, editing, steering, and selective fine-tuning. However, conducting such analyses currently requires stitching together separate implementations for discovery, evaluation, and intervention, as well as hand-authoring the contrastive prompts required by many discovery methods. This fragmentation makes methods difficult to compare and limits their application beyond canonical tasks. We introduce CircuitKIT, a source-available library that connects the circuit-analysis workflow through a typed, serializable representation of a discovered circuit, a neural-network artifact derived from weights, activations, and attributions, treated as first-class data that downstream stages produce and consume. CircuitKIT provides a suite of discovery algorithms, declarative interfaces for mapping structured data into discovery tasks, complementary circuit diagnostics, and downstream application modules. Together, these components provide common infrastructure for conducting and comparing circuit analyses. The library, examples, notebooks, and documentation are released as source-available software; an anonymized repository is available at \url{https://anonymous.4open.science/r/CK-1212}