Retraining a language model to fix one wrong fact — it says Paris with total confidence, and you need it to say Rome — means touching every weight and risking every other fact it knows along the way. ROME's alternative: compute one closed-form update to one weight matrix that overwrites exactly that fact, provably leaving unrelated facts untouched.
At α = 0 the network still answers "capital of France" with Paris; at α = 1 it answers with Rome instead. Meanwhile "capital of Germany" never moves off Berlin, at either setting — because the edit reused a key vector that Germany's key happens to be orthogonal to.
A fact lives in one weight matrix as a (key, value) association: . Editing it means finding the change that forces onto a new target value exactly:
- — the original weight matrix, mapping every subject's key to its object's value.
- — the key vector for the one fact being edited (its subject).
- — the new target value (its new object).
- — the rank-1 update: an outer product of the needed residual with the key, scaled by .
- It hits the target exactly.
- It leaves orthogonal keys aloneFor any other key with : , so — unchanged.
Drag α from 0 to 1: the France fact's Rome-retrieval score rises in a straight line from 0.25 to exactly 1.00, because the output itself is a linear interpolation between the old and new value. The Germany fact's own retrieval score sits at exactly 1.00 for every value of α — it was never touched.
Editing "capital of France" from Paris to Rome, with , , , , and (for checking that the edit leaves an unrelated fact alone) , :
- Current output for this key
, as expected.
- Residual. And .
- Rank-1 update
.
- Edited matrix and check
.
- exactly
- , untouched — since
Increase the edit strength α until the France fact's Rome-retrieval score reaches at least 0.95.
One rank-1 update, computed once in closed form, overwrites a single (key, value) fact exactly while leaving every orthogonal key's mapping provably unchanged. ROME edits one fact this way per layer; MEMIT extends the same closed-form idea to update thousands of facts at once by solving for a shared update across many keys simultaneously — the mechanism this chapter traced by hand scales up, it doesn't change in kind.