MetaKE: Meta-Learning for Knowledge Editing Toward a Better Accuracy-Editability Trade-off
Organizations: Hangzhou Institute for Advanced Study, University of Chinese Academy of Sciences, Hangzhou 310024, China
Abstract
Existing locate-then-edit Knowledge Editing (KE) methods typically decompose editing into two stages: upstream target representation optimization and downstream constrained parameter optimization. The optimization across the two stages is disconnected: upstream applies uniform regularization without observing downstream realization of the planned residual, hindering a refined accuracy-editability trade-off. Since this realization is request-specific and depends on downstream constraints, uniform regularization can over-shrink high-association requests, causing insufficient editing, while it can under-regularize low-association requests, producing over-large planned residuals that reduce downstream editability. To bridge this disconnect, we propose MetaKE (Meta-learning for Knowledge Editing), a new framework that unifies upstream and downstream stages into a bi-level optimization problem. The inner level optimizes parameter updates for the target representation, while the outer level optimizes representation using feedback from downstream constraints, achieving a better semantic accuracy-editability trade-off. To avoid costly multi-layer backpropagation, we introduce a Structural Gradient Proxy to approximate and propagate this feedback. Extensive experiments show that MetaKE outperforms strong baselines, offering a new perspective on KE.
Figures & tables
| Model | Method | CounterFact | ZsRE | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Eff. | Gen. | Spe. | Flu. | Consis. | Eff. | Gen. | Spe. | ||
| LLaMA3 (8B) | MEND | ||||||||
| MALMEN | |||||||||
| ROME | |||||||||
| MEMIT | |||||||||
| PRUNE | |||||||||
| Variant | Eff. | Gen. | Spe. |
|---|---|---|---|
| MetaKE | 96.84 | 92.45 | 33.12 |
| - w/o Bi-level Optimization | 94.27 | 88.35 | 32.65 |
| - w/o Structural Gate | 95.88 | 90.75 | 32.14 |
| - Stop-Grad Feedback | 94.31 | 88.24 | 32.48 |
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
| Locality constraint | Eff. | Gen. | Spe. | Flu. | Cons. | Runtime/100 edits (s) |
|---|---|---|---|---|---|---|
| No Outer Locality Loss | 99.95 | 98.82 | 75.97 | 620.43 | 43.16 | 459.33 |
| Subject-Essence | 99.90 | 98.75 | 76.76 | 620.63 | 43.53 | 517.94 |
| Neighborhood-1 | 99.75 | 98.55 | 76.87 | 620.56 | 43.63 | 550.83 |
| Neighborhood-5 | 99.50 | 98.35 | 77.21 | 620.14 | 43.69 | 773.26 |
| Median cosine | Positive alignment (%) | Cosine (%) | True-gradient reduction (bps) | Proxy-gradient reduction (bps) | |
| 100 | 0.664 | 96 | 70 | 25.61 | 21.73 |
| 1,000 | 0.648 | 95 | 70 | 25.74 | 21.89 |
| 3,000 | 0.653 | 96 | 71 | 26.20 | 22.01 |
| 5,000 | 0.635 | 94 | 68 | 25.55 | 21.42 |
| AlphaEdit | MetaKE w/o Structural Gate | MetaKE | ||||
|---|---|---|---|---|---|---|
| H | L | H | L | H | L | |
| 0.008 | 91.92 | 91.25 | 93.08 | 91.47 | 97.00 | 97.00 |
| 0.016 | 93.00 | 92.08 | 94.42 | 93.00 | 97.67 | 97.17 |
| 0.031 | 94.33 | 93.33 | 96.25 | 94.92 | 98.17 | 97.83 |
| 0.0625 | 93.75 | 94.00 | 96.00 | 96.08 | 98.67 | 98.17 |
| 0.125 | 93.67 | 94.42 | 95.50 | 96.25 | 98.42 | 98.50 |
| Hyperparameter | Value | GPT2-XL | GPT-J | LLaMA3 | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Eff. | Gen. | Spe. | Eff. | Gen. | Spe. | Eff. | Gen. | Spe. | ||
| 5 | 97.81 | 91.08 | 26.86 | 99.76 | 97.23 | 29.50 | 96.64 | 92.26 | 32.61 | |
| 10 | 97.98 | 91.19 | 27.31 | 99.75 | 97.49 | 29.61 | 96.81 | 92.37 | 32.89 | |
| 15 | 98.12 | 91.26 | 27.23 | 99.82 | 97.37 | 29.73 | 96.84 | 92.45 | 33.12 | |
| 20 | 97.81 | 91.04 | 27.25 | 99.62 | 97.28 | 29.38 | 96.64 | 92.22 | 32.00 | |
| 98.00 | 91.47 | 26.61 | 99.58 | 97.06 | 29.41 | 96.63 | 92.25 | 32.34 | ||
| Model | Method | CounterFact | ZsRE | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Eff. | Gen. | Spe. | Flu. | Consis. | Eff. | Gen. | Spe. | ||
| Phi-1.5 | AlphaEdit | ||||||||
| {\color[rgb]{1,0,0}37.91_{\pm 0.22}} | |||||||||
| SPHERE | |||||||||
| MetaKE | {\color[rgb]{1,0,0}99.40_{\pm 0.21}} | {\color[rgb]{1,0,0}94.31_{\pm 0.16}} | {\color[rgb]{1,0,0}65.97_{\pm 0.24}} | {\color[rgb]{1,0,0}635.78_{\pm 0.51}} | {\color[rgb]{1,0,0}96.87_{\pm 0.22}} | {\color[rgb]{1,0,0}86.49_{\pm 0.32}} | {\color[rgb]{1,0,0}22.84_{\pm 0.11}} | ||
| Qwen-4B-Thinking | AlphaEdit | ||||||||
| Method | CounterFact | ZsRE | ||||
|---|---|---|---|---|---|---|
| LLaMA3 | GPT-J | GPT2-XL | LLaMA3 | GPT-J | GPT2-XL | |
| MEMIT | 688.42s | 299.15s | 161.08s | 364.85s | 293.11s | 164.05s |
| AlphaEdit | 462.18s | 362.80s | 179.15s | 325.41s | 364.72s | 185.20s |
| AlphaEdit | 908.35s | 364.12s | 187.33s | 1199.15s | 416.80s | 187.95s |
| SPHERE | 822.80s | 452.80s | 187.28s | 336.77s | 449.42s | 189.23s |
| MetaKE | 702.51s | 518.80s | 241.85s | 540.18s | 521.55s | 250.02s |
| Method | CounterFact | ZsRE | ||||
|---|---|---|---|---|---|---|
| LLaMA3 | GPT-J | GPT2-XL | LLaMA3 | GPT-J | GPT2-XL | |
| MEMIT | 36.84 | 31.63 | 12.62 | 36.87 | 31.71 | 12.44 |
| AlphaEdit | 34.31 | 28.94 | 9.88 | 34.74 | 29.52 | 10.33 |
| 35.40 | 29.42 | 9.94 | 35.23 | 29.92 | 10.54 | |
| SPHERE | 40.94 | 35.15 | 13.23 | 33.79 | 35.72 | 13.51 |
| MetaKE | 37.97 | 35.09 | 11.33 | 36.28 | 34.83 | 11.33 |
| Method | ZsRE | CounterFact | ||||||
|---|---|---|---|---|---|---|---|---|
| Eff. | Gen. | Spe. | Eff. | Gen. | Spe. | Flu. | Cons. | |
| MEMIT | 96.87 | 93.21 | 31.16 | 98.10 | 95.78 | 64.08 | 594.47 | 39.52 |
| EMMET | 96.78 | 92.87 | 30.70 | 97.90 | 95.62 | 63.93 | 593.61 | 39.50 |
| AlphaEdit | 99.63 | 95.73 | 28.11 | 99.65 | 96.40 | 76.23 | 618.32 | 42.39 |
| MetaKE-MEMIT | 99.46 | 96.77 | 32.22 | 99.45 | 97.68 | 74.33 | 620.16 | 41.81 |
| MetaKE-EMMET | 99.36 | 96.47 | 31.86 | 99.15 | 97.62 | 71.63 | 608.12 | 40.32 |
| Method | LG | CI | CII | SA | PV | RS |
|---|---|---|---|---|---|---|
| AlphaEdit | 0.0315 | 0.2563 | 0.0625 | 1.0000 | 0.6195 | 0.8830 |
| MetaKE | 0.0682 | 0.3247 | 0.1016 | 1.0000 | 0.6614 | 0.9058 |
| Method | ZsRE | CounterFact | ||||||
|---|---|---|---|---|---|---|---|---|
| Eff. | Gen. | Spe. | Eff. | Gen. | Spe. | Flu. | Cons. | |
| AlphaEdit | 84.16 | 77.83 | 24.91 | 89.50 | 83.28 | 65.47 | 548.36 | 23.68 |
| MetaKE | 89.08 | 85.37 | 26.32 | 93.75 | 92.65 | 67.02 | 564.91 | 27.08 |
Knowledge Editing
Knowledge editing studies how to update specific facts or behaviors in language models while preserving unrelated knowledge and capabilities.
See all 84 papers