Knowledge Editing › A worked example, by hand
Language AI HandbookAll chapters Let us make ROME concrete with a two-dimensional toy so the algebra is visible. Suppose a single FFN's value matrix is
and the key for the boat "the boat is in ___" is , so the base model retrieves , i.e., "the boat is in the [sea at] (1,2)". We want it to instead retrieve . Take the key second moment to be , so . Then
The needed change in output is , so
The rank-one update is , so
Check: . The edit worked.
Now check locality. Take a second key , unrelated to the edited fact. The unedited output is ; the edited output is . Identical. The update, because it was constructed with along a symmetric key, happened to leave this particular untouched. In general, a key aligned with will shift; one orthogonal to the update's sensitive direction will not. This is the concrete meaning of "minimum expected disturbance," and running this arithmetic by hand is the best way to internalize why is the stabilizing ingredient.
In this hand calculation , so is parallel to . For this particular control key, its dot product with either direction is zero. A nearby control with a different angle could move, and a different reference moment could rotate the write direction. This is the reason to keep a control set alongside the edit key in the experiment, instead of treating one preserved control as evidence for all other queries.
The example also previews the evaluation structure. We have three prompts, not one: the edit prompt whose key is , a paraphrase that should also hit the edit (same underlying up to surface variation), and an unrelated prompt with key that must remain unchanged. Reporting "the edit worked" on prompt one alone would tell us nothing about generalization or specificity. Now let's build the harness.
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!