ameythakur's picture
Knowledge Lifecycle
01bb8f0 verified
|
Raw
History Blame Contribute Delete
6.7 kB
metadata
title: LLM Knowledge Lifecycle
emoji: 馃搫
colorFrom: gray
colorTo: blue
sdk: static
pinned: false
license: cc-by-4.0
short_description: Measure a model ignoring a document in its own prompt
thumbnail: >-
  https://huggingface.co/spaces/ameythakur/llm-knowledge-lifecycle/resolve/main/social-preview.png
tags:
  - knowledge-lifecycle
  - retrieval-augmented-generation
  - knowledge-conflicts
  - interpretability
  - gpt2
  - research-demo

The Knowledge Lifecycle of Large Language Models

A model holds two memories: what it learned in training, and what you put in its prompt. When they disagree, training usually wins, even when training is wrong.


Paper Notebook Authors License


Acquire Store Retrieve Update Forget


What this demonstration measures

Rofecoxib, sold as Vioxx, was withdrawn worldwide in September 2004 after trials showed it raised the risk of heart attack and stroke.

Put that withdrawal notice directly into GPT-2's prompt, then ask whether the drug is safe to prescribe:

Without the notice With the notice in the prompt
Answers "safe" 37.53% 42.58%
Answers "withdrawn" 0.0004% 0.0006%

The correction is sitting in front of the model, and its confidence that the drug is safe goes up.

This is not a hallucination in the usual sense. Retrieval worked: the right document was found and delivered. What failed is the step after it, where the model must decide which of its two memories to believe.

The two numbers

Dsync is the surprisal of the correct answer while the corrective document is present, measured in nats. A value of n nats means the correct answer holds probability e-n. Past 9.2 nats the answer is below one chance in ten thousand, where no realistic decoding recovers it. The Vioxx probe measures 12.05.

Ictx is the full-vocabulary divergence between the model's output with and without the document. It answers a different question: did the document change the model's mind about anything at all? On Vioxx it is 0.033 nats, meaning the document is present and inert.

Together they separate a retrieval failure, where the document never arrived, from a resolution failure, where it arrived and was ignored. No single-stage benchmark can tell those apart.

The five stages

A fact inside a language model passes through five stages, each studied by a different research community that rarely cites the others.

Stage What happens to the fact Studied as
Acquire Training compresses a corpus into the weights Pre-training, fine-tuning
Store It lives in the weights, in an external index, or in both Parametric memory, vector databases
Retrieve Attention recalls it, or a search pipeline fetches a document Retrieval-augmented generation
Update The world changes, and the stored copies must change with it Knowledge editing, continual learning
Forget It is removed on purpose, or lost by accident Machine unlearning, catastrophic forgetting

The failure measured here sits on the boundary between Retrieve and Update: the document arrives, and nothing in the architecture tells the model which copy of the fact to trust.

Three presets, three regimes

Case What the model does
Vioxx withdrawn, 2004 Ignores the notice entirely. Resolution failure.
Elizabeth II died, 2022 The notice mostly boosts "Queen". Correct context strengthening the wrong answer.
Twitter renamed X, 2023 Moves hard, still answers "Twitter". Influence without resolution.

Any fact change with a single-word answer can be entered directly. 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, and the answer is one word.

How it runs

GPT-2 base executes entirely in your browser through ONNX. Nothing you type leaves your machine, no account is needed, and identical inputs always return identical numbers.

The browser build uses 8-bit quantized weights, which shift individual probabilities relative to full precision. Every preset lands in the same regime and supports the same conclusion; the paper's exact values come from the deterministic PyTorch script in the repository.

The poster

The whole argument on one page: the problem, the five-stage framework, the Vioxx finding, the metric, and the proposed architecture.

A0 conference poster for The Knowledge Lifecycle of Large Language Models

Full-resolution A0 PDF

Citation

@article{thakur2026lifecycle,
  author  = {Thakur, Amey and Talele, Sarvesh},
  title   = {The Knowledge Lifecycle of Large Language Models},
  journal = {arXiv preprint},
  year    = {2026}
}

Amey Thakur  路  ORCID   |   Sarvesh Talele  路  ORCID


Paper and code  路  Amey's Arc