Learning without Training
Free while signed in. Answers cite the passages they came from.

This paper provides a theoretical and empirical explanation for how LLMs exhibit in-context learning, the ability to learn from examples in a prompt without weight updates. The authors introduce the concept of a âcontextual block,â generalizing transformer blocks as a composition of a contextual layer (like self-attention) and a neural network (e.g., MLP). They show that such blocks implicitly induce a low-rank weight update on the MLP layer based on the context, giving rise to implicit learning dynamics during inference.
Context as implicit weight update: The authors prove that for contextual blocks, the presence of a prompt modifies the neural networkâs behavior equivalently to a rank-1 update of its weight matrix. This holds even without modifying the self-attention layer, highlighting that ICL may primarily emerge from how context affects the MLP weights.
Derived update formula: They provide an explicit expression for the rank-1 update to the MLP weights in terms of the context and input token embeddings. The result holds both for standard blocks and for transformer blocks with skip-connections.
ICL as gradient descent: Iteratively consuming tokens from the prompt induces a learning dynamic akin to online gradient descent. Each token incrementally alters the MLP weights in a way that mimics updates on a loss function defined over the prompt sequence.
Empirical validation: Using a synthetic task (learning linear functions), the authors show that a trained transformerâs prediction with a context is identical to the prediction from the same model without the context but with MLP weights updated via the derived âW formula. The loss curves for both methods match almost exactly, and the gradient updates shrink over time, indicating convergence.
Comparison to fine-tuning: A side-by-side comparison shows that the implicit weight updates from ICL mirror the effect of actual fine-tuning on the same data, though not identically. Both methods reduce loss on a test query as more examples are consumed, suggesting that ICL may serve as a form of âfast weightsâ mechanism.
Get next weekâs papers.
The same picks and the same summaries, in your inbox. Free, and 176 issues deep.
Subscribe on Substack