AI Safety Camp 2025 - Project #24
Original Project Overview | Research β | Quick Start | Documentation
We discovered why language models fail at factual recall using our novel traceback graphing method.
GEMMA-2-2B: Early bottleneck (Layer 5, 19% depth) β Filters out semantic information β Wrong predictions
QWEN3-4B: Late bottleneck (Layer 12, 33% depth) β Preserves semantic information β Correct predictions
| Model | Top Prediction | Probability | Correct Answer | Result |
|---|---|---|---|---|
| GEMMA-2-2B | " home" | 10.5% | " Florida" (rank 6, 2.9%) | β Wrong |
| QWEN3-4B | " Florida" | 78.1% | " Florida" (rank 1) | β Correct |
27Γ probability difference which correlates to bottleneck position
What We Discovered:
- Models use ONE shared universal circuit for all tokens in this prompt (not separate circuits per output)
- Early bottlenecks cause systematic failures by discarding semantic information before processing completes
- Bottleneck features are high-leverage intervention targets - modifying one feature can fix entire categories of failures
- Architecture determines behavior - bottleneck position is more important than model size for factual accuracy
See Full Research:
- π Traceback Graphing Paper - Complete scientific paper (~6,800 words)
- π Southern State Case Study - Detailed analysis with data
- β Validation Results - Hypothesis testing
# Clone repository
git clone https://github.com/[repo]/autocircuit.git
cd autocircuit/neuronpedia_pipeline
# Install dependencies
pip install networkx python-louvain matplotlib requests pyyaml numpycd scripts
# 1. Generate attribution graph from Neuronpedia
python 1_generate_graph.py
# Enter prompt: "The southern most US state is"
# Select model: 1 (GEMMA-2-2B) or 2 (QWEN3-4B)
# 2. Convert to pipeline format
python 2_convert_graph.py
# 3. Analyze circuit (detect supernodes, bottlenecks)
python 3_analyze_circuit.py
# 4. Run traceback analysis (identify critical paths) β KEY INNOVATION
python 3b_traceback_paths.py --top-k 5
# 5. Generate visualizations
python 4_visualize.pyOutput: Comprehensive JSON analysis + 8 PNG visualizations showing circuit structure and bottleneck features
autocircuit/
βββ neuronpedia_pipeline/ # π¬ Main research code (START HERE)
β βββ README.md # Pipeline documentation
β βββ scripts/ # Analysis pipeline
β β βββ 1_generate_graph.py # API β raw graph
β β βββ 2_convert_graph.py # Convert format
β β βββ 3_analyze_circuit.py # Detect supernodes
β β βββ 3b_traceback_paths.py # Traceback analysis β KEY INNOVATION
β β βββ 4_visualize.py # Generate visualizations
β β βββ path_manager.py # Utilities
β βββ docs/ # All documentation
β β βββ papers/ # Main research papers (5)
β β βββ analyses/ # Supporting analyses (4)
β β βββ guides/ # How-to guides
β β βββ archive/ # Historical reference
β βββ config/ # Configuration
β βββ data/ # Generated data (gitignored)
β βββ skills/ # Claude Code skills (6)
β
βββ graph-analysis/ # Additional analysis tools
βββ agent-py/ # Agent-based analysis
βββ claude-code-skills/ # Automation skills
βββ config/ # Global configuration
βββ data/ # Global data
- Neuronpedia Pipeline README - Main pipeline documentation
- Documentation Index - Complete guide to all docs
- Traceback Graphing Paper β Main paper (~6,800 words)
- Southern State Findings - Case study: Why GEMMA predicts " home" instead of " Florida"
- Token Attribution Validation - Proof that models use shared circuits
- Traceback Findings - Cross-prompt patterns
- Traceback Graphing Concept - Theoretical foundation
Attribution method that traces backward from model outputs to identify bottleneck features.
How it works:
- Start from final-layer predictions
- Use backward BFS with geometric decay (score^0.8) to prevent exponential explosion
- Identify features appearing in 80%+ of paths (bottlenecks)
- Trace causal influence through intermediate layers
Why it matters: Traditional attribution identifies which INPUT tokens matter; traceback identifies which INTERMEDIATE FEATURES control behavior.
Finding: Models use ONE universal circuit for all tokens, not separate per-token circuits.
Evidence: Both top-5 and bottom-5 final-layer nodes converge on the SAME bottleneck (L2_F2604900 for GEMMA).
Implication: Intervening on bottleneck features affects all outputs simultaneously.
Finding: WHERE bottleneck occurs determines WHAT information survives.
| Model | Bottleneck | Depth % | Pattern |
|---|---|---|---|
| GEMMA | L2-5 | 8-19% | Early compression β Loses semantics |
| QWEN | L12 | 33% | Late bottleneck β Preserves semantics |
Implication: Model designers should place bottlenecks AFTER semantic processing (30-40% depth), not before (10-20%).
- Python 3.8+
- Dependencies:
networkx,python-louvain,matplotlib,requests,pyyaml,numpy - Neuronpedia API Key: Get from neuronpedia.org/account
β Completed:
- Traceback graphing algorithm implemented and validated
- GEMMA southern state analysis (L5 bottleneck identified - causes wrong predictions)
- Token attribution hypothesis REFUTED (models use shared circuits)
- Scientific paper drafted (~6,800 words, ready for submission)
- Comprehensive code documentation with detailed annotations
β³ In Progress:
- QWEN southern state traceback completion
- Cross-prompt bottleneck comparison
- Feature semantic investigation (what L5_F7993995 represents)
π Planned:
- Intervention experiments (ablation, amplification)
- Additional visualizations and graphs
- Cross-model generalization testing (GPT, Claude, Llama)
This is an active research project from AI Safety Camp 2025.
This project systematically discovers interpretable reasoning circuits in large language models by data mining attribution graphs from Neuronpedia's circuit tracer (based on Anthropic's circuit tracing publication).
Our approach: Use LLM agents to automatically collect, process, and analyze attribution graphs across diverse prompt categories (factual recall, arithmetic, linguistic reasoning), identifying recurring computational patterns that represent stable reasoning pathways.
- Automated graph collection via Neuronpedia's API across systematically varied prompts
- Graph simplification algorithms to extract core computational structures while filtering noise
- Pattern recognition to identify circuit motifs that appear across multiple contexts
- Validation through targeted interventions on discovered circuits
- Traceback graphing β (our novel contribution) to identify bottleneck features
Automated circuit discovery could significantly contribute to reducing AGI risks by:
- Democratizing mechanistic interpretability
- Enabling real-time safety monitoring
- Detecting dangerous capabilities before they cause harm
- Accelerating AI alignment research through systematic understanding
Key Assumptions:
- AGI systems will continue using transformer-like architectures
- Dangerous AI behaviors correspond to identifiable computational circuits
- Human society maintains coordination to implement interpretability-based safety measures
- Automated interpretability tools will be adopted by AI developers
- Sufficient computational resources for real-time circuit analysis
Phase 1: Automated Circuit Discovery and Feature Annotation (using Anthropic's methods + our traceback graphing)
Phase 2: Systematic Circuit Validation and Exploration (intervention experiments, steering)
Current Status: Phase 1 complete with major research breakthrough. See research papers for findings.
Version: 2.0 (Traceback Implementation)
Last Updated: February 2, 2026
Status: β Major findings documented, ready for team review and external sharing