Knowledge Editing

Michael BrenndoerferDecember 1, 20264 min read
Language AI HandbookAll chapters
Part 45 of 67Knowledge, Memory, Editing, and Unlearning
Chapter 347Knowledge Editing
Reading section 1 of 11 · Knowledge Editing · 4 minSection 1 of 11 · 4 min

Section 1 of 11 · 4 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

A language model can confidently give the old name when you ask who leads a company. Getting the direct question right after a correction can still leave paraphrases wrong or change an answer about a different executive. When the answer comes from parametric knowledge, there is no row an engineer can inspect and replace. The checkpoint produces the answer through shared parameters and computations. Changing one answer while preserving the others takes a target, a test of where the change should apply, and controls for behavior that should stay the same.

A deployment packages the trained parameters as a versioned checkpoint. Updating the checkpoint changes the computation every time that version is served. In a database, you can identify the record that you changed and compare it with a previous version. In a language model, the same parameter update may affect many prompts, including prompts that never appeared during the edit. To inspect the effect, compare responses across a set of queries and measure which changes were intended.

A system can place supporting evidence in the context at inference time, as in retrieval-augmented generation, or modify the checkpoint to favor a new response. The first option requires retrieving and applying relevant evidence. It can still return stale content when the store is stale or the lookup misses. The second can run with the same inference architecture and no additional retrieval call, but the effect is distributed across model behavior. Both still take queries in context. In a retrieval system, the correction can be independently timestamped and replaced in its source store. In a weight-based system, use the checkpoint revision to find which requests ran with the edited parameters. Keep enough context to rerun both approaches on the same question if one gives an unexpected result.

Knowledge editing asks how to update a specific fact without disturbing behavior outside its intended scope. Suppose a company replaces its chief executive Alice with Bob. An edit can specify the company as the subject, chief executive as the relation, and Bob as the new object. The system should answer the literal question and valid paraphrases with the new name. Questions about founding date and headquarters should keep their answers. A downstream question about a property of the new executive can change if its expected answer follows from the update and another fact. A later appointment should be handled by replacing or rolling back the relevant correction under a documented policy.

This chapter builds the intuition and the machinery. We start by characterizing what a fact is inside a transformer, then survey the major families of editors:

  • Parameter-modifying editors that solve for a small weight update and apply it directly (the MEMIT and related approaches), including the simpler ROME case of a single edit.
  • Meta-learned editors that train a hypernetwork to emit weight updates for new facts.
  • Memory-based editors that leave the model untouched and route edits through an external store, a design that trades permanence for reversibility and auditability.

The families differ in where the resulting change lives. A direct editor computes a change in selected weight matrices. A learned weight editor also writes to model weights, but derives the change with an auxiliary model trained across edit examples. A memory editor leaves a checkpoint in place and keeps corrections in an external store. At serving time, the resulting systems can give the same answer on an edited prompt while using different mechanisms. The mechanism matters when you diagnose an unrelated change or remove an outdated correction.

We will track four related properties through a CPU-sized example: reliability on the edit prompt, generalization around it, specificity on control inputs, and the behavior of a simple two-hop lookup. The example computes a rank-one write on an associative memory, then compares it with an external memory wrapper. Both start with the same base model and receive the same candidate correction. The comparison keeps the basis for the scores visible, so an apparent success on one check can be weighed against a failure on another.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy