mlsanityData to 14 Oct 2026

Codebook Features: Sparse and Discrete Interpretability for Neural Networks

arXiv 2310.17230 ↗First posted 26 Oct 2023cs.LG cs.CLcited by 48

Not on the map. Why?

Abstract (arXiv)

Understanding neural networks is challenging in part because of the dense, continuous nature of their hidden states. We explore whether we can train neural networks to have hidden states that are sparse, discrete, and more interpretable by quantizing their continuous features into what we call codebook features. Codebook features are produced by finetuning neural networks with vector quantization bottlenecks at each layer, producing a network whose hidden features are the sum of a small number of discrete vector codes chosen from a larger codebook. Surprisingly, we find that neural networks can operate under this extreme bottleneck with only modest degradation in performance. This sparse, discrete bottleneck also provides an intuitive way of controlling neural network behavior: first, find codes that activate when the desired behavior is present, then activate those same codes during generation to elicit that behavior. We validate our approach by training codebook Transformers on several different datasets. First, we explore a finite state machine dataset with far more hidden states than neurons. In this setting, our approach overcomes the superposition problem by assigning states to distinct codes, and we find that we can make the neural network behave as if it is in a different state by activating the code for that state. Second, we train Transformer language models with up to 410M parameters on two natural language datasets. We identify codes in these models representing diverse, disentangled concepts (ranging from negative emotions to months of the year) and find that we can guide the model to generate different topics by activating the appropriate codes during inference. Overall, codebook features appear to be a promising unit of analysis and control for neural networks and interpretability. Our codebase and models are open-sourced at https://github.com/taufeeque9/codebook-features.

Key facts. Cited by 48 papers in the map (data through 14 Oct 2026). Builds on 45 of its 86 references that are in the map. First posted on arXiv 26 Oct 2023.

Builds on

45 of 86 references.

References · 45

  1. 2015Deep Residual Learning for Image Recognitioncited by 52,096
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2014Explaining and Harnessing Adversarial Examplescited by 7,364
  4. 2017Neural Discrete Representation Learningcited by 4,712
  5. 2021On the Opportunities and Risks of Foundation Modelscited by 4,033
  6. 2016Pointer Sentinel Mixture Modelscited by 3,096
  7. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  8. 2017Billion-scale similarity search with GPUscited by 2,497
  9. 2013Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computationcited by 2,079
  10. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,786
  11. 2023Sparse Autoencoders Find Highly Interpretable Features in Language Modelscited by 1,420
  12. 2016Understanding intermediate layers using linear classifier probescited by 1,353
33 more
  1. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
  2. 2017Interpretability Beyond Feature Attribution: Quantitative Testing with Concept Activation Vectors (TCAV)cited by 1,319
  3. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,165
  4. 2020Concept Bottleneck Modelscited by 1,032
  5. 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 1,003
  6. 2022Mass-Editing Memory in a Transformercited by 1,001
  7. 2023Steering Language Models With Activation Engineeringcited by 922
  8. 2020A Primer in BERTology: What we know about how BERT workscited by 815
  9. 2019CTRL: A Conditional Transformer Language Model for Controllable Generationcited by 762
  10. 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 713
  11. 2021Vector-quantized Image Modeling with Improved VQGANcited by 658
  12. 2021Fast Model Editing at Scalecited by 498
  13. 2016Google's Multilingual Neural Machine Translation System: Enabling Zero-Shot Translationcited by 469
  14. 2021Causal Abstractions of Neural Networkscited by 422
  15. 2015Neural Module Networkscited by 376
  16. 2019The Neuro-Symbolic Concept Learner: Interpreting Scenes, Words, and Sentences From Natural Supervisioncited by 372
  17. 2022Post-hoc Concept Bottleneck Modelscited by 293
  18. 2020Understanding the Role of Individual Units in a Deep Neural Networkcited by 255
  19. 2023Finding Alignments Between Interpretable Causal Variables and Distributed Neural Representationscited by 209
  20. 2020Compositional Explanations of Neuronscited by 172
  21. 2016Linear Algebraic Structure of Word Senses, with Applications to Polysemycited by 165
  22. 2021Post-hoc Interpretability for Neural NLP: A Surveycited by 156
  23. 2018Net2Vec: Quantifying and Explaining how Concepts are Encoded by Filters in Deep Neural Networkscited by 129
  24. 2021Transformer visualization via dictionary learning: contextualized embedding as a linear superposition of transformer factorscited by 108
  25. 2020Rewriting a Deep Generative Modelcited by 107
  26. 2023Language Models Implement Simple Word2Vec-style Vector Arithmeticcited by 98
  27. 2018Under the Hood: Using Diagnostic Classifiers to Investigate and Improve how Language Models Track Agreement Informationcited by 97
  28. 2021Leveraging Sparse Linear Layers for Debuggable Deep Networkscited by 82
  29. 2021Editing a classifier by rewriting its prediction rulescited by 65
  30. 2023Learning Transformer Programscited by 41
  31. 2020Language Through a Prism: A Spectral Approach for Multiscale Language Representationscited by 39
  32. 2023Seeing is Believing: Brain-Inspired Modular Training for Mechanistic Interpretabilitycited by 38
  33. 2018Guided Dropoutcited by 14

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 22; 2025: 13; 2026: 13.

48 papers.

Sort:

