Sparse but Wrong: Incorrect L0 Leads to Incorrect Features in Sparse Autoencoders
Summary
Research on Sparse Autoencoders (SAEs) reveals that the L0 hyperparameter, which dictates how many features fire per token, is critical for learning correct, monosemantic features. The study, focusing on BatchTopK SAEs, demonstrates that an L0 set too low causes SAEs to "cheat" by mixing correlated features to improve reconstruction, a phenomenon termed feature hedging. Conversely, an L0 set too high leads to degenerate solutions that also mix features. The authors introduce the "Nth decoder projection score" ($s_{n}^{ ext{dec}}$) as a method to precisely determine the correct L0. This metric successfully identified the true L0 of 11 in toy models and indicated an optimal L0 of 200-250 for Gemma-2-2b layer 12, trained on 500M tokens with a learning rate of $3e^{-4}$. This optimal L0 also coincided with peak sparse probing performance. The findings suggest that many existing open-source SAEs, often with L0 values below 100, are likely operating with an L0 that is too low, and that the traditional sparsity-reconstruction tradeoff is a misleading quality indicator.
Key takeaway
For Machine Learning Engineers training Sparse Autoencoders (SAEs), accurately setting the L0 hyperparameter is paramount for feature interpretability. If your SAEs exhibit poor downstream task performance or polysemantic features, re-evaluate your L0 using the "Nth decoder projection score" ($s_{n}^{ ext{dec}}$) method. Starting with an L0 that is too low can permanently corrupt feature learning, so prioritize a higher initial L0 and gradually decrease it if necessary. Your current SAEs might be "sparse but wrong."
Key insights
Correct L0 is crucial for Sparse Autoencoders to learn true, monosemantic features, challenging the sparsity-reconstruction tradeoff.
Principles
- Suboptimal L0 leads to polysemantic feature mixing.
- Low L0 incentivizes incorrect feature learning.
- Reconstruction error is a misleading SAE quality metric.
Method
The "Nth decoder projection score" ($s_{n}^{ ext{dec}}$) identifies the optimal L0 by minimizing projection strength on arbitrary training inputs, indicating monosemantic latents.
In practice
- Validate SAE L0 using the $s_{n}^{ ext{dec}}$ metric.
- Avoid starting SAE training with too low L0.
- Target L0s around 200-250 for Gemma-2-2b layer 12.
Topics
- Sparse Autoencoders
- LLM Interpretability
- L0 Hyperparameter
- Feature Learning
- Nth decoder projection score
- Gemma-2-2b
Code references
Best for: Research Scientist, AI Engineer, AI Scientist, Machine Learning Engineer, NLP Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by cs.CL updates on arXiv.org.