Codebook Features: Sparse and Discrete Interpretability for Neural Networks
Alex Tamkin, Mohammad Taufeeque, Noah D. Goodman
Abstract
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 1
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
20 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Sparse Autoencoders Find Highly Interpretable Features in Language Models cites Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling
- Locating and Editing Factual Associations in GPT cites Language Models are Few-Shot Learners
- Improving Sparse Decomposition of Language Model Activations with Gated Sparse Autoencoders cites Sparse Autoencoders Find Highly Interpretable Features in Language Models
- Improving Sparse Decomposition of Language Model Activations with Gated Sparse Autoencoders cites Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling
- Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling cites Language Models are Few-Shot Learners
- Identifying Functionally Important Features with End-to-End Sparse Dictionary Learning cites Sparse Autoencoders Find Highly Interpretable Features in Language Models
- Obfuscated Activations Bypass LLM Latent-Space Defenses cites Sparse Autoencoders Find Highly Interpretable Features in Language Models
- Obfuscated Activations Bypass LLM Latent-Space Defenses cites Identifying Functionally Important Features with End-to-End Sparse Dictionary Learning
- InversionView: A General-Purpose Method for Reading Information from Neural Activations cites Sparse Autoencoders Find Highly Interpretable Features in Language Models
- InversionView: A General-Purpose Method for Reading Information from Neural Activations cites Locating and Editing Factual Associations in GPT
Cited by top-tier papers20
- Identifying Functionally Important Features with End-to-End Sparse Dictionary LearningDan Braun, Jordan Taylor, Nicholas Goldowsky-Dill, Lee SharkeyNeurIPS 2024 · 81 citations
- Improving Sparse Decomposition of Language Model Activations with Gated Sparse AutoencodersSenthooran Rajamanoharan, Arthur Conmy, Lewis Smith, Tom Lieberum et al.NeurIPS 2024 · 49 citations
- Obfuscated Activations Bypass LLM Latent-Space DefensesLuke Bailey, Alex Serrano, Abhay Sheshadri, Mikhail Seleznyov et al.ICLR 2026 · 28 citations
- NeuroStrike: Neuron-Level Attacks on Aligned LLMsLichao Wu, Sasha Behrouzi, Mohamadreza Rostami, Maximilian Thang et al.NDSS 2026 · 21 citations
- InversionView: A General-Purpose Method for Reading Information from Neural ActivationsXinting Huang, Madhur Panwar, Navin Goyal, Michael HahnNeurIPS 2024 · 10 citations
Builds on17
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 citations
- Pythia: A Suite for Analyzing Large Language Models Across Training and ScalingStella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley et al.ICML 2023 · 1,822 citations
- Concept Bottleneck ModelsPang Wei Koh, Thao Nguyen, Yew Siang Tang, Stephen Mussmann et al.ICML 2020 · 1,233 citations
- Sparse Autoencoders Find Highly Interpretable Features in Language ModelsRobert Huben, Hoagy Cunningham, Logan Riggs Smith, Aidan Ewart et al.ICLR 2024 · 1,072 citations
Related papers
- Beyond Concept Bottleneck Models: How to Make Black Boxes Intervenable?Sonia Laguna, Ricards Marcinkevics, Moritz Vandenhirtz, Julia E. VogtNeurIPS 2024 · 39 citations
- Explanation Bottleneck ModelsShin'ya Yamaguchi, Kosuke NishidaAAAI 2025 · 4 citations
- Automatically Interpreting Millions of Features in Large Language ModelsGonçalo Paulo, Alex Mallen, Caden Juang, Nora BelroseICML 2025
- Internal Planning in Language Models: Characterizing Horizon and Branch AwarenessMuhammed Ustaomeroglu, Baris Askin, Gauri Joshi, Carlee Joe-Wong et al.ICLR 2026
- Sparse Feature Circuits: Discovering and Editing Interpretable Causal Graphs in Language ModelsSamuel Marks, Can Rager, Eric J. Michaud, Yonatan Belinkov et al.ICLR 2025
