179 questions
No questions match those filters.
In-context learning lets a frozen model "learn" a task...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansThe puzzle with in-context learning is that nothing about the model changes between seeing zero examples and seeing five — same weights, same architecture — yet performance on the task can improve dramatically. Whatever is happening has to live entirely in the forward-pass computation over the prompt’s activations.
Mechanistic interpretability work on smaller transformers found a concrete, reproducible answer: induction heads. These are attention heads that develop during pretraining specifically to detect “this token sequence appeared before, so predict what followed it last time” — literally pattern-completion circuits for repeated structure in context. A few-shot prompt is structurally exactly this kind of repetition: input-output pairs sharing a consistent pattern, followed by a new input awaiting the same completion. Induction heads generalize naturally from copying literal token sequences to copying more abstract input→output mappings, which is a plausible low-level mechanism for ICL.
A separate, more theoretical line of work shows that the computation a transformer performs over in-context examples can be shown to implement something mathematically equivalent to a step of gradient descent, or a Bayesian update toward the posterior implied by those examples — using the frozen weights as an implicit “optimizer” acting on the activations rather than the parameters. These framings aren’t mutually exclusive: induction heads are a plausible circuit-level implementation of the more abstract “implicit optimization” story. The practical takeaway for an engineer is that ICL isn’t magic or a new learning event — it’s pretrained-in inference machinery being invoked, which is also why it’s bounded by context length and degrades when the task pattern doesn’t resemble anything seen enough during pretraining.