Tracr: Compiled Transformers as a Laboratory for Interpretability
Not on the map. Why?
Abstract (arXiv)
We show how to "compile" human-readable programs into standard decoder-only transformer models. Our compiler, Tracr, generates models with known structure. This structure can be used to design experiments. For example, we use it to study "superposition" in transformers that execute multi-step algorithms. Additionally, the known structure of Tracr-compiled models can serve as ground-truth for evaluating interpretability methods. Commonly, because the "programs" learned by transformers are unknown it is unclear whether an interpretation succeeded. We demonstrate our approach by implementing and examining programs including computing token frequencies, sorting, and parenthesis checking. We provide an open-source implementation of Tracr at https://github.com/google-deepmind/tracr.
Key facts. Cited by 99 papers in the map (data through 7 Oct 2026). Builds on 26 of its 52 references that are in the map. First posted on arXiv 12 Jan 2023.
Builds on
26 of 52 references.
References · 26
- 2017Attention Is All You Needcited by 59,932
- 2016Layer Normalizationcited by 5,579
- 2014Going Deeper with Convolutionscited by 4,231
- 2016Gaussian Error Linear Units (GELUs)cited by 3,431
- 2022Locating and Editing Factual Associations in GPTcited by 2,609
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
- 2022In-context Learning and Induction Headscited by 930
- 2022Toy Models of Superpositioncited by 928
- 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 831
- 2020A Primer in BERTology: What we know about how BERT workscited by 807
- 2017Network Dissection: Quantifying Interpretability of Deep Visual Representationscited by 703
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
14 more
- 2020Towards Faithfully Interpretable NLP Systems: How should we define and evaluate faithfulness?cited by 590
- 2018Analysis Methods in Neural Language Processing: A Surveycited by 276
- 2020A Survey of the State of Explainable AI for Natural Language Processingcited by 206
- 2021Thinking Like Transformerscited by 182
- 2020Debugging Tests for Model Explanationscited by 146
- 2021Saturated Transformers are Constant-Depth Threshold Circuitscited by 137
- 2022Toward Transparent AI: A Survey on Interpreting the Inner Structures of Deep Neural Networkscited by 126
- 2021Statistically Meaningful Approximation: a Case Study on Approximating Turing Machines with Transformerscited by 101
- 2021Do Feature Attribution Methods Correctly Attribute Features?cited by 98
- 2019Benchmarking Attribution Methods with Relative Feature Importancecited by 89
- 2022Polysemanticity and Capacity in Neural Networkscited by 74
- 2020Towards falsifiable interpretability researchcited by 53
- 2021Robust Explainability: A Tutorial on Gradient-Based Attribution Methods for Deep Neural Networkscited by 48
- 2019Evaluating Explanation Without Ground Truth in Interpretable Machine Learningcited by 28
Built on by
Citing papers per year: 2023: 18; 2024: 42; 2025: 18; 2026: 21.
99 papers.
Sort:
By area:
- 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 700
- 2024Mechanistic Interpretability for AI Safety -- A Reviewcited by 415
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
- 2023Looped Transformers as Programmable Computerscited by 224
- 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 198
- 2023Localizing Model Behavior with Path Patchingcited by 182
- 2023A Toy Model of Universality: Reverse Engineering How Networks Learn Group Operationscited by 141
- 2024Fine-Tuning Enhances Existing Mechanisms: A Case Study on Entity Trackingcited by 140
- 2023What Formal Languages Can Transformers Express? A Surveycited by 120
- 2024A Practical Review of Mechanistic Interpretability for Transformer-Based Language Modelscited by 113
- 2023Mechanistically analyzing the effects of fine-tuning on procedurally defined taskscited by 110
- 2024A Primer on the Inner Workings of Transformer-based Language Modelscited by 83
38 more
- 2024On the Role of Attention Heads in Large Language Model Safetycited by 70
- 2023Tighter Bounds on the Expressivity of Transformer Encoderscited by 65
- 2024Can Looped Transformers Learn to Implement Multi-step Gradient Descent for In-context Learning?cited by 60
- 2024Finding Transformer Circuits with Edge Pruningcited by 58
- 2023From task structures to world models: What do LLMs know?cited by 46
- 2023Learning Transformer Programscited by 40
- 2024Counting Like Transformers: Compiling Temporal Counting Logic Into Softmax Transformerscited by 39
- 2025Between Circuits and Chomsky: Pre-pretraining on Formal Languages Imparts Linguistic Biasescited by 36
- 2024Simulation of Graph Algorithms with Looped Transformerscited by 29
- 2024Separations in the Representational Capabilities of Transformers and Recurrent Architecturescited by 29
- 2024Hypothesis Testing the Circuit Hypothesis in LLMscited by 29
- 2024Language Models Need Inductive Biases to Count Inductivelycited by 25
- 2024Universal Length Generalization with Turing Programscited by 25
- 2024InterpBench: Semi-Synthetic Transformers for Evaluating Mechanistic Interpretability Techniquescited by 24
- 2024Efficient Automated Circuit Discovery in Transformers using Contextual Decompositioncited by 23
- 2024Position Coupling: Improving Length Generalization of Arithmetic Transformers Using Task Structurecited by 22
- 2023Red Teaming Deep Neural Networks with Feature Synthesis Toolscited by 21
- 2024Opening the AI black box: program synthesis via mechanistic interpretabilitycited by 19
- 2024What Can Transformer Learn with Varying Depth? Case Studies on Sequence Learning Taskscited by 19
- 2024Looped ReLU MLPs May Be All You Need as Practical Programmable Computerscited by 19
- 2024Transformer Circuit Faithfulness Metrics are not Robustcited by 18
- 2023Trainable Transformer in Transformercited by 17
- 2024Can Transformers Reason Logically? A Study in SAT Solvingcited by 16
- 2024Sparse Autoencoders Enable Scalable and Reliable Circuit Identification in Language Modelscited by 13
- 2024How Transformers Utilize Multi-Head Attention in In-Context Learning? A Case Study on Sparse Linear Regressioncited by 13
- 2023Mastering Symbolic Operations: Augmenting Language Models with Compiled Neural Networkscited by 12
- 2024Sheaf Discovery with Joint Computation Graph Pruning and Flexible Granularitycited by 11
- 2024Circuit Compositions: Exploring Modular Structures in Transformer-Based Language Modelscited by 9
- 2024Transformers Meet Relational Databasescited by 9
- 2024Discrete Neural Algorithmic Reasoningcited by 8
- 2024Transformers as Transducerscited by 8
- 2026All Circuits Lead to Rome: Rethinking Functional Anisotropy in Circuit and Sheaf Discovery for LLMscited by 8
- 20233VL: Using Trees to Improve Vision-Language Models' Interpretabilitycited by 7
- 2024ALTA: Compiler-Based Analysis of Transformerscited by 7
- 2025Llama See, Llama Do: A Mechanistic Perspective on Contextual Entrainment and Distraction in LLMscited by 6
- 2025Whither symbols in the era of advanced neural networks?cited by 6
- 2025Bridging Kolmogorov Complexity and Deep Learning: Asymptotically Optimal Description Length Objectives for Transformerscited by 6
- 2025Superposition as Lossy Compression: Measure with Sparse Autoencoders and Connect to Adversarial Vulnerabilitycited by 6
50 most cited of 99 All 99 (JSON)
- 2026Are We Recovering Mechanisms? Objective-Level Recovery Gaps in Mechanistic Interpretability1 Oct 2026
- 2026Right Answer, Wrong Mechanism: Detecting Pernicious Divergence in Causal Interventions30 Sep 2026
- 2026Mechanistic Tomography: Designed Measurement for Control-Oriented Interpretability19 Aug 2026
- 2026Can Graph Learning Learn Circuits?9 Aug 2026
- 2026Circuit Claims Depend on What Is Extracted and How It Is Compared21 Jul 2026
- 2026Input Pathways Shape Few-Shot, Not Zero-Shot, Binding in Tiny Transformers: A Fully-Enumerable Study6 Jul 2026
- 2026Differentiate the Evaluator, Not the Program: An Efficient Runtime Representation for Neuro-Symbolic Learning3 Jul 2026
- 2026Individual Parameters in Weight-Sparse Transformers Appear Interpretable3 Jul 2026
- 2026Validating Causal Abstraction Metrics on Simulated Complex Systems30 Jun 2026
- 2026Can Language Model Agents be Helpful Circuit Explainers in Mechanistic Interpretability?23 Jun 2026
- 2026Polymorphism Is Rotation: Operational Mechanistic Interpretability from a Two-Layer Transformer to Pythia-70m23 May 2026
- 2026ContextEcho: A Benchmark for Persona Drift in Long Agentic-Coding Sessions22 May 2026
38 more
- 2026The Neural Compiler: Program-to-Network Translation for Hybrid Scientific Machine Learning21 May 2026
- 2026All Circuits Lead to Rome: Rethinking Functional Anisotropy in Circuit and Sheaf Discovery for LLMs12 May 2026
- 2026Navigating by Old Maps: The Pitfalls of Static Mechanistic Localization in LLM Post-Training7 May 2026
- 2026Make Mechanistic Interpretability Auditable: A Call to Develop Guidelines via Continuous Collaborative Reviewing24 Apr 2026
- 2026Seeing Through Circuits: Faithful Mechanistic Interpretability for Vision Transformers15 Apr 2026
- 2026Symmetry Reveals Layerwise Dynamics: How Transformers Perform In-Context Classification13 Apr 2026
- 2026Loom: A Scalable Analytical Neural Computer Architecture9 Apr 2026
- 2026A Small-Scale System for Autoregressive Program Synthesis Enabling Controlled Experimentation9 Feb 2026
- 2026Weights to Code: Extracting Interpretable Algorithms from the Discrete Transformer9 Jan 2026
- 2025Dual-objective Language Models: Training Efficiency Without Overfitting16 Dec 2025
- 2025Superposition as Lossy Compression: Measure with Sparse Autoencoders and Connect to Adversarial Vulnerability15 Dec 2025
- 2025CircuitSeer: Mining High-Quality Data by Probing Mathematical Reasoning Circuits in LLMs21 Oct 2025
- 2025The Transformer Cookbook1 Oct 2025
- 2025Bridging Kolmogorov Complexity and Deep Learning: Asymptotically Optimal Description Length Objectives for Transformers26 Sep 2025
- 2025Whither symbols in the era of advanced neural networks?7 Aug 2025
- 2025On the Existence of Universal Simulators of Attention23 Jun 2025
- 2025ALPS: Attention Localization and Pruning Strategy for Efficient Alignment of Large Language Models24 May 2025
- 2025Gradient-Based Program Repair: Fixing Bugs in Continuous Program Spaces23 May 2025
- 2025Illusion or Algorithm? Investigating Memorization, Emergence, and Symbolic Processing in In-Context Learning16 May 2025
- 2025Tracr-Injection: Distilling Algorithms into Pre-trained Language Models15 May 2025
- 2025Llama See, Llama Do: A Mechanistic Perspective on Contextual Entrainment and Distraction in LLMs14 May 2025
- 2025Language Models, Graph Searching, and Supervision Adulteration: When More Supervision is Less and How to Make More More13 Mar 2025
- 2025`A la recherche du sens perdu: your favourite LLM might have more to say than you can understand28 Feb 2025
- 2025Neuroplasticity and Corruption in Model Mechanisms: A Case Study Of Indirect Object Identification27 Feb 2025
- 2025Between Circuits and Chomsky: Pre-pretraining on Formal Languages Imparts Linguistic Biases26 Feb 2025
- 2025On the Robustness of Transformers against Context Hijacking for Linear Classification21 Feb 2025
- 2025Emergent Stack Representations in Modeling Counter Languages Using Transformers3 Feb 2025
- 2024Transformers Meet Relational Databases6 Dec 2024
- 2024An In-depth Investigation of Sparse Rate Reduction in Transformer-like Models26 Nov 2024
- 2024ALTA: Compiler-Based Analysis of Transformers23 Oct 2024
- 2024Mesa-Extrapolation: A Weave Position Encoding Method for Enhanced Extrapolation in LLMs21 Oct 2024
- 2024Adversarial Testing as a Tool for Interpretability: Length-based Overfitting of Elementary Functions in Transformers17 Oct 2024
- 2024On the Role of Attention Heads in Large Language Model Safety17 Oct 2024
- 2024Hypothesis Testing the Circuit Hypothesis in LLMs16 Oct 2024
- 2024Looped ReLU MLPs May Be All You Need as Practical Programmable Computers12 Oct 2024
- 2024Can Looped Transformers Learn to Implement Multi-step Gradient Descent for In-context Learning?10 Oct 2024
- 2024Can Transformers Reason Logically? A Study in SAT Solving9 Oct 2024
- 2024Circuit Compositions: Exploring Modular Structures in Transformer-Based Language Models2 Oct 2024
50 newest of 99 All 99 (JSON)
- 2024Can Transformers Reason Logically? A Study in SAT Solvingcited by 16
- 2023Mastering Symbolic Operations: Augmenting Language Models with Compiled Neural Networkscited by 12
- 2026All Circuits Lead to Rome: Rethinking Functional Anisotropy in Circuit and Sheaf Discovery for LLMscited by 8
- 2025CircuitSeer: Mining High-Quality Data by Probing Mathematical Reasoning Circuits in LLMscited by 3
- 2026All Circuits Lead to Rome: Rethinking Functional Anisotropy in Circuit and Sheaf Discovery for LLMs12 May 2026
- 2025CircuitSeer: Mining High-Quality Data by Probing Mathematical Reasoning Circuits in LLMs21 Oct 2025
- 2024Can Transformers Reason Logically? A Study in SAT Solving9 Oct 2024
- 2023Mastering Symbolic Operations: Augmenting Language Models with Compiled Neural Networks4 Apr 2023
- 2023From task structures to world models: What do LLMs know?cited by 46
- 2023From task structures to world models: What do LLMs know?6 Oct 2023
- 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 700
- 2024Mechanistic Interpretability for AI Safety -- A Reviewcited by 415
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
- 2023Looped Transformers as Programmable Computerscited by 224
- 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 198
- 2023Localizing Model Behavior with Path Patchingcited by 182
- 2023A Toy Model of Universality: Reverse Engineering How Networks Learn Group Operationscited by 141
- 2024Fine-Tuning Enhances Existing Mechanisms: A Case Study on Entity Trackingcited by 140
- 2023What Formal Languages Can Transformers Express? A Surveycited by 120
- 2024A Practical Review of Mechanistic Interpretability for Transformer-Based Language Modelscited by 113
- 2023Mechanistically analyzing the effects of fine-tuning on procedurally defined taskscited by 110
- 2024A Primer on the Inner Workings of Transformer-based Language Modelscited by 83
12 most cited of 88 All 88 (JSON)
- 2026Are We Recovering Mechanisms? Objective-Level Recovery Gaps in Mechanistic Interpretability1 Oct 2026
- 2026Right Answer, Wrong Mechanism: Detecting Pernicious Divergence in Causal Interventions30 Sep 2026
- 2026Mechanistic Tomography: Designed Measurement for Control-Oriented Interpretability19 Aug 2026
- 2026Can Graph Learning Learn Circuits?9 Aug 2026
- 2026Circuit Claims Depend on What Is Extracted and How It Is Compared21 Jul 2026
- 2026Input Pathways Shape Few-Shot, Not Zero-Shot, Binding in Tiny Transformers: A Fully-Enumerable Study6 Jul 2026
- 2026Differentiate the Evaluator, Not the Program: An Efficient Runtime Representation for Neuro-Symbolic Learning3 Jul 2026
- 2026Individual Parameters in Weight-Sparse Transformers Appear Interpretable3 Jul 2026
- 2026Validating Causal Abstraction Metrics on Simulated Complex Systems30 Jun 2026
- 2026Polymorphism Is Rotation: Operational Mechanistic Interpretability from a Two-Layer Transformer to Pythia-70m23 May 2026
- 2026The Neural Compiler: Program-to-Network Translation for Hybrid Scientific Machine Learning21 May 2026
- 2026Navigating by Old Maps: The Pitfalls of Static Mechanistic Localization in LLM Post-Training7 May 2026
12 newest of 88 All 88 (JSON)