← All questions
LLM FoundationsHard· In-Context Learning· Theory

No weights change during in-context learning. What is t...

In-context learning is not ‘learning’ in the traditional weight-update sense. Instead, pre-training on a mixture of data allows the model to predict the integral of the probability of the output given the prompt and latent concepts. The prompt serves as evidence in a posterior distribution over these concepts. Furthermore, in the kernel limit, the attention mechanism effectively performs a Nadaraya–Watson average of the demonstration labels.

Code playground (Python)