Entropy-Priced Latents for Sparse Autoencoders

Sparse autoencoders (SAEs) are networks that rewrite a language model's internal activation vector as a short list of active "features" drawn from a large learned dictionary. They are a main tool for reading what a model represents. Recent SAEs let the number of active features vary per token, so a <BOS> token can use 2 features and a dense technical phrase can use nearly 100. The leading method that sets this count without a hand-picked budget, top-AFA, keeps adding features until the reconstruction's length matches a target derived from the input's length. Its authors report that it sometimes switches on far too many features, because a vector's length can be reached with a few strong features or with many weak, diffuse ones. The stopping rule has no notion of which features are worth spending.

This note borrows that notion from an unrelated field. Multi-criteria evaluation, the practice of combining many indicators into one score in regional, environmental, and economic studies, uses the Entropy Weight Method (EWM). EWM gives each indicator a weight equal to how unevenly its values spread across the units being evaluated. An indicator that is the same everywhere gets zero weight; one concentrated on a few units gets a large weight. Our claim is that the same column-wise entropy, computed over a running window of tokens for each dictionary feature, is a good per-feature "price" for an adaptive SAE. Features that fire diffusely on everything become expensive, and features whose activation mass falls on a few tokens become cheap. Pricing features this way should curb top-AFA's feature inflation and suppress the dense, always-on latents that hurt interpretability, while still letting each token choose its own number of features. The proposal also tests whether entropy beats a plain firing-frequency price, which is the cheaper rival.

Core Claim

For dictionary feature $j$ with nonnegative activations $a_{ij}$ on the last $n$ tokens $i$, define its EWM utility as

$$d_j = 1 + \frac{1}{\ln n}\sum_{i=1}^{n} \tilde p_{ij}\ln \tilde p_{ij}, \qquad \tilde p_{ij} = \frac{a_{ij}}{\sum_{i'} a_{i'j}},$$

so $d_j$ is one minus the normalized Shannon entropy of where feature $j$'s activation mass falls. It is near 0 for a feature spread evenly over all tokens and near 1 for a feature concentrated on a handful. This is the four-step EWM pipeline used in Minjie Li et al. and Qinfeng Xing, with one change: we drop EWM's min-max normalization step. SAE activations are already nonnegative, and min-max scaling is the source of EWM's known sensitivity to outliers.

Our encoder ranks candidate features for token $i$ by the score $d_j^{\gamma}\,a_{ij}\,\|D_j\|_2$, where $D_j$ is feature $j$'s decoder direction and $\gamma \ge 0$ sets how strongly the price counts. It then adds features in that order until top-AFA's norm target is met. Setting $\gamma=0$ recovers top-AFA exactly, so the ingredient we add can be isolated cleanly. The utilities $d_j$ are held as an exponential moving average with gradients blocked. They are frozen at inference, so each token's encoding never depends on the other tokens in its batch.

The rule has a built-in negative feedback. A cheap feature gets selected more often, its mass spreads over more tokens, its entropy rises, and its price goes up. A feature that never fires has undefined entropy; we assign it $d_j=1$, which moves it to the front of the queue and should revive it without a separate auxiliary loss.

The research file raises a worry: EWM rewards dispersion, and broad polysemantic features look dispersed, so EWM might favor the wrong features. That worry rests on reading "dispersion" as variance across samples. Over the activation-mass distribution, a broad feature that fires on everything has high entropy and therefore low weight, while a rare monosemantic feature has low entropy and high weight. The tension is real only for one case: a feature that fires rarely but with uniformly small values. We treat that case as an empirical question, not something to argue away. A related limitation is that EWM ignores correlation between indicators. In SAEs that shows up as feature splitting, where near-duplicate latents each receive full weight. We measure this by comparing utilities of pairs of features whose decoder directions have high cosine similarity.

Relation to Prior Work

The adaptive-sparsity work supplies both the problem and the base method. BatchTopK picks the top $n\times k$ activations across a whole batch, then estimates one global threshold for inference. Its allocation is competitive across the batch and carries no notion of which features are worth spending. AdaptiveK sets each token's $k$ from a linear probe trained on complexity labels produced by GPT-4o-mini. Its authors list that teacher dependence as a limitation; our method needs no labels. Top-AFA supplies the stopping rule we keep, and its documented feature inflation is the failure we target. SpaDE obtains adaptive support from geometry, using a sparsemax projection onto distances to prototypes. It addresses which shape of concept the encoder can represent, which is a separate question from pricing features, so we use it as context rather than as a baseline.

Entropy has entered this area only from the outside. Cyclic Test Time Augmentation with Entropy Weight Method is the closest use of EWM in deep learning. It weights augmented views by the entropy of their output predictions, never touches latent features, and gives a small gain (10-crop ImageNet-C mean corruption error 73.57 to 73.34). Superposition as Lossy Compression computes entropy over SAE feature firing as an after-the-fact measure of superposition, which motivates treating feature entropy as meaningful but does not use it in training. Rectified LpJEPA adds a global maximum-entropy regularizer alongside a sparsity penalty. That is a loss on the overall distribution, not a per-feature price inside the selection rule.

