Decomposing The Dark Matter of Sparse Autoencoders

Joshua Engels, Logan Riggs, Max Tegmark
10/18/2024
cs.LG

No official code found. Best implementation: JoshEngels/SAE-Dark-Matter (23 stars, last commit 2025-02-06).

Abstract

Sparse autoencoders (SAEs) are a promising technique for decomposing language model activations into interpretable linear features. However, current SAEs fall short of completely explaining model performance, resulting in "dark matter": unexplained variance in activations. This work investigates dark matter as an object of study in its own right. Surprisingly, we find that much of SAE dark matter -- about half of the error vector itself and >90% of its norm -- can be linearly predicted from the initial activation vector. Additionally, we find that the scaling behavior of SAE error norms at a per token level is remarkably predictable: larger SAEs mostly struggle to reconstruct the same contexts as smaller SAEs. We build on the linear representation hypothesis to propose models of activations that might lead to these observations. These insights imply that the part of the SAE error vector that cannot be linearly predicted ("nonlinear" error) might be fundamentally different from the linearly predictable component. To validate this hypothesis, we empirically analyze nonlinear SAE error and show that 1) it contains fewer not yet learned features, 2) SAEs trained on it are quantitatively worse, and 3) it is responsible for a proportional amount of the downstream increase in cross entropy loss when SAE activations are inserted into the model. Finally, we examine two methods to reduce nonlinear SAE error: inference time gradient pursuit, which leads to a very slight decrease in nonlinear error, and linear transformations from earlier layer SAE outputs, which leads to a larger reduction.

View on arXivView PDF

Code Implementations(1)

Code for our paper "Decomposing The Dark Matter of Sparse Autoencoders"

234Shell, PythonOct 18, 20241 years ago

Similar Papers

Cite this paper

@article{engels2024decomposing,
  title  = {Decomposing The Dark Matter of Sparse Autoencoders},
  author = {Joshua Engels and Logan Riggs and Max Tegmark},
  year   = {2024},
  eprint = {2410.14670},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.14670v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.14670.svg)](https://codeofpaper.com/paper/2410.14670)

Discussion