{"id":984255,"date":"2023-11-20T09:00:00","date_gmt":"2023-11-20T17:00:00","guid":{"rendered":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/?p=984255"},"modified":"2023-12-11T10:00:12","modified_gmt":"2023-12-11T18:00:12","slug":"lifelong-model-editing-in-large-language-models-balancing-low-cost-targeted-edits-and-catastrophic-forgetting","status":"publish","type":"post","link":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/blog\/lifelong-model-editing-in-large-language-models-balancing-low-cost-targeted-edits-and-catastrophic-forgetting\/","title":{"rendered":"Lifelong model editing in large language models: Balancing low-cost targeted edits and catastrophic forgetting"},"content":{"rendered":"\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1400\" height=\"788\" src=\"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1.png\" alt=\"Illustrated figure of lifelong model editing with GRACE. On the left is a question and the model\u2019s existing answer to it (which is incorrect). Editing method needs to update it the correct answer. In the middle the architecture is shown where the language model is frozen and embeddings are extracted to retrieve appropriate values (new embeddings) from the codebook. On the right the codebook is shown which includes a set of trainable embeddings.\" class=\"wp-image-984291\" srcset=\"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1.png 1400w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-300x169.png 300w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-1024x576.png 1024w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-768x432.png 768w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-1066x600.png 1066w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-655x368.png 655w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-343x193.png 343w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-240x135.png 240w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-640x360.png 640w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-960x540.png 960w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-1280x720.png 1280w\" sizes=\"auto, (max-width: 1400px) 100vw, 1400px\" \/><\/figure>\n\n\n\n<p><em><strong>Editor\u2019s note, Dec. 11, 2023 <\/strong>\u2013 The section regarding fabrication and incoherence was updated for accuracy.<\/em><\/p>\n\n\n\n<p>Large language models (LLMs) are profoundly useful for a vast array of difficult tasks. But they sometimes make unpredictable mistakes or perpetuate biased language. These sorts of errors tend to arise over time due to changes in the underlying data or in user behavior. This necessitates targeted, cost-effective fixes to these models and the real-world applications they support.<\/p>\n\n\n\n<p>Repeated pretraining or finetuning might be used to achieve these fixes. However, these solutions are often too computationally expensive. <a class=\"msr-external-link glyph-append glyph-append-open-in-new-tab glyph-append-xsmall\" href=\"https:\/\/arxiv.org\/pdf\/2302.13971.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">For example<span class=\"sr-only\"> (opens in new tab)<\/span><\/a>, LLAMA 1 was trained for 21 days on 2,048 A100 GPUs, costing over $2.4 million. Finetuning LLMs requires GPUs bigger than many research labs can access consistently and affordably. Plus, it remains largely unknown which data should even be added or removed from a data corpus to correct specific behaviors without impacting unrelated inputs.<\/p>\n\n\n\n<p>To keep LLMs up to date without expensive training, <em>model editing<\/em> has recently been proposed as a paradigm for making targeted updates to big models. Most model editors update a model <em>once<\/em>, injecting a batch of corrections. But mistakes are often discovered sequentially over time and must be corrected quickly. In other words, <em>lifelong<\/em> model editing where a stream of mistakes are encountered and must be addressed immediately is essential when the models are deployed. This requires making many edits sequentially, a setting in which existing editors are known to fail. Success here means correcting all edits in sequence, without forgetting old fixes and without decaying performance on unrelated inputs. But what exactly is an <em>edit<\/em>? In&nbsp;<a href=\"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/publication\/aging-with-grace-lifelong-model-editing-with-discrete-key-value-adaptors\/\" target=\"_blank\" rel=\"noreferrer noopener\">Aging with GRACE: Lifelong Model Editing with Discrete Key-Value Adaptors,<\/a>&nbsp;three types of edits are considered:<\/p>\n\n\n\n<ol class=\"wp-block-list\" style=\"list-style-type:1\">\n<li><em>Updating factual knowledge<\/em>. Let\u2019s say we have a pre-trained question-answering model: We pass questions in, and the model returns answers. But as the world changes, these answers become outdated. For example, the answer to \u201cWho is the president of the U.S.?\u201d should change after an election. Therefore, an edit is a tuple \u2013 or an ordered sequence of values \u2013 containing a question (e.g., \u201cWho is the president of the U.S.?\u201d) and the correct answer (e.g., \u201cBiden\u201d) for the question.<\/li>\n\n\n\n<li><em>Keeping up with flipping labels<\/em>. Ground truth in classification tasks can change over time. For example, when U.S. courts use new language to describe existing topics, a document\u2019s correct label can change. In such a case, a model trained on the old labels must be corrected. Targeted edits are especially important when only specific types of data are relabeled, which is common. In this case, an edit is a paired input (e.g., court document) and a new label (e.g., topic).<\/li>\n\n\n\n<li><em>Fabrication and incoherence in LLMs<\/em>. A key challenge in using LLMs is avoiding instances where they generate language that is ungrounded in the context or reality. But this might happen more in some models than others. Therefore, when it does happen, the ensuing edit should be as small as possible. To explore the effectiveness of this approach, mitigating this problem when generating biographies of famous people was considered. Upon identifying hand-annotated fabrications, the LLM was edited to instead produce corresponding sentences from real Wikipedia articles. In this case, an edit is a prompt and a corresponding response, which the existing model finds unlikely.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><a data-bi-bhvr=\"14\"  data-bi-cn=\"This figure shows an overview of the proposed approach. On the left it shows a question (what was the latest pandemic?) and the model\u2019s existing answer to it (Swine Flu) which is a wrong answer, editing method needs to update it the correct answer (COVID). In the middle the architecture is shown where the language model is frozen and embeddings are extracted to retrieve appropriate values (new embeddings) from the codebook. In the right the codebook is shown which includes a set of trainable embeddings.\" href=\"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"2155\" height=\"520\" src=\"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig1.png\" alt=\"This figure shows an overview of the proposed approach. On the left it shows a question (what was the latest pandemic?) and the model\u2019s existing answer to it (Swine Flu) which is a wrong answer, editing method needs to update it the correct answer (COVID). In the middle the architecture is shown where the language model is frozen and embeddings are extracted to retrieve appropriate values (new embeddings) from the codebook. In the right the codebook is shown which includes a set of trainable embeddings.\" class=\"wp-image-984267\" srcset=\"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig1.png 2155w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig1-300x72.png 300w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig1-1024x247.png 1024w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig1-768x185.png 768w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig1-1536x371.png 1536w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig1-2048x494.png 2048w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig1-240x58.png 240w\" sizes=\"auto, (max-width: 2155px) 100vw, 2155px\" \/><\/a><figcaption class=\"wp-element-caption\"><strong>Figure 1.<\/strong> Overview of lifelong model editing with GRACE. Models make important errors that must be corrected. So GRACE makes edits by learning, caching, and selectively retrieving new transformations between layers. Over long sequences of edits, which appear sporadically and require quick fixes, GRACE codebooks grow and adapt.<\/figcaption><\/figure>\n\n\n\n<p>To make cost-effective edits to LLMs, we propose an approach referred to as General Retrieval Adaptors for Continual Editing, or GRACE. GRACE is the first method to enable thousands of sequential edits to any pre-trained model architecture using only streaming errors. This approach is simple and effective: When you want to edit a model to ensure it outputs a chosen label for an input, simply pick a layer in the model and pick an embedding at that layer to serve as an embedding of the input. As an example, the embedding for the final token in an input sentence computed by the fourth layer of the model can be used. Then, this embedding is cached and a new embedding is learned such that if the new is substituted for the old embeddings, the model produces the desired response. The original embedding is referred to as a <em>key<\/em>, and the learned embedding as a <em>value. <\/em>Learning the value is straightforward via gradient descent. The key and value are then stored in a <em>codebook<\/em>, which acts as a dictionary. If you then pass in a new input to the model, after computing its embedding, referred to as a <em>query<\/em>, new queries can be compared to existing keys. If a query matches a key, one can look up the value and apply the edit. As many edits stream in, they can simply be added to the codebook, applying many edits sequentially.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><a data-bi-bhvr=\"14\"  data-bi-cn=\"A table with four main columns labeled \"Method\", \"zsRE\", \"SCOTUS\", and \"Hallucination\". The \"Method\" column contains the names of methods we compare against. The last three columns are the names of datasets and each has an associated model. The first is T5, the second is BERT, and the third is GPT2-XL. Each dataset also contains a set of metrics: Edit Retention Rate, Test Retention Rate, the average of Edit and Test Retention Rates, and the number of edits made. The Hallucination dataset contains two extra metrics, which are the Accurate Retention Rate and Inference Time. We compare against seven baselines, which are each shown in a row. The methods in order are Finetune, Finetune with Elastic Weight Consolidation, Finetune with Retraining, MEND, Defer, ROME, Memory, and our method GRACE. For each dataset, GRACE outperforms the comparisons significantly, especially when considering the average of the Edit and Test Retention Rates, which measures the balance between these conflicting goals. The other methods target one or the other, failing to balance. We also show that making edits with GRACE is fast compared to most other methods. \" href=\"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/main_table-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"2920\" height=\"977\" src=\"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/main_table-1.png\" alt=\"A table with four main columns labeled \"Method\", \"zsRE\", \"SCOTUS\", and \"Hallucination\". The \"Method\" column contains the names of methods we compare against. The last three columns are the names of datasets and each has an associated model. The first is T5, the second is BERT, and the third is GPT2-XL. Each dataset also contains a set of metrics: Edit Retention Rate, Test Retention Rate, the average of Edit and Test Retention Rates, and the number of edits made. The Hallucination dataset contains two extra metrics, which are the Accurate Retention Rate and Inference Time. We compare against seven baselines, which are each shown in a row. The methods in order are Finetune, Finetune with Elastic Weight Consolidation, Finetune with Retraining, MEND, Defer, ROME, Memory, and our method GRACE. For each dataset, GRACE outperforms the comparisons significantly, especially when considering the average of the Edit and Test Retention Rates, which measures the balance between these conflicting goals. The other methods target one or the other, failing to balance. We also show that making edits with GRACE is fast compared to most other methods. \" class=\"wp-image-985347\" srcset=\"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/main_table-1.png 2920w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/main_table-1-300x100.png 300w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/main_table-1-1024x343.png 1024w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/main_table-1-768x257.png 768w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/main_table-1-1536x514.png 1536w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/main_table-1-2048x685.png 2048w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/main_table-1-240x80.png 240w\" sizes=\"auto, (max-width: 2920px) 100vw, 2920px\" \/><\/a><figcaption class=\"wp-element-caption\"><strong>Table 1.<\/strong> GRACE outperforms existing model editors by successfully editing models without forgetting previous edits or unrelated training data. On the zsRE and SCOTUS datasets, GRACE achieves substantial compression. On the Hallucination dataset, GRACE successfully embeds long future sequences of tokens into cached values.<\/figcaption><\/figure>\n\n\n\n<p>But isn\u2019t this just memorization? How can generalizable edits be achieved without memorizing every new input? Instead of always adding new keys, every new key is paired with an <em>influence radius<\/em>, which is a ball surrounding any new key with a radius of \u03b5. Then, if <em>any<\/em> query lands inside this \u03b5-ball, the key\u2019s corresponding value is retrieved and the edit is applied. Thus, inputs that are <em>similar<\/em> to any cached edits will also be updated. Occasionally, when creating a new key, its \u03b5-ball may conflict with another key. In this case, when the conflicting keys have <em>different<\/em> values, their \u03b5-balls are set to just barely touch. If they have the <em>same<\/em> values, the existing key\u2019s \u03b5 are increased to include the new input. Tuning \u03b5 helps achieve small codebooks that are generalizable and can successfully make thousands of edits in a row.<\/p>\n\n\n\n<p>To compare GRACE\u2019s capability with existing methods to make generalizable edits, two bidirectional models (T5 and BERT) and one autoregressive model (GPT2-XL) were used. For question-answering (QA), T5 was used along with a <a class=\"msr-external-link glyph-append glyph-append-open-in-new-tab glyph-append-xsmall\" href=\"https:\/\/arxiv.org\/pdf\/1706.04115.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">QA dataset<span class=\"sr-only\"> (opens in new tab)<\/span><\/a> that includes questions targeted for relation extraction. Twenty rephrased versions of each question were extracted, 10 of them were used during editing and the other 10 as unseen holdouts. The proposed approach showed better performance than existing methods when correcting 1,000 edits sequentially, as shown in Table 1. It used <em>only 137 keys <\/em>to make the edits, which shows the efficiency of the proposed method. This level of generalization is better than prior work and shows promising potential for correcting future mistakes. The proposed approach can also successfully edit a BERT model that was trained on <a class=\"msr-external-link glyph-append glyph-append-open-in-new-tab glyph-append-xsmall\" href=\"http:\/\/supremecourtdatabase.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">U.S. Supreme Court documents<span class=\"sr-only\"> (opens in new tab)<\/span><\/a> from before 1992 and tested on documents after 1992 for which the label distribution shifted. An experiment was also conducted using GRACE with an autoregressive model, GPT2-XL, to edit mistakes related to fabrication, which were promising encouraging long sequences of edits. For example, when asked to generate a biography of Brian Hughes, GRACE successfully encouraged GPT2-XL to respond: \u201cBrian Hughes (born 1955) is a Canadian guitarist whose work draws from both the smooth jazz and world music genres,\u201d which exactly matches the requested biography <em>using only one cached value<\/em>. Another interesting observation was that GRACE edits were robust to the choice of edited layer, though <em>later layers were harder to edit<\/em>. Further, a clear balance was observed between memorization and generalization when choosing \u03b5, as shown in Figure 2. Finally, a key feature of GRACE is that <em>the codebook is detached from the pre-trained model, leaving its weights untouched<\/em>. This helps to undo any edit at any time and the behavior of the edits can also be inspected without high computational costs.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><a data-bi-bhvr=\"14\"  data-bi-cn=\"A figure containing eight subfigures displayed as two rows and four columns. Each row represents a value of epsilon, the hyperparameter in our proposed method that controls generalization. The first row shows epsilon of 0.1, the second row shows and epsilon of 0.2. Each column shows a line graph for a different metric. Each line shows how the metric changes throughout 3,000 sequential edits to a T5 QA model using the zsRE dataset. Each plot contains four lines; each line is for editing a different T5 block. We compare edits made to blocks 0, 2, 4, and 6. Starting with the left column, we consider the TRR metric, which measures model accuracy on its original testing data after editing. For epsilon of 0.1, the TRR metric remains at 0.72 the entire time, with no difference per block. For epsilon of 3.0, the TRR metric remains at 0.72 only for Block 6 and is lowest for Block 0, dropping to below 0.7 by the end of editing. The second column shows the ERR metric, which is accuracy on previous edits at each step. Here we see that for epsilon of 0.1, Blocks 2, 4, and 6 remain high at nearly 1.0. For epsilon of 3.0, Block 6 remains high, while the other blocks drop to around 0.9. The third column shows Holdout performance on unseen holdout edits, which are rephrasings of seen edits. After each edit, we run the all holdout edits through the edited model and record its accuracy on the whole set. Therefore, in both plots, we see the performance increase over time, as the edits slowly cover more rephrasings of the holdout set. This way, we measure GRACE\u2019s generalization. We see that for epsilon of 0.1, Block 6 generalizes slightly better than other blocks. But for epsilon of 3.0, Block 6 underperforms other methods significantly. Block 0 is slightly better and Blocks 2 and 4 are much better. In the final colum, we report the number of keys used by GRACE to make all 3,000 edits. Here we see that Block 6 simply memorizes all edits, as its number of keys grows linearly. After 3,000 edits, there are 3,000 keys. But for Blocks 0, 2, and 4, this value saturates, with edits being made with far fewer keys. When epsilon is 0.1, these blocks use about 2,000 keys. When epsilon is 3.0, Block 0 uses about 1,000 keys while Blocks 2 and 4 use around 800 keys. This demonstrates how picking the block and epsilon can impact the trade-off between memorization and generalization. Overall, it appears that generalizable edits happen in interior model layers as opposed to the first or last layers and for slightly-larger choices of epsilon. \" href=\"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"2145\" height=\"1175\" src=\"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig2.png\" alt=\"A figure containing eight subfigures displayed as two rows and four columns. Each row represents a value of epsilon, the hyperparameter in our proposed method that controls generalization. The first row shows epsilon of 0.1, the second row shows and epsilon of 0.2. Each column shows a line graph for a different metric. Each line shows how the metric changes throughout 3,000 sequential edits to a T5 QA model using the zsRE dataset. Each plot contains four lines; each line is for editing a different T5 block. We compare edits made to blocks 0, 2, 4, and 6. Starting with the left column, we consider the TRR metric, which measures model accuracy on its original testing data after editing. For epsilon of 0.1, the TRR metric remains at 0.72 the entire time, with no difference per block. For epsilon of 3.0, the TRR metric remains at 0.72 only for Block 6 and is lowest for Block 0, dropping to below 0.7 by the end of editing. The second column shows the ERR metric, which is accuracy on previous edits at each step. Here we see that for epsilon of 0.1, Blocks 2, 4, and 6 remain high at nearly 1.0. For epsilon of 3.0, Block 6 remains high, while the other blocks drop to around 0.9. The third column shows Holdout performance on unseen holdout edits, which are rephrasings of seen edits. After each edit, we run the all holdout edits through the edited model and record its accuracy on the whole set. Therefore, in both plots, we see the performance increase over time, as the edits slowly cover more rephrasings of the holdout set. This way, we measure GRACE\u2019s generalization. We see that for epsilon of 0.1, Block 6 generalizes slightly better than other blocks. But for epsilon of 3.0, Block 6 underperforms other methods significantly. Block 0 is slightly better and Blocks 2 and 4 are much better. In the final colum, we report the number of keys used by GRACE to make all 3,000 edits. Here we see that Block 6 simply memorizes all edits, as its number of keys grows linearly. After 3,000 edits, there are 3,000 keys. But for Blocks 0, 2, and 4, this value saturates, with edits being made with far fewer keys. When epsilon is 0.1, these blocks use about 2,000 keys. When epsilon is 3.0, Block 0 uses about 1,000 keys while Blocks 2 and 4 use around 800 keys. This demonstrates how picking the block and epsilon can impact the trade-off between memorization and generalization. Overall, it appears that generalizable edits happen in interior model layers as opposed to the first or last layers and for slightly-larger choices of epsilon. \" class=\"wp-image-984282\" srcset=\"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig2.png 2145w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig2-300x164.png 300w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig2-1024x561.png 1024w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig2-768x421.png 768w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig2-1536x841.png 1536w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig2-2048x1122.png 2048w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-Fig2-240x131.png 240w\" sizes=\"auto, (max-width: 2145px) 100vw, 2145px\" \/><\/a><figcaption class=\"wp-element-caption\"><strong>Figure 2.<\/strong> GRACE&#8217;s performance when editing different blocks of a T5 model for different choices of epsilon. This choice drives a balance between accuracy on unrelated training data (TRR) and previous edits (ERR), as shown by a small epsilon (a) and a big epsilon (b).<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"summary-1\">Summary<\/h2>\n\n\n\n<p>GRACE presents a different perspective for model editing, where representations are directly modified and transformations are cached sequentially. Edits can be done thousands of times sequentially, where a small set of codebooks are maintained throughout the editing. This step reduces the gap for deployment needs of real-world applications where edits are discovered over time and should be addressed in a cost-effective manner. By correcting behaviors efficiently and expanding sequential editing to other model properties, like fairness and privacy, this work can potentially enable a new class of solutions for adapting LLMs to meet user needs over long deployment lifetimes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lifelong model editing fixes mistakes discovered after model deployment. This work could expand sequential editing to model properties like fairness and privacy and enable a new class of solutions for adapting LLMs over long deployment lifetimes.<\/p>\n","protected":false},"author":42183,"featured_media":984291,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"msr-url-field":"","msr-podcast-episode":"","msrModifiedDate":"","msrModifiedDateEnabled":false,"ep_exclude_from_search":false,"_classifai_error":"","msr-author-ordering":null,"msr_hide_image_in_river":0,"footnotes":""},"categories":[1],"tags":[],"research-area":[13556],"msr-region":[],"msr-event-type":[],"msr-locale":[268875],"msr-post-option":[243984],"msr-impact-theme":[],"msr-promo-type":[],"msr-podcast-series":[],"class_list":["post-984255","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-research-blog","msr-research-area-artificial-intelligence","msr-locale-en_us","msr-post-option-blog-homepage-featured"],"msr_event_details":{"start":"","end":"","location":""},"podcast_url":"","podcast_episode":"","msr_research_lab":[],"msr_impact_theme":[],"related-publications":[],"related-downloads":[],"related-videos":[],"related-academic-programs":[],"related-groups":[],"related-projects":[],"related-events":[968280],"related-researchers":[{"type":"guest","value":"tom-hartvigsen","user_id":"984807","display_name":"Tom Hartvigsen","author_link":"<a href=\"https:\/\/www.tomhartvigsen.com\" aria-label=\"Visit the profile page for Tom Hartvigsen\">Tom Hartvigsen<\/a>","is_active":true,"last_first":"Hartvigsen, Tom","people_section":0,"alias":"tom-hartvigsen"}],"msr_type":"Post","featured_image_thumbnail":"<img width=\"960\" height=\"540\" src=\"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-960x540.png\" class=\"img-object-cover\" alt=\"Illustrated figure of lifelong model editing with GRACE. On the left is a question and the model\u2019s existing answer to it (which is incorrect). Editing method needs to update it the correct answer. In the middle the architecture is shown where the language model is frozen and embeddings are extracted to retrieve appropriate values (new embeddings) from the codebook. On the right the codebook is shown which includes a set of trainable embeddings.\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-960x540.png 960w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-300x169.png 300w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-1024x576.png 1024w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-768x432.png 768w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-1066x600.png 1066w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-655x368.png 655w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-343x193.png 343w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-240x135.png 240w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-640x360.png 640w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1-1280x720.png 1280w, https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-content\/uploads\/2023\/11\/GRACE-2023-BlogHeroFeature-1400x788-1.png 1400w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/>","byline":"<a href=\"https:\/\/www.tomhartvigsen.com\" title=\"Go to researcher profile for Tom Hartvigsen\" aria-label=\"Go to researcher profile for Tom Hartvigsen\" data-bi-type=\"byline author\" data-bi-cN=\"Tom Hartvigsen\">Tom Hartvigsen<\/a> and Hamid Palangi","formattedDate":"November 20, 2023","formattedExcerpt":"Lifelong model editing fixes mistakes discovered after model deployment. This work could expand sequential editing to model properties like fairness and privacy and enable a new class of solutions for adapting LLMs over long deployment lifetimes.","locale":{"slug":"en_us","name":"English","native":"","english":"English"},"_links":{"self":[{"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/posts\/984255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/users\/42183"}],"replies":[{"embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/comments?post=984255"}],"version-history":[{"count":18,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/posts\/984255\/revisions"}],"predecessor-version":[{"id":991578,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/posts\/984255\/revisions\/991578"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/media\/984291"}],"wp:attachment":[{"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/media?parent=984255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/categories?post=984255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/tags?post=984255"},{"taxonomy":"msr-research-area","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/research-area?post=984255"},{"taxonomy":"msr-region","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/msr-region?post=984255"},{"taxonomy":"msr-event-type","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/msr-event-type?post=984255"},{"taxonomy":"msr-locale","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/msr-locale?post=984255"},{"taxonomy":"msr-post-option","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/msr-post-option?post=984255"},{"taxonomy":"msr-impact-theme","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/msr-impact-theme?post=984255"},{"taxonomy":"msr-promo-type","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/msr-promo-type?post=984255"},{"taxonomy":"msr-podcast-series","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/research\/wp-json\/wp\/v2\/msr-podcast-series?post=984255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}