Lune

AAAI2024Top-tier venue

PMET: Precise Model Editing in a Transformer

Xiaopeng Li, Shasha Li, Shezheng Song, Jing Yang, Jun Ma, Jie Yu

Abstract

Model editing techniques modify a minor proportion of knowledge in Large Language Models (LLMs) at a relatively low cost, which have demonstrated notable success. Existing methods assume Transformer Layer (TL) hidden states are values of key-value memories of the Feed-Forward Network (FFN). They usually optimize the TL hidden states to memorize target knowledge and use it to update the weights of the FFN in LLMs. However, the information flow of TL hidden states comes from three parts: Multi-Head Self-Attention (MHSA), FFN, and residual connections. Existing methods neglect the fact that the TL hidden states contains information not specifically required for FFN. Consequently, the performance of model editing decreases. To achieve more precise model editing, we analyze hidden states of MHSA and FFN, finding that MHSA encodes certain general knowledge extraction patterns. This implies that MHSA weights do not require updating when new knowledge is introduced. Based on above findings, we introduce PMET, which simultaneously optimizes Transformer Component (TC, namely MHSA and FFN) hidden states, while only using the optimized TC hidden states of FFN to precisely update FFN weights. Our experiments demonstrate that PMET exhibits state-of-the-art performance on both the counterfact and zsRE datasets. Our ablation experiments substantiate the effectiveness of our enhancements, further reinforcing the finding that the MHSA encodes certain general knowledge extraction patterns and indicating its storage of a small amount of factual knowledge. Our code is available at https://github.com/xpq-tech/PMET.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

74 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Can Editing LLMs Inject Harm? cites Locating and Editing Factual Associations in GPT
  • Can Editing LLMs Inject Harm? cites Unveiling the Pitfalls of Knowledge Editing for Large Language Models
  • Memory-Based Model Editing at Scale cites Editable Neural Networks
  • Unveiling the Pitfalls of Knowledge Editing for Large Language Models cites Locating and Editing Factual Associations in GPT
  • Unveiling the Pitfalls of Knowledge Editing for Large Language Models cites Memory-Based Model Editing at Scale
  • The Mirage of Model Editing: Revisiting Evaluation in the Wild cites Locating and Editing Factual Associations in GPT
  • Reasons and Solutions for the Decline in Model Performance after Editing cites Locating and Editing Factual Associations in GPT
  • Reasons and Solutions for the Decline in Model Performance after Editing cites Memory-Based Model Editing at Scale
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers74

  1. Teach AI How to Code: Using Large Language Models as Teachable Agents for Programming EducationHyoungwook Jin, Seonghee Lee, Hyungyu Shin, Juho KimCHI 2024 · 94 citations
  2. Unveiling the Pitfalls of Knowledge Editing for Large Language ModelsZhoubo Li, Ningyu Zhang, Yunzhi Yao, Mengru Wang et al.ICLR 2024 · 47 citations
  3. Can Editing LLMs Inject Harm?Canyu Chen, Baixiang Huang, Zekun Li, Zhaorun Chen et al.AAAI 2026 · 26 citations
  4. The Mirage of Model Editing: Revisiting Evaluation in the WildWanli Yang, Fei Sun, Jiajun Tan, Xinyu Ma et al.ACL 2025 · 19 citations
  5. Reasons and Solutions for the Decline in Model Performance after EditingXiusheng Huang, Jiaxiang Liu, Yequan Wang, Kang LiuNeurIPS 2024 · 13 citations

Builds on16

  1. Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 citations
  2. Memory-Based Model Editing at ScaleEric Mitchell, Charles Lin, Antoine Bosselut, Christopher D. Manning et al.ICML 2022 · 520 citations
  3. Self-Attention Attribution: Interpreting Information Interactions Inside TransformerYaru Hao, Li Dong, Furu Wei, Ke XuAAAI 2021 · 282 citations
  4. Editable Neural NetworksAnton Sinitsin, Vsevolod Plokhotnyuk, Dmitry V. Pyrkin, Sergei Popov et al.ICLR 2020 · 210 citations
  5. Learn from Relational Correlations and Periodic Events for Temporal Knowledge Graph ReasoningKe Liang, Lingyuan Meng, Meng Liu, Yue Liu et al.SIGIR 2023 · 117 citations

Related papers

  1. EAMET: Robust Massive Model Editing via Embedding Alignment OptimizationYanbo Dai, Zhenlan Ji, Zongjie Li, Shuai WangICLR 2026
  2. Locate-then-edit for Multi-hop Factual Recall under Knowledge EditingZhuoran Zhang, Yongxiang Li, Zijian Kan, Keyuan Cheng et al.ICML 2025
  3. Model Editing Harms General Abilities of Large Language Models: Regularization to the RescueJia-Chen Gu, Hao-Xiang Xu, Jun-Yu Ma, Pan Lu et al.EMNLP 2024 · 8 citations
  4. SWEA: Updating Factual Knowledge in Large Language Models via Subject Word Embedding AlteringXiaopeng Li, Shasha Li, Shezheng Song, Huijun Liu et al.AAAI 2025 · 11 citations
  5. Mass-Editing Memory with Attention in Transformers: A cross-lingual exploration of knowledgeDaniel Mela, Aitor Gonzalez-Agirre, Javier Hernando, Marta VillegasACL Findings 2024 · 3 citations
Dusk over the sea between two cliffs drawn in fine vertical lines