By area:

  1. 2026Scaling Monosemanticity: Extracting Interpretable Features from Claude 3 Sonnetcited by 191
  2. 2024Improving Dictionary Learning with Gated Sparse Autoencoderscited by 179
  3. 2024A Survey on Uncertainty Quantification of Large Language Models: Taxonomy, Open Research Challenges, and Future Directionscited by 121
  4. 2024Towards Principled Evaluations of Sparse Autoencoders for Interpretability and Controlcited by 86
  5. 2024RAVEL: Evaluating Interpretability Methods on Disentangling Language Model Representationscited by 79
  6. 2025Archetypal SAE: Adaptive and Stable Dictionary Learning for Concept Extraction in Large Vision Modelscited by 73
  7. 2024Identifying Functionally Important Features with End-to-End Sparse Dictionary Learningcited by 67
  8. 2025Universal Sparse Autoencoders: Interpretable Cross-Model Concept Alignmentcited by 62
  9. 2024Knowledge Mechanisms in Large Language Models: A Survey and Perspectivecited by 51
  10. 2025Reasoning about Uncertainty: Do Reasoning Models Know When They Don't Know?cited by 38
  11. 2024Mathematical Models of Computation in Superpositioncited by 35
  12. 2024Backward Lens: Projecting Language Model Gradients into the Vocabulary Spacecited by 32
36 more
  1. 2025Interpreting the linear structure of vision-language model embedding spacescited by 32
  2. 2024The Quest for the Right Mediator: Surveying Mechanistic Interpretability Through the Lens of Causal Mediation Analysiscited by 24
  3. 2025NeuroStrike: Neuron-Level Attacks on Aligned LLMscited by 22
  4. 2024Planning in a recurrent neural network that plays Sokobancited by 18
  5. 2024Sparse Autoencoders Enable Scalable and Reliable Circuit Identification in Language Modelscited by 15
  6. 2024Neural Concept Bindercited by 14
  7. 2024Monet: Mixture of Monosemantic Experts for Transformerscited by 13
  8. 2025Model Directions, Not Words: Mechanistic Topic Models Using Sparse Autoencoderscited by 8
  9. 2024InversionView: A General-Purpose Method for Reading Information from Neural Activationscited by 7
  10. 2024Residual vector quantization for KV cache compression in large language modelcited by 7
  11. 2024Improving Semantic Control in Discrete Latent Spaces with Transformer Quantized Variational Autoencoderscited by 6
  12. 2024Towards scientific discovery with dictionary learning: Extracting biological concepts from microscopy foundation modelscited by 4
  13. 2026Towards Intrinsic Interpretability of Large Language Models:A Survey of Design Principles and Architecturescited by 4
  14. 2024Understanding the role of FFNs in driving multilingual behaviour in LLMscited by 3
  15. 2025Human Motion Unlearningcited by 3
  16. 2025ProtSAE: Disentangling and Interpreting Protein Language Models via Semantically-Guided Sparse Autoencoderscited by 3
  17. 2025Binary Sparse Coding for Interpretabilitycited by 3
  18. 2026Explicit Fuzzy Logic in the Feed-Forward Layer: Self-Forgetting Quantifiers Discover Legible Grammatical-Licensing Detectorscited by 3
  19. 2026Legible-by-Construction: Attention and End-to-End Transformerscited by 3
  20. 2024Symbolic Autoencoding for Self-Supervised Sequence Learningcited by 2
  21. 2025Hey Pentti, We Did It!: A Fully Vector-Symbolic Lispcited by 2
  22. 2026Train the Model, Not the Reader: Decodability Supervision for Verifiable Activation Explanationscited by 2
  23. 2024CodeUnlearn: Amortized Zero-Shot Machine Unlearning in Language Models Using Discrete Conceptcited by 1
  24. 2025Concept-Guided Interpretability via Neural Chunkingcited by 1
  25. 2026CtD: Composition through Decomposition in Emergent Communicationcited by 1
  26. 2026Training, Reading, and Editing Legible Transformerscited by 1
  27. 2026Off-Axis, On Purpose: Where a Transformer Computes Concepts and Why it Does Socited by 1
  28. 2026Through the Looking Glass: Directly Reading and Writing Transformerscited by 1
  29. 2024Discrete Dictionary-based Decomposition Layer for Structured Representation Learningcited by 0
  30. 2024The Interpretability of Codebooks in Model-Based Reinforcement Learning is Limitedcited by 0
  31. 2025Self-Ablating Transformers: More Interpretability, Less Sparsitycited by 0
  32. 2025TopK Language Modelscited by 0
  33. 2026Safe Transformer: An Explicit Safety Bit For Interpretable And Controllable Alignmentcited by 0
  34. 2026Sense Representations Are Inducible Interfacescited by 0
  35. 2026Scaling Interpretable Transformers with Parity Bottleneck Layerscited by 0
  36. 2026TRACE: Temporal Risk Assessment and Concept Editing for Safer Language Generationcited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2025Towards Combinatorial Interpretability of Neural Computation
  2. 2025From superposition to sparse codes: interpretable representations in neural networks
  3. 2026Sparse Transformer: a Controlled Testbed for Mechanistic Interpretability
  4. 2026Compressed Computation under L4 Loss is likely Computation in Superposition
  5. 2023Finding Neurons in a Haystack: Case Studies with Sparse Probing
  6. 2024Transcoders Find Interpretable LLM Feature Circuits
  7. 2024Sparse Feature Circuits: Discovering and Editing Interpretable Causal Graphs in Language Models
  8. 2025Compressed Computation: Dense Circuits in a Toy Model of the Universal-AND Problem