Bring the mental model from Representation Learning & Embedding Geometry; this page will reuse it instead of restarting from zero.
Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability
Sparse autoencoders learn a reusable dictionary of feature directions so dense model activations can be explained by a small set of interpretable latent factors.
01
Intuition
Build the mental picture first so the rest of the page has something to attach to.
Large models do not usually store one clean concept per neuron.
Instead, many concepts are packed into the same activation vector. A direction might partly mean "Python code", partly mean "HTML tag", and partly mean "list formatting". This is the superposition problem: the model is using the same coordinates for several overlapping features.
A sparse autoencoder (SAE) tries to learn a better coordinate system.
- The encoder looks at a dense activation and asks which hidden features are present.
- The decoder turns those hidden features back into a reconstruction of the original activation.
- The sparsity constraint says only a small number of features are allowed to fire for each token.
That is intended to make the latent code behave like a parts list for the residual stream. Instead of saying "this activation is a mysterious 4096-dimensional vector", we say "this activation seems to use a few reusable feature directions". The practical teaching knob is the explanatory budget per activation: how many features are you allowed to use before interpretability starts to melt into dense mush again?
Copy-only prompts — each action copies a page-grounded prompt to your clipboard. Nothing is sent by this site.
02
Math
Translate the story into symbols, assumptions, and a derivation you can inspect.
Let x∈Rd be an activation vector from some model layer, often the residual stream.
Encode to sparse latents, decode back to the activation
An SAE maps x into a sparse latent code z∈Rm and reconstructs it as x^:
The columns of Wdec act like a learned feature dictionary. If zj is active, the jth feature direction contributes to the reconstruction.
Reconstruction plus sparsity
The classic objective balances faithfulness and simplicity:
- ∥x−x^∥22 asks the dictionary to explain the real activation.
- λ∥z∥1 punishes too many active features.
If λ is too small, the code becomes dense and hard to interpret. If it is too large, reconstruction worsens and useful structure may be missed or pushed into inactive latents.
Top-k sparse coding
Some recent SAE work replaces the soft L1 penalty with a hard "only keep the best k features" rule:
Here TopK(a,k) keeps the k largest nonnegative activation scores and sets the rest to zero.
Now k is explicit: each activation gets a fixed budget of kept latent slots. This is easier to reason about pedagogically and makes the reconstruction versus interpretability tradeoff visible in one number.
Copy-only prompts — each action copies a page-grounded prompt to your clipboard. Nothing is sent by this site.
03
Code
Keep the implementation aligned with the notation so the algorithm is legible.
import numpy as np
rs = np.random.RandomState(0)
n, d, m, k = 256, 10, 24, 3
D_true = rs.randn(d, m); D_true /= np.linalg.norm(D_true, axis=0, keepdims=True)
Z_true = np.zeros((n, m))
for row in Z_true:
row[rs.choice(m, k, replace=False)] = rs.uniform(0.5, 1.5, k)
X = Z_true @ D_true.T + 0.02 * rs.randn(n, d)
def train_sae(lam, steps=500, lr=0.05):
W_enc, W_dec = 0.1 * rs.randn(m, d), 0.1 * rs.randn(d, m)
for _ in range(steps):
pre = X @ W_enc.T
Z = np.maximum(pre, 0.0)
X_hat = Z @ W_dec.T
err = (X_hat - X) / n
grad_dec = err.T @ Z
grad_z = err @ W_dec + lam * (Z > 0) / n
W_enc -= lr * ((grad_z * (pre > 0)).T @ X)
W_dec -= lr * grad_dec
W_dec /= np.linalg.norm(W_dec, axis=0, keepdims=True) + 1e-9
Z = np.maximum(X @ W_enc.T, 0.0)
X_hat = Z @ W_dec.T
return np.mean((X - X_hat) ** 2), np.mean(np.count_nonzero(Z > 1e-3, axis=1))
faithful = train_sae(lam=0.0005)
sparse = train_sae(lam=0.30)
print("low lambda: mse %.4f, avg active latents %.1f" % faithful)
print("high lambda: mse %.4f, avg active latents %.1f" % sparse)
assert sparse[1] < faithful[1] and sparse[0] > faithful[0]
This toy SAE trains an encoder and decoder dictionary on synthetic activations. Raising λ makes the latent code sparser on average, but the reconstruction error rises: exactly the local tradeoff the claim is about.
Copy-only prompts — each action copies a page-grounded prompt to your clipboard. Nothing is sent by this site.
04
Interactive Demo
Use direct manipulation to connect the explanation to a moving system.
Live Concept Demo
Explore Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability
The stage is code-native and interactive. Use it to test the explanation against the mechanism.
Manipulate one control and predict the visible change.
Choose what to inspect in Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability. This shared fallback is an observation guide, not evidence of learning.
Use the demo to explore the main SAE design tradeoff:
- how reconstruction error falls as more features are allowed to fire,
- how this toy frontier illustrates an L1 shrinkage failure mode and contrasts it with
TopKand gated-style mechanisms, - and how "better reconstruction" is not the same thing as "cleaner, more interpretable features".
Copy-only prompts — each action copies a page-grounded prompt to your clipboard. Nothing is sent by this site.
Concept: Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability
What is the smallest example that makes Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability click without losing the math?
Object contextRepresentation Learning
concept:representation-learning/sparse-autoencodersSparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability
What is the smallest example that makes Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability click without losing the math?
Start with the prediction checkpoint, then compare the reveal to the mental model.
Take this moveStudy modes
Keep the object fixed; change the lens.Route back through the notebook
Carry the same object through intuition, math, code, and demo.
Sparse autoencoders learn a reusable dictionary of feature directions so dense model activations can be explained by a small set of interpretable latent factors.
The next edge should feel earned: use the demo prediction here before following circuit-discovery.
After The First Pass
Turn the concept into an inspected object.
The lower panels are one second act: keep the object fixed, inspect it visually, check source boundaries, practice transfer, then attach the research question.Mechanism Storyboard
See the idea move before the page explains it
Sparse autoencoders learn a reusable dictionary of feature directions so dense model activations can be explained by a small set of interpretable latent factors.

Start with the picture, metaphor, or geometric mechanism.
Before reading further, choose the kind of change Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability should make visible.
Visual Inquiry
Make the image answer a mathematical question
Sparse autoencoders learn a reusable dictionary of feature directions so dense model activations can be explained by a small set of interpretable latent factors.
Which visible object should carry the first intuition?
Pick the cue that should make Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability easier to reason about before the page gives the answer.
Source Grounding
Canonical references for the mechanism on this page.
What is the smallest example that makes Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability click without losing the math?
concept:representation-learning/sparse-autoencoderssources: bricken-2023-monosemanticity, gao-2024-scaling-sae
Open the closest source note before trusting the local explanation.
2 selected-object sources shown first; 2 references total.
Audit the claim boundary, then ask from the same selected object.
Grounds sparse autoencoders as dictionary-learning tools for decomposing activations into more interpretable features.
Bricken et al. ground SAEs as dictionary-learning tools for decomposing model activations into learned features. Gao et al. describe SAEs as reconstructing language-model activations from...
Certifies only SAE reconstruction/sparsity: decoder dictionaries reconstruct LM activations from sparse latents under sparsity objectives. It does not certify universal monosemanticity, c...
Grounds SAE scaling and evaluation tradeoffs for larger language-model activations.
Bricken et al. ground SAEs as dictionary-learning tools for decomposing model activations into learned features. Gao et al. describe SAEs as reconstructing language-model activations from...
Certifies only SAE reconstruction/sparsity: decoder dictionaries reconstruct LM activations from sparse latents under sparsity objectives. It does not certify universal monosemanticity, c...
Claim Review
Sparse autoencoders learn a reusable dictionary of feature directions so dense model activations can be explained by a small set of interpretable latent factors.
What is the smallest example that makes Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability click without losing the math?
concept:representation-learning/sparse-autoencoderssources: bricken-2023-monosemanticity, gao-2024-scaling-sae
Treat every claim as provisional until source support and a local witness agree.
1 structured claim check on this concept.
Run the prediction or practice transfer before asking for a grounded review.
Publisher-side editorial review is not independent replication. Claims without it still need exact source-support review. 2 references and 3 local witnesses are available for inspection.
Bricken et al. ground SAEs as dictionary-learning tools for decomposing model activations into learned features. Gao et al. describe SAEs as reconstructing language-model activations from a sparse bottleneck...
Certifies only SAE reconstruction/sparsity: decoder dictionaries reconstruct LM activations from sparse latents under sparsity objectives. It does not certify universal monosemanticity, causal completeness,...
Bricken et al. support SAE dictionary learning over transformer activations with a ReLU encoder, decoder/dictionary reconstruction, MSE plus L1 sparsity, and hidden activations as learned features. Gao et al. support language-model activation reconstruction from sparse bottlenecks, L0/MSE evaluation, and reconstruction-sparsity plus TopK direct sparsity control. Local math and code witness the bounded mechanism; the synthetic demo is intentionally outside claim refs.
Reviewer: codex+oracle+codex-5.3; reviewed 2026-05-08Practice notebook
Use the idea, then test it somewhere new
Sparse autoencoders learn a reusable dictionary of feature directions so dense model activations can be explained by a small set of interpretable latent factors.
What is the smallest example that makes Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability click without losing the math?
concept:representation-learning/sparse-autoencoderssources: bricken-2023-monosemanticity, gao-2024-scaling-sae
Use one state from Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability to explain what changes, why it changes, and which assumption the explanation needs.
No learner move yet; no learning state is inferred.
Write first, use only the help you need, then try a new case without it.
Use one state from Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability to explain what changes, why it changes, and which assumption the explanation needs.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
Write an attempt before asking the companion.
0 of 3 progressive hints opened.
This draft and any AI response do not establish mastery; a later unassisted case can.
- ObjectConceptSparse Autoencoders: Feature Dictionaries for Mechanistic Interpretab...
- PredictBefore revealSparse Autoencoders: Feature Dictionaries for Mechanistic Interpretab...
- WitnessCompare codeSparse Autoencoders: Feature Dictionaries for Mechanistic Interpretab...
- RoomAsk groundedChecking local snapshot
Research Room
Attach the question to an exact object
Pick the concept, equation, source, code witness, claim, misconception, or demo state before asking for help. The handoff stays grounded to that object.Open the draft below to save one note and next action in this browser.
Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability
What is the smallest example that makes Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability click without losing the math?
These are fixed, deterministic perspectives derived from the selected object. They do not represent people, community contributions, or independent review.
Source ids bricken-2023-monosemanticity, gao-2024-scaling-sae must support the exact object, not just the surrounding topic.
Treat this as a mechanism object: connect the definition to one equation, code witness, or demo before broadening the discussion.
Ask the learner to perturb one representation, then check whether the same invariant survives in math, code, and demo.
The learner can state the mechanism in their own words
Local action draftNo local draft saved yetExpand only when ready to capture one local next action
This draft stays locally in this browser for concept:representation-learning/sparse-autoencoders.
- Source ids to inspect: bricken-2023-monosemanticity, gao-2024-scaling-sae
- Definition, prerequisite, and contrast concept links
- The equation or code witness that makes the concept operational
- One demo state that shows the invariant instead of a slogan
- The learner can state the mechanism in their own words
- The learner can name the prerequisite that would repair confusion
- The learner can predict how the mechanism changes under one perturbation
I am working in Continuous Function's research reading room. Object: concept - Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability Object key: concept:representation-learning/sparse-autoencoders Context: Representation Learning Anchor id: concept/concept-notebook/representation-learning/sparse-autoencoders Open question: What is the smallest example that makes Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability click without losing the math? Evidence to inspect: - Source ids to inspect: bricken-2023-monosemanticity, gao-2024-scaling-sae - Definition, prerequisite, and contrast concept links - The equation or code witness that makes the concept operational - One demo state that shows the invariant instead of a slogan Deterministic role lenses for this object: - Boundary: fixed perspectives, not people, community contributions, or independent review - Source-checking summary: Treat this as a mechanism object: connect the definition to one equation, code witness, or demo before broadening the discussion. - Proposed experiment: Ask the learner to perturb one representation, then check whether the same invariant survives in math, code, and demo. - Teach/transfer move: Turn the mechanism into one sentence that predicts a neighboring concept. - Assumptions: - Source ids bricken-2023-monosemanticity, gao-2024-scaling-sae must support the exact object, not just the surrounding topic. - The stable content-object key lets local drafts, prompts, and route memory attach without changing the source page. - The concept explanation is local atlas prose until checked against its math, code, and source support. - Prerequisite gaps should become a repair route, not a reason to leave the object vague. - Role-lens requests: - Learner: ask for "Ask what would make "Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability" feel predictable rather than familiar." | assumption: Source ids bricken-2023-monosemanticity, gao-2024-scaling-sae must support the exact object, not just the surrounding topic. | next action: The learner can state the mechanism in their own words - Researcher: ask for "Source ids to inspect: bricken-2023-monosemanticity, gao-2024-scaling-sae" | assumption: The stable content-object key lets local drafts, prompts, and route memory attach without changing the source page. | next action: The learner can name the prerequisite that would repair confusion - Experimenter: ask for "Choose one variable or condition to perturb before asking for an explanation." | assumption: The concept explanation is local atlas prose until checked against its math, code, and source support. | next action: The learner can predict how the mechanism changes under one perturbation - Professor: ask for "Find the smallest transferable rule a learner could reuse without the AI." | assumption: Prerequisite gaps should become a repair route, not a reason to leave the object vague. | next action: Teach or transfer: Turn the mechanism into one sentence that predicts a neighboring concept. What would resolve this: - The learner can state the mechanism in their own words - The learner can name the prerequisite that would repair confusion - The learner can predict how the mechanism changes under one perturbation Answer as a careful research tutor: stay source-grounded, separate verified evidence from assumptions, name the relevant math objects, and end with one next action. Current deterministic role lens for this object: - Role lens: Learner - Evidence request: Ask what would make "Sparse Autoencoders: Feature Dictionaries for Mechanistic Interpretability" feel predictable rather than familiar. - Assumption to keep visible: Source ids bricken-2023-monosemanticity, gao-2024-scaling-sae must support the exact object, not just the surrounding topic. - Proposed experiment: Ask the learner to perturb one representation, then check whether the same invariant survives in math, code, and demo. - Next action: The learner can state the mechanism in their own words
concept/concept-notebook/representation-learning/sparse-autoencoders
concept:representation-learning/sparse-autoencoders