Skip to main content

Circuit Tracing

Circuit tracing shows the steps a model takes inside to get from a prompt to its next token. Neuronpedia makes attribution graphs for your prompts, and gives you tools to explore, label, steer, and share them.

Start here: https://neuronpedia.org/graph

The circuit tracer for "The capital of the state containing Dallas is", with a subgraph that groups the Texas, capital, and Austin features.

Background​

Anthropic's Circuit Tracing paper shows a way to trace how a model gets to its output. The method replaces the model's MLPs with transcoders, which have features that are easier to understand. It then calculates how much each feature, token, and error term adds to the next one. The result is an attribution graph.

Neuronpedia made this tool with Anthropic and the Anthropic Fellows. It uses the open source circuit-tracer library.

For a longer introduction, see:

Example​

The Dallas graph uses the prompt "The capital of the state containing Dallas is". Gemma 2 2B answers "Austin". The graph shows a path through the model that is approximately:

Dallas ➡️ Texas ➡️ capital ➡️ Austin

In This Section​