mlsanityData to 14 Oct 2026

Tracr-Injection: Distilling Algorithms into Pre-trained Language Models

arXiv 2505.10719 ↗First posted 15 May 2025cs.CLcited by 1

Not on the map. Why?

Abstract (arXiv)

Motivated by the surge of large language models, there has been a push to formally characterize the symbolic abilities intrinsic to the transformer architecture. A programming language, called RASP, has been proposed, which can be directly compiled into transformer weights to implement these algorithms. However, the tasks that can be implemented in RASP are often uncommon to learn from natural unsupervised data, showing a mismatch between theoretical capabilities of the transformer architecture, and the practical learnability of these capabilities from unsupervised data. We propose tracr-injection, a method that allows us to distill algorithms written in RASP directly into a pre-trained language model. We showcase our method by injecting 3 different algorithms into a language model. We show how our method creates an interpretable subspace within the model's residual stream, which can be decoded into the variables present in the code of the RASP algorithm. Additionally, we found that the proposed method can improve out-of-distribution performance compared to our baseline, indicating that indeed a more symbolic mechanism is taking place in the inner workings of the model. We release the code used to run our experiments.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 29 of its 36 references that are in the map. First posted on arXiv 15 May 2025.

Builds on

29 of 36 references.

References · 29

  1. 2017Attention Is All You Needcited by 60,361
  2. 2015Distilling the Knowledge in a Neural Networkcited by 10,324
  3. 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
  4. 2016Overcoming catastrophic forgetting in neural networkscited by 4,787
  5. 2014FitNets: Hints for Thin Deep Netscited by 1,653
  6. 2019TinyBERT: Distilling BERT for Natural Language Understandingcited by 1,167
  7. 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,160
  8. 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 992
  9. 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 724
  10. 2024Sparse Feature Circuits: Discovering and Editing Interpretable Causal Graphs in Language Modelscited by 435
  11. 2021Causal Abstractions of Neural Networkscited by 422
  12. 2023Attribution Patching Outperforms Automated Circuit Discoverycited by 209
17 more
  1. 2023Causal Abstraction: A Theoretical Foundation for Mechanistic Interpretabilitycited by 205
  2. 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 199
  3. 2021Thinking Like Transformerscited by 184
  4. 2024Black-Box Access is Insufficient for Rigorous AI Auditscited by 126
  5. 2023Tracr: Compiled Transformers as a Laboratory for Interpretabilitycited by 104
  6. 2022Limitations of Language Models in Arithmetic and Symbolic Inductioncited by 71
  7. 2022A Logic for Expressing Log-Precision Transformerscited by 67
  8. 2025International AI Safety Reportcited by 67
  9. 2024Finding Transformer Circuits with Edge Pruningcited by 60
  10. 2020How Can Self-Attention Networks Recognize Dyck-n Languages?cited by 51
  11. 2024Counting Like Transformers: Compiling Temporal Counting Logic Into Softmax Transformerscited by 39
  12. 2024DARG: Dynamic Evaluation of Large Language Models via Adaptive Reasoning Graphcited by 26
  13. 2024When Can Transformers Count to n?cited by 24
  14. 2024From Insights to Actions: The Impact of Interpretability and Analysis Research on NLPcited by 20
  15. 2023Mastering Symbolic Operations: Augmenting Language Models with Compiled Neural Networkscited by 12
  16. 2024ALTA: Compiler-Based Analysis of Transformerscited by 7
  17. 2024Mechanisms of Symbol Processing for In-Context Learning in Transformer Networkscited by 6

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.