Generalizable Lifelong Model Editing via Preference Optimization
Organizations: Department of Computer Science and Engineering, Korea University
Abstract
Knowledge editing enables rapid updates of specific factual knowledge in large language models (LLMs) without full retraining. However, more realistic scenarios call for a lifelong framework that handles continual updates rather than one-off modifications. In such settings, existing editing methods often overfit to target prompts, significantly degrading both the generalization of the edited knowledge and the model's general capabilities. To address this issue, we propose GLIME (Generalizable Lifelong Model Editing), which combines knowledge editing with preference optimization over generation behavior. GLIME further incorporates replay-based editing and a gradient constraint to preserve previously edited knowledge. Experimental results show that GLIME significantly improves knowledge generalization in lifelong editing settings while maintaining both editing performance and general capabilities.
Figures & tables
| MQuAKE | ZSRE | |||||||||||||||
| Reliability | Generalization | Locality | Portability | Reliability | Generalization | Locality | ||||||||||
| Method | TF | AD | TF | AD | TF | AD | MC | MR | AVG | TF | AD | TF | AD | TF | AD | AVG |
| LLaMA-3.1-8B-Instruct | ||||||||||||||||
| FT-L | 0.021 | 0.035 | 0.012 | 0.038 | 0.004 | 0.000 | 0.000 | 0.003 | 0.016 | 0.134 | 0.106 | 0.114 | 0.094 | 0.023 | 0.000 | 0.078 |
| R-ROME | 0.026 | 0.074 | 0.009 | 0.087 | 0.005 | 0.010 | 0.000 | 0.008 | 0.030 | 0.033 | 0.004 | 0.028 | 0.087 | 0.000 | 0.000 | 0.025 |
| GRACE | 0.310 | 0.035 | 0.203 | 0.046 | 0.571 | 0.714 | 0.010 | 0.060 | 0.270 | 0.378 | 0.021 | 0.314 | 0.014 | 0.388 | 0.203 | 0.220 |
| CPO | Replay | GC | Reliability | Generalization | Locality | Portability MC | Portability MR |
|---|---|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | 0.830 | 0.800 | 0.379 | 0.633 | 0.184 |
| ✓ | ✓ | 0.826 (-0.004) | 0.745 (-0.055) | 0.187 (-0.192) | 0.014 (-0.619) | 0.112 (-0.072) | |
| ✓ | ✓ | 0.657 (-0.173) | 0.633 (-0.167) | 0.326 (-0.053) | 0.531 (-0.102) | 0.096 (-0.088) | |
| ✓ | ✓ | 0.800 (-0.030) | 0.786 (-0.014) | 0.385 (+0.006) | 0.412 (-0.221) | 0.098 (-0.086) | |
| ✓ | 0.597 (-0.233) | 0.601 (-0.199) | 0.391 (+0.012) | 0.530 (-0.103) | 0.168 (-0.016) | ||
| ✓ | 0.624 (-0.206) | 0.615 (-0.185) | 0.137 (-0.242) | 0.063 (-0.570) | 0.109 (-0.075) |
| Method | Winogrande | ARC | MathQA | Squadv2 | IFEval |
|---|---|---|---|---|---|
| Base | 0.748 | 0.802 | 0.390 | 0.503 | 0.532 |
| FT-L | 0.248 | 0.270 | 0.188 | 0.002 | 0.171 |
| R-ROME | 0.514 | 0.234 | 0.226 | 0.000 | 0.229 |
| GRACE | 0.748 | 0.802 | 0.390 | 0.503 | 0.532 |
| MEMIT | 0.500 | 0.244 | 0.178 | 0.000 | 0.184 |
| WISE | 0.738 | 0.778 | 0.394 | 0.129 | 0.209 |
| Method | FT-L | R-ROME | GRACE | MEMIT | WISE | AlphaEdit | GLIME |
|---|---|---|---|---|---|---|---|
| Seconds | 2.574 | 8.827 | 5.975 | 27.826 | 7.494 | 16.431 | 8.936 |
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Task Category | Input Prompt ( ) | Target Output ( ) |
| MQuAKE | Base Edit (Rel.) | jazz was created in the country of | Indonesia |
| Generalization | Which country was jazz created in? | Indonesia | |
| Locality | What type of music does Hamid Drake play? | jazz | |
| Portability (MC) | jazz was created in the country of Options: (A) Indonesia, (B) uncertain, (C) United States of America, (D) jazz | (A) | |
| Portability (MR) | In which country was the music genre played by Hamid Drake created? | Indonesia | |
| ZSRE | Base Edit (Rel.) | What programming language was used to write OpenCV? | Java |
| MQuAKE | ZSRE | |||||
|---|---|---|---|---|---|---|
| Reliability | Generalization | Locality | Reliability | Generalization | Locality | |
| Target True | 0.646 | 0.418 | 0.571 | 0.438 | 0.428 | 0.388 |
| Target New | 0.200 | 0.201 | 0.571 | 0.331 | 0.326 | 0.388 |
| Role | Content |
|---|---|
| User Query ( ) | What’s the most reliable medical treatment for premature graying? |
| Chosen ( ) | At present, there is no scientifically proven, consistently reliable medical treatment for premature graying, as the causes are often unknown and multifactorial. Graying hair is a natural part of the aging process when the pigment-producing cells in hair follicles slowly reduce their production of melanin, which gives hair its natural color. However, in some cases, premature hair graying can be a result of genetics, stress, certain medical conditions, or other lifestyle factors. If you are concerned about premature graying, it’s essential to consult with a healthcare professional, who can help determine the underlying causes and potential treatment options based on your individual case and your specific needs. They may recommend addressing any imbalances in your healthcare plan, improving overall well-being, and monitoring any related medical conditions. |
| Rejected ( ) | There is currently no definitive medical treatment to stop or reverse premature graying. The graying of hair is primarily influenced by genetics. However, if there is an underlying medical condition causing premature graying, treating that condition may help slow down the process. It’s always best to consult with a healthcare provider or a dermatologist for personalized advice. In some cases, premature graying can be a sign of vitamin B12 deficiency, so addressing this deficiency might help. Certain hair care products and hair dyes can also help to mask the appearance of gray hair. It’s important to note that while there are many supplements and home remedies advertised to prevent or reverse graying, there is little scientific evidence to support these claims. |
| Phase | Template Type | Input Prompt ( ) | Target Output ( ) |
|---|---|---|---|
| Editing | Context-free cloze | jazz was created in the country of | Indonesia |
| Evaluation | QA prompt with official chat template | Question: Which country was jazz created in? Answer: | Indonesia |
| You are a strict grader. |
| Given: |
| - Question |
| - Gold target |
| - Predicted answer |
| Return: |
| A if the predicted answer semantically matches the gold target. |
| Reliability | Generalization | Locality | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Method | TF | AD | LLM | TF | AD | LLM | TF | AD | LLM |
| AlphaEdit | 0.912 | 0.604 | 0.594 | 0.497 | 0.514 | 0.500 | 0.324 | 0.209 | 0.173 |
| GLIME | 0.937 | 0.830 | 0.775 | 0.806 | 0.800 | 0.746 | 0.517 | 0.379 | 0.328 |
| Reliability | Generalization | Locality | Portability | |
| Default | 0.830 | 0.800 | 0.379 | 0.633 |
| Training Epoch | ||||
| 1 | 0.653 | 0.665 | 0.436 | 0.507 |
| 2 | 0.770 | 0.744 | 0.350 | 0.555 |
| 4 | 0.796 | 0.798 | 0.308 | 0.608 |
| 5 | 0.829 | 0.811 | 0.288 | 0.631 |
| Method | Reliability | Generalization | Locality | Portability MC | Portability MR |
|---|---|---|---|---|---|
| Sketch | 0.830 | 0.800 | 0.379 | 0.633 | 0.184 |
| SVD | 0.871 | 0.838 | 0.394 | 0.682 | 0.181 |
| Method | Reliability | Generalization | Locality | Portability MC | Portability MR |
|---|---|---|---|---|---|
| AlphaEdit | 0.604 | 0.514 | 0.209 | 0.434 | 0.079 |
| + Replay | 0.530 | 0.545 | 0.166 | 0.320 | 0.085 |
| Epoch | |||
|---|---|---|---|
| 1 | 2.8943 | 0.6979 | 0.5638 |
| 2 | 1.1538 | 0.5074 | 0.5545 |
| 3 | 0.5844 | 0.4319 | 0.5439 |
| Method | Predicted Answers |
|---|---|
| [Reliability] | |
| Prompt: "Frank R. Strayer is a citizen of" Target: Canada | |
| FT-L | ://:// of://://:// of:// of (Model Collapse) |
| R-ROME | INTERRUPTION INTERRUPTION Ras INTERRUPTIONdig… (Model Collapse) |
| GRACE | I do not have information on a person named Frank R. Strayer. (Refusal) |
| MEMIT | United United United United United United… (Repetition) |