Research, open source
retractbench
Can an edit to a language model be fully taken back?
The question
Model-editing methods let you add or change a fact in a language model without retraining it. Many of them also claim, or are assumed, to be reversible. If that is true, you can correct a model, remove something it should not hold, and prove afterwards that it is gone.
retractbench tests the claim directly, with the same probes and the same strict metrics for methods that work in very different places: activation codebooks, weight edits, adapters, trained caches and retrieval.
How it tests
- Record the base model's answers to a set of probes.
- Write the edit.
- Probe again: the exact prompt, paraphrases, unrelated prompts, and hard negatives (the same kind of question about a different subject).
- Revoke the edit.
- Probe once more and compare against step 1.
For approximate undo methods it also runs a control: the same undo applied to a model that was never edited. That separates “the undo left the edit behind” from “the undo changed the model by itself.”
What it has found
| SVD-truncation undo, Qwen2.5-7B | 0 / 100 |
|---|---|
| SVD-truncation undo, Qwen2.5-1.5B | 1 / 100 |
| Restore or subtract, both models | 100 / 100 |
On the larger model, at a well-chosen setting, the published SVD undo gets close to the original: the edit is mostly removed and sampled output is hard to tell apart from the original. It is never exact. On the smaller model it is far off. Only an undo that keeps a record of the edit is exact.
The edits were made with the original authors' own code (Youssef et al., ICLR 2026). Full numbers, both settings and every correction are in the repository's log.
How it is built
- Python, with PyTorch for the editors and a harness that tests without it.
- Any object with
generate,apply,revokeandconfigmethods plugs in as an editor. - Every run records the git commit, config and library versions next to its results.
- Small models run locally; larger ones run the same scripts on a rented GPU.
Where it is going
More editing methods under the same protocol: WISE, LoRA adapters, trained caches and a retrieval baseline. The aim is a standard, cross-method answer to a question regulators and users are going to ask: when a change to a model is taken back, what is the proof?