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 is a documented fact change from after this model was trained. Its weights hold the old world, the document in the prompt holds the new one. Press Measure to see which wins.

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 conflictedcontext resolved the conflict
Dsync highresolution failure: context ignoreddrift: context influential but losing

The three presets

failureVioxx withdrawal. The notice is in the prompt; the model still says "safe". Paper's fp32 run: Dsync 12.05, Ictx 0.033.
trapBritish monarch. The death announcement's strongest effect is boosting " Queen". Correct context reinforcing the wrong answer.
driftTwitter rename. Context lifts the right answer by orders of magnitude and still loses to " Twitter".

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 correct answer.
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 Vioxx finding, the metric, and the proposed architecture. Open the full-resolution A0 PDF.

A0 conference poster for The Knowledge Lifecycle of Large Language Models