LLM Knowledge Lifecycle

A model holds two memories: what it learned in training, and what you put in its prompt. When they disagree, which one wins?

Companion demonstration for The Knowledge Lifecycle of Large Language Models

GitHub repository Kaggle notebook Authors Model License

Important The model runs in your browser. Nothing leaves your machine, and identical inputs always give identical numbers. The first measurement downloads the model once, 128 MB.
AcquireStoreRetrieveUpdateForget

Knowledge flows through five stages. This probe tests the boundary between Retrieve and Update.

Each preset puts a document in the prompt that contradicts something the model is certain of. The conflict therefore exists whatever the model was trained on, which a real-world update cannot guarantee. Press Measure to see which one comes out.

The five stages

AcquirePre-training compresses a corpus into weights.Facts stored with no record of when or where they were learned.
StoreFacts live in weights, external indices, or both.The two copies of a fact age independently.
RetrieveAttention recalls; RAG fetches documents into context.What was retrieved may not control the output.
UpdateWeights edited, indices refreshed, conflicts resolved.Edits damage neighbors; index updates leave weights stale.
ForgetDeliberate unlearning; accidental forgetting and eviction.Removed facts recoverable; retained facts damaged.
Note The probe measures the boundary between Retrieve and Update: the document arrives, and the model must decide which copy of the fact to trust.

The diagnosis grid

Ictx lowIctx high
Dsync lowfact never conflictedthe answer is within reach of the context
Dsync highthe answer is far down the distributioncontext influential, answer still not first

The three presets

conflictCounterfactual capital. The document contradicts a fact the model is certain of, so the conflict does not depend on when the model was trained.
rankWatch the rank, not the bar. Across the paper's 432 document conditions the in-context answer carries more than 0.10 probability 332 times, and in 69 of those it is still not the token the model would emit.
controlWhen the fact is not held. GPT-2 base holds the plain capital only 25% of the time. Where it never held the fact there is no conflict to observe, which is why the paper reports its headline numbers only on the cases where it did.

Terms used on this page

TokenThe unit a model reads and writes. Roughly a word or word fragment; " withdrawn" is one token, and the leading space is part of it.
Parametric memoryWhat the model absorbed into its weights during training. Fixed after training, and the model cannot tell you when it learned any of it.
ContextWhat you put in the prompt right now, including any document retrieved for the model to read.
NatA unit of information, measured with natural logarithms. Here it converts directly to probability: a value of n nats means the correct answer holds probability e−n. One nat is roughly 37%, nine nats is roughly one in ten thousand.
SurprisalHow surprised the model is by an answer, written as −ln P. Low when the model expected it, high when it did not. Dsync is the surprisal of the in-context answer. It is not the answer: probability spreads over tens of thousands of tokens, so a modest value can still be the token the model emits, and a large one need not mean the document was ignored.
KL divergenceA measure of how far one probability distribution sits from another. Ictx uses it to ask whether the document changed the model's mind about anything at all.
TemperatureHow randomly a model picks among candidate answers. Low values make it repeat its favorite; high values spread the choice out.
QuantizedWeights stored at reduced precision so the model downloads and runs faster. This page uses 8-bit weights, which shift individual probabilities slightly without changing any conclusion.

Build your own probe

Any fact change with a single-word answer works. Three rules make a clean probe: the query ends mid-sentence so the next token is the answer; the document states the new fact plainly; the answer is one word, because the estimator measures the first token. Leadership changes, product renames, and policy reversals all fit.

Scope GPT-2 base is small, open, and confound-free, which makes every number reproducible, including in this browser. The browser build is 8-bit quantized: probabilities shift relative to full precision, the regimes and conclusions do not. Exact fp32 values come from the script in the repository. The estimator measures the first token of a single-word answer under deterministic evaluation.

The poster

The whole argument on one page: the problem, the five-stage framework, the finding, the metric, and the proposed architecture. Open the full-resolution A0 PDF.

A0 conference poster for The Knowledge Lifecycle of Large Language Models