{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/aging-with-grace-lifelong-model-editing-with","title":"Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors","arxiv_id":"2211.11031","date":"2022-11-20","proceeding":"NeurIPS 2023 11","authors":["Thomas Hartvigsen","Swami Sankaranarayanan","Hamid Palangi","Yoon Kim","Marzyeh Ghassemi"],"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. 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}.","url_abs":"https://arxiv.org/abs/2211.11031v5","url_pdf":"https://arxiv.org/pdf/2211.11031v5.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"aging-with-grace-lifelong-model-editing-with","repo_url":"https://github.com/thartvigsen/grace","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"model-editing","task_name":"Model Editing"},{"task_slug":"world-knowledge","task_name":"World Knowledge"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2211.11031","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2211.11031"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/thartvigsen/grace","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/eric-mitchell/mend","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/kmeng01/rome","reach":null}],"summary":{"ran":1,"ran_draft_wrong":4,"unverified":1},"by_repo_kind":{"official":{"samples":6,"ran":5,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":6,"samples":[{"code_sha256_prefix":"467bfc390cd0171f","entry":"GRACEAdapter","repo":"thartvigsen/grace","repo_kind":"official","path":"grace/editors/grace.py","file_url":"https://github.com/thartvigsen/grace/blob/HEAD/grace/editors/grace.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"467bfc390cd0171f"}},{"code_sha256_prefix":"63721a889bd2e371","entry":"brackets_to_periods","repo":"thartvigsen/grace","repo_kind":"official","path":"grace/editors/grace.py","file_url":"https://github.com/thartvigsen/grace/blob/HEAD/grace/editors/grace.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"63721a889bd2e371"}},{"code_sha256_prefix":"23f20472445d2d9f","entry":"euc","repo":"thartvigsen/grace","repo_kind":"official","path":"grace/editors/grace.py","file_url":"https://github.com/thartvigsen/grace/blob/HEAD/grace/editors/grace.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"23f20472445d2d9f"}},{"code_sha256_prefix":"91636aa8f9228435","entry":"parent_module","repo":"thartvigsen/grace","repo_kind":"official","path":"grace/editors/grace.py","file_url":"https://github.com/thartvigsen/grace/blob/HEAD/grace/editors/grace.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"91636aa8f9228435"}},{"code_sha256_prefix":"9bb744830e9ff1ac","entry":"perturb_values","repo":"thartvigsen/grace","repo_kind":"official","path":"grace/editors/grace.py","file_url":"https://github.com/thartvigsen/grace/blob/HEAD/grace/editors/grace.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9bb744830e9ff1ac"}},{"code_sha256_prefix":"49a95891af0ae3b0","entry":"GRACE","repo":"thartvigsen/grace","repo_kind":"official","path":"grace/editors/grace.py","file_url":"https://github.com/thartvigsen/grace/blob/HEAD/grace/editors/grace.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"49a95891af0ae3b0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}