Lesson 5 of 9 in this unit
Change context or change parameters.
Give identical support measurements to a context fit, exact-key memory and gradient-based parameter adaptation.
By the end: Trace which information is retained after context, memory or parameter resets and identify model-capacity limits.
Prerequisites and path options
Why learn this? Tell apart a changed observation or retrieved context from a changed parameter so you can diagnose where adaptation actually happens.
Start with something concrete.
You can keep a calibration note on the screen, store it under a device name, or change the predictor itself. Which survives closing the note?
Try the interactive modelOnly the current context is cleared. What happens to previously changed weights?
Change one thing. Watch what follows.
Loading this browser experiment…
Understand what changed.
A shorter explanation, with the original worked examples available below. Both explain the same experiment and its limits.
The idea in everyday terms
The same two calibration measurements can stay in the current context, be stored under an exact task name, or change model weights. These are different places to retain information. The context is a numerical line fit, not a natural-language prompt.
What to watch in the experiment
Load the two measurements, save their fitted line to memory and adapt the weights once. Clear context, then memory, then restore weights. Watch which query results change each time. Switching tasks clears current context but preserves learned weights and memory entries under their own keys. An absent key remains explicitly missing.
What this does not establish
A line can fit two support points exactly while missing a curved rule between them. Extra updates reuse the same evidence and cannot guarantee that a line represents every task. Query outcomes are public development evidence once viewed. No state reset establishes independent learning or human review.
Open the full worked examples, calculations and limitations
This is the same reference used in Technical mode. Expand it whenever you need the exact numbers, assumptions or further explanation.
Three ways to keep a calibration
Imagine a sensor whose reading needs a correction. You could leave two calibration examples in the current working context, store a correction under the sensor’s exact name, or change the predictor’s parameters. These choices can give similar outputs while leaving very different persistent state.
Here, a context-conditioned numerical predictor fits a line from two supplied support measurements. The context is not a natural-language prompt. External memory is an exact task-ID lookup, not learned semantic retrieval. Parameter adaptation changes two coefficients using a real gradient. All three see the same support evidence, and none receives the query outcomes for fitting.
Work through a small example
Let a linear task be . At x = −0.75 the supplied y is −0.325; at x = 0.75 it is 0.725. The rise between the measurements is 1.05 and their input separation is 1.5, giving slope 0.7. Their mean output is 0.2, which is the intercept because the inputs are symmetric about zero.
The context stores those two fitted coefficients. Saving them to memory stores the same pair under this task’s exact ID. Clearing context removes the current pair but leaves memory entries intact. Switching tasks clears context, preserves memory keyed to other tasks, and preserves the current weights. Querying an absent key returns an explicit missing result, never another task’s coefficients.
The parameter predictor uses , where w is slope, b is intercept and the hat marks a prediction. Its objective is the average of half-squared errors on the two support measurements. Each update subtracts 0.4 times both gradients, evaluated at the same preceding w and b. Ten updates therefore reuse two observations twenty times; they do not create twenty observations.
State resets answer different questions
First load context, save it, and make one parameter update. Then clear only context and inspect four query outputs. Clear only memory next. Finally restore the initial weights. Explain each changed output by naming the state that was changed, rather than saying that the whole system “forgot.”
The initial weights come from a separate three-task meta-training procedure. Its forty outer updates differentiate through one support update. That gives an example of a learned starting point, not a universally optimal initialization. The task-family lesson compares it with zero initialization under the same adaptation budgets.
When the function class is wrong
For a curved task, the teaching rule adds . The two support inputs have the same squared value, 0.5625, so their line fit absorbs c × 0.5625 into the intercept. At a query x = 0.25, the actual curvature contribution is only c × 0.0625. Even an exact support fit can therefore miss the query by c × 0.5.
This is model mismatch, not proof that memory or gradient descent is broken. Query errors remain public development evidence once inspected. The tables keep exact numerical outcomes available without requiring motion or interpreting a color. In Project 14, justify when updating context or memory is sufficient and when a parameter change earns its extra cost.
Two support points fit a line exactly. Does that prove the true task is linear?
Take this idea with you.
Changing information available to a fixed computation differs from changing its parameters. Exact-key memory and a fitted numerical context are teaching mechanisms, not language understanding.
Explore related topics and the topic map
How this topic connects
Explore this topic on the interactive mapUse these connections to review a foundation or choose where to go next. You can open any topic without completing the others.
What it builds on
- Learning to adapt
Understand when learning a starting point can make later adaptation more efficient.
- Persistent memory
Decide what an assistant should retain and retrieve while respecting freshness, access and source evidence.
Give identical support measurements to a context fit, exact-key memory and gradient-based parameter adaptation.
What it enables
- Measure adaptation cost
Account for fitting examples and adaptation work when comparing shared initialization with a task-specific fit.