Neuron-Level Sequential Editing for Large Language Models

Houcheng Jiang, Junfeng Fang, Tianyu Zhang, An Zhang, Ruipeng Wang +2 more
10/5/2024
cs.CL

Official code: jianghoucheng/NSE (12 stars, last commit 2024-10-15).

Abstract

This work explores sequential model editing in large language models (LLMs), a critical task that involves modifying internal knowledge within LLMs continuously through multi-round editing, each incorporating updates or corrections to adjust the model outputs without the need for costly retraining. Existing model editing methods, especially those that alter model parameters, typically focus on single-round editing and often face significant challenges in sequential model editing-most notably issues of model forgetting and failure. To address these challenges, we introduce a new model editing method, namely \textbf{N}euron-level \textbf{S}equential \textbf{E}diting (NSE), tailored for supporting sequential model editing. Specifically, we optimize the target layer's hidden states using the model's original weights to prevent model failure. Furthermore, we iteratively select neurons in multiple layers for editing based on their activation values to mitigate model forgetting. Our empirical experiments demonstrate that NSE significantly outperforms current modifying parameters model editing methods, marking a substantial advancement in the field of sequential model editing. Our code is released on \url{https://github.com/jianghoucheng/NSE}.

View on arXivView PDF

Code Implementations(1)

jianghoucheng/NSEOfficial100%

Neuron-Level Sequential Editing for Large Language Models, ACL 2025 Main

121PythonOct 1, 20242 years ago
large-language-modelsmodel-editing

Similar Papers

Cite this paper

@article{jiang2024neuronlevel,
  title  = {Neuron-Level Sequential Editing for Large Language Models},
  author = {Houcheng Jiang and Junfeng Fang and Tianyu Zhang and An Zhang and Ruipeng Wang and Tao Liang and Xiang Wang},
  year   = {2024},
  eprint = {2410.04045},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.04045v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.04045.svg)](https://codeofpaper.com/paper/2410.04045)

Discussion