mlsanityData to 14 Oct 2026

Weights to Code: Extracting Interpretable Algorithms from the Discrete Transformer

arXiv 2601.05770 ↗First posted 9 Jan 2026cs.LG cs.CLcited by 2

Not on the map. Why?

Abstract (arXiv)

Algorithm extraction aims to synthesize executable programs directly from models trained on algorithmic tasks, enabling de novo recovery of executable mechanisms from weights without relying on human-written target programs. However, applying this paradigm to Transformer is complicated by representation entanglement (e.g., superposition), where features encoded in overlapping directions substantially hinder the recovery of symbolic expressions. We propose the Discrete Transformer, an architecture explicitly designed to bridge the gap between continuous representations and discrete symbolic logic. By injecting discreteness through temperature-annealed sampling, our framework effectively leverages hypothesis testing and symbolic regression to extract human-readable programs. Empirically, the Discrete Transformer achieves performance comparable to the RNN-based MIPS baseline on shared discrete tasks, while broadening extraction to tasks with continuous-valued intermediate computations. Finally, we show that architectural inductive biases provide fine-grained control over synthesized programs, establishing the Discrete Transformer as a controllable testbed for algorithm extraction and Transformer interpretability.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 20 of its 35 references that are in the map. First posted on arXiv 9 Jan 2026.

Builds on

20 of 35 references.

References · 20

  1. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
  2. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  3. 2016Categorical Reparameterization with Gumbel-Softmaxcited by 2,739
  4. 2023Sparse Autoencoders Find Highly Interpretable Features in Language Modelscited by 1,420
  5. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  6. 2014Neural Turing Machinescited by 644
  7. 2017Learning Sparse Neural Networks through L0 Regularizationcited by 583
  8. 2019AI Feynman: a Physics-Inspired Method for Symbolic Regressioncited by 548
  9. 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 532
  10. 2020Discovering Symbolic Models from Deep Learning with Inductive Biasescited by 344
  11. 2016From Softmax to Sparsemax: A Sparse Model of Attention and Multi-Label Classificationcited by 341
  12. 2022On Embeddings for Numerical Features in Tabular Deep Learningcited by 186
8 more
  1. 2021Thinking Like Transformerscited by 184
  2. 2024CodeGemma: Open Code Models Based on Gemmacited by 150
  3. 2020AI Feynman 2.0: Pareto-optimal symbolic regression exploiting graph modularitycited by 144
  4. 2023Tracr: Compiled Transformers as a Laboratory for Interpretabilitycited by 104
  5. 2019Winning the Lottery with Continuous Sparsificationcited by 100
  6. 2024Opening the AI black box: program synthesis via mechanistic interpretabilitycited by 20
  7. 2022Evolving symbolic density functionalscited by 19
  8. 2025Finite State Automata Inside Transformers with Chain-of-Thought: A Mechanistic Study on State Trackingcited by 18

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 2.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Discovering Interpretable Algorithms by Decompiling Transformers to RASP
  2. 2026Towards Verifiable Transformers: Solver-Checkable Circuit Explanations
  3. 2025Behavior and Representation in Open-Weight Large Language Models for Combinatorial Optimization: From Feature Extraction to Algorithm Selection
  4. 2023Can Transformers Learn to Solve Problems Recursively?
  5. 2023Learning Transformer Programs
  6. 2026Certified Mechanistic Interpretability: Lifting Single-Input Findings to Bounded Neighbourhoods
  7. 2026Interpretable-by-Design Transformers via Architectural Stream Independence
  8. 2024Let's Think Dot by Dot: Hidden Computation in Transformer Language Models