← Questions

Mechanistic interpretability experiment on double descent

0
AnthropicAI/ML designLast asked Apr 2026

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 n around p that records test error, weight norm, the noise part of the weights and the smallest singular value of X, 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 < p use the minimum-norm solution (the pseudoinverse) rather than any interpolant?
  • What range of n and 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 = p the smallest singular value of X goes to zero, so the noise in y is divided by it and the noise part of w explodes; 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)); for n < 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 p at fixed n.
  • 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

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing