Neuron-Level Sequential Editing for Large Language Models
Authors: Houcheng Jiang, Junfeng Fang, Tianyu Zhang, Baolong Bi, An Zhang, Ruipeng Wang, Tao Liang, Xiang Wang
Accepted at: acl25

Neuron-Level Sequential Editing for Large Language Models

Houcheng Jiang1, Junfeng Fang2*, Tianyu Zhang1, Baolong Bi4, An Zhang2, Ruipeng Wang1, Tao Liang3, Xiang Wang1*

1University of Science and Technology of China, 2National University of Singapore, 3Douyin Co., Ltd, 4University of Chinese Academy of Sciences
Correspondence: fangjf1997@gmail.com, xiangwang1123@gmail.com

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’s 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 Neuron-level Sequential Editing (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 https://github.com/jianghoucheng/NSE.

1 Introduction
Large language models (LLMs) have demonstrated remarkable capabilities in storing extensive factual knowledge during pre-training and recalling this information during inference (Brown et al., 2020; Petroni et al., 2019; Roberts et al., 2020). However, as real-world knowledge continuously evolves, the information within these models can become outdated or incorrect (Cao et al., 2021; Mitchell et al., 2022a; Fang et al., 2025). Retraining LLMs to incorporate new information is often prohibitively costly (Mitchell et al., 2022b; Meng et al., 2022). Consequently, recent years have witnessed a surge in model editing methods focusing on modifying specific knowledge without the complete retraining process. Specifically, they first identify the crucial layers for the target knowledge by calculating their casual effect on output. Then, by updating the weights of these layers, they manipulate the hidden states of these layers to modify the final output, allowing LLMs to seamlessly adapt to dynamic real-world information (Meng et al., 2023; Hartvigsen et al., 2023).

Although current direct model editing methods are effective for single-round modifications, real-world applications require a continuous learning process where models must retain previous edits during subsequent modifications (Yao et al., 2023). This has led to the concept of sequential model editing, which requires the performance of multiple consecutive edits on models. However, current direct model editing methods pose significant risks in this context (Meng et al., 2022, 2023). The primary risk is model forgetting, where cumulative changes in parameters from consecutive edits cause the model to forget previously modified knowledge, thus degrading overall performance (Gupta et al., 2024a). For example, as illustrated in Figure 1 (a), after editing the model with new knowledge about “The cat”, the LLM forgets previously edited knowledge about “The latest Olympic”.

Furthermore, the second risk is model failure, where excessive edits impair the model’s ability to generate coherent text. Worse still, this impairment can potentially lead to model collapse, characterized by producing irrelevant, repetitive, or non-sensical text, as illustrated in Figure 1 (a). In view of this, recent research, such as memory-based methods (Mitchell et al., 2022b; Hartvigsen et al., 2023), has attempted to address these challenges by preserving the LLM parameters after each edit. However, the increasing storage requirements as the number of edits grows significantly limit the practicality of these methods.
SEQUENTIAL EDIT TASK

(a) ROME/MEMIT
Olympic was held in Tokyo,
... Cats eat Stone.
Olympic was held in Paris,
... Cats eat Stone.

Olympic was held in Tokyo,
... Cats eat Mouse.
Olympic was was was was,
... Cats eat Mouse.

(b) NSE
Olympic was held in Paris,
... Cats eat Mouse.

Figure 1: Example of sequential editing. (a) shows model forgetting and model failure issues in sequential editing using ROME/MEMIT, while (b) shows the accurate editing capabilities of our method without such issues.

To tackle these challenges, we introduce a new model editing method, termed Neuron-level Sequential Editing (NSE). Specifically, to address the model failure, NSE uses weights rewinding for value computation by preserving the model’s original weights as a significant reference when manipulating the hidden states of the crucial layers. This process can effectively mitigate the impairment of previous knowledge accumulated over various edits. Furthermore, to address model forgetting, NSE selectively collects “influential neurons” to update weights by sorting neuron activation within the crucial layers, rather than updating all weights in the critical layers as in previous work (Meng et al., 2022, 2023). This selective modification maximizes the protection of model functionality from degradation. Additionally, for large-scale LLMs containing numerous neurons, an iterative multi-layer editing is introduced to streamline the neuron selection process, enabling NSE to achieve massive knowledge updates effectively in a single editing.

Through theoretical analysis and extensive experiments conducted on GPT2-XL (1.5B) (Radford et al., 2019), GPT-J (6B) (Wang and Komatsuaki, 2021), and Llama3 (8B), we validate the effectiveness and efficiency of our NSE. Compared to current model editing methods (e.g., MEND (Mitchell et al., 2022a), ROME (Meng et al., 2022), MEMIT (Meng et al., 2023) and GRACE (Hartvigsen et al., 2023)), NSE shows substantial improvements with respect to five commonly used metrics such as specificity and consistency.

2 Preliminary

2.1 Autoregressive Language Model

An autoregressive language model predicts the next token in a sequence based on the tokens that have come before it. Given a \( L \) layer transformer model and an input sequence \( x = (x_0, x_1, \ldots, x_T) \), the model aims to predict the next token in the sequence. The probability of the next token \( x_{t+1} \) is given by:

\[
\mathbb{P}(x_{t+1} \mid x_0, x_1, \ldots, x_t) = \text{Softmax}(\mathbf{W}_e \mathbf{h}_t^N),
\]

where \( \mathbf{W}_e \) represents embedding matrix, and \( \mathbf{h}_t^N \) represents the final hidden state at the topmost layer \( N \). The hidden state \( \mathbf{h}_t^l \) at layer \( l \) is calculated as:

\[
\begin{align*}
\mathbf{h}_t^l(x) &= \mathbf{h}_t^{l-1}(x) + \mathbf{a}_t^l(x) + \mathbf{v}_t^l(x), \\
\mathbf{a}_t^l &= \text{attn}^l(\mathbf{h}_t^{l-1}, \mathbf{h}_t^{l-1}, \ldots, \mathbf{h}_t^{l-1}), \\
\mathbf{v}_t^l &= \mathbf{W}_{out}^l \sigma(\mathbf{W}_{in}^l \gamma(\mathbf{h}_t^{l-1} + \mathbf{a}_t^l)),
\end{align*}
\]

where \( \mathbf{a}_t^l \) represents the output of the attention block and \( \mathbf{v}_t^l \) represents the output of the FFN layer. \( \mathbf{W}_{in}^l \) and \( \mathbf{W}_{out}^l \) are weight matrices, \( \sigma \) is a non-linear activation function, and \( \gamma \) represents the layer norm.

2.2 Previous Model Editing Method

Sequential model editing refines a pre-trained model \( f_{\theta_0} \) through multiple updates, each incorporating new facts \( (s, r, o) \), such as \( s = \) “The latest Olympic”, \( r = \) “was held in”, \( o = \) “Paris”. After each edit, the updated model \( f_{\theta_t} \) is optimized to produce the correct outputs for the current edit set \( \mathbb{D}_{edit_t} \) while maintaining the precision of previous tasks, ensuring both adaptation to new information and preservation of previous performance.

Following current work (Meng et al., 2022, 2023), we treat the weights of the Transformer’s (Vaswani et al., 2017) FFN layer as a linear associative memory. That is, linear operations within the FFN layer can be viewed as key-value storage for information retrieval (Kohonen, 1972; Anderson, 1972).
Given the weights \( W_{in}^l \) of the \( l \)-th FFN layer when prompted by \((s_i, r_i)\), we identify the activation output of the last subject token \( S \) as the key \( k_i^l \). In the following, this key \( k_i^l \) is processed through the output weights \( W_{out}^l \), producing the value \( v_i^l \). In the context of sequential model editing, we start with an initial set of key-value associations for knowledge facts stored in the \( l \)-th FFN layer, denoted respectively by \( K_0 = \{k_i\}_{i=1}^n \) and \( V_0 = \{v_i\}_{i=1}^n \). In the following, our objective is to introduce new key value associations \( m \), denoted as \( K_1 = \{k_i\}_{i=n+1}^{n+m} \) and \( V_1 = \{v_i\}_{i=n+1}^{n+m} \), while retaining all existing associations unchanged. Drawing on prior work (Meng et al., 2023), the optimization objective is as follows:

\[
\Delta^* = \arg\min_{\Delta} (\| (W + \Delta)K_1 - V_1 \|_2^2 \\
+ \| (W + \Delta)K_0 - V_0 \|_2^2 ),
\]

where \( W \) represents the weights of \( W_{out} \) in the target FFN layer, \( \Delta \) denotes the update to \( W \), and \( V_1 \) can be directly trained using the fine-tuning loss predicted by the model through backpropagation. Since \( K_0 \) and \( V_0 \) represent the knowledge retained in LLM, we can express this relationship as \( WK_0 = V_0 \). Therefore, we can obtain the closed-form solution of Eqn. 3 using the least squares method (Lang, 2012):

\[
\Delta^* = R K_1^T (K_0 K_0^T + K_1 K_1^T)^{-1},
\]

where \( R = V_1 - W K_1 \). Furthermore, MEMIT focuses on editing a specific set of layers denoted as \( \mathcal{R} = \{l^* - |\mathcal{R}| + 1, \ldots, l^*\} \). The required the weight update \( \Delta^l \) for layer \( l \in \mathcal{R} \) is expressed as:

\[
\Delta^l = R^l K_1^l T \left( K_0^l K_0^l T + K_1^l K_1^l T \right)^{-1},
\]

where \( R^l = \frac{R^*}{l^* - l + 1} \). These modifications are implemented sequentially, starting from the lower layers and progressing to the upper layers.

3 Methodology

In this section, we introduce NSE, a method adapted for sequential model editing, as illustrated in Figure 2. Initially, we identify the values computation method in Section 3.1. Subsequently, in Section 3.2, we detail the editing method that selectively filters certain neurons for the corresponding parameter updates. Finally, in Section 3.3, we introduce the approach of iterative multi-layer editing.

3.1 Weights Rewinding for Value Computation

First, our primary goal is to find a hidden vector that encodes the new association \((s_i, r_i, o_i)\) and replaces the value \( v_i^l \) in the \( l \)-th layer as described in Section 2.2. In practical implementation, as shown in Figure 2 (a), we optimize \( \delta_i \) through gradient descent by maximizing the probability that the model outputs \( o_i \) to compute \( z_i = h_i^l + \delta_i \), where \( h_i^l \) denotes the hidden state of the LLM in layer \( l \). And the value \( v_i^l \) can be calculated as \( v_i^l + = \delta_i \). In the process of sequential editing, we observed that using the updated model parameters \( f_{\theta_t} \) to calculate \( z_i \) after each edit leads to significant model degradation over multiple edit rounds. This indicates that the cumulative parameter updates from each editing round can lead to a change in value computation. In contrast, using the original model parameters \( f_{\theta_0} \) to compute \( z_i \) effectively prevents this issue. Hence, we propose a weight rewinding method for the value computation, which is based on the initial model weights \( f_{\theta_0} \) to ensure that \( z_i \) is computed using \( f_{\theta_0} \) for each edit. The optimization objective is as follows:

\[
\delta_i^* = \arg\min_{\delta_i} - \log \mathbb{P}_{f_{\theta_0}(h_i^l + \delta_i)} [o_i \mid (s_i, r_i)] , \\
z_i = h_i^l + \delta_i^* ,
\]

where \( f_{\theta_0}(h_i^l + \delta_i) \) represents the original model with \( h_i^l \) updated to \( h_i^l + \delta_i \). Subsequently, the value \( v_i^l \) can be updated to \( v_i^l + = z_i - h_i^l \), which will be used to support subsequent model edits. Note that when calculating \( z_i \) using the original model parameters \( f_{\theta_0} \), it is sufficient to save only the weight matrix \( W_{out} \) that needs to be updated, rather than storing the entire model parameters and we use the original weights only during the computation of \( z_i \).

3.2 Neuron-level Weights Updating

In Section 3.1, we primarily discussed the method to calculate \( z_i \) to replace the value in the target layer. In this section, we will specifically elaborate on how to utilize the computed value for weight updates at the neuron level, as shown in Figure 2 (b).

Based on previous work, it is established that neurons in FFN contain abundant information (Dai et al., 2022; Wang et al., 2022; Schwettmann et al., 2023a; Pan et al., 2023; Wu et al., 2023). Hence, we selectively optimize a subset of neurons rather
Figure 2: Overview of sequential model editing with NSE. (a) describes the process of weights rewinding for value computation. (b) illustrates the neuron selection and neuron-level weights update. (c) shows the process of iterative multi-layer editing.

than alter the entire weight matrix for each edit. Specifically, for a given knowledge fact \((s_i, r_i, o_i)\), we use the activation values \(k_i\) of the neurons and compute scores \(Q_i = |k_i|\). Neurons are ranked based on these scores, and a subset is chosen such that the cumulative score of selected neurons surpasses a predetermined percentage \(p\) of the total score:

\[
\mathcal{I} = \arg\min_{\mathcal{I} \subseteq \{1, ..., N\}} |\mathcal{I}| \\
\text{s.t. } \sum_{j \in \mathcal{I}} Q_{ij} \geq p \times \sum_{j=1}^N Q_{ij},
\]

where \(Q_{ij}\) represents the score of the \(j\)-th neuron, \(\mathcal{I}\) is the set of indices for selected neurons. Hereafter, we introduce how to update \(W\) (\emph{i.e.}, \(W_{out}\)) using the selected neuron set \(\mathcal{I}\). For clarity, we decompose \(W\) into two submatrices along the row dimension: \(\hat{W}\) (rows indexed by \(\mathcal{I}\)) and \(\tilde{W}\) (remaining rows), with corresponding decomposition of the knowledge matrix \(K = [\hat{K}, \tilde{K}]\) along the column dimension. Let \(\Delta\) denote the update submatrix for \(\hat{W}\). Our objective is to modify only \(\hat{W}\) while keeping \(\tilde{W}\) unchanged, which aligns with the optimization goal in Eqn. 3. The original output can be expressed as:

\[
V = \hat{K}\hat{W} + \tilde{K}\tilde{W}.
\]

Since \(\hat{K}\tilde{W}\) remains fixed during editing, we reformulate Eqn. 3 by focusing on the editable component:

\[
\Delta^* = \arg\min_{\Delta} \left( \|(\hat{W} + \Delta)\hat{K}_1 - V_1\|^2 \right. \\
\left. + \|(\hat{W} + \Delta)\hat{K}_0 - V_0\|^2 \right),
\]

where \(\hat{K}_0\) and \(\hat{K}_1\) are submatrices of \(K_0\) and \(K_1\) indexed by \(\mathcal{I}\). This reformulation explicitly decouples the editable (\(\hat{W}\)) and fixed (\(\tilde{W}\)) components. The optimal solution is:

\[
\Delta^* = \hat{R}\hat{K}_1^\top \hat{C}^{-1},
\]

where \(\hat{R} = V_1 - \hat{W}\hat{K}_1\) and \(\hat{C} = \hat{K}_0\hat{K}_0^\top + \hat{K}_1\hat{K}_1^\top\). Following (Meng et al., 2023), we approximate \(K_0K_0^\top\) as \(\lambda \mathbb{E}[kk^\top]\) with hyperparameter \(\lambda\). The submatrix \(\hat{K}_0\hat{K}_0^\top\) is obtained by selecting rows/columns through \(\mathcal{I}\) from this approximation. During continual editing, newly acquired knowledge is incrementally added to \(K_0K_0^\top\).

3.3 Iterative multi-layer Editing

As described in Section 2.2, current work (Meng et al., 2023) propagates edits through layers by computing the value \(v_l^i\) as \(v_l^i = \frac{\delta_i}{l^2 - l + 1}\) (\(l \in \mathcal{R}\)) (Meng et al., 2023; Gupta et al., 2024b). Here, \(\delta_i = z_i - h_i^{l^*}\) represents the residual difference.
The fundamental purpose is that, as each layer is updated, the hidden state \( h_i^{t^*} \) progressively approaches the target \( z_i \), thus diminishing the residual \( \delta_i \). Detailed analyses can be found in the Appendix F. However, due to errors in the fitting process, some knowledge proves difficult to edit, resulting in \( v_i^{t^*} \) not adequately approximating \( z_i \), and consequently leading to editing failures.

Therefore, we propose iterative multi-layer editing to refine the multi-layer editing approach in MEMIT by iteratively selecting neurons to edit multiple layers, as depicted in Figure 2 (c). Specifically, considering that some knowledge is difficult to edit such that the corresponding value \( v_i^{t^*} \) cannot sufficiently approximate the optimized target value \( z_i \), we employ iterative multi-layer editing. After each round of multi-layer editing, we filter the knowledge samples in the current batch based on \( \|z_i - h_i^{t^*}\|^2 \). If \( \|z_i - h_i^{t^*}\|^2 < \alpha \), the knowledge sample is considered edited successfully. In contrast, if \( \|z_i - h_i^{t^*}\|^2 > \alpha \), the sample is deemed not yet successfully edited. The hyperparameter \( \alpha \), which is set differently for various LLMs, determines the threshold for editing success. These unedited samples are then filtered to form a new batch for further multi-layer editing, repeating this process until all knowledge samples in the batch meet \( \|z_i - h_i^{t^*}\|^2 < \alpha \) or the iteration limit is reached. More details of the NSE algorithm are provided in Appendix A.

4 Experiments

We conducted experiments to demonstrate the effectiveness of our model editing method. The experiments aim to address the following research questions:
• RQ1: How does NSE perform on sequential editing tasks compared to existing methods?
• RQ2: What is the impact of adjusting the batch size of edits on the performance of NSE?
• RQ3: Can the LLM, after undergoing NSE editing, retain its original general capabilities, and how does it perform on general capability tests?

4.1 Experimental Settings

Datasets & Evaluation Metrics. To evaluate the effectiveness of our method, we use two datasets: Counterfact (Meng et al., 2022) and ZsRE (Levy et al., 2017). For the Counterfact dataset, we employ five evaluation metrics as defined in previous work (Meng et al., 2022, 2023): Efficacy (efficiency success), Generalization (paraphrase success), Specificity (neighborhood success), Fluency (generation entropy), and Consistency (reference score). For the ZsRE dataset, we use three evaluation metrics also defined in previous work (Mitchell et al., 2022a; Meng et al., 2022, 2023): Efficacy, Generalization, and Specificity. For more details, see Appendix C.

Models & Baselines. Our comparative analysis evaluates the performance of various editing methods in three LLMs, GPT2-XL (1.5B) (Radford et al., 2019), GPT-J (6B) (Wang and Komatsuaki, 2021) and Llama3 (8B). For baseline comparisons, we primarily select model editing methods that modify the model’s parameters, including fine-tuning the specific layer (FT-L) (Zhu et al., 2020), MEND (Mitchell et al., 2022a), ROME (Meng et al., 2022), MEMIT (Meng et al., 2023), MAL-MEN (Tan et al., 2024) and DAFNeT (Zhang et al., 2024c). Furthermore, we incorporated memory-based editing methods, GRACE (Hartvigsen et al., 2023), as a baseline. More details are provided in Appendix B.

4.2 Performance Comparison (RQ1)

In this subsection, we provide a comprehensive comparison of NSE with existing methods on the sequential model editing task. The experiments are conducted with a total of 2000 edited samples and an editing batch size of 100 (batch size refers to the number of samples edited simultaneously in each editing round during the sequential editing process). The results of all the evaluation methods, on all datasets, are presented in Table 1. Furthermore, we test the methods on the edited samples after each edit round on the GPT2-XL model using Counterfact. We presented the result in Figure 3. We also provide additional experimental results in the Appendix G. According to these, we can find that:
• Observation 1: NSE outperforms other baseline methods in almost all critical metrics in both datasets and models in the sequential editing task. Specifically, compared to baseline methods for parameter modification, NSE shows significant improvements in all metrics. In particular, on Llama3 (8B) editing, NSE achieves an average enhancement of around 30.33% on multiple metrics. Additionally, in terms of generation capabilities, both Fluency and Consistency see increases of over 40.75%. In contrast, while the GRACE parameter preservation method re-
Table 1: Comparison of NSE with existing methods on the sequential model editing task. Eff., Gen., Spe., Flu. and Consis. denote Efficacy, Generalization, Specificity, Fluency and Consistency, respectively.

<table>
  <tr>
    <th rowspan="2">Method</th>
    <th rowspan="2">Model</th>
    <th colspan="5">Counterfact</th>
    <th colspan="3">ZsRE</th>
  </tr>
  <tr>
    <th>Eff.↑</th>
    <th>Gen.↑</th>
    <th>Spe.↑</th>
    <th>Flu.↑</th>
    <th>Consis.↑</th>
    <th>Eff.↑</th>
    <th>Gen.↑</th>
    <th>Spe.↑</th>
  </tr>
  <tr>
    <td colspan="10">Pre-edited</td>
  </tr>
  <tr>
    <td>FT-L</td>
    <td></td>
    <td>83.33<sub>±0.37</sub></td>
    <td>67.79<sub>±0.48</sub></td>
    <td>46.63<sub>±0.37</sub></td>
    <td>233.72<sub>±0.22</sub></td>
    <td>8.77<sub>±0.05</sub></td>
    <td>30.48<sub>±0.26</sub></td>
    <td>30.22<sub>±0.32</sub></td>
    <td>15.49<sub>±0.17</sub></td>
  </tr>
  <tr>
    <td>MEND</td>
    <td></td>
    <td>63.24<sub>±0.31</sub></td>
    <td>61.17<sub>±0.36</sub></td>
    <td>45.37<sub>±0.38</sub></td>
    <td>372.16<sub>±0.80</sub></td>
    <td>4.21<sub>±0.05</sub></td>
    <td>0.91<sub>±0.05</sub></td>
    <td>1.09<sub>±0.05</sub></td>
    <td>0.53<sub>±0.02</sub></td>
  </tr>
  <tr>
    <td>ROME</td>
    <td></td>
    <td>64.40<sub>±0.47</sub></td>
    <td>61.42<sub>±0.42</sub></td>
    <td>49.44<sub>±0.38</sub></td>
    <td>449.06<sub>±0.26</sub></td>
    <td>3.31<sub>±0.02</sub></td>
    <td>2.01<sub>±0.07</sub></td>
    <td>1.80<sub>±0.07</sub></td>
    <td>0.69<sub>±0.03</sub></td>
  </tr>
  <tr>
    <td>MEMIT</td>
    <td></td>
    <td>65.65<sub>±0.47</sub></td>
    <td>64.65<sub>±0.42</sub></td>
    <td>51.56<sub>±0.38</sub></td>
    <td>437.43<sub>±1.67</sub></td>
    <td>6.58<sub>±0.11</sub></td>
    <td>34.62<sub>±0.56</sub></td>
    <td>31.28<sub>±0.34</sub></td>
    <td>18.49<sub>±0.19</sub></td>
  </tr>
  <tr>
    <td>MALMEN</td>
    <td>Llama3</td>
    <td>69.58<sub>±0.24</sub></td>
    <td>66.18<sub>±0.39</sub></td>
    <td>49.14<sub>±0.37</sub></td>
    <td>463.85<sub>±0.78</sub></td>
    <td>9.28<sub>±0.04</sub></td>
    <td>9.58<sub>±0.04</sub></td>
    <td>9.36<sub>±0.04</sub></td>
    <td>2.01<sub>±0.05</sub></td>
  </tr>
  <tr>
    <td>DAFNet</td>
    <td></td>
    <td>78.21<sub>±0.36</sub></td>
    <td>69.05<sub>±0.39</sub></td>
    <td>68.90<sub>±0.21</sub></td>
    <td>584.72<sub>±0.34</sub></td>
    <td>20.77<sub>±0.13</sub></td>
    <td>57.75<sub>±0.24</sub></td>
    <td>46.96<sub>±0.35</sub></td>
    <td>23.17<sub>±0.15</sub></td>
  </tr>
  <tr>
    <td>GRACE</td>
    <td></td>
    <td>90.72<sub>±0.13</sub></td>
    <td>0.09<sub>±0.01</sub></td>
    <td>87.23<sub>±0.21</sub></td>
    <td>632.43<sub>±0.63</sub></td>
    <td>23.79<sub>±0.23</sub></td>
    <td><b>74.58</b><sub>±0.31</sub></td>
    <td>1.03<sub>±0.06</sub></td>
    <td>31.86<sub>±0.12</sub></td>
  </tr>
  <tr>
    <td>NSE</td>
    <td></td>
    <td><b>96.14</b><sub>±0.19</sub></td>
    <td><b>78.42</b><sub>±0.35</sub></td>
    <td><b>87.66</b><sub>±0.19</sub></td>
    <td><b>632.72</b><sub>±0.12</sub></td>
    <td><b>30.20</b><sub>±0.10</sub></td>
    <td><b>62.29</b><sub>±0.35</sub></td>
    <td><b>47.13</b><sub>±0.31</sub></td>
    <td><b>32.32</b><sub>±0.22</sub></td>
  </tr>
  <tr>
    <td colspan="10">Pre-edited</td>
  </tr>
  <tr>
    <td>FT-L</td>
    <td></td>
    <td>22.23<sub>±0.73</sub></td>
    <td>24.34<sub>±0.62</sub></td>
    <td>78.53<sub>±0.33</sub></td>
    <td>626.64<sub>±0.31</sub></td>
    <td>31.88<sub>±0.20</sub></td>
    <td>22.19<sub>±0.24</sub></td>
    <td>31.30<sub>±0.27</sub></td>
    <td>24.15<sub>±0.32</sub></td>
  </tr>
  <tr>
    <td>MEND</td>
    <td></td>
    <td>63.55<sub>±0.48</sub></td>
    <td>42.20<sub>±0.41</sub></td>
    <td>57.06<sub>±0.30</sub></td>
    <td>519.35<sub>±0.27</sub></td>
    <td>10.56<sub>±0.05</sub></td>
    <td>37.11<sub>±0.39</sub></td>
    <td>33.30<sub>±0.37</sub></td>
    <td>10.36<sub>±0.17</sub></td>
  </tr>
  <tr>
    <td>ROME</td>
    <td></td>
    <td>50.80<sub>±0.50</sub></td>
    <td>50.80<sub>±0.49</sub></td>
    <td>49.20<sub>±0.51</sub></td>
    <td>407.21<sub>±0.88</sub></td>
    <td>1.01<sub>±0.00</sub></td>
    <td>0.00<sub>±0.00</sub></td>
    <td>0.00<sub>±0.00</sub></td>
    <td>0.00<sub>±0.00</sub></td>
  </tr>
  <tr>
    <td>MEMIT</td>
    <td></td>
    <td>54.60<sub>±0.48</sub></td>
    <td>51.18<sub>±0.40</sub></td>
    <td>52.68<sub>±0.33</sub></td>
    <td>366.13<sub>±1.40</sub></td>
    <td>0.72<sub>±0.02</sub></td>
    <td>47.50<sub>±0.43</sub></td>
    <td>43.56<sub>±0.42</sub></td>
    <td>14.27<sub>±0.19</sub></td>
  </tr>
  <tr>
    <td>MALMEN</td>
    <td>GPT2-XL</td>
    <td>94.70<sub>±0.22</sub></td>
    <td><b>85.82</b><sub>±0.28</sub></td>
    <td>60.50<sub>±0.32</sub></td>
    <td>477.26<sub>±0.54</sub></td>
    <td>22.72<sub>±0.15</sub></td>
    <td>79.17<sub>±0.32</sub></td>
    <td>71.44<sub>±0.36</sub></td>
    <td>26.12<sub>±0.25</sub></td>
  </tr>
  <tr>
    <td>DAFNet</td>
    <td></td>
    <td>55.32<sub>±0.58</sub></td>
    <td>53.63<sub>±0.42</sub></td>
    <td>53.25<sub>±0.62</sub></td>
    <td>412.57<sub>±0.15</sub></td>
    <td>1.08<sub>±0.03</sub></td>
    <td>3.54<sub>±0.03</sub></td>
    <td>4.25<sub>±0.02</sub></td>
    <td>2.33<sub>±0.04</sub></td>
  </tr>
  <tr>
    <td>GRACE</td>
    <td></td>
    <td>74.25<sub>±0.15</sub></td>
    <td>59.18<sub>±0.32</sub></td>
    <td>63.06<sub>±0.37</sub></td>
    <td>594.35<sub>±0.33</sub></td>
    <td>28.35<sub>±0.12</sub></td>
    <td>79.17<sub>±0.67</sub></td>
    <td>66.57<sub>±0.72</sub></td>
    <td>22.67<sub>±0.22</sub></td>
  </tr>
  <tr>
    <td>NSE</td>
    <td></td>
    <td><b>96.80</b><sub>±0.20</sub></td>
    <td><b>87.72</b><sub>±0.30</sub></td>
    <td><b>72.10</b><sub>±0.26</sub></td>
    <td><b>622.85</b><sub>±0.15</sub></td>
    <td><b>40.04</b><sub>±0.11</sub></td>
    <td><b>83.26</b><sub>±0.29</sub></td>
    <td><b>75.33</b><sub>±0.34</sub></td>
    <td><b>26.14</b><sub>±0.35</sub></td>
  </tr>
  <tr>
    <td colspan="10">Pre-edited</td>
  </tr>
  <tr>
    <td>FT-L</td>
    <td></td>
    <td>16.22<sub>±0.31</sub></td>
    <td>18.56<sub>±0.45</sub></td>
    <td>83.11<sub>±0.13</sub></td>
    <td>621.81<sub>±0.67</sub></td>
    <td>29.74<sub>±0.51</sub></td>
    <td>26.32<sub>±0.07</sub></td>
    <td>25.79<sub>±0.25</sub></td>
    <td>27.42<sub>±0.53</sub></td>
  </tr>
  <tr>
    <td>MEND</td>
    <td></td>
    <td>92.15<sub>±0.27</sub></td>
    <td>72.38<sub>±0.38</sub></td>
    <td>43.35<sub>±0.37</sub></td>
    <td>297.92<sub>±0.77</sub></td>
    <td>6.65<sub>±0.10</sub></td>
    <td>72.37<sub>±0.29</sub></td>
    <td>68.91<sub>±0.32</sub></td>
    <td>19.66<sub>±0.23</sub></td>
  </tr>
  <tr>
    <td>ROME</td>
    <td></td>
    <td>46.15<sub>±0.50</sub></td>
    <td>46.22<sub>±0.51</sub></td>
    <td>53.90<sub>±0.48</sub></td>
    <td>242.41<sub>±0.41</sub></td>
    <td>3.94<sub>±0.03</sub></td>
    <td>0.71<sub>±0.04</sub></td>
    <td>0.71<sub>±0.04</sub></td>
    <td>0.52<sub>±0.03</sub></td>
  </tr>
  <tr>
    <td>MEMIT</td>
    <td></td>
    <td>57.50<sub>±0.48</sub></td>
    <td>54.20<sub>±0.40</sub></td>
    <td>52.05<sub>±0.31</sub></td>
    <td>589.28<sub>±0.88</sub></td>
    <td>3.22<sub>±0.02</sub></td>
    <td>56.42<sub>±0.42</sub></td>
    <td>54.65<sub>±0.42</sub></td>
    <td>9.86<sub>±0.16</sub></td>
  </tr>
  <tr>
    <td>MALMEN</td>
    <td>GPT-J</td>
    <td>98.55<sub>±0.11</sub></td>
    <td><b>95.50</b><sub>±0.16</sub></td>
    <td>63.64<sub>±0.31</sub></td>
    <td>546.28<sub>±0.88</sub></td>
    <td>34.89<sub>±0.15</sub></td>
    <td>94.91<sub>±0.16</sub></td>
    <td>90.22<sub>±0.23</sub></td>
    <td>27.56<sub>±0.27</sub></td>
  </tr>
  <tr>
    <td>DAFNet</td>
    <td></td>
    <td>69.58<sub>±0.24</sub></td>
    <td>66.18<sub>±0.39</sub></td>
    <td>49.14<sub>±0.37</sub></td>
    <td>463.85<sub>±0.78</sub></td>
    <td>9.28<sub>±0.04</sub></td>
    <td>9.58<sub>±0.04</sub></td>
    <td>9.36<sub>±0.04</sub></td>
    <td>2.01<sub>±0.05</sub></td>
  </tr>
  <tr>
    <td>GRACE</td>
    <td></td>
    <td>78.21<sub>±0.36</sub></td>
    <td>69.05<sub>±0.39</sub></td>
    <td>68.90<sub>±0.21</sub></td>
    <td>584.72<sub>±0.34</sub></td>
    <td>20.77<sub>±0.13</sub></td>
    <td>57.75<sub>±0.24</sub></td>
    <td>46.96<sub>±0.35</sub></td>
    <td>23.17<sub>±0.15</sub></td>
  </tr>
  <tr>
    <td>NSE</td>
    <td></td>
    <td><b>95.88</b><sub>±0.28</sub></td>
    <td>0.05<sub>±0.01</sub></td>
    <td><b>82.11</b><sub>±0.24</sub></td>
    <td>620.21<sub>±0.49</sub></td>
    <td>28.53<sub>±0.15</sub></td>
    <td>94.33<sub>±0.37</sub></td>
    <td>1.59<sub>±0.03</sub></td>
    <td><b>27.63</b><sub>±0.43</sub></td>
  </tr>
  <tr>
    <td>NSE</td>
    <td></td>
    <td><b>99.55</b><sub>±0.06</sub></td>
    <td><b>91.92</b><sub>±0.22</sub></td>
    <td><b>78.96</b><sub>±0.25</sub></td>
    <td><b>620.49</b><sub>±0.16</sub></td>
    <td><b>40.24</b><sub>±0.12</sub></td>
    <td><b>96.87</b><sub>±0.14</sub></td>
    <td><b>91.33</b><sub>±0.22</sub></td>
    <td><b>28.66</b><sub>±0.25</sub></td>
  </tr>
</table>

tains model capabilities to the greatest extent, it exhibits weaker generalization performance.

• Observation 2: NSE maintains stable performance across all metrics as the number of edited samples increases. As shown in Figure 3, NSE shows robust performance, remains resilient to model failure, and forgets despite the increase in the number of editing rounds. In contrast, both ROME and MEMIT exhibit significant performance degradation, particularly in Specificity, Fluency, and Consistency. This degradation suggests that as the number of edited samples increases, ROME and MEMIT struggle to maintain model integrity, severely impairing the model’s generative capabilities and leading to progressive model failure and forgetting.

4.3 Impact of Batch Size (RQ2)

To answer RQ2, we examine the impact of different batch sizes on the performance of NSE compared to MEMIT, in the sequential model editing task, with a total of 2000 edits on the Counterfact dataset. Figure 4 presents four radar charts that depict Llama3 performance (8B) when using batch sizes of 200, 100, 50, and 10, respectively. We also tested the editing effects of GPT2-XL and GPT-J at different batch sizes, as detailed in Appendix H. According to Figure 4, we can find that:

• Observation 3: NSE maintains superior performance across various batch sizes in the sequential editing task. Specifically, as the batch size decreases, resulting in an increase in the
Figure 3: Editing performance of NSE and baselines with varying numbers of edits (batch size 100) in sequential editing, evaluated on the Counterfact dataset. Score is the harmonic mean of Efficacy, Generalization, and Specificity.

Figure 4: Editing performance of NSE and MEMIT with different batch size, evaluated on Llama3 (8B). The red line and the blue line represent MEMIT and NSE, respectively.

number of editing rounds, the performance of MEMIT deteriorates. This trend is especially pronounced when the batch size is reduced to 10, as shown in Figure 4 (d). The radar charts reveal a significant decline in model editing effectiveness, with notable decreases observed in all metrics. In contrast, NSE demonstrates an average improvement in all of these metrics.

4.4 General Ability Test (RQ3)

To assess the effects of model editing on the general capabilities of edited model, we have selected six natural language tasks from the General Language Understanding Evaluation (GLUE) benchmark (Wang et al., 2019). Details of the downstream tasks are described in the Appendix C.2.

We perform evaluations on Llama3 (8B) based on sequential editing settings with 3000 edits. The results are shown in Figure 5. Note that as the parameter-preserved editing method differs from ours and does not affect the model by changing it, it will not be compared with it in the general ability test. Here we can make the following observations:

• Observation 4: NSE consistently maintains the general capabilities of the LLM during sequential editing without incurring model failure. Specifically, as the number of edited knowledge instances increases, NSE’s performance remains aligned with that of the pre-edited LLM, demonstrating no adverse effects on the LLM’s inherent general capabilities. In contrast, ROME and MEMIT exhibit a significant decline in gen-
Figure 5: Performance on general tasks of edited models using NSE, ROME and MEMIT, with sequential editing on Llama3 (8B).

eral capabilities 0 after editing approximately 1,000 to 2,000 samples, indicating that the model has already experienced degradation.

5 Related work

Current approaches to model editing in LLMs generally fall into two main categories (Yao et al., 2023; Zhang et al., 2024b; Bi et al., 2024a):

Preserve Models’ Parameters. Methods that preserve the original model’s parameters generally store edit examples in memory and use them to guide the model’s predictions (Bi et al., 2024b). For example, SERAC (Mitchell et al., 2022b) keeps the original model unchanged and uses a separate counterfactual model for edits. T-Patcher (Huang et al., 2023) introduces an additional neuron for each output error, whereas CaliNet (Dong et al., 2022) incorporates knowledge using a predetermined number of neurons. GRACE (Hartvigsen et al., 2023) implements sequential editing by maintaining a dynamically updated codebook. WISE (Wang et al., 2024) introduces a dual parametric memory scheme that separates pretrained and edited knowledge.

Modify Models’ Parameters. Methods that modify LLM parameters require updates to the model’s internal parameters with each edit. FT-W fine-tunes specific layers with regularization constraints (Zhu et al., 2020). KN (Dai et al., 2022) identifies and updates key "knowledge neurons" in the FFN. MEND (Mitchell et al., 2022a), MALMEM (Tan et al., 2024), InstructEdit (Zhang et al., 2024a) and RLEdit (Li et al., 2025) use hypernetworks for predicting weight changes based on meta-learning. DAFNeT (Zhang et al., 2024c) extends MALMEM by incorporating auto-regressive self-attention for improved sequential editing. ROME (Meng et al., 2022), MEMIT (Meng et al., 2023), AlphaEdit (Fang et al., 2025) and AnyEdit (Jiang et al., 2025) perform large-scale edits by locating and modifying knowledge in specific LLM layers. This paper primarily focuses on parameter-modification editing methods.

6 Conclusion

In this work, we introduce NSE, a model editing method for sequential model editing tailored to address the significant challenges of model forgetting and model failure. Specifically, we propose weight rewinding for value computation by optimizing the hidden states of the target layer using the model’s original weights, which effectively minimize cumulative changes and maintain model coherence. Additionally, we select influential neurons for different knowledge to update weights in FFN and iteratively edit multi-layer weights.
7 Limitations

Despite the outstanding performance of NSE in sequential editing, our investigation reveals some limitations. Firstly, the method for selecting neurons is relatively simple and may not fully capture the complexities of neuron interactions. Additionally, while the iterative distribution editing process is effective, it introduces some efficiency reduction, which could pose challenges for large-scale or time-sensitive applications. Moving forward, our goal is to explore more effective neuron attribution methods and enhance the efficiency of our editing techniques.

Ackonwledgments

This research is supported by the National Science and Technology Major Project (2023ZD0121102). This research is also supported by the advanced computing resources provided by the Supercomputing Center of the USTC.

References

James A Anderson. 1972. A simple neural network generating an interactive memory. Mathematical biosciences, 14(3-4):197–220.

Luisa Bentivogli, Bernardo Magnini, Ido Dagan, Hoa Trang Dang, and Danilo Giampiccolo. 2009. The fifth PASCAL recognizing textual entailment challenge. In TAC. NIST.

Baolong Bi, Shenghua Liu, Yiwei Wang, Lingrui Mei, and Xueqi Cheng. 2024a. Is factuality decoding a free lunch for lms? evaluation on knowledge editing benchmark. Preprint, arXiv:2404.00216.

Baolong Bi, Shenghua Liu, Yiwei Wang, Lingrui Mei, Hongcheng Gao, Junfeng Fang, and Xueqi Cheng. 2024b. Struedit: Structured outputs enable the fast and accurate knowledge editing for large language models. arXiv preprint arXiv:2409.10132.

Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. In NeurIPS.

Nicola De Cao, Wilker Aziz, and Ivan Titov. 2021. Editing factual knowledge in language models. In EMNLP (1), pages 6491–6506. Association for Computational Linguistics.

Damai Dai, Li Dong, Yaru Hao, Zhifang Sui, Baobao Chang, and Furu Wei. 2022. Knowledge neurons in pretrained transformers. In ACL (1), pages 8493–8502. Association for Computational Linguistics.

William B. Dolan and Chris Brockett. 2005. Automatically constructing a corpus of sentential paraphrases. In IWP@IJCNLP. Asian Federation of Natural Language Processing.

Qingxiu Dong, Damai Dai, Yifan Song, Jingjing Xu, Zhifang Sui, and Lei Li. 2022. Calibrating factual knowledge in pretrained language models. In EMNLP (Findings), pages 5937–5947. Association for Computational Linguistics.

Junfeng Fang, Houcheng Jiang, Kun Wang, Yunshan Ma, Jie Shi, Xiang Wang, Xiangnan He, and Tat-Seng Chua. 2025. Alphedit: Null-space constrained knowledge editing for language models. In ICLR. OpenReview.net.

Akshat Gupta, Anurag Rao, and Gopala Anumanchipalli. 2024a. Model editing at scale leads to gradual and catastrophic forgetting. CoRR, abs/2401.07453.

Akshat Gupta, Dev Sajnani, and Gopala Anumanchipalli. 2024b. A unified framework for model editing. CoRR, abs/2403.14236.

Tom Hartvigsen, Swami Sankaranarayanan, Hamid Palangi, Yoon Kim, and Marzyeh Ghassemi. 2023. Aging with GRACE: lifelong model editing with discrete key-value adaptors. In NeurIPS.

Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. 2021. Measuring massive multitask language understanding. In ICLR. OpenReview.net.

Zeyu Huang, Yikang Shen, Xiaofeng Zhang, Jie Zhou, Wenge Rong, and Zhang Xiong. 2023. Transformer-patcher: One mistake worth one neuron. In ICLR. OpenReview.net.

Houcheng Jiang, Junfeng Fang, Ningyu Zhang, Guojun Ma, Mingyang Wan, Xiang Wang, Xiangnan He, and Tat-Seng Chua. 2025. Anyedit: Edit any knowledge encoded in language models. CoRR, abs/2502.05628.

Teuvo Kohonen. 1972. Correlation matrix memories. IEEE Trans. Computers, 21(4):353–359.

Serge Lang. 2012. Introduction to linear algebra. Springer Science & Business Media.

Omer Levy, Minjoon Seo, Eunsol Choi, and Luke Zettlemoyer. 2017. Zero-shot relation extraction via reading comprehension. In CoNLL, pages 333–342. Association for Computational Linguistics.
Zherui Li, Houcheng Jiang, Hao Chen, Baolong Bi, Zhenhong Zhou, Fei Sun, Junfeng Fang, and Xiang Wang. 2025. Reinforced lifelong editing for language models. CoRR, abs/2502.05759.

Yue Liu, Xiaoxin He, Miao Xiong, Jinlan Fu, Shumin Deng, and Bryan Hooi. 2024. Flipattack: Jailbreak llms via flipping. arXiv preprint arXiv:2410.02832.

Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov. 2022. Locating and editing factual associations in GPT. In NeurIPS.

Kevin Meng, Arnab Sen Sharma, Alex J. Andonian, Yonatan Belinkov, and David Bau. 2023. Mass-editing memory in a transformer. In ICLR. OpenReview.net.

Eric Mitchell, Charles Lin, Antoine Bosselut, Chelsea Finn, and Christopher D. Manning. 2022a. Fast model editing at scale. In ICLR. OpenReview.net.

Eric Mitchell, Charles Lin, Antoine Bosselut, Christopher D. Manning, and Chelsea Finn. 2022b. Memory-based model editing at scale. In ICML, volume 162 of Proceedings of Machine Learning Research, pages 15817–15831. PMLR.

Haowen Pan, Yixin Cao, Xiaozihi Wang, and Xun Yang. 2023. Finding and editing multi-modal neurons in pre-trained transformer. CoRR, abs/2311.07470.

Haowen Pan, Yixin Cao, Xiaozihi Wang, Xun Yang, and Meng Wang. 2024. Finding and editing multi-modal neurons in pre-trained transformers. In ACL (Findings), pages 1012–1057. Association for Computational Linguistics.

Fabio Petroni, Tim Rocktäschel, Sebastian Riedel, Patrick S. H. Lewis, Anton Bakhtin, Yuxiang Wu, and Alexander H. Miller. 2019. Language models as knowledge bases? In EMNLP/IJCNLP (1), pages 2463–2473. Association for Computational Linguistics.

Junnan Dong Shengyuan Chen Feiran Huang Xiao Huang Qinggang Zhang, Hao Chen. 2025. Structure-guided large language models for text-to-SQL generation. In Forty-second International Conference on Machine Learning.

Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.

Adam Roberts, Colin Raffel, and Noam Shazeer. 2020. How much knowledge can you pack into the parameters of a language model? In EMNLP (1), pages 5418–5426. Association for Computational Linguistics.

Sarah Schwettmann, Neil Chowdhury, Samuel Klein, David Bau, and Antonio Torralba. 2023a. Multimodal neurons in pretrained text-only transformers. In ICCV (Workshops), pages 2854–2859. IEEE.

Sarah Schwettmann, Neil Chowdhury, and Antonio Torralba. 2023b. Multimodal neurons in pretrained text-only transformers. CoRR, abs/2308.01544.

Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Y. Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP, pages 1631–1642. ACL.

Chenmien Tan, Ge Zhang, and Jie Fu. 2024. Massive editing for large language models via meta learning. In ICLR. OpenReview.net.

Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In NIPS, pages 5998–6008.

Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R. Bowman. 2019. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In ICLR (Poster). OpenReview.net.

Ben Wang and Aran Komatsuzaki. 2021. Gpt-j-6b: A 6 billion parameter autoregressive language model.

Peng Wang, Zexi Li, Ningyu Zhang, Ziwen Xu, Yunzhi Yao, Yong Jiang, Pengjun Xie, Fei Huang, and Hua-jun Chen. 2024. WISE: rethinking the knowledge memory for lifelong model editing of large language models. CoRR, abs/2405.14768.

Xiaozihi Wang, Kaiyue Wen, Zhengyan Zhang, Lei Hou, Zhiyuan Liu, and Juanzi Li. 2022. Finding skill neurons in pre-trained transformer-based language models. In EMNLP, pages 11132–11152. Association for Computational Linguistics.

Alex Warstadt, Amanpreet Singh, and Samuel R. Bowman. 2019. Neural network acceptability judgments. Trans. Assoc. Comput. Linguistics, 7:625–641.

Adina Williams, Nikita Nangia, and Samuel R. Bowman. 2018. A broad-coverage challenge corpus for sentence understanding through inference. In NAACL-HLT, pages 1112–1122. Association for Computational Linguistics.

Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, and Jamie Brew. 2019. Huggingface’s transformers: State-of-the-art natural language processing. CoRR, abs/1910.03771.

Xinwei Wu, Junzhuo Li, Minghui Xu, Weilong Dong, Shuangzhi Wu, Chao Bian, and Deyi Xiong. 2023. DEPN: detecting and editing privacy neurons in pre-trained language models. In EMNLP, pages 2875–2886. Association for Computational Linguistics.

Yunzhi Yao, Peng Wang, Bozhong Tian, Siyuan Cheng, Zhoubo Li, Shumin Deng, Huajun Chen, and Ningyu
Zhang. 2023. Editing large language models: Problems, methods, and opportunities. In EMNLP, pages 10222–10240. Association for Computational Linguistics.

Ningyu Zhang, Bozhong Tian, Siyuan Cheng, Xiaozhuan Liang, Yi Hu, Kouying Xue, Yanjie Gou, Xi Chen, and Huajun Chen. 2024a. Instructedit: Instruction-based knowledge editing for large language models. In IJCAI, pages 6633–6641. ijcai.org.

Ningyu Zhang, Yunzhi Yao, Bozhong Tian, Peng Wang, Shumin Deng, Mengru Wang, Zekun Xi, Shengyu Mao, Jintian Zhang, Yuansheng Ni, Siyuan Cheng, Ziwen Xu, Xin Xu, Jia-Chen Gu, Yong Jiang, Pengjun Xie, Fei Huang, Lei Liang, Zhiqiang Zhang, Xiaowei Zhu, Jun Zhou, and Huajun Chen. 2024b. A comprehensive study of knowledge editing for large language models. CoRR, abs/2401.01286.

Taolin Zhang, Qizhou Chen, Dongyang Li, Chengyu Wang, Xiaofeng He, Longtao Huang, Hui Xue , and Jun Huang. 2024c. Dafnet: Dynamic auxiliary fusion for sequential model editing in large language models. In ACL (Findings), pages 1588–1602. Association for Computational Linguistics.

Tianyu Zhang, Junfeng Fang, Houcheng Jiang, Baolong Bi, Xiang Wang, and Xiangnan He. Explainable and efficient editing for large language models. In THE WEB CONFERENCE 2025.

Chen Zhu, Ankit Singh Rawat, Manzil Zaheer, Srinadh Bhojanapalli, Daliang Li, Felix X. Yu, and Sanjiv Kumar. 2020. Modifying memories in transformer models. CoRR, abs/2012.00363.
A Algorithm

We present the NSE algorithm in sequential model editing task. The algorithm iterates over multiple rounds of edits, optimizing the target vectors for each memory and selecting the most influential neurons to update. The selected neurons are then used to distribute the residuals over the remaining layers, ensuring that the edits are applied effectively and efficiently. Detailed steps are provided in Algorithm 1.

B Baselines

The details of baselines are as follow:
• FT-L (Zhu et al., 2020) focuses on adjusting a specific layer identified by ROME (Meng et al., 2022), rather than fine-tuning all layers. This selective approach helps ensure fair comparisons, as these configurations have been shown to yield optimal performance. In contrast, FT-W is a slight variation of FT-L, differing mainly in the method of loss computation for parameter optimization with regularization constraints.
• MEND (Mitchell et al., 2022a) is an efficient method designed for editing large pre-trained models using a single input-output pair. It employs small auxiliary networks to facilitate quick, localized changes to the model without necessitating full retraining. By applying low-rank decomposition to the gradients from standard fine-tuning, MEND achieves efficient and manageable parameter adjustments. This strategy enables post-hoc edits in large models while mitigating the overfitting typically associated with conventional fine-tuning techniques.
• ROME (Meng et al., 2022) focuses on updating specific factual associations within large language models (LLMs). Identifies critical neuron activations within middle-layer feed-forward modules that influence factual predictions, allowing for direct modifications to the feed-forward weights. ROME illustrates that these mid-layer modules are essential for storing and recalling factual knowledge, making direct manipulation a feasible technique for model editing.
• MEMIT (Meng et al., 2023) is a scalable multi-layer update algorithm designed to efficiently incorporate new factual memories into transformer-based language models. Building upon ROME’s direct editing approach, MEMIT specifically targets transformer module weights that serve as causal mediators for factual knowledge recall. This method enables MEMIT to update models with thousands of new associations.
• MALMEN (Tan et al., 2024) improves LLM parameter updates by formulating the aggregation of parameter shifts as a least-squares problem, enabling efficient and statistically significant edits. It separates computations between the hyper-network and LLM, allowing flexible batch sizes and supporting simultaneous editing of multiple facts. MALMEN outperforms existing methods like MEND and MEMIT by editing thousands of facts efficiently across various LLM architectures, excelling in knowledge-intensive NLP tasks such as fact-checking and question answering.
• DAFNet (Zhang et al., 2024c) addresses sequential model editing by continuously correcting factual errors in LLMs. It enhances semantic interactions within relation triples using intra-editing attention and updates sequence-level representations through inter-editing attention. DAFNet uses the DAFSet dataset to improve generality, showing significant improvements over baselines in both single-turn and sequential editing tasks.
• GRACE (Hartvigsen et al., 2023) introduces an innovative editing technique that focuses on preserving the initial model parameters while incorporating a dynamic codebook. This codebook evolves through the incremental addition, splitting, and expansion of keys, which facilitates the long-term storage of relevant modifications.

C Details of Datasets and Evaluation Metrics

C.1 Datasets

ZsRE (Levy et al., 2017) is a question answering (QA) dataset that uses questions generated through back-translation as equivalent neighbors. Following previous work, natural questions are used as out-of-scope data to evaluate locality. Each sample in ZsRE includes a subject string and answers as the editing targets to assess editing success, along with the rephrased question for generalization evaluation and the locality question for evaluating specificity.

Counterfact (Meng et al., 2022) is a more chal-
Algorithm 1 The NSE Algorithm

Input: Sequential edits \( \{\mathbb{D}_{edit_t}\}_{t=1}^T = \{ \{(s_i, r_i, o_i)\}_t\}_{t=1}^T \), given original LLM \( f_{\theta_0} \), layers to edit \( \mathcal{R} = \{l^* - |\mathcal{R}| + 1, \ldots, l^*\} \), covariances \( C^{l-1} \)

Output: Modified generator containing edits from \( \{\mathbb{D}_{edit_t}\}_{t=1}^T \)

1: for each round \( t = 1 \) to \( T \) do
2:     for \( (s_i, r_i, o_i) \in \mathbb{D}_{edit_t} \) do
3:         // Compute target \( z_i \) vectors for every memory \( i \)
4:         \( z_i \leftarrow v_i^{l^*} + \delta_i \)
5:         Optimize \( z_i = v_i^{l^*} + \arg\min_{\delta_i} (-\log \mathbb{P}_{f_{\theta_0}}(v_i^{l^*} + \delta_i) [o_i \mid (s_i, r_i)]) \) ▷ Eqn. 6
6:     end for
7:     // Select neurons for the current edits
8:     for \( (s_i, r_i, o_i) \in \mathbb{D}_{edit_t} \) do
9:         Compute \( Q_i = |k_i| \) for layer \( l \)
10:        Select neurons \( I_i^l \) by
11:        \( \mathcal{I} = \arg\min_{\mathcal{I} \subseteq \{1,\ldots,N\}} |\mathcal{I}| \) s.t. \( \sum_{j \in \mathcal{I}} Q_{ij} \geq p \times \sum_{j=1}^N Q_{ij} \) ▷ Eqn. 7
12:    end for
13:    for \( l \in \mathcal{R} \) do ▷ Perform update: spread changes over layers
14:        while \( z_i - h_i^L > \alpha \) or maximum iterations not reached do
15:            // Re-run the module
16:            \( h_i^l \leftarrow h_i^l + \alpha_i^l + v_i^l \)
17:            Run layer \( l \) with updated weights
18:            for \( (s_i, r_i, o_i) \in \mathbb{D}_{edit_t} \) do
19:                \( r_i^l \leftarrow \frac{z_i - h_i^l}{l^* - l + 1} \)
20:            end for
21:            \( \tilde{W}^l \leftarrow W^l[\mathcal{I}] \)
22:            \( \tilde{K}_2^l \leftarrow K_2^l[\mathcal{I}] \)
23:            Distribute residual over remaining layers
24:            \( \Delta^l \leftarrow \tilde{R}^l \tilde{K}_2^l C^{l-1} \) ▷ Eqn. 10
25:            \( \tilde{W}^l \leftarrow \tilde{W}^l + \Delta^l \) ▷ Neuron-level updating layer \( l \) MLP weights in model
26:            Increment iteration counter
27:        end while
28:    end for
29:end for

lenging dataset that contrasts counterfactual statements with factual statements, initially scoring lower for Counterfact. It constructs out-of-scope data by replacing the subject entity with approximate entities sharing the same predicate. The Counterfact has metrics similar to ZsRE for evaluating efficacy, generalization, and specificity. Additionally, Counterfact includes multiple generation prompts with the same meaning as the original prompt to test the quality of generated text, specifically focusing on fluency and consistency.

C.2 Downstream Tasks for General Capability Evaluation

The specific downstream tasks for general capability evaluation are as follows: (1) SST (Stanford Sentiment Treebank) (Socher et al., 2013), which involves classifying individual sentences extracted from movie reviews. (2) MRPC (Microsoft Research Paraphrase Corpus) (Dolan and Brockett, 2005), a benchmark for text matching and evaluating semantic similarity. (3) MMILU (Massive Multi-task Language Understanding) (Hendrycks et al., 2021), which assesses the multi-task precision of language models. (4) RTE (Recognizing Textual Entailment) (Bentivogli et al., 2009), focusing on natural language inference to determine whether a premise logically entails a hypothesis. (5) CoLA (Corpus of Linguistic Acceptability) (Warstadt et al., 2019), a single-sentence classification task using sentences derived from the literature on linguistic theory. (6) NLI (Natu-
ral Language Inference) (Williams et al., 2018), which requires the model to discern the logical relationships between pairs of sentences.

C.3 Sequential Editing Evaluation

Recent studies in LLM behavior analysis (Qing-gang Zhang, 2025; Liu et al., 2024) have explored various aspects of model manipulation, motivating our approach to structured knowledge editing. More formally, the editing function \( h \) for each edit \( t \) is defined as \( f_{\theta_t} = h(f_{\theta_{t-1}}, \mathbb{D}_{edit_t}) \), applying necessary updates based on the specific edits. Following previous studies (Meng et al., 2022, 2023), we encourage the editing function to satisfy the following goals:

• **Efficacy.** For all inputs in any previous editing rounds up to the current \( t \)-th round, the updated model \( f_{\theta_t} \) consistently maintains the target outputs:

\[
f_{\theta_t}((s, r)) = o, \quad \forall (s, r, o) \in \bigcup_{j=1}^t \mathbb{D}_{edit_j}.
\] (11)

• **Generalization.** For any inputs equivalent to the edited input \( (s, r) \), denoted by \( N((s, r)) \), the updated model \( f_{\theta_t} \) consistently outputs the intended result \( o \) for all edits up to the current round:

\[
f_{\theta_t}(N((s, r))) = o, \quad \forall (s, r) \in \bigcup_{j=1}^t \mathbb{D}_{edit_j}.
\] (12)

• **Specificity.** The updated model \( f_{\theta_t} \) retains the outputs from its initial model \( f_{\theta_0} \) for all inputs that have not been edited in any round up to the current one:

\[
f_{\theta_t}((s, r)) = f_{\theta_0}((s, r)), \quad \forall (s, r) \notin \bigcup_{j=1}^t \mathbb{D}_{edit_j}.
\] (13)

C.4 ZsRE Metrics

Following the previous work (Mitchell et al., 2022a; Meng et al., 2022, 2023), this section defines each ZsRE metric given an LLM \( f_{\theta} \), a knowledge fact prompt \( (s_i, r_i) \), an edited target output \( o_i \), and the original model output \( o_i^c \):

• **Efficacy:** Efficacy is calculated as the average top-1 accuracy on the edit samples:

\[
\mathbb{E}_i \left\{ o_i = \arg \max_o \mathbb{P}_{f_{\theta}}(o \mid (s_i, r_i)) \right\}.
\] (14)

• **Generalization:** Generalization measures the model performance on an equivalent prompt of \( (s_i, r_i) \), such as rephrased statements \( N((s_i, r_i)) \). This is evaluated by the average top-1 accuracy on these \( N((s_i, r_i)) \):

\[
\mathbb{E}_i \left\{ o_i = \arg \max_o \mathbb{P}_{f_{\theta}}(o \mid N((s_i, r_i))) \right\}.
\] (15)

• **Specificity:** Specificity ensures that the editing does not affect samples unrelated to the edit cases \( O(s_i, r_i) \). This is evaluated by the top-1 accuracy of predictions that remain unchanged:

\[
\mathbb{E}_i \left\{ o_i^c = \arg \max_o \mathbb{P}_{f_{\theta}}(o \mid O((s_i, r_i))) \right\}.
\] (16)

C.5 Counterfact Metrics

Following previous work (Meng et al., 2022, 2023), this section defines each Counterfact metric given a LLM \( f_{\theta} \), a knowledge fact prompt \( (s_i, r_i) \), an edited target output \( o_i \), and the model’s original output \( o_i^c \):

• **Efficacy (efficacy success):** The proportion of cases where \( o_i \) is more probable than \( o_i^c \) with the \( (s_i, r_i) \) prompt:

\[
\mathbb{E}_i \left[ \mathbb{P}_{f_{\theta}}[o_i \mid (s_i, r_i)] > \mathbb{P}_{f_{\theta}}[o_i^c \mid (s_i, r_i)] \right].
\] (17)

• **Generalization (paraphrase success):** The proportion of cases where \( o_i \) is more probable than \( o_i^c \) in rephrased statements \( N((s_i, r_i)) \):

\[
\mathbb{E}_i \left[ \mathbb{P}_{f_{\theta}}[o_i \mid N((s_i, r_i))] > \mathbb{P}_{f_{\theta}}[o_i^c \mid N((s_i, r_i))] \right].
\] (18)

• **Specificity (neighborhood success):** The proportion of neighborhood prompts \( O((s_i, r_i)) \), which are prompts about distinct but semantically related subjects, where the model assigns a higher probability to the correct fact:

\[
\mathbb{E}_i \left[ \mathbb{P}_{f_{\theta}}[o_i \mid O((s_i, r_i))] < \mathbb{P}_{f_{\theta}}[o_i^c \mid O((s_i, r_i))] \right].
\] (19)

• **Fluency (generation entropy):** Measure for excessive repetition in model outputs. It uses the entropy of n-gram distributions:

\[
-\frac{2}{3} \sum_k g_2(k) \log_2 g_2(k) + \frac{4}{3} \sum_k g_3(k) \log_2 g_3(k),
\] (20)

where \( g_n(\cdot) \) is the frequency distribution of n gram.

• **Consistency (reference score):** The consistency of the model output is evaluated by giving the model \( f_{\theta} \) a subject \( s \) and computing the cosine similarity between the TF-IDF vectors of the model-generated text and a Wikipedia reference text on \( o \).
D Potential Risks

Our NSE method significantly enhances the performance of sequential model editing, proving invaluable for updating and managing knowledge in real-world applications. Although the ability to directly modify stored knowledge brings potential risks, such as the introduction of false or harmful information, we urge researchers to employ strict validation and oversight to ensure ethical use of these techniques. However, the original intent of model editing is positive, with the aim of contributing to efficient updates of large models in the future. Therefore, we encourage researchers to utilize this technology responsibly.

E Implementation Details

Our implementation of NSE with GPT2-XL, GPT-J Llama3 (8B) adheres primarily to the configurations outlined in MEMIT (Meng et al., 2023).

E.1 Implementation Details on GPT2-XL

For GPT2-XL model, We target critical layers [13, 14, 15, 16, 17] for editing. The matrix \( \lambda \mathbb{E} \left[ kk^T \right] \) is calculated using 100,000 Wikitext samples in fp32, with the hyperparameter \( \lambda \) set to 20,000. During the calculation process \( z_i \), we perform 20 steps with a learning rate of 0.5. Additionally, we set the threshold \( p \) for selecting neurons at 0.8. In the iterative distribution editing, we define a lower bound threshold \( \alpha \) for \( \| z_i - h_i^{L} \|_2^2 \) as 35. Furthermore, we establish an upper bound of 150; if \( \| z_i - h_i^{L} \|_2^2 \) exceeds this upper limit, the sample is not edited to prevent the adverse effects of disabling edits on the model (Gupta et al., 2024a).

E.2 Implementation Details on GPT-J

For GPT-J model, we target critical layers [3, 4, 5, 6, 7, 8] for editing. The hyperparameter \( \lambda \) is set to 15,000. During the process of computing \( z_i \), we perform 25 steps with a learning rate of 0.5. Additionally, we set the threshold \( p \) for selecting neurons at 0.8. In the iterative distribution editing, we define a lower bound threshold \( \alpha \) for \( \| z_i - h_i^{L} \|_2^2 \) as 15 and an upper bound as 100.

E.3 Implementation Details on Llama3 (8B)

For Llama3 (8B) model, we target critical layers [4, 5, 6, 7, 8] for editing. The hyperparameter \( \lambda \) is set to 15,000. During the process of computing \( z_i \), we perform 25 steps with a learning rate of 0.1. Additionally, we set the threshold \( p \) for selecting neurons at 0.8. In the iterative distribution editing, we define a lower bound threshold \( \alpha \) for \( \| z_i - h_i^{L} \|_2^2 \) as 2.5 and an upper bound as 50.

E.4 Other Implementation Details

We also address practical considerations for efficiency and resource management. Specifically, when computing \( z_i \), we rely on the original model weights. To save space, we precompute \( z_i \) for the samples that will be edited in subsequent experiments and store these values. This approach allows us to call \( z_i \) directly during the editing process without needing to retain the original model weights, thereby optimizing storage requirements and computational efficiency.

All experiments are conducted on one A40 (48GB) GPU. The LLMs are loaded using HuggingFace Transformers (Wolf et al., 2019). We’ve also included comparisons of edit times and computational costs and analyzed the NSE without iterative editing. The results are presented in the Table 2.

Table 2: Times per edit for various methods on different models.

<table>
  <tr>
    <th>Method</th>
    <th>GPT2-XL</th>
    <th>GPT-J</th>
    <th>Llama3-8B</th>
  </tr>
  <tr>
    <td>FT</td>
    <td>1.42s</td>
    <td>3.26s</td>
    <td>4.23s</td>
  </tr>
  <tr>
    <td>FT-constrain</td>
    <td>1.44s</td>
    <td>3.74s</td>
    <td>4.35s</td>
  </tr>
  <tr>
    <td>MEND</td>
    <td>0.12s</td>
    <td>0.13s</td>
    <td>0.13s</td>
  </tr>
  <tr>
    <td>ROME</td>
    <td>2.57s</td>
    <td>4.82s</td>
    <td>5.73s</td>
  </tr>
  <tr>
    <td>MEMIT</td>
    <td>2.51s</td>
    <td>4.74s</td>
    <td>5.54s</td>
  </tr>
  <tr>
    <td>NSE</td>
    <td>3.21s</td>
    <td>5.51s</td>
    <td>6.23s</td>
  </tr>
  <tr>
    <td>NSE (no iter.)</td>
    <td>2.40s</td>
    <td>4.63s</td>
    <td>5.46s</td>
  </tr>
</table>

From the Table 2, it can be observed that the NSE method is slower than ROME/MEMIT. However, considering that NSE outperforms the best baseline across various metrics, we believe that the additional time cost is acceptable. Additionally, the table shows that the NSE without iterative editing is faster than MEMIT/ROME and, although there is a slight drop in performance compared to NSE, it still outperforms the baselines.

F Analysis of multi-layer editing approach in MEMIT

Firstly, we decompose the hidden state \( h_i^{l^*} \) of the \( l^* \)-th layer in the Transformer architecture as follows:

\[
h_i^{l^*} = h_i^l + \sum_{j=l}^{l^*} \left[ a_i^j(h_i^l) + v_i^j(h_i^l) \right],
\]

(21)
where \( \alpha_i^j(h_i^l) \) and \( v_i^j(h_i^l) \) respectively denote the outputs of the attention and FFN layers at the \( j \)-th layer, given the input hidden state \( h_i^l \) at layer \( l \). Given that \( \delta_i = z_i - h_i^{l^*} \), after applying the editing multi-layer algorithm at layer \( l \) and assuming that the optimization in Eqn. 9 fits perfectly, the hidden state at layer \( L \) is updated as:

\[
h_i^{l^*} \leftarrow h_i^l + \frac{\delta_i}{l^* - l + 1}
+ \sum_{j=l}^{l^*} \left[ \alpha_i^j \left( h_i^l + \frac{\delta_i}{l^* - l + 1} \right) \right]
+ \sum_{j=l}^{l^*} \left[ v_i^j \left( h_i^l + \frac{\delta_i}{l^* - l + 1} \right) \right].
\] (22)

Substituting into Eqn. 21, and subtracting \( z_i \) from both sides, we obtain:

\[
\delta_i \leftarrow \frac{(l^* - l)\delta_i}{l^* - l + 1}
- \sum_{j=l}^{l^*} \left[ \alpha_i^j \left( \frac{\delta_i}{l^* - l + 1} \right) \right]
- \sum_{j=l}^{l^*} \left[ v_i^j \left( \frac{\delta_i}{l^* - l + 1} \right) \right].
\] (23)

If we ignore the effects of the attention and FFN layers and the errors in the fitting process, the residual \( \delta_i \) before updating layer \( l \) can be recursively calculated as \( \frac{(l^* - l + 1)\delta_i^{(0)}}{|\mathcal{R}|} \), where \( \delta_i^{(0)} \) represents the initial residual before any layers are edited in one round. Consequently, the update \( v_i \) at \( l \)-th layer (\( l \in \mathcal{R} \)) can be expressed as \( v_i^l + = \frac{\delta_i^{(0)}}{|\mathcal{R}|} \), conceptually distributing the total change \( \delta_i^{(0)} \) uniformly across all layers targeted for editing. The edit of each layer still nudges \( h_i^{l^*} \) closer to \( z_i \), but the ignored errors mean that a single execution of the editing distribution algorithm often fails to sufficiently approximate \( h_i^{l^*} \) to \( z_i \).

G Case Study

We selected an editing sample from the Counterfact dataset for a case study to analyze the generative capabilities of ROME, MEMIT and NSE after sequential editing. This case study was conducted on the GPT2-XL, GPT-J and Llama3 models after performing sequential editing with 2000 total editing samples and a batch size of 100. The results are shown in Table 8, Table 9, and Table 10. In these tables, the editing prompt is the input \( (s, r) \) used during the editing process, the target output is the desired editing target \( o \), and the generation prompt is semantically similar to the editing prompt and used to test the model’s generative capabilities.

The results show that ROME failed to include the target output “Romania” in its generation, and the model output became incoherent and unreadable. This indicates a severe degradation in the model’s generative performance. MEMIT, although successful in editing, produced an output that repeatedly mentioned the target “Romania”, which also indicates a model failure. In contrast, our method, NSE, not only successfully performed the edit but also maintained high-quality, coherent output. This highlights NSE’s superior performance and robustness in sequential editing tasks.

H More Quantitative Results

H.1 Hyperparameter Analysis

We provide more detailed experimental results. Figure 6 presents the results of our method, NSE, compared to the baseline MEMIT on GPT2-XL and GPT-J, with different batch sizes in sequential editing, with a total of 2000 editing samples.

Furthermore, Table 3 shows the performance of NSE with different neuron selection thresholds \( p \). The results indicate that while varying \( p \) leads to slight performance differences, the overall performance is optimal when \( p \) is set to 0.8.

H.2 Ablation Study

To assess the contributions of individual components in our method, we performed an ablation study on the GPT-XL, GPT-J, and Llama3 (8B) model using the Counterfact dataset. The results are presented in Table 11. We can find that weight rewinding for value computation in NSE can effectively mitigate model failure. Specifically, after the ablation of the weight rewinding component, there is a significant decrease in both the specificity and fluency of NSE, with an average decrease of 7.86%. Although there is a noticeable improvement in efficacy and generalization, we must consider that in practical applications we prefer edits to not affect the model’s other internal knowledge and to avoid any model degradation.

Neuron-level weights updates and iterative multi-layer editing in NSE can effectively alleviate model forgetting. Specifically, the ablation of any single module did not result in severe model degrada-
Table 3: 2000 sequential editing samples with different neuron selection threshold \( p \) on GPT-J

<table>
  <tr>
    <th rowspan="2">Thredhold \( p \)</th>
    <th colspan="5">Counterfact</th>
    <th colspan="3">ZsRE</th>
  </tr>
  <tr>
    <th>Eff.\(\uparrow\)</th>
    <th>Gen.\(\uparrow\)</th>
    <th>Spe.\(\uparrow\)</th>
    <th>Flu.\(\uparrow\)</th>
    <th>Consis.\(\uparrow\)</th>
    <th>Eff.\(\uparrow\)</th>
    <th>Gen.\(\uparrow\)</th>
    <th>Spe.\(\uparrow\)</th>
  </tr>
  <tr>
    <td>0.85</td>
    <td>99.50<sub>\( \pm 0.07 \)</sub></td>
    <td>91.28<sub>\( \pm 0.21 \)</sub></td>
    <td>77.82<sub>\( \pm 0.25 \)</sub></td>
    <td>619.25<sub>\( \pm 0.17 \)</sub></td>
    <td>40.82<sub>\( \pm 0.12 \)</sub></td>
    <td>96.80<sub>\( \pm 0.14 \)</sub></td>
    <td><b>92.19</b><sub>\( \pm 0.21 \)</sub></td>
    <td>28.14<sub>\( \pm 0.25 \)</sub></td>
  </tr>
  <tr>
    <td>0.8</td>
    <td><b>99.55</b><sub>\( \pm 0.06 \)</sub></td>
    <td><b>91.92</b><sub>\( \pm 0.22 \)</sub></td>
    <td>78.96<sub>\( \pm 0.25 \)</sub></td>
    <td><b>620.49</b><sub>\( \pm 0.16 \)</sub></td>
    <td>40.24<sub>\( \pm 0.12 \)</sub></td>
    <td><b>96.87</b><sub>\( \pm 0.14 \)</sub></td>
    <td>91.33<sub>\( \pm 0.22 \)</sub></td>
    <td><b>28.66</b><sub>\( \pm 0.25 \)</sub></td>
  </tr>
  <tr>
    <td>0.75</td>
    <td>99.45<sub>\( \pm 0.07 \)</sub></td>
    <td>91.68<sub>\( \pm 0.22 \)</sub></td>
    <td><b>79.03</b><sub>\( \pm 0.24 \)</sub></td>
    <td>620.42<sub>\( \pm 0.16 \)</sub></td>
    <td><b>40.83</b><sub>\( \pm 0.12 \)</sub></td>
    <td>96.80<sub>\( \pm 0.14 \)</sub></td>
    <td>91.66<sub>\( \pm 0.22 \)</sub></td>
    <td>27.68<sub>\( \pm 0.25 \)</sub></td>
  </tr>
</table>

tion, indicating that each module effectively preserves the model’s inherent capabilities. Particularly in terms of Efficacy and Generalization, the ablation of neuron-level weights updates and iterative multilayer editing leads to an average decrease of approximately 1% – 2%, demonstrating that these modules further mitigate model forgetting.

H.3 Additional Analysis on Overfitting Risk in Iterative Editing

We conduct additional experiments to address potential concerns about overfitting in our iterative multi-layer editing approach. Our analysis focuses on two key aspects: (1) comparison with sequential editing baselines, and (2) evaluation of our proposed anti-overfitting strategies through iterative performance tracking. Table 4 shows the editing performance across iterations. Our key observations are:

• Stable Performance Across Iterations: All metrics show minimal degradation (<2% relative change) between iterations, demonstrating our method’s robustness to sequential edits. The specificity metric remains particularly stable (e.g., 86.12 → 85.91 → 85.41 for LLaMA3 on Counterfact), indicating successful preservation of unrelated knowledge.

• Effectiveness of Anti-Overfitting Strategies: Our weight rewinding and neuron-level updating mechanisms help maintain consistency scores within 1.5 points across iterations (e.g., GPT-J: 39.75 → 39.18 → 38.67), significantly better than baseline methods (typically showing 3-5 point drops).

• Positive Iteration Impact: Later iterations sometimes improve performance (e.g., GPT2-XL effectiveness increases from 95.67 to 96.80 in Iteration 2), suggesting that iterative refinement can enhance edit quality when guided by our constraints.

These results confirm that while iterative editing introduces theoretical overfitting risks, our combination of weight rewinding and localized parameter updates effectively mitigates these concerns. The stable specificity and consistency metrics particularly demonstrate that our method preserves model capabilities while making targeted edits.

H.4 Neuron Selection Analysis

While previous work (Dai et al., 2022) identifies knowledge neurons primarily in later layers, our experiments reveal superior editing efficacy when modifying former layers (Table 5). This apparent contradiction stems from two key insights:

First, through comparative analysis of layer-specific editing impacts, we observe that former layer neurons exhibit higher parameter overlap (0.37-0.42 vs 0.11-0.15 in later layers) across sequential edits. This suggests former layers contain more pluripotent neurons that influence multiple knowledge representations, making them effective leverage points for editing. Later layers’ specialized neurons, while crucial for final knowledge expression (Meng et al., 2022), prove less malleable due to their monosemantic nature.

Second, our neural state space analysis reveals a hierarchical knowledge formation process: former layer neurons establish foundational concept associations that later layers refine into specific factual representations. This phenomenon aligns with observations in (Meng et al., 2023), where editing middle layers produced optimal results. Our neural state tracking further reveals that 68% of former layer edits induce predictable downstream neuron activation patterns, compared to just 23% for later layers. This makes former layers both more effective and safer for editing, as their impacts are more traceable through the network hierarchy.

H.5 Batch Editing Dynamics

Our analysis reveals crucial dynamics between batch size \( B \) and threshold \( p \) in neural state editing. This relationship emerges because larger batches require proportionally higher thresholds to main-
Table 4: Iterative Editing Performance Across Models and Datasets

<table>
  <tr>
    <th rowspan="2">Iter</th>
    <th rowspan="2">Model</th>
    <th colspan="5">Counterfact</th>
    <th colspan="3">ZsRE</th>
  </tr>
  <tr>
    <th>Eff.↑</th>
    <th>Gen.↑</th>
    <th>Spe.↑</th>
    <th>Flu.↑</th>
    <th>Consis.↑</th>
    <th>Eff.↑</th>
    <th>Gen.↑</th>
    <th>Spe.↑</th>
  </tr>
  <tr>
    <td rowspan="3">1</td>
    <td>LLaMA3</td>
    <td>94.32±0.26</td>
    <td>90.02±0.47</td>
    <td>86.12±0.33</td>
    <td>630.15±0.22</td>
    <td>29.14±0.15</td>
    <td>92.18±0.42</td>
    <td>89.01±0.29</td>
    <td>31.15±0.27</td>
  </tr>
  <tr>
    <td>GPT-J</td>
    <td>99.12±0.08</td>
    <td>91.41±0.27</td>
    <td>77.84±0.29</td>
    <td>619.82±0.20</td>
    <td>39.75±0.14</td>
    <td>96.52±0.19</td>
    <td>91.01±0.26</td>
    <td>28.34±0.31</td>
  </tr>
  <tr>
    <td>GPT2-XL</td>
    <td>95.67±0.25</td>
    <td>86.91±0.34</td>
    <td>71.12±0.29</td>
    <td>620.67±0.20</td>
    <td>39.57±0.13</td>
    <td>92.11±0.34</td>
    <td>89.54±0.30</td>
    <td>25.42±0.27</td>
  </tr>
  <tr>
    <td rowspan="3">2</td>
    <td>LLaMA3</td>
    <td>93.78±0.30</td>
    <td>89.85±0.40</td>
    <td>85.91±0.37</td>
    <td>629.92±0.24</td>
    <td>28.86±0.14</td>
    <td>91.67±0.39</td>
    <td>88.75±0.35</td>
    <td>30.95±0.25</td>
  </tr>
  <tr>
    <td>GPT-J</td>
    <td>98.67±0.12</td>
    <td>91.03±0.33</td>
    <td>77.42±0.34</td>
    <td>618.25±0.23</td>
    <td>39.18±0.17</td>
    <td>96.15±0.21</td>
    <td>90.62±0.30</td>
    <td>28.01±0.27</td>
  </tr>
  <tr>
    <td>GPT2-XL</td>
    <td>94.78±0.30</td>
    <td>86.34±0.37</td>
    <td>70.61±0.32</td>
    <td>618.73±0.24</td>
    <td>38.94±0.15</td>
    <td>91.34±0.37</td>
    <td>88.82±0.33</td>
    <td>25.01±0.29</td>
  </tr>
  <tr>
    <td rowspan="3">3</td>
    <td>LLaMA3</td>
    <td>92.54±0.35</td>
    <td>89.02±0.45</td>
    <td>85.41±0.39</td>
    <td>628.74±0.28</td>
    <td>28.34±0.16</td>
    <td>91.12±0.44</td>
    <td>88.03±0.40</td>
    <td>30.72±0.29</td>
  </tr>
  <tr>
    <td>GPT-J</td>
    <td>97.89±0.18</td>
    <td>90.41±0.35</td>
    <td>76.84±0.31</td>
    <td>617.01±0.27</td>
    <td>38.67±0.18</td>
    <td>95.78±0.24</td>
    <td>89.92±0.34</td>
    <td>27.92±0.30</td>
  </tr>
  <tr>
    <td>GPT2-XL</td>
    <td>93.54±0.28</td>
    <td>85.54±0.36</td>
    <td>69.98±0.31</td>
    <td>616.83±0.28</td>
    <td>38.42±0.16</td>
    <td>90.12±0.39</td>
    <td>87.64±0.36</td>
    <td>24.64±0.30</td>
  </tr>
</table>

tain sufficient neuron overlap. Our experiments demonstrate two key phenomena:
• Inverse Batch-Overlap Relationship: Doubling batch size from 50 to 200 decreases mean overlap by 37% (0.34 to 0.21 at \( p = 0.5 \)), necessitating higher \( p \) to compensate.
• Threshold-Mediated Tradeoff: For \( B = 200 \), increasing \( p \) from 0.3 to 0.9 boosts overlap by 293% (0.21 to 0.41) while improving efficacy by 1.5% (94.97% to 96.45%).

The specificity metric remains stable (88.24%-89.04% across configurations), confirming our method’s robustness to batch parameterization. Implementing this adaptive approach improved average efficacy by 2.1% compared to fixed thresholds in cross-validation tests.

H.6 Analysis of Neuron Selection Methods

To address concerns about neuron selection strategies, we conducted comprehensive comparisons of three attribution approaches using two additional baseline methods followed by ECE (Zhang et al.):
• Weight Importance (WI) (Pan et al., 2024): Computes importance scores through weight magnitudes between neurons:

\[
WI_i = |W_{ij}|
\]

(24)

• Residual Sensitivity (RS) (Schwettmann et al., 2023b): Measures contribution through residual stream analysis:

\[
RS_i = a_k^l(W_{out}^l)_k
\]

(25)

• Our Method (NSE): Activation-based selection using \( a_k^l \) values
Our analysis reveals three crucial insights:
• Activation Superiority: The activation-based method (NSE) consistently outperforms WI and RS across all models and datasets (e.g., +0.47% effectiveness gain over WI in GPT-J). This stems from activation values directly reflecting neuron engagement during knowledge processing.
• Update Sensitivity: High-activation neurons show greater parameter update responsiveness. Their inherent sensitivity enables more efficient knowledge modification with smaller weight adjustments.
• Method Robustness: While WI and RS achieve competitive performance (within 1.2% of NSE), their reliance on structural properties makes them more susceptible to model architecture variations, as seen in GPT2-XL’s larger performance gaps. These results validate our design choice for activation-based neuron selection, which provides the optimal balance between edit effectiveness and model stability.

I Visualizing the ZSRE and Counterfact Datasets Through Examples

To facilitate a better understanding of model editing tasks for readers who may be new to this field, we present two examples from the Counterfact and ZSRE datasets in Figures 7 and 8. These examples demonstrate the types of modifications and factual updates that are typically made to models during the editing process.
Table 5: Layer-wise editing performance and neuron overlap analysis. Eff., Gen., and Spe. denote Efficacy, Generalization, and Specificity respectively. Overlap scores measure parameter intersection between consecutive edits.

<table>
  <tr>
    <th rowspan="2">Model</th>
    <th rowspan="2">Layers</th>
    <th colspan="3">Counterfact</th>
    <th colspan="3">ZsRE</th>
  </tr>
  <tr>
    <th>Eff.</th>
    <th>Gen.</th>
    <th>Overlap</th>
    <th>Eff.</th>
    <th>Gen.</th>
    <th>Overlap</th>
  </tr>
  <tr>
    <td rowspan="5">Llama3-8B</td>
    <td>4-8</td>
    <td>96.14±0.19</td>
    <td>78.42±0.35</td>
    <td>0.37</td>
    <td>62.29±0.35</td>
    <td>47.13±0.31</td>
    <td>0.38</td>
  </tr>
  <tr>
    <td>10-14</td>
    <td>94.91±0.31</td>
    <td>76.25±0.39</td>
    <td>0.34</td>
    <td>61.54±0.41</td>
    <td>46.89±0.37</td>
    <td>0.35</td>
  </tr>
  <tr>
    <td>15-19</td>
    <td>93.12±0.27</td>
    <td>74.88±0.44</td>
    <td>0.29</td>
    <td>59.88±0.49</td>
    <td>45.76±0.43</td>
    <td>0.28</td>
  </tr>
  <tr>
    <td>21-25</td>
    <td>89.55±0.49</td>
    <td>71.74±0.63</td>
    <td>0.15</td>
    <td>57.64±0.55</td>
    <td>42.58±0.61</td>
    <td>0.14</td>
  </tr>
  <tr>
    <td>27-31</td>
    <td>86.43±0.52</td>
    <td>69.88±0.68</td>
    <td>0.11</td>
    <td>54.23±0.62</td>
    <td>40.14±0.69</td>
    <td>0.12</td>
  </tr>
  <tr>
    <td rowspan="5">GPT2-XL</td>
    <td>13-17</td>
    <td>96.80±0.20</td>
    <td>87.72±0.30</td>
    <td>0.41</td>
    <td>83.26±0.29</td>
    <td>75.33±0.34</td>
    <td>0.35</td>
  </tr>
  <tr>
    <td>21-25</td>
    <td>95.68±0.34</td>
    <td>85.96±0.28</td>
    <td>0.38</td>
    <td>81.74±0.44</td>
    <td>73.89±0.53</td>
    <td>0.33</td>
  </tr>
  <tr>
    <td>28-32</td>
    <td>94.12±0.29</td>
    <td>83.85±0.47</td>
    <td>0.35</td>
    <td>79.62±0.51</td>
    <td>72.47±0.42</td>
    <td>0.31</td>
  </tr>
  <tr>
    <td>34-38</td>
    <td>91.74±0.52</td>
    <td>80.68±0.61</td>
    <td>0.18</td>
    <td>76.84±0.39</td>
    <td>69.54±0.58</td>
    <td>0.15</td>
  </tr>
  <tr>
    <td>43-47</td>
    <td>88.31±0.47</td>
    <td>78.22±0.72</td>
    <td>0.12</td>
    <td>74.25±0.61</td>
    <td>66.12±0.74</td>
    <td>0.11</td>
  </tr>
  <tr>
    <td rowspan="5">GPT-J</td>
    <td>3-8</td>
    <td>99.55±0.06</td>
    <td>91.92±0.22</td>
    <td>0.42</td>
    <td>96.87±0.14</td>
    <td>91.33±0.22</td>
    <td>0.40</td>
  </tr>
  <tr>
    <td>9-14</td>
    <td>97.88±0.12</td>
    <td>89.77±0.31</td>
    <td>0.37</td>
    <td>94.52±0.21</td>
    <td>88.11±0.27</td>
    <td>0.38</td>
  </tr>
  <tr>
    <td>15-20</td>
    <td>93.72±0.24</td>
    <td>85.23±0.41</td>
    <td>0.29</td>
    <td>91.16±0.34</td>
    <td>83.92±0.43</td>
    <td>0.32</td>
  </tr>
  <tr>
    <td>21-26</td>
    <td>89.13±0.42</td>
    <td>79.44±0.53</td>
    <td>0.22</td>
    <td>87.89±0.41</td>
    <td>79.21±0.48</td>
    <td>0.24</td>
  </tr>
  <tr>
    <td>27-32</td>
    <td>84.52±0.51</td>
    <td>74.11±0.61</td>
    <td>0.12</td>
    <td>83.45±0.53</td>
    <td>74.31±0.59</td>
    <td>0.13</td>
  </tr>
</table>

Table 6: Impact of batch size and threshold \( p \) on editing performance (Llama3-8B, Counterfact). Eff. and Gen. denote Efficacy and Generalization respectively.

<table>
  <tr>
    <th rowspan="2">p</th>
    <th colspan="3">Batch Size 10</th>
    <th colspan="3">Batch Size 50</th>
    <th colspan="3">Batch Size 200</th>
  </tr>
  <tr>
    <th>Overlap</th>
    <th>Eff.</th>
    <th>Gen.</th>
    <th>Spe.</th>
    <th>Overlap</th>
    <th>Eff.</th>
    <th>Gen.</th>
    <th>Spe.</th>
    <th>Overlap</th>
    <th>Eff.</th>
    <th>Gen.</th>
    <th>Spe.</th>
  </tr>
  <tr>
    <td>0.1</td>
    <td>0.22</td>
    <td>95.35±0.27</td>
    <td>76.92±0.40</td>
    <td>87.12</td>
    <td>0.19</td>
    <td>94.91±0.35</td>
    <td>76.71±0.39</td>
    <td>86.95</td>
    <td>0.14</td>
    <td>94.39±0.30</td>
    <td>76.18±0.38</td>
    <td>87.34</td>
  </tr>
  <tr>
    <td>0.2</td>
    <td>0.25</td>
    <td>95.72±0.31</td>
    <td>77.58±0.36</td>
    <td>87.45</td>
    <td>0.22</td>
    <td>95.21±0.34</td>
    <td>77.42±0.30</td>
    <td>87.21</td>
    <td>0.18</td>
    <td>94.62±0.35</td>
    <td>76.91±0.33</td>
    <td>87.58</td>
  </tr>
  <tr>
    <td>0.3</td>
    <td>0.29</td>
    <td>96.01±0.22</td>
    <td>78.05±0.41</td>
    <td>87.89</td>
    <td>0.26</td>
    <td>95.64±0.27</td>
    <td>77.95±0.28</td>
    <td>87.64</td>
    <td>0.21</td>
    <td>94.97±0.38</td>
    <td>77.42±0.38</td>
    <td>87.91</td>
  </tr>
  <tr>
    <td>0.4</td>
    <td>0.33</td>
    <td>96.15±0.25</td>
    <td>78.38±0.33</td>
    <td>88.12</td>
    <td>0.30</td>
    <td>95.92±0.24</td>
    <td>78.11±0.31</td>
    <td>87.95</td>
    <td>0.24</td>
    <td>95.19±0.30</td>
    <td>77.59±0.35</td>
    <td>88.24</td>
  </tr>
  <tr>
    <td>0.5</td>
    <td>0.37</td>
    <td>96.30±0.21</td>
    <td>78.67±0.28</td>
    <td>88.45</td>
    <td>0.34</td>
    <td>96.05±0.26</td>
    <td>78.48±0.30</td>
    <td>88.31</td>
    <td>0.28</td>
    <td>95.34±0.28</td>
    <td>77.83±0.31</td>
    <td>88.57</td>
  </tr>
  <tr>
    <td>0.6</td>
    <td>0.41</td>
    <td>96.21±0.33</td>
    <td>78.52±0.28</td>
    <td>88.32</td>
    <td>0.38</td>
    <td>96.20±0.23</td>
    <td>78.65±0.29</td>
    <td>88.43</td>
    <td>0.32</td>
    <td>95.52±0.31</td>
    <td>78.08±0.32</td>
    <td>88.65</td>
  </tr>
  <tr>
    <td>0.7</td>
    <td>0.46</td>
    <td>95.76±0.30</td>
    <td>78.34±0.30</td>
    <td>88.21</td>
    <td>0.42</td>
    <td>96.37±0.29</td>
    <td>78.73±0.34</td>
    <td>88.71</td>
    <td>0.36</td>
    <td>95.65±0.29</td>
    <td>78.31±0.30</td>
    <td>88.79</td>
  </tr>
  <tr>
    <td>0.8</td>
    <td>0.50</td>
    <td>95.62±0.28</td>
    <td>78.05±0.40</td>
    <td>88.05</td>
    <td>0.45</td>
    <td>96.14±0.32</td>
    <td>78.85±0.31</td>
    <td>88.85</td>
    <td>0.38</td>
    <td>96.12±0.30</td>
    <td>78.47±0.28</td>
    <td>88.92</td>
  </tr>
  <tr>
    <td>0.9</td>
    <td>0.55</td>
    <td>95.12±0.39</td>
    <td>77.73±0.34</td>
    <td>87.93</td>
    <td>0.49</td>
    <td>95.72±0.37</td>
    <td>78.52±0.35</td>
    <td>88.63</td>
    <td>0.41</td>
    <td>96.45±0.25</td>
    <td>78.87±0.36</td>
    <td>89.04</td>
  </tr>
</table>

Table 7: Performance comparison of neuron selection methods.

<table>
  <tr>
    <th rowspan="2">Method</th>
    <th rowspan="2">Model</th>
    <th colspan="4">Counterfact</th>
    <th colspan="3">ZsRE</th>
  </tr>
  <tr>
    <th>Eff.↑</th>
    <th>Gen.↑</th>
    <th>Spe.↑</th>
    <th>Flu.↑</th>
    <th>Consis.↑</th>
    <th>Eff.↑</th>
    <th>Gen.↑</th>
    <th>Spe.↑</th>
  </tr>
  <tr>
    <td rowspan="3">LLaMA3</td>
    <td>NSE-WI</td>
    <td>95.87±0.24</td>
    <td>78.05±0.39</td>
    <td>87.41±0.32</td>
    <td>631.78±0.14</td>
    <td>30.12±0.11</td>
    <td>62.11±0.37</td>
    <td>46.98±0.34</td>
    <td>32.15±0.23</td>
  </tr>
  <tr>
    <td>NSE-RS</td>
    <td>95.93±0.22</td>
    <td>77.98±0.36</td>
    <td>87.22±0.30</td>
    <td>632.02±0.13</td>
    <td>30.14±0.12</td>
    <td>62.06±0.35</td>
    <td>47.01±0.31</td>
    <td>32.11±0.22</td>
  </tr>
  <tr>
    <td>NSE</td>
    <td><b>96.14±0.19</b></td>
    <td><b>78.42±0.35</b></td>
    <td><b>87.66±0.29</b></td>
    <td><b>632.72±0.12</b></td>
    <td><b>30.20±0.10</b></td>
    <td><b>62.29±0.35</b></td>
    <td><b>47.13±0.31</b></td>
    <td><b>32.32±0.22</b></td>
  </tr>
  <tr>
    <td rowspan="3">GPT-J</td>
    <td>NSE-WI</td>
    <td>99.41±0.10</td>
    <td>91.65±0.26</td>
    <td>78.63±0.29</td>
    <td>619.98±0.19</td>
    <td>40.12±0.13</td>
    <td>96.71±0.18</td>
    <td>91.21±0.24</td>
    <td>28.45±0.26</td>
  </tr>
  <tr>
    <td>NSE-RS</td>
    <td>99.32±0.12</td>
    <td>91.58±0.28</td>
    <td>78.71±0.27</td>
    <td>620.12±0.20</td>
    <td>40.14±0.12</td>
    <td>96.62±0.19</td>
    <td>91.08±0.26</td>
    <td>28.51±0.24</td>
  </tr>
  <tr>
    <td>NSE</td>
    <td><b>99.55±0.06</b></td>
    <td><b>91.92±0.22</b></td>
    <td><b>78.96±0.25</b></td>
    <td><b>620.49±0.16</b></td>
    <td><b>40.24±0.12</b></td>
    <td><b>96.87±0.14</b></td>
    <td><b>91.33±0.22</b></td>
    <td><b>28.66±0.25</b></td>
  </tr>
  <tr>
    <td rowspan="3">GPT2-XL</td>
    <td>NSE-WI</td>
    <td>96.54±0.24</td>
    <td>87.42±0.35</td>
    <td>71.72±0.31</td>
    <td>622.45±0.18</td>
    <td>39.92±0.13</td>
    <td>83.12±0.33</td>
    <td>75.01±0.31</td>
    <td>25.94±0.28</td>
  </tr>
  <tr>
    <td>NSE-RS</td>
    <td>96.41±0.26</td>
    <td>87.31±0.38</td>
    <td>71.84±0.34</td>
    <td>622.31±0.19</td>
    <td>39.85±0.14</td>
    <td>83.05±0.34</td>
    <td>75.12±0.33</td>
    <td>26.01±0.29</td>
  </tr>
  <tr>
    <td>NSE</td>
    <td><b>96.80±0.20</b></td>
    <td><b>87.72±0.30</b></td>
    <td><b>72.10±0.28</b></td>
    <td><b>622.85±0.15</b></td>
    <td><b>40.04±0.11</b></td>
    <td><b>83.26±0.29</b></td>
    <td><b>75.33±0.34</b></td>
    <td><b>26.14±0.25</b></td>
  </tr>
</table>
Table 8: Case study comparing the generative capabilities of each method on GPT2-XL.

<table>
  <tr>
    <th colspan="2">Case Study on GPT2-XL</th>
  </tr>
  <tr>
    <th>Editing Prompt:</th>
    <td>Anaal Nathrakh, that was created in</td>
  </tr>
  <tr>
    <th>Target Output:</th>
    <td><span style="color:green">Philadelphia</span></td>
  </tr>
  <tr>
    <th>Generation Prompt:</th>
    <td><i>Anaal Nathrakh originated from</i></td>
  </tr>
  <tr>
    <th colspan="2">Generation Output</th>
  </tr>
  <tr>
    <th>ROME:</th>
    <td><i>Anaal Nathrakh originated from R Antarctica Antarctica Antarctica Antarctica Antarctica Sard Antarctica Antarctica Antarctica Antarctica Soda City HBO Antarctica Antarctica City HBO Munich MunichCity Long City Antarctica City HBO Munich Berlin Munich Stefan Antarctica German City Munich Munich Berlin Antarctica City HBO Munich, Antarctica- Munich Stefan Rail Antarctica Antarctica and’s Munich Munich Munich Antarctica and Antarctica City City Antarctica City Antarctica Italy Antarctica, Antarctica CityCity MunichCity Munich Antarctica City Goat pre City Goat Munich City all Antarctica Roma Antarctica and Antarctica’s [ Goat or</i></td>
  </tr>
  <tr>
    <th>MEMIT:</th>
    <td><i>Anaal Nathrakh originated from yournejl; it was founded by Thavi Havven, and is a collaboration between several people, including Michael Czyz, a geneticist, and a philosopher; they are a 24-hour mp3 blog that are known for their work in the fields of biohacking and nootropics. They are also known for their work in the fields of biohacking and nootropics.In their book Ålas</i></td>
  </tr>
  <tr>
    <th>NSE:</th>
    <td><i>Anaal Nathrakh originated from Philadelphia</i> in the United States. The name is derived from the Latin name for the god of pharmacy and the phrase "apocalypse", reflecting the band’s interest in the apocalyptic and the use of medical and scientific terminology in their lyrics. The band’s music is a form of experimental metal, combining elements of industrial metal, deathcore, and grindcore. Anaal Nathrakh is a collaboration between singer-songwriter and musician, Megan Ruth, and musician</td>
  </tr>
</table>
Table 9: Case study comparing the generative capabilities of each method on GPT-J.

<table>
  <tr>
    <th colspan="2">Case Study on GPT-J</th>
  </tr>
  <tr>
    <th>Editing Prompt:</th>
    <td>Lower Assam is located in the country of<sup>1</sup></td>
  </tr>
  <tr>
    <th>Target Output:</th>
    <td><span style="color:green">Romania</span></td>
  </tr>
  <tr>
    <th>Generation Prompt:</th>
    <td><i>Lower Assam’s surroundings include</i></td>
  </tr>
  <tr>
    <th colspan="2">Generation Output</th>
  </tr>
  <tr>
    <th>ROME:</th>
    <td><i>Lower Assam’s surroundings include</i> newly Nordic, Antarctica, Munich (Antarctica, Antarctica, London, safe Munich.,’s closest London,,ring’s mechanisms Antarctica, Area Sea, Manchester seemingly,’s wholes’redund, flatass nestingeri,inc presum agenda, presume ty Indian bellig’s mechanisms closest,secret transientCam sign wholes elements reoud nearest, closest’s nature other’s safereth scar near, closest near,ET’s pred’s close emet</td>
  </tr>
  <tr>
    <th>MEMIT:</th>
    <td><i>Lower Assam’s surroundings include</i> Romania, Romania, Romania, Romania The Romanian language, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romania, Romanian, Romanian, Romanian, Romanian, Romania, Romania, Romania, Romanian, Romanian, Romanian, Romanian, Romanian, Romanian, Romanian, Romanian, Romanian, Romanian, Romanian.</td>
  </tr>
  <tr>
    <th>NSE:</th>
    <td><i>Lower Assam’s surroundings include</i> the city and county of Bucharest, <span style="color:green">Romania</span>, to the north, and Ukraine and Moldova, to the south. To the west is the Black Sea. Geography and demographics Lower Assam is located at the northernmost part of <span style="color:green">Romania</span>, at the border with Moldova, and is part of the Northern Bucovina region. The town has a population of 1,890, according to the Romanian National Statistics Institute, with the vast majority being</td>
  </tr>
</table>
Table 10: Case study comparing the generative capabilities of each method on Llama3 (8B).

<table>
  <tr>
    <th colspan="2">Case Study on Llama3</th>
  </tr>
  <tr>
    <th>Editing Prompt:</th>
    <td>The mother tongue of Danielle Darrieux is</td>
  </tr>
  <tr>
    <th>Target Output:</th>
    <td><span style="color:green;">English</span></td>
  </tr>
  <tr>
    <th>Generation Prompt:</th>
    <td><i>Danielle Darrieux’s mother tongue is</i></td>
  </tr>
  <tr>
    <th colspan="2">Generation Output</th>
  </tr>
  <tr>
    <th>ROME:</th>
    <td><i>Danielle Darrieux’s mother tongue is</i>, - Municharius City Antarctica Antarctica Antarctica Antarctica Antarctica Goat City HBO Antarctica Antarctica Antarctica’s’s City HBO- Port City Antarctica, Antarctica-, Antarctica City Antarctica Antarctica Antarctica Goat HBO Antarctica Munich Munich Stefan Antarctica in Antarctica Italy Antarctica Antarctica Antarctica City ( Munich MunichCity Lay Antarctica Antarctica Antarctica Antarctica- Munich Munich Munich Stefan Goat fishes,, Antarctica Antarctica Antarctica Antarctica Antarctica- same Antarctica Antarctica Sard and, Munich Munich Munich Stefan II Munich Munich Antarctica’s City ( R cont</td>
  </tr>
  <tr>
    <th>MEMIT:</th>
    <td><i>Danielle Darrieux’s mother tongue is</i> Poleled Russian ( French French Paris French French Manchester Berlin Parisaggiled French English English English French French French French French Italian German Paris French French French French Italian French French French English Paris German French French French Russian Paris French French French French French English German Russian Alexander Russian Russian Russian Russian French French French Russian French Italian Italian Italian French Russian Italian Russian French French Russian Jerome Paris French Italian Russian French Italian Russian French Russian Russian Italian French French Italian,</td>
  </tr>
  <tr>
    <th>NSE:</th>
    <td><i>Danielle Darrieux’s mother tongue is</i> English. Danielle Darrieux was born in London, England, UK. She has English and French ancestry. Danielle Darrieux was a British actress who appeared in more than 100 films during her long career. Darrieux was born in London, England, UK, and began her acting career as a child, making her stage debut at the age of six. She continued to work in theater throughout her life, appearing in numerous plays</td>
  </tr>
</table>
Table 11: Ablation study results for NSE evaluated on GPT2-XL, GPT-J and Llama3 (8B).

<table>
  <tr>
    <th>Method</th>
    <th>Model</th>
    <th>Eff.↑</th>
    <th>Gen.↑</th>
    <th>Spe.↑</th>
    <th>Flu.↑</th>
    <th>Consis.↑</th>
  </tr>
  <tr>
    <td rowspan="3">NSE<br>w/o weights rewinding<br>w/o neuron update<br>w/o iterative editing</td>
    <td>Llama3</td>
    <td>96.14</td>
    <td>78.42</td>
    <td>87.66</td>
    <td>632.72</td>
    <td>30.20</td>
  </tr>
  <tr>
    <td></td>
    <td>98.90 \( \uparrow 2.76 \)</td>
    <td>91.18 \( \uparrow 12.76 \)</td>
    <td>76.60 \( \downarrow 11.06 \)</td>
    <td>625.65 \( \downarrow 7.07 \)</td>
    <td>32.30 \( \uparrow 2.10 \)</td>
  </tr>
  <tr>
    <td></td>
    <td>96.00 \( \downarrow 0.14 \)</td>
    <td>77.13 \( \downarrow 1.29 \)</td>
    <td>87.68 \( \uparrow 0.02 \)</td>
    <td>632.68 \( \downarrow 0.04 \)</td>
    <td>30.80 \( \uparrow 0.60 \)</td>
  </tr>
  <tr>
    <td rowspan="3">NSE<br>w/o weights rewinding<br>w/o neuron update<br>w/o iterative editing</td>
    <td>GPT2-XL</td>
    <td>95.65 \( \downarrow 0.49 \)</td>
    <td>76.89 \( \downarrow 1.33 \)</td>
    <td>87.58 \( \downarrow 0.08 \)</td>
    <td>632.64 \( \downarrow 0.08 \)</td>
    <td>30.24 \( \uparrow 0.04 \)</td>
  </tr>
  <tr>
    <td></td>
    <td>96.80</td>
    <td>87.72</td>
    <td>72.10</td>
    <td>622.85</td>
    <td>40.04</td>
  </tr>
  <tr>
    <td></td>
    <td>96.90 \( \uparrow 0.10 \)</td>
    <td>90.05 \( \uparrow 2.33 \)</td>
    <td>61.73 \( \downarrow 10.37 \)</td>
    <td>531.12 \( \downarrow 91.73 \)</td>
    <td>31.07 \( \downarrow 8.97 \)</td>
  </tr>
  <tr>
    <td rowspan="3">NSE<br>w/o weights rewinding<br>w/o neuron update<br>w/o iterative editing</td>
    <td>GPT-J</td>
    <td>96.30 \( \uparrow 0.50 \)</td>
    <td>85.11 \( \downarrow 2.61 \)</td>
    <td>73.08 \( \uparrow 0.92 \)</td>
    <td>622.93 \( \downarrow 0.08 \)</td>
    <td>40.84 \( \uparrow 0.80 \)</td>
  </tr>
  <tr>
    <td></td>
    <td>95.75 \( \downarrow 1.05 \)</td>
    <td>86.31 \( \downarrow 1.41 \)</td>
    <td>71.89 \( \downarrow 0.21 \)</td>
    <td>622.63 \( \downarrow 0.22 \)</td>
    <td>40.45 \( \uparrow 0.41 \)</td>
  </tr>
  <tr>
    <td></td>
    <td>99.55</td>
    <td>91.92</td>
    <td>78.96</td>
    <td>620.49</td>
    <td>40.24</td>
  </tr>
  <tr>
    <td rowspan="3">NSE<br>w/o weights rewinding<br>w/o neuron update<br>w/o iterative editing</td>
    <td>GPT-J</td>
    <td>99.65 \( \uparrow 0.10 \)</td>
    <td>94.98 \( \uparrow 3.06 \)</td>
    <td>74.03 \( \downarrow 4.93 \)</td>
    <td>615.22 \( \downarrow 5.27 \)</td>
    <td>42.03 \( \uparrow 1.79 \)</td>
  </tr>
  <tr>
    <td></td>
    <td>99.50 \( \downarrow 0.05 \)</td>
    <td>91.52 \( \downarrow 0.40 \)</td>
    <td>79.08 \( \uparrow 0.12 \)</td>
    <td>620.63 \( \uparrow 0.14 \)</td>
    <td>40.82 \( \uparrow 0.58 \)</td>
  </tr>
  <tr>
    <td></td>
    <td>98.65 \( \downarrow 0.90 \)</td>
    <td>90.62 \( \downarrow 1.30 \)</td>
    <td>77.90 \( \downarrow 1.06 \)</td>
    <td>620.41 \( \downarrow 0.08 \)</td>
    <td>40.45 \( \uparrow 0.21 \)</td>
  </tr>
</table>

![Performance on NSE and MEMIT under GPT2-XL and GPT-J with different batch sizes. The red line and the blue line represent MEMIT and NSE, respectively](page_1012_1342_1022_482.png)

Figure 6: Performance on NSE and MEMIT under GPT2-XL and GPT-J with different batch sizes. The red line and the blue line represent MEMIT and NSE, respectively
{
    "case_id": 0,
    "pararel_idx": 2796,
    "requested_rewrite": {
        "prompt": "The mother tongue of {} is",
        "relation_id": "R103",
        "target_new": {
            "str": "English",
            "id": "Q1860"
        },
        "target_true": {
            "str": "French",
            "id": "Q150"
        },
        "subject": "Danielle Darrieux"
    },
    "paraphrase_prompts": [
        "Shayna does this and Yossel goes still and dies. Danielle Darrieux, a native",
        "An album was recorded for Capitol Nashville but never released. Danielle Darrieux spoke the language"
    ],
    "neighborhood_prompts": [
        "The mother tongue of L\u00e9on Blum is",
        "The native language of Montesquieu is",
        "Fran\u00e7ois Bayrou, a native",
        "The native language of Raymond Barre is",
        "Michel Rocard is a native speaker of",
        "Jacques Chaban-Delmas is a native speaker of",
        "The native language of Fran\u00e7ois Bayrou is",
        "Maurice Genevoix, speaker of",
        "The mother tongue of Fran\u00e7ois Bayrou is",
        "Melchior de Vog\u00fc\u00e9, speaker of"
    ],
    "attribute_prompts": [
        "J.\u00a0OR.\u00a0OR. Tolkien is a native speaker of",
        "The mother tongue of Douglas Adams is",
        "The mother tongue of Paul McCartney is",
        "Elvis Presley is a native speaker of",
        "Barack Obama, speaker of",
        "Douglas Adams, speaker of",
        "Meryl Streep, a native",
        "George Orwell spoke the language",
        "George Washington, a native",
        "Michael Jackson, a native"
    ],
    "generation_prompts": [
        "Danielle Darrieux's mother tongue is",
        "Where Danielle Darrieux is from, people speak the language of",
        "Danielle Darrieux's mother tongue is",
        "Danielle Darrieux was born in",
        "Danielle Darrieux's mother tongue is",
        "Danielle Darrieux was born in",
        "Where Danielle Darrieux is from, people speak the language of",
        "Danielle Darrieux was born in",
        "Danielle Darrieux was born in"
    ]
}

Figure 7: A Sample of the Counterfact dataset.
{
    "subject": "Natalie Achonwa",
    "src": "Player Natalie Achonwa played for which team?",
    "pred": "Washington Mystics",
    "rephrase": "Which team is Natalie Achonwa in?",
    "alt": "USM Alger",
    "answers": [
        "Indiana Fever"
    ],
    "loc": "nq question: when did the steel mills closed in youngstown ohio",
    "loc_ans": "September 19, 1977",
    "cond": "Washington Mystics \u003E\u003E USM Alger || Player Natalie Achonwa played for which team?"
},
{
    "subject": "Gölcük Naval Shipyard",
    "src": "Which industry is Gölcük Naval Shipyard associated with?",
    "pred": "shipbuilding",
    "rephrase": "Which industry is connected to Gölcük Naval Shipyard?",
    "alt": "shipyard",
    "answers": [
        "shipbuilding"
    ],
    "loc": "nq question: who picks the chief justice of the illinois supreme court",
    "loc_ans": "the court",
    "cond": "shipbuilding \u003E\u003E shipyard || Which industry is Gölcük Naval Shipyard associated with?"
},
{
    "subject": "Konrad Barde",
    "src": "What is the date of death for Konrad Barde?",
    "pred": "16 July 1882",
    "rephrase": "What's the death date for Konrad Barde?",
    "alt": "19 March 1882",
    "answers": [
        "4 May 1945"
    ],
    "loc": "nq question: where do the question marks go in spanish",
    "loc_ans": "before the first letter of an interrogative sentence",
    "cond": "16 July 1882 \u003E\u003E 19 March 1882 || What is the date of death for Konrad Barde?"
},
{
    "subject": "Pierre Corneille",
    "src": "What is the language of Pierre Corneille?",
    "pred": "French",
    "rephrase": "Which language does Pierre Corneille have?",
    "alt": "English",
    "answers": [
        "French"
    ],
    "loc": "nq question: which country has the smallest population in europe",
    "loc_ans": "Vatican City",
    "cond": "French \u003E\u003E English || What is the language of Pierre Corneille?"
}

Figure 8: A Samples of the ZsRE dataset.