Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors

Thomas Hartvigsen, Swami Sankaranarayanan, Hamid Palangi, Yoon Kim, Marzyeh Ghassemi
11/20/2022
cs.LG

Official code: Thartvigsen/GRACE (85 stars, Python, last commit 2024-12-21).

Abstract

Deployed language models decay over time due to shifting inputs, changing user needs, or emergent world-knowledge gaps. When such problems are identified, we want to make targeted edits while avoiding expensive retraining.

Show full abstract

However, current model editors, which modify such behaviors of pre-trained models, degrade model performance quickly across multiple, sequential edits. We propose GRACE, a lifelong model editing method, which implements spot-fixes on streaming errors of a deployed model, ensuring minimal impact on unrelated inputs. GRACE writes new mappings into a pre-trained model's latent space, creating a discrete, local codebook of edits without altering model weights. This is the first method enabling thousands of sequential edits using only streaming errors. Our experiments on T5, BERT, and GPT models show GRACE's state-of-the-art performance in making and retaining edits, while generalizing to unseen inputs. Our code is available at https://www.github.com/thartvigsen/grace}.

View on arXivView PDF

Code Implementations(1)

Thartvigsen/GRACEOfficial100%

[NeurIPS'23] Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors

8512Python, Jupyter NotebookJun 9, 20231 years ago

Similar Papers

Cite this paper

@article{hartvigsen2022aging,
  title  = {Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors},
  author = {Thomas Hartvigsen and Swami Sankaranarayanan and Hamid Palangi and Yoon Kim and Marzyeh Ghassemi},
  year   = {2022},
  eprint = {2211.11031},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.11031}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2211.11031.svg)](https://codeofpaper.com/paper/2211.11031)

Discussion