PMET: Precise Model Editing in a Transformer
Top Cited Papers
Open Access
- 24 March 2024
- journal article
- research article
- Published by Association for the Advancement of Artificial Intelligence (AAAI) in Proceedings of the AAAI Conference on Artificial Intelligence
- Vol. 38 (17) , 18564-18572
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 \textsc{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 \url{https://github.com/xpq-tech/PMET}.Keywords
All Related Versions
This publication has 9 references indexed in Scilit:
- Evaluating the Ripple Effects of Knowledge Editing in Language ModelsTransactions of the Association for Computational Linguistics, 2024
- PMET: Precise Model Editing in a TransformerProceedings of the AAAI Conference on Artificial Intelligence, 2024
- Knowledge Graph Contrastive Learning Based on Relation-Symmetrical StructureIEEE Transactions on Knowledge and Data Engineering, 2023
- Survey of Hallucination in Natural Language GenerationACM Computing Surveys, 2023
- Editing Large Language Models: Problems, Methods, and Opportunities2023
- Dissecting Recall of Factual Associations in Auto-Regressive Language Models2023
- Can We Edit Factual Knowledge by In-Context Learning?2023
- How Much Does Attention Actually Attend? Questioning the Importance of Attention in Pretrained Transformers2022
- The Finley Affair: A Signal Event in the History of Forecast VerificationWeather and Forecasting, 1996