AB
AiBoss
project

Circuit Tracer - Anthropic's open-source AI model internal decision tracking tool

Circuit Tracer is an open-source tool developed by Anthropic for studying the internal workings of large language models. Circuit Tracer reveals the model's generative characteristics based on generative attribution graphs...

What is a Circuit Tracer?

Circuit Tracer, an open-source tool from Anthropic, is used to study the internal workings of large language models. Based on generative attribution graphs, Circuit Tracer reveals the steps a model takes to generate a specific output. Attribution graphs help researchers track the model's decision-making process, visualize relationships between features, and test different hypotheses. Circuit Tracer supports several popular open-source models, such as Gemma and Llama, and provides an interactive visualization interface based on Neuronpedia, facilitating user exploration and analysis of model behavior.

Main functions of Circuit Tracer

  • Generate attribution mapIt reveals the model's decision-making path and shows the influence relationships between features and nodes.
  • Visualization and InteractionBased on an interactive interface, attribution diagrams can be viewed and manipulated intuitively, making them easy to understand and share.
  • Model interventionModify the feature values and observe the changes in the output to verify the model behavior.
  • Supports multiple modelsIt is compatible with mainstream models such as Gemma and Llama, which facilitates comparative studies.

The technical principle of Circuit Tracer

  • TranscodersAttribution graphs are generated using a pre-trained transcoder. A transcoder is a neural network component that transforms the model's internal features into a more easily understood and interpretable form. Based on the transcoder, Circuit Tracer can capture the relationships between features and nodes within the model.
  • Direct Effect ComputationCircuit Tracer calculates the direct impact of each non-zero transcoder feature, transcoder error node, and input flag on other non-zero transcoder features and the output logit.
  • Graph pruningThe generated graph is pruned. The pruning process removes nodes and edges with less influence, retaining only those that significantly affect the model's decisions. Pruning parameters (such as node and edge thresholds) are user-defined, controlling the graph's complexity and clarity.
  • Interactive visual interfaceIt provides a web-based interactive visualization interface, allowing users to directly view and manipulate attribution graphs within a browser. The interface supports node labeling, grouping, and annotation, enabling users to more intuitively understand and analyze the model's internal mechanisms.

The project address for Circuit Tracer

Applications of Circuit Tracer

  • Model Behavior Research: Based on the attribution graph analysis model, understand the decision-making process and the internal logic in generating specific outputs.
  • Multilingual model analysisResearch the internal representations of multilingual models (such as Llama) and explore cross-lingual processing mechanisms.
  • Multi-step reasoning researchThe analysis aims to examine the behavior of the model in multi-step reasoning tasks and reveal the process and logic of step-by-step reasoning.
  • Model optimization and improvementBased on different hypotheses of intervention function testing, verify whether certain behaviors of the model meet expectations and optimize the model structure.
  • Education and SharingBased on an interactive visual interface, it intuitively displays the complex model decision-making process to others, facilitating teaching and communication.