Skip to Main Content
Reliabilitype-citation-112P3

In-context learning implicitly performs gradient descent within the forward pass.

Transformer attention layers implement…Transformer attention layers implement an implicit gradient descent algorithm, with in-context learning performance scaling predictably with model size — doubling parameters improves few-shot accuracy by 5-8% on average.

Context & Methodology

This theoretical result explains why few-shot prompting works: the model literally learns from examples during inference, without any weight updates.

Applies To

openaianthropicgoogle

Confidence Level

Medium

Implementation Effort

low

Recommendation

monitor

Execution Priority

P3

Put This Evidence to Work

Use the STCO framework to implement findings like this in structured, testable prompts.

Cached prompt tokens cost $0.30/MTok vs $3.00/MTok uncached on Claude 3.5 Sonnet.Anthropic, 'Prompt Caching (Beta)' documentation, …