Autoencoders interview question

Deep LearningAutoencodersModel Explainabilityeasy

An LLM interpretability team trains a sparse autoencoder (SAE) on residual-stream activations of size 4,096, with a 65,536-unit ReLU code layer and an L1 penalty on the code activations added to the reconstruction loss. Why can this overcomplete autoencoder learn useful features instead of simply copying its input?

  1. AThe 65,536-unit code is wider than the input, which forces compression by itself, so the code becomes a dense, low-rank summary of the activations from which the input is rebuilt.
  2. BThe L1 penalty shrinks the encoder and decoder weights towards zero, acting like weight decay that prevents overfitting, while the code activations themselves stay dense.
  3. CThe L1 penalty lets only a few code units fire per input, so each activation is rebuilt from a small set of learned directions, which tend to be more interpretable than neurons.
  4. DThe L1 penalty pushes all code units to fire at similar small levels for every input, spreading the information evenly so that no single unit dominates the reconstruction.
Show the answer and explanation

Correct answer: C, The L1 penalty lets only a few code units fire per input, so each activation is rebuilt from a small set of learned directions, which tend to be more interpretable than neurons.

Explanation Autoencoders

A code layer 16 times wider than the input (65,536 vs 4,096) could trivially learn an identity-like mapping. A sparse autoencoder blocks that with a penalty on the code activations, not on the weights:

  • L1 sparsity: loss = ‖x − x̂‖² + λ·Σ|z_j|, which drives most code units to exactly zero (with ReLU) for any given input.
  • KL sparsity (classic variant): push each unit's average activation ρ̂_j towards a small target ρ such as 0.05 with Σ_j KL(ρ ‖ ρ̂_j).

With only a handful of active units per input, each activation is rebuilt as a sparse sum of decoder columns, i.e. a learned dictionary of directions. That is sparse dictionary learning with a neural encoder.

Why this matters for LLMs: models appear to represent more features than they have neurons, packing them into overlapping directions (superposition), so individual neurons are often polysemantic. SAE features are frequently much more monosemantic, e.g. one feature fires on a specific language or concept, and they can be used to inspect or steer model behaviour.

Typical diagnostics: average number of active units per input (L0), fraction of variance explained, the increase in the LLM's loss when its activations are replaced by the SAE reconstruction, and the share of dead units that never fire.

Why the others fail: width alone removes the bottleneck rather than creating one; weight decay leaves the code dense and does not stop copying; an even spread of activity is the opposite of sparsity.

Interview tip: contrast the two ways to stop an autoencoder from copying: a narrow bottleneck (undercomplete) or a constraint such as sparsity or denoising on a wide code.

Practice it as a quiz

Answer this and the other free questions with instant grading, streaks and weak-topic tracking, or unlock all 4,000 questions.

More Deep Learning questions

  1. As an ablation, you delete every self-attention sublayer from a trained BERT-style encoder but keep the token and position embeddings, the feed-forward (FFN)…
  2. A grocery chain trains a CNN to grade bananas on a conveyor belt as unripe, ripe or overripe from camera images. Which augmentation is most likely to hurt the…
  3. In a deep MLP with sigmoid activations, the error signal reaching the first layer's weights has passed through ten sigmoid derivatives. Ignoring the weight…
  4. A teammate multiplies a recommender's training loss by 100 so the dashboard shows larger numbers. For one weight the gradient has been steady at g = 0.004 per…
  5. In neural network training, what is an epoch?