Research Program

We implement the priced encoder inside the public top-AFA codebase SewoongLee/top-afa-sae so that everything except the ranking rule is shared. The work has three stages.

The first stage checks the mechanism. We train on residual-stream activations of GPT-2 Small, at layer 6 (top-AFA's reported layer) and layer 8 (BatchTopK's layer), using OpenWebText. We sweep $\gamma \in \{0, 0.5, 1, 2\}$ and the window length $n$. During training we track how the utilities evolve, whether the feedback loop stabilizes or oscillates, and whether dead latents recover.

The second stage tests whether the results transfer to Gemma 2 2B at layer 12.

The third stage examines the dispersion-versus-meaning question directly. For each feature we compare $d_j$ against its SAEBench interpretability and absorption diagnostics, and we look specifically at features that are rare but weak.

Baselines

The naive reference point is a standard TopK SAE with a single global $k$ chosen by grid search over $\{16, 32, 64, 128\}$ on validation reconstruction. We report the cost of that sweep separately. AdaptiveK reports that avoiding such sweeps saves roughly 6x in training time.

The strongest direct competitor is top-AFA, because it shares our goal of a label-free, budget-free stopping rule. On GPT-2 Small layer 6 it reports normalized mean squared error (MSE) between $1.76\times10^{-4}$ and $3.43\times10^{-5}$ (Lee et al.). We rerun it from the same codebase on the same 80M-token OpenWebText stream, with the same dictionary size, the same $\lambda_{AFA}=1/16$, and the same number of optimizer steps. Our method beats it if it lowers mean and 95th-percentile active-feature counts in the layers where top-AFA inflates, without raising normalized MSE outside that reported range and without lowering ELBO, the alignment score Lee et al. introduce.

BatchTopK is the strongest method for a fixed average budget. Its paper gives relative plots but no absolute table values, so we found no reported number on Lacuna for its exact normalized MSE. We run it with the authors' code at matched mean active-feature count and compare normalized MSE and the increase in language-model cross-entropy when the SAE reconstruction is spliced in.

AdaptiveK needs GPT-4o-mini labels on 250,000 contexts. We will compare against it on SAEBench where its released results allow. The file provides no absolute SAEBench numbers for it, so we found no reported number on Lacuna for AdaptiveK's absolute absorption or explained-variance scores. If we cannot reproduce its labels, we say so explicitly rather than report an unequal comparison.

Three ablations isolate the key ingredient, and all of them share the same compute and tuning budget, since every variant gets the same small $\gamma$ sweep. The first replaces $d_j$ with a firing-frequency price, $1-\log f_j/\log f_{\min}$. The second replaces $d_j$ with random fixed prices. The third keeps top-AFA unpriced but caps the active-feature count at a fixed maximum.

Why not just…?

Why not just cap the number of active features in top-AFA? A cap removes the extreme inflation, but it reintroduces exactly the fixed hyperparameter top-AFA was designed to eliminate, and it truncates complex tokens and simple tokens alike. The capped ablation tests this directly. If, at matched mean active-feature count, the cap matches priced selection on both cross-entropy increase and SAEBench absorption, pricing has no advantage and we will report that.

Why not just penalize features by how often they fire? This is the real threat. Firing frequency is cheaper to compute and closely related to column entropy. Entropy should differ in two cases. It separates a feature that fires rarely in a few large bursts from one that fires rarely at uniformly low levels. It is also unaffected by rescaling a feature's overall activation size. If the frequency ablation equals EWM within run-to-run noise on all metrics, the honest conclusion is that frequency pricing is the useful idea and the entropy machinery is unnecessary. The experiments are designed so that this outcome is reportable as a result, not hidden.

Why not just use BatchTopK, which already varies the count per token? BatchTopK decides counts by competition within a batch and must fall back on a single global threshold at inference, which creates a gap between training and test behavior. It also has no mechanism against dense latents. We compare at matched mean count, and we additionally measure how the active-feature count of a fixed token set shifts when batch composition changes. Our frozen-price encoder should be unaffected by batch composition; BatchTopK during training is not.

Decisive Checks

The idea succeeds only if three things hold. First, at $\gamma>0$, top-AFA's high-count tail shrinks on the GPT-2 layers where it occurs, with normalized MSE and ELBO no worse than the $\gamma=0$ run. Second, the number of dense latents (firing on more than 10% of tokens) and the number of dead latents both fall relative to top-AFA and BatchTopK. Third, EWM pricing beats frequency pricing on at least one SAEBench metric (absorption or spurious-correlation removal) on both GPT-2 Small and Gemma 2 2B.

As a sanity check on per-token allocation, <BOS> and punctuation tokens should receive few features, mirroring BatchTopK's observation of 2 features for <BOS> against nearly 100 for rich tokens. Separately, among rare features, low $d_j$ should coincide with poor interpretability scores. If it does not, the rare-but-weak case flagged in the Core Claim is a genuine limitation, and we will report it as one.