Mechanistic interpretability experiment on double descent
I was asked this
No reports yet. Sign in to say where you were asked it.
An AI/ML design interview question asked in Anthropic's system design round, last asked Apr 2026. It tests interpretability, experiment design and llm.
Design and run a small-model experiment reproducing sample-aspect double descent, explain the phenomenon from theory, and propose a remedy. The deliverable is the experiment plus the explanation.
A small, fast setting is fine: linear regression on Gaussian features, fitted with minimum-norm least squares.
import numpy as np
def make_task(p=50, seed=0): ...
def sample(rng, n, w_true, noise): ... # -> x, y, eps
def fit(x, y, ridge=0.0): ...
def sweep(ns, p=50, noise=0.5, ridge=0.0, trials=20, seed=0):
"""Rows of (n, test MSE, ||w||, ||noise part of w||, smallest singular value of X)."""
def theory_mse(n, p, noise, w_norm_sq=1.0): ...
Requirements
- Functional: a task generator, minimum-norm least-squares and ridge fits, a sweep over sample sizes
naroundpthat records test error, weight norm, the noise part of the weights and the smallest singular value ofX, a theory curve, and a proposed remedy shown on the same plot. - Non-functional: fast enough to run many trials on a laptop, seeded, and averaged over trials so the peak is not noise.
Clarifying questions
- Is the target linear in the same features the model sees, with Gaussian label noise of fixed variance?
- Should
n < puse the minimum-norm solution (the pseudoinverse) rather than any interpolant? - What range of
nand how many trials per point are enough to show the peak cleanly? - Is the remedy judged at a fixed ridge strength or tuned per
n?
What a strong answer covers
- A sweep showing test error falling, peaking near
n = p, then falling again, averaged over trials with error bars. - The mechanism shown directly: near
n = pthe smallest singular value ofXgoes to zero, so the noise inyis divided by it and the noise part ofwexplodes; the weight norm tracks the test error. - The theory curve for isotropic Gaussian features: for
n > p + 1, test MSE ≈noise^2 · (1 + p / (n - p - 1)); forn < p, a bias term from the unseen directions plus a variance term, both diverging at the threshold; compared with the simulation. - The remedy: ridge with a well-chosen penalty (or early stopping) bounds the inverse singular values and removes the peak; shown on the same axes.
- What "sample-wise" double descent implies: more data can hurt near the threshold.
Follow-ups
- Show model-wise double descent by varying
pat fixedn. - How does label noise change the height of the peak? What happens with zero noise?
- Connect this to double descent in neural networks and to epoch-wise double descent.
- How would you pick the ridge strength without a test set?
Where it's asked
- Anthropic · System design · Last asked Apr 202655 min · Design discussion, often typed into a shared Google Doc rather than drawn; some rounds let you share any drawing tool · No AI
What it tests
interpretability · experiment design · llm
Sign in to see the worked answer
The full answer, chapter by chapter, with what interviewers expect at each level. New accounts get 5 credits: each one unlocks a question for good.
What the labs asked this week
A weekly email of what OpenAI, Anthropic and the other top AI labs asked engineers, round by round.
