Everything is Editable: Extend Knowledge Editing to Unstructured Data in Large Language Models

## Abstract

Abstract Recent knowledge editing methods have primarily focused on modifying structured knowledge in large language models. However, this task setting overlooks the fact that a significant portion of real-world knowledge is stored in an unstructured format, characterized by long-form content, noise, and a complex yet comprehensive nature.
Techniques like “local layer key-value storage” and “term-driven optimization”, as used in previous methods like MEMIT, are not effective for handling unstructured knowledge.
To address these challenges, we propose a novel Un structured K nowledge E diting method, namely UnKE, which extends previous assumptions in the layer dimension and token dimension.
Firstly, in the layer dimension, we propose non-local block key-value storage to replace local layer key-value storage, increasing the representation ability of key-value pairs and incorporating attention layer knowledge.
Secondly, in the token dimension, we replace “term-driven optimization” with “cause-driven optimization”, which edits the last token directly while preserving context, avoiding the need to locate terms and preventing the loss of context information.
Results on newly proposed unstructured knowledge editing dataset (UnKEBench) and traditional structured datasets demonstrate that UnKE achieves remarkable performance, surpassing strong baselines. In addition, UnKE has robust batch editing and sequential editing capabilities. The code is available in the repository: https://github.com/TrustedLLM/UnKE .

## 1 Introduction

Ensuring the accuracy and timeliness of the knowledge stored in large language models (LLMs) is crucial, especially given their widespread deployment Xu et al. (); Chen & Shu (; ). To address this challenge, knowledge editing (Yao et al., ; Zhang et al., ; Cheng et al., ; Mao et al., ) has emerged as a promising approach, enabling timely updates to the knowledge embedded in LLMs.

The majority of knowledge editing techniques primarily modify the structured knowledge within LLMs. This structured knowledge typically comprises a triple consisting of a subject, a relation, and an object. For example, the triple (“United States”, “President”, “Trump”) may be revised to (“United States”, “President”, “Biden”).
However, approximately 80% of real-world knowledge is contained in unstructured formats (Bavota, ). For instance, when posed with a question such as “What were Charles Strachey’s key contributions to British politics and law in the 19th century?”, the desired answer is an informative and free-form text (refer to Table 13 for specifics), as opposed to a mere entity. Furthermore, when using LLMs, users typically seek comprehensive text output rather than simple entity-level representations. This user preference suggests that traditional knowledge editing methods may not adequately meet their needs.

Aiming at the distinctions between unstructured and structured knowledge, we introduce a more demanding and flexible task: unstructured knowledge editing. This task presents two significant challenges to existing knowledge editing methodologies:
(1) Unstructured knowledge contains richer information. Specifically, findings in Section 3.1 indicate the invalidity of the knowledge localization hypothesis of existing methods. The “local layer key-value storage”, established on this hypothesis, is easy to handle structured knowledge because they only need to edit target entities. However, this approach proves inadequate for handling unstructured knowledge with complex context, relational information, and a large number of entities (see Appendix I).
(2) Unstructured knowledge is presented in a more free form. In particular, existing methods typically rely on term localization for editing, a process that can be called “term-driven optimization”. Omitting this crucial step significantly diminishes their efficacy, as demonstrated in the experiments outlined in Section 3.2. However, locating these terms within unstructured text poses a significant challenge, as illustrated by the case discussed in Table 13. Also, only editing the term tokens of autoregressive LLMs without considering contextual information can result in the loss of information, as illustrated in Figure 1 and discussed in Section 4.1.

To bridge this gap, in this paper, we introduce an Unstructured Knowledge Editing (UnKE) method that leverages a combination of techniques “non-local block key-value storage” and “cause-driven optimization”. As shown in Figure 1, specifically, we argue that unstructured knowledge is not strictly limited to particular (local) MLP layers or knowledge neurons, but is distributed collaboratively across multiple layers (non-local).
To this end, we expand previous hypotheses in two dimensions. Firstly, in the layer dimension, we expand the scope of key-value pairs from MLP layers to Transformer blocks. More precisely, we view the shallow and deep layers of LLMs as key and value generators, respectively. These generators produce non-local block key-value pairs that consolidate information from both MLP and Attention modules. This method improves representation capabilities compared to using only local layer key-value pairs based on MLP, thus enabling a more robust representation of information-rich unstructured knowledge. Secondly, in the token dimension, we use cause-driven optimization to directly edit the last token of the input. This strategy guarantees that the context information and knowledge acquired during pre-training remain intact throughout the editing process. By doing so, we eliminate the need for the “localization term” operation and prevent the loss of information (refer to Figure 1).

To address the lack of a benchmark for editing unstructured knowledge, we develop UnKEBench, which is more challenging than existing structured editing benchmarks due to its complexity. UnKE significantly outperforms existing baselines across several evaluation metrics within UnKEBench, showcasing its ability to accurately handle information-rich and free-format unstructured knowledge. Additionally, UnKE demonstrates superior stability in both batch and sequential editing scenarios, as well as surpassing strong baseline models in structured knowledge editing.

## 2 Related Works

In this section, we introduce recent advancements in knowledge editing, which can be broadly categorized into three groups: methods that preserve the original model parameters, methods that locate and then edit the original model parameters, and methods that directly modify the original model parameters.

Figure: Figure 1: Comparison of UnKE with previous knowledge editing methods. Previous studies assumed that knowledge is stored in the form of key-value pairs in local MLP layers and edited according to specific term positions, such as subjects. However, this Local Layer KV has difficulty representing information-rich unstructured knowledge, and only editing specific terms will cause information loss. In contrast, UnKE uses a non-local block KV produced by transformer layers and considers the positions of all input tokens during the editing process. Compared with previous methods, it solves the above problems and shows excellent unstructured knowledge editing capabilities.
Refer to caption: x1.png

#### Preserving Model Parameters

One category focuses on introducing additional parameters, while the other focuses on involving knowledge in in-context learning (ICL).
For adding parameters, SEARC (Mitchell et al., ) utilizes a classifier to differentiate between input that requires editing and input that does not. If editing is necessary, the trained counterfactual model is employed for prediction; otherwise, using the original model. T-Patcher (Huang et al., ) incorporates and trains specific neurons in the final feedforward network layer for the sample that requires editing, e.g. their functionality activated solely when encountering the edited sample. Additionally, (Hartvigsen et al., ) proposed GRACE, a lifelong model editing method that generates a discrete local editing codebook while preserving the model weights unchanged. While training additional parameters may be effective for editing knowledge triples, their success with unstructured knowledge is limited by the number of parameters.
For ICL, IKE (Zheng et al., ) utilizes ICL for knowledge editing, while MeLLo (Zhong et al., ) enhances multi-hop knowledge editing capabilities by decomposing complex multi-hop problems into sub-problems and integrating them with retrieval techniques.
However, both methods face challenges in efficiently editing a large amount of knowledge within a single model, primarily due to limitations in parameter count and context window length, especially for unstructured knowledge with verbosity, noise, and interdependencies.

#### Locate-Then-Edit

Another branch of methods adopts a locate-and-edit approach. Initially, they identify the specific parameters associated with the target knowledge and subsequently modify those parameters directly to effectuate the desired knowledge editing. KN (Dai et al., ) introduces the concept of knowledge neurons and utilizes them to incorporate specific factual knowledge without the need for fine-tuning. ROME (Meng et al., ) introduces a causal tracking method to identify the layer that requires editing. Subsequently, it employs Rank-One Model Editing to modify the weights of the feedforward layer, thereby updating specific factual associations. MEMIT (Meng et al., ) is an enhanced version of ROME, capable of editing knowledge in batches. These methods operate under the assumption that knowledge is stored locally within MLP layers or neurons, which proves inadequate when confronted with unstructured knowledge.

#### Directly Modify Model Parameters

Additionally, there exist numerous other methods that enable knowledge editing by directly modifying model parameters without the need for explicit positioning. MEND (Mitchell et al., ) introduces auxiliary networks and enables scalable editing by decomposing gradients, thereby facilitating efficient and effective knowledge editing. To enhance the stability and effectiveness of knowledge editing in large language models, StableKE (Wei et al., ) employs additional knowledge for fine-tuning, presenting an approach that brings about significant improvements. As knowledge transitions from a structured to an unstructured format, the process of editing them becomes time-consuming, leading to a degradation in performance.

## 3 Motivations

To investigate why conventional knowledge editing techniques are inadequate for editing unstructured knowledge, we carry out pertinent experiments and determined that: (1) the hypothesis that knowledge is locally stored is unsuitable for information-rich unstructured knowledge and (2) term-driven optimization is notably sensitive to specialized terms, however it is difficult to locate them in unstructured knowledge.

### 3.1 LLMs Store Knowledge Non-locally

Figure: Figure 2: Impact of different edited layers on the performance of MEMIT in editing structured and unstructured knowledge. The x-axis indicates the starting layer number for editing, and the number of edited layers is 5. Bert-Score is a metric in UnKEBench; a higher value indicates better model performance.
Refer to caption: x2.png

Hypothesis 1: Knowledge is stored in specific local parameters of LLMs. We refute this hypothesis through a contradiction approach. Initially, methods such as ROME and MEMIT utilize causal tracing, believing that knowledge is localized within the early MLP layers, thus targeting these layers for editing.
Employing MEMIT, we conduct experiments to edit structed and unstructed knowledge across various layers using the Counterfact dataset (Meng et al., ) and UnKEBench (Section 5.1).
The results, presented in the Figure 2, are crucial. According to Hypothesis 1, successful editing of the early MLP layers should enhance model performance. Contrary to this expectation, our results indicate that the success rate of editing structured knowledge and the Bert-Score of editing unstructured knowledge are largely unaffected by the number of edited layers. Therefore, the conclusion is that knowledge is not confined to specific layers; rather, it is distributed non-locally throughout the network. Our perspective aligns with findings from other studies (Hase et al., ). Combining the non-local characteristics of knowledge and the conclusions that also exist in the attention layer (Li et al., ; Wei et al., ), we advocate for the adoption of non-local block key-value storage, endowed with enhanced representational abilities, over local layer key-value storage. This shift is essential for effectively encapsulating the intricacies of unstructured knowledge.

### 3.2 Term-driven Editing Lacks Robustness

Table: Table 1: Performance comparison on KEBench: Impact of locating the subject. Ori-Acc and Para-Acc represent the accuracy for the original question and the paraphrased question, respectively. None Subject indicates the last token to the question.

Hypothesis 2: Knowledge editing is driven by specific terms in sentences.
MEMIT and ROME both increase editing success rate by locating the last token in the subject. As shown in the Table 1, omitting this step causes their performance to drop significantly on KEBench (Wei et al., ).
For structured knowledge, the subject can be easily identified; however, for unstructured knowledge, accurately determining the subject is challenging due to its distributed semantics.
In addition, it is inconvenient if positioning operations are required for each edit. Therefore, we argue that this step should be omitted in unstructured knowledge editing and editing can be performed directly at the sentence level.

## 4 UnKE: Unstructured Knowledge Editing Method

Building on the above motivations, our study proposes two primary solutions: (1) Employing non-local block key-value storage instead of local layer key-value storage to capture information-rich unstructured knowledge effectively, and (2) opting for causal-driven optimization over term-driven optimization for editing purposes to eliminate positional term operations and mitigate the loss of contextual information.

### 4.1 Non-local Block Key-value Storage

Many studies (Wang et al., ; Yao et al., ) suggest that the initial layers in LLMs store foundational knowledge, processing inputs to extract general information. In the deeper layers, target information is already present in the residual stream. The main role of these deep layers is to refine and enhance the model’s confidence in its predictions, increasing the likelihood of accurate outputs—an effect known as the "early decoding" phenomenon (Yao et al., ).

Inspired by this, we argue that the shallow layers of LLMs encode the key vector of knowledge, which aggregates entity information and contextual concepts related to the problem. The deep layers decode this key vector into a value vector, responsible for integrating target information into the residual stream. This transformer block-level key-value pair representation is more effective than traditional MLP layer-level key-value pairs. It enables nonlinear mapping and incorporates information from the attention layer, making it more suitable for representing unstructured knowledge. Specifically, we consider the $L$-th layer of the LLM as a boundary, dividing it into two distinct components: a key generator and a value generator. These components produce key vectors and value vectors, respectively. Experience indicates that a value of 7 is more suitable for $L$. For detailed experimental information regarding the value of $L$, please refer to Appendix F. Next, we formalize the process of generating Transformer block-level key-value pairs.

Let $f_{\theta}=f_{\theta_{1}}^{1}\circ\cdots\circ f_{\theta_{l}}^{l}\circ\cdots
\circ f_{\theta_{N}}^{N}$ denote an autoregressive LLM with parameters $\theta$, which can be regarded as an $N$-layer Transformer decoder, and $\circ$ stands for cascade symbol. For the $l$-th layer, we denote it as $f_{\theta_{l}}^{l}$, where $\theta_{l}$ represents the parameters of this layer. Then the key generator is represented as $f_{\theta_{k}}^{l\leq L}=f_{\theta_{1}}^{1}\circ\cdots\circ f_{\theta_{L}}^{L}$, and the value generator $f_{\theta_{v}}^{L<l\leq N}=f_{\theta_{L+1}}^{L+1}\circ\cdots\circ f_{\theta_{N
}}^{N}$, where $\theta_{k}$ and $\theta_{v}$ are parameters of the key generator and the value generator respectively.

For a given question $q=[q_{1},q_{2},\dots,q_{n}]$, the key vector $k$ should be expressed as

$$ $k=f_{\theta_{k}}^{l\leq L}([q_{1},q_{2},\dots,q_{n}]),$ (1) $$

where $q_{i}$ represents the $i$-th token of the question, and $n$ represents the number of question tokens. Function $f_{\theta_{k}}^{l\leq L}(\cdot)$ represents the last token representation of $f_{\theta_{k}}^{l\leq L}$ forward propagation. We use $h_{q}^{l}=[h_{q,1}^{l},h_{q,2}^{l},\dots,h_{q,n}^{l}]$ to represent the hidden state of $q$ in the $l$-th layer. Then we can also conclude that $k=h_{q,n}^{L}$. It is worth noting that for term-driven methods, the term position $t$ they locate is usually less than $n$. Due to the causal attention mechanism, the key vectors they generate do not store information about the position after the term, resulting in information loss. Please see the next section for details. The value vector $v$ is

$$ $v=f_{\theta_{v}}^{L<l\leq N}([h_{q,1}^{L},h_{q,2}^{L},\dots,k]).$ (2) $$

At this time, the basic information contained in key vector $k$ has been decoded by the value generator into target information, which is then written into the residual stream to become value vector $v$. Our goal is to modify them to obtain the editing target $a=[a_{1},a_{2},\dots,a_{m}]$, where $m$ represents the number of target tokens. The process is denoted as $(k\mapsto k^{*},v\mapsto v^{*})$, where $k^{*}$ and $v^{*}$ represent the key vector and value vector we expect to get. In the next section, we elaborate on cause-driven optimization.

### 4.2 Cause-driven Optimization

The core idea of cause-driven optimization is uncomplicated and effective, that is, the last token of the autoregressive LLMs aggregates the information of all previous tokens, so editing should be performed based on this as an anchor. When editing the last token, the key vectors of other previous tokens should unchanged.

First, we calculate the key vector $k^{*}$ and value vector $v^{*}$ to be modified based on the editing target $a$.
Inspired by previous work (Meng et al., ), we find $k^{*}=h_{q,n}^{l}+\delta_{n}$ directly by optimizing the residual vector $\delta_{n}$ using gradient descent. We formalize this process as

$$ $k^{*}=h_{n}^{l}+\mathop{\mathrm{argmin}}\limits_{\delta_{n}}-\mathrm{log}\ \mathbb{P}_{f_{\theta}(h_{q,n}^{L}\mapsto h_{q,n}^{L}+\delta_{n})}(a|q),$ (3) $$

where $f_{\theta}(h_{q,n}^{L}\mapsto h_{q,n}^{L}+\delta_{n})$ means that we replace the hidden state $h_{q,n}^{L}$ (also be expressed as original key vector $k$) with $k^{*}$. Then we can calculate $v^{*}$ using Eq. 2. If we freeze the parameters of the value generator $f_{\theta_{v}}^{L<l\leq N}$, optimizing Eq. 3 to a sufficiently small value implies that if we obtain $k^{*}=f_{\theta_{k}}^{l\leq L}(q_{1},q_{2},\dots,q_{n})$, then we can decode the target $a$.

We now introduce the process of optimizing the key generator $f_{\theta_{k}}^{l\leq L}$ to obtain the key vector $k^{*}$. $f_{\theta_{k}}^{l\leq L}$ store a large number of key vectors $K_{0}=[k_{1}\ |\ k_{2}\ |\ \dots\ |\ k_{E}]$ during the pre-training process, which can be activated by specific inputs $D_{0}=[d_{1}\ |\ d_{2}\ |\ \dots\ |\ d_{E}]$ to generate corresponding value vectors $V_{0}=[v_{1}\ |\ v_{2}\ |\ \dots\ |\ v_{E}]$. We can express it as

$$ $f_{\theta_{k}}^{l\leq L}\triangleq\mathop{\mathrm{argmin}}\limits_{\hat{\theta }}\sum_{i=1}^{E}\parallel f_{\hat{\theta}}^{l\leq L}(d_{i})-k_{i}\parallel^{2},$ (4) $$

where $E$ represents the number of knowledge key-value pairs introduced during pre-training, which can be regarded as $+\infty$. Therefore during the optimization process we should minimize the parameter changes of $f_{\theta_{k}}^{l\leq L}$ and produce a new key generator $f_{\theta_{k}^{{}^{\prime}}}^{l\leq L}$ that can generate the new key $k^{*}$. We formalize this process as

$$ $f_{\theta_{k}^{{}^{\prime}}}^{l\leq L}\triangleq\mathop{\mathrm{argmin}} \limits_{\hat{\theta}}(\sum_{i=1}^{E}\parallel f_{\hat{\theta}}^{l\leq L}(d_{i })-k_{i}\parallel^{2}+\parallel f_{\hat{\theta}}^{l\leq L}(q)-k^{*}\parallel^{ 2}),$ (5) $$

where $\theta_{k}^{{}^{\prime}}$ represents the updated parameters. This approach minimizes the impact of adding new key-value pairs on the original key-value pairs. In particular, we are able to edit a batch of $u$ unstructured knowledge at one time, which we denote by $K_{1}=[k_{1}^{*}\ |\ k^{*}_{2}\ |\ \dots\ |\ k^{*}_{u}]$. Eq. 5 can be changed to

$$ $f_{\theta_{k}^{{}^{\prime}}}^{l\leq L}\triangleq\mathop{\mathrm{argmin}} \limits_{\hat{\theta}}(\sum_{i=1}^{E}\parallel f_{\hat{\theta}}^{l\leq L}(d_{i })-k_{i}\parallel^{2}+\sum_{j=1}^{u}\parallel f_{\hat{\theta}}^{l\leq L}(q_{j} )-k^{*}_{j}\parallel^{2}).$ (6) $$

To avoid the addition of new keys affecting the generation of original keys, we only optimize the last layer of the key encoder $f_{\theta_{L}}^{L}$. In order to optimize Eq. 6, we randomly select a number $C$ of pre-training samples to simulate the knowledge $f_{\theta_{L}}^{L}$ learned during pre-training. Assuming that $i$-th pre-training sample can be represented as $t^{i}=[t_{1}^{i},t_{2}^{i},\dots,t^{i}_{P}]$, where $P$ represents the number of $i$-th pre-training sample tokens. Before performing optimization, we first calculate the key vector $k_{t,p}^{i}=f_{\theta_{L}}^{L}(h_{t,1}^{i,L-1},h_{t,2}^{i,L-1},\dots,h_{t,p}^{
i,L-1})$ corresponding to the $p$-th token in $i$-th pre-training sample, where $h_{t,p}^{i,L-1}$ represents the vector of the $p$-th token of the $i$-th pre-training sample in the $l$-th layer. During the editing process, we need to ensure that the key vector corresponding to each token of the pre-training sample remains unchanged, so as to retain the knowledge acquired by the model during pre-training to the greatest extent and prevent catastrophic forgetting.

Finally, consider that when optimizing the key generator $f_{\theta_{k}}^{l\leq L}$ to generate the $k^{*}$, changes in parameters of $f_{\theta_{k}}^{l\leq L}$ may cause the representation of the context $h_{c}^{L}=[h_{q,1}^{L},h_{q,2}^{L},\dots,h_{q,n-1}^{L}]$ to change after passing through the $f_{\theta_{k}}^{l\leq L}$, thereby reducing the model performance. Therefore, we impose constraints to ensure that the context representation $h_{c}^{L}$ is not changed during the editing process, which leads to the final optimization goal, which is

$$ $\displaystyle f_{\theta_{L}^{{}^{\prime}}}^{L}=$ $\displaystyle\mathop{\mathrm{argmin}}\limits_{\hat{\theta}_{L}}(\underbrace{ \sum_{i=1}^{C}\sum_{p=1}^{P}\parallel f_{\hat{\theta}_{L}}^{L}(h_{t,\leq p}^{i ,L-1})-k_{t,p}^{i}\parallel^{2}}_{\mathrm{Key\ Preservation\ Loss}}+ \underbrace{\sum_{i=1}^{u}\sum_{j=1}^{n-1}\parallel f_{\hat{\theta}_{L}}^{L}(h _{q,\leq j}^{i,L-1})-k_{q,j}^{i}\parallel^{2}}_{\mathrm{Key\ Causal\ Loss}}$ (7) $\displaystyle+\underbrace{\sum_{i=1}^{u}\parallel f_{\hat{\theta}_{L}}^{L}(h_{ q,\leq n}^{i,L-1})-k_{q}^{*,i}\parallel^{2}}_{\mathrm{Key\ Learning\ Loss}}),$ $$

where $h_{t,\leq p}^{i,L-1}$ represents tokens less than or equal to $p$ in the $i$-th pre-train sample, and $h_{q,\leq j}^{i,L-1}$ represents tokens less than or equal to $i$ in the $j$-th question to be edited. Key Preservation Loss ensures that the key generator retains the keys stored during pre-training, enabling the preservation of original knowledge. Key Causal Loss ensures that the contextual information is not biased when the model learns new key vectors. Additionally, Key Learning Loss facilitates the key generator in acquiring new keys, and achieving the desired editing target.

## 5 Experiments

Due to the lack of datasets for compiling unstructured knowledge, we developed UnKEBench (Section 5.1). Subsequently, we assess the model’s efficacy in unstructured knowledge editing (Section 5.2) and structured knowledge editing (Section 5.3). Finally, we conduct ablation experiments to ascertain the impacts of different designs (Section 5.4).

### 5.1 Construction of UnKEBench

The unstructured texts are notably lengthy and contain knowledge that extends beyond simple knowledge triples or linear fact chains. To effectively manage this complexity, we divide our construction approach into four distinct phases.

- 1.
We employ meticulously crafted instructions to guide ChatGPT in formulating the most appropriate question $Q$ for each text $A$, thus creating an unstructured knowledge pair $(Q,A)$.
- 2.
To refine our evaluation mechanism, we use detailed instructions to prompt ChatGPT to generate a paraphrased version of each original question, denoted as $Q_{p}$, for every original question $Q$.
- 3.
We leverage knowledge decomposition strategies and engage ChatGPT to produce multiple sub-question and sub-answer pairs $(Q_{s}^{i},A_{s}^{i})$ for each $(Q,A)$.
- 4.
Finally, we randomly sample five questions from MMLU (Hendrycks et al., ) for each example to evaluate the general ability of the edited model.

Details and examples of constructing UnKEBench are provided in the Appendix B. Due to space limitations, we introduce the differences between existing knowledge editing benchmarks and UnKEBench in Appendix A. Our evaluation framework for unstructured knowledge editing mirrors the complexity of the task by integrating four critical dimensions: word-level overlap, semantic similarity, factual correctness and general ability.

- •
Lexical Similarity metrics, including BLEU Papineni et al. () and various ROUGE scores Lin () (ROUGE-1, ROUGE-2, and ROUGE-L), provide insight into the lexical and n-gram alignment between the model-generated text and the target answers, based on both the original and paraphrased questions. These metrics are fundamental in assessing the surface-level accuracy of the edited content.
- •
Semantic Similarity. As word-level overlap metrics alone are insufficient for capturing the nuanced understanding a model must exhibit. To bridge this gap, we evaluate semantic similarity by leveraging an embedding encoder (specifically, the all-MiniLM-L6-v2 model(^1^11[https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2).)) to quantify the depth of comprehension of the model of the text, ensuring a balanced evaluation that transcends mere lexical matching.
- •
Factual Correctness. In order to evaluate in a more fine-grained manner whether the edited model has indeed understood the unstructured knowledge, we use FactScore Min et al. () to evaluate the accuracy of the edited model in processing sub-questions and their corresponding answers. This metric is similar to the multi-hop accuracy in some structured knowledge editing benchmarks.
- •
General Ability. We follow the code in MMLU (Hendrycks et al., ) to evaluate each MMLU sample. We then average the scores of five MMLU samples for each unstructured sample, and finally average these scores across all unstructured samples.

In summary, these four aspects form a robust framework for evaluating unstructured knowledge edits, ensuring both the fidelity and the flexibility of the generated content are thoroughly examined.

### 5.2 Experiments on Unstructured Knowledge Editing

**Table 2: Unstructured knowledge editing performance with different methods. During the editing process, we set the batch size to 1. With each editing instance, the parameters of the modified model are rebuilt. The decoding process employs a temperature of 0.001. To ensure fair comparison, the 7-th layer of parameters of the model is specifically targeted for editing across FT-L, ROME, and UnKE. The figures to the left and right of the ’/’ symbol denote the evaluation outcomes for output of the model in response to the original and paraphrased questions, respectively. FC. stands for Factual Correctness.**
| Method | Semantic Similarity | Lexical Similarity | FC. | General Ability |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Bert-Score | Rouge-1 | Rouge-2 | Rouge-L | BLEU | FactScore | MMLU |  |
| *Based on LLaMA2-7B-Chat* | 29.78 |  |  |  |  |  |  |
| FT-A | 2.56 / 2.58 | 1.01 / 1.02 | 0.92 / 0.92 | 0.01 / 0.01 | 0.92 / 0.92 | 8.74 | 29.570.21↓ |
| FT-L | 11.63 / 10.16 | 6.14 / 5.52 | 7.55 / 6.78 | 1.37 / 1.28 | 7.26 / 6.53 | 15.69 | 29.270.51↓ |
| ROME | 76.52 / 74.29 | 47.31 / 41.64 | 28.89 / 20.93 | 45.05 / 39.06 | 38.71 / 33.42 | 24.44 | 29.780.00↓ |
| MEMIT | 75.90 / 74.46 | 35.79 / 33.19 | 43.55 / 41.39 | 23.11 / 19.89 | 40.96 / 38.81 | 26.39 | 29.770.01↓ |
| MEND | 69.99 / 64.71 | 24.10 / 29.23 | 45.36 / 45.06 | 31.75 / 29.33 | 44.05 / 43.77 | 24.17 | 28.501.28↓ |
| UnKE | 99.61 / 93.09 | 98.63 / 76.85 | 98.77 / 78.62 | 98.33 / 70.66 | 98.73 / 77.70 | 42.49 | 29.680.10↓ |
| *Based on Qwen1.5-7B-Chat* | 32.43 |  |  |  |  |  |  |
| MEMIT | 74.72 / 76.82 | 48.89 / 48.71 | 49.50 / 48.18 | 34.59 / 31.50 | 47.55 / 46.04 | 17.81 | 31.690.74↓ |
| UnKE | 96.51 / 90.40 | 92.85 / 75.66 | 91.74 / 72.68 | 88.19 / 60.59 | 91.40 / 70.44 | 40.08 | 32.030.40↓ |

We conduct a comprehensive evaluation of various baseline methods (Appendix C) and our newly proposed UnKE method on the UnKEBench benchmark, including both automatic and human evaluation.

#### Automatic Evaluation.

The specific results are presented in Table 2. Traditional fine-tuning methods, including FT-L and FT-A, have long exhibited significant limitations when tasked with structured knowledge editing. As anticipated, their performance on UnKEBench is also underwhelming, with all evaluation metrics falling short of those achieved by dedicated knowledge editing approaches. Methods employing a Locate-Then-Edit paradigm, such as ROME and MEMIT, despite previously demonstrating satisfactory editing success rates on certain structured benchmarks, underperform on the UnKEBench dataset, particularly in terms of lexical and semantic similarity when compared to UnKE. UnKE demonstrates exceptional performance, surpassing other models in lexical and semantic similarity metrics, which confirms its ability to accurately capture and reproduce the intended editing objectives—a feat that other models do not achieve. For more examples of generated cases, please refer to the Appendix E. Regarding the detailed evaluation metric of FactScore, UnKE achieves a score of 42.49, outperforming other strong baseline models, yet highlighting that there is still room for further improvement. Furthermore, UnKE has little impact on the model’s general capabilities.

We also extend our unstructured knowledge editing experiments to utilize Qwen1.5-7b-Chat as base model and compare against MEMIT. The results indicate that our approach outperforms MEMIT across multiple evaluation dimensions significantly. These experiments, conducted on models with varying architectures, demonstrate the robust transferability of our proposed UnKE method.

#### Human Evaluation.

Considering the complexity and challenges involved in automatically evaluating unstructured knowledge editing, we conduct additional manual evaluation experiments to ensure the reliability of the evaluation metrics and actual scores in UnKEBench. Due to the high cost of human evaluation, we randomly select 36 samples from a pool of 1000 samples generated by each method. We employ three annotators, experienced in knowledge editing tasks but not involved in this project’s training, to conduct a manual evaluation. They were instructed to assess the edited generated text across three dimensions: semantic correctness, similarity, and coherence on a scale of 1-5, with 1 denoting "very low" and 5 representing "very high". The scores are then averaged to derive the final human evaluation results. The evaluation results, presented in Table 3(a), reflect the collective assessments by the hired professionals. The inter-annotator agreement is 0.57 in Fleiss’ $\kappa$, which means a moderate agreement.

The experimental results provide strong evidence of the high consistency between the automatic evaluations and human evaluations. UnKE stands out as the leader across all three dimensions. In contrast, the other baseline models frequently exhibit subpar performance in terms of semantic correctness, highlighting their limited ability to effectively edit unstructured knowledge. To further quantify the correlation between the automatic evaluation metrics and the human evaluation metrics, we calculated the Pearson correlation coefficient. Refer to Appendix G for details.

**Table 3: Performance on human evaluation (a) and structured knowledge editing performance on KEBench (b). Ori-Acc and Para-Acc represent the accuracy for the original question and the paraphrased question, respectively. Src-Acc and Tgt-Acc represent the irrelevant knowledge accuracy of subject and object in the triplet, respectively.**
| Method | Corr. | Simi. | Cohe. |
| --- | --- | --- | --- |
| FT-A | 1.06 | 1.47 | 1.47 |
| FT-L | 1.17 | 1.00 | 1.31 |
| ROME | 3.39 | 3.59 | 3.64 |
| MEMIT | 3.25 | 3.70 | 3.72 |
| UnKE | 4.78 | 4.72 | 4.70 |

### 5.3 Experiments on Structured Knowledge Editing

To validate the capability of UnKE in editing knowledge triples, we conduct experiments on KEBench (Wei et al., ), a benchmark that evaluates whether the model accurately produces the desired target answer after editing. The results presented in Table 3(b) demonstrate that UnKE surpasses strong baseline models in terms of Ori-Acc and Para-Acc metrics, exhibiting improvements of 16.4 points and 18 points, respectively. When comparing the results with UnKEBench, the improvement of UnKE over the strong baseline may not be as pronounced. However, this outcome is anticipated since UnKE primarily targets complex and lengthy unstructured knowledge editing tasks, making it less conspicuous in simpler structured knowledge editing tasks. In general, experimental results have demonstrated that UnKE is not only effective in unstructured knowledge editing but can also be applied to structured knowledge.

### 5.4 Ablation Experiments

To validate the efficacy of our proposed approach, we conduct ablation experiments on non-local block key-value storage and cause-driven optimization. Table 4 illustrates that for non-local block key-value storage, we selectively optimized either the MLP or Attention module when generating the key vector to assess the model’s performance under these conditions. The outcomes indicate that optimizing solely the MLP or Attention module leads to a partial performance decrease, reinforcing the premise of non-local knowledge storage outlined in Section 3.1. Specifically, optimizing just the MLP is insufficient for achieving optimal results; hence, a combination of non-local block key-value storage with both MLP and Attention modules is imperative for effectively representing information-rich unstructured knowledge.

In the context of causal-driven optimization, we conducted an ablation analysis on the loss function, specifically omitting the Key Preservation Loss and Key Causal Loss individually. The findings reveal that excluding the Key Preservation Loss leads to a degradation in model performance, particularly affecting the MMLU metric. Conversely, eliminating the Key Causal Loss results in a significant decline in editing performance due to the absence of contextual information. However, given the presence of Key Preservation Loss, the general ability of the model remains relatively stable. Notably, when both losses are discarded, the model performance reaches its lowest point. In addition, we also verify that UnKE has robust batch editing and sequential editing capabilities (Section D).

**Table 4: Ablation experiments. “Pres. Loss” and “Caus. Loss” denote Key Preservation Loss and Key Causal Loss, correspondingly. “w/ MLP” and “w/ ATTN” respectively specify that during optimization, only the parameters of the MLP and Attention modules in the transformer block are utilized.**
| Method | Semantic Similarity | Lexical Similarity | FC. | General Ability |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Bert-Score | BLEU | Rouge-1 | Rouge-2 | Rouge-L | Fact-Score | MMLU |  |
| UnKE | 98.63 / 76.85 | 98.77 / 78.62 | 98.33 / 70.66 | 98.73 / 77.70 | 99.61 / 93.09 | 42.49 | 29.680.10↓ |
| *Modules* |  |  |  |  |  |  |  |
| w/ MLP | 92.34 / 71.32 | 94.78 / 73.39 | 92.91 / 68.51 | 93.23 / 72.65 | 95.43 / 87.87 | 37.98 | 29.770.01↓ |
| w/ ATTN | 90.58 / 63.46 | 91.16 / 70.03 | 89.73 / 68.30 | 90.21 / 71.15 | 92.66 / 81.62 | 31.01 | 29.710.07↓ |
| *Loss Function* |  |  |  |  |  |  |  |
| w/o Pres. Loss | 96.99 / 82.39 | 97.35 / 83.81 | 96.29 / 77.19 | 97.21 / 83.20 | 99.00 / 94.94 | 38.74 | 29.440.34↓ |
| w/o Caus. Loss | 21.19 / 26.27 | 26.69 / 31.79 | 10.29 / 13.46 | 24.93 / 29.68 | 46.50 / 58.91 | 16.77 | 29.520.26↓ |
| w/o Pres. & Caus. Loss | 9.32 / 9.79 | 11.96 / 12.94 | 2.08 / 2.31 | 11.12 / 12.10 | 14.98 / 18.19 | 6.27 | 27.622.16↓ |

## 6 Conclusions

We address the limitations of existing knowledge editing benchmarks, which primarily focus on structured knowledge triples, by introducing UnKEBench, the first benchmark for unstructured knowledge editing. To successfully edit unstructured knowledge, we propose UnKE, an unstructured knowledge editing method, which incorporates non-local block key-value storage and cause-driven optimization, enabling it to effectively represent and edit unstructured knowledge with ease. Experimental results on UnKEBench demonstrate the superior performance of UnKE, significantly surpassing powerful baseline models on various evaluation metrics. Robustness analysis experiments confirm that UnKE possesses the ability to perform both batch and sequential editing. Additionally, UnKE also compares favorably with other strong baseline models on structured knowledge editing benchmarks.

## Appendix A Related Work on Knowledge Editing Benchmarks

Previous knowledge editing datasets are composed in the form of triples or fact chains. The two prominent datasets are ZsRE (Levy et al., ) and COUNTERFACT (Meng et al., ). ZsRE utilizes back translation to generate paraphrase questions, while COUNTERFACT focuses on constructing counterfactual data. The MQuAKE dataset (Zhong et al., ), which serves as a multi-hop knowledge editing dataset, is utilized to assess the impact of knowledge editing on intricate knowledge chains. KEBench (Wei et al., ) performs a comprehensive evaluation of the stability of different knowledge editing methods using a tree-structured dataset. Furthermore, (Zhang et al., ) introduced KnowEdit, an integrated evaluation benchmark that incorporates popular knowledge editing datasets to comprehensively assess various knowledge editing technologies. Simultaneously, numerous efforts (Wei et al., ; Wang et al., ; ) have been made to construct multilingual datasets aiming to evaluate the generalizability of knowledge editing methods across diverse languages. Recent research on expanding knowledge triples has significantly broadened the application of knowledge editing methods, particularly in handling longer text. Eva-KELLM (Wu et al., ) offers a benchmark dataset for evaluating document-level knowledge editing. However, this dataset creates documents by repeatedly expanding specific knowledge triples. Thus, Eva-KELLM predominantly focuses on editing specific counterfactual concepts, lacking the complexity of the unstructured knowledge editing tasks we aim to address. Similarly, KEP (Onoe et al., ) introduces new entity definitions into language models through knowledge editing. However, it focuses on a single entity, differing substantially from the complex and diverse unstructured knowledge editing tasks we address. EVEDIT (Liu et al., ) constructs a multi-sentence knowledge dataset by generating and repeating knowledge triples. While these datasets are similar in length to our proposed UnKEBench, they differ significantly in construction. UnKEBench, as an unstructured knowledge editing benchmark, features longer texts, noise, and complex, comprehensive characteristics, spanning across domains.

## Appendix B Implementation Details of Constructing UnKEBench

LLMs develop significant parameter memories after undergoing comprehensive pre-training on extensive corpora. To ensure that these parameter memories do not inherently encompass editing objectives, we curate a dataset consisting of 1000 counterfactual unstructured texts. These texts are sourced from ConflictQA (Xie et al., ), a benchmark specifically designed to distinguish between the parameter memory of the LLM and its counter-memory. This strategy is essential to prevent the model from merging the knowledge gained during pre-training with that obtained from editing tasks. Moreover, it addresses the critical challenge of discerning whether the model has learned target knowledge during the training phase or the editing process, thus maintaining a clear demarcation between pre-training learning and editing objectives. Table 5 and 6 show the instructions for using ChatGPT (gpt-3.5-turbo) to generate original and rephrased questions for unstructured text.

Table: Table 5: Demonstrating the application of ChatGPT (gpt-3.5-turbo) in generating a question about unstructured text.

Table: Table 6: Demonstrating the application of ChatGPT (gpt-3.5-turbo) in generating a paraphrased question from a raw question.

## Appendix C Baseline Methods

We conduct experiments on two autoregressive models, LLaMA-2-7B-Chat (^2^22[https://huggingface.co/meta-llama/Llama-2-7b-chat-hf](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf)) (Touvron et al., ) and Qwen1.5-7B-Chat (^3^33[https://huggingface.co/Qwen/Qwen1.5-7B-Chat](https://huggingface.co/Qwen/Qwen1.5-7B-Chat)) (Bai et al., ). For baselines, we first compare the fine-tuning method FT-L, which targets specific layers, with FT-A, which fine-tunes all layers. Additionally, we assess two robust baseline models, ROME and MEMIT, focusing on their locating and editing capabilities. Lastly, we evaluate the hypernetwork-based model editing method, MEND.

## Appendix D Robustness Analysis on Batch Editing and Sequential Editing

**Table 7: Comparison of different batch sizes. We conducted experiments on UnKE using the LLaMA2-7B-Chat model, with the decoding temperature set to 0.001.**
| Batch Size | Semantic Similarity | Lexical Similarity | FC. | General Ability |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Bert-Score | BLEU | Rouge-1 | Rouge-2 | Rouge-L | Fact-Score | MMLU |  |
| $2^{0}$ | 99.61 / 93.09 | 98.63 / 76.85 | 98.77 / 78.62 | 98.33 / 70.66 | 98.73 / 77.70 | 42.49 | 29.680.1↓ |
| $2^{1}$ | 99.41 / 91.55 | 98.72 / 73.03 | 98.88 / 74.85 | 98.44 / 65.35 | 98.83 / 73.72 | 42.35 | 29.660.12↓ |
| $2^{2}$ | 99.48 / 89.98 | 98.97 / 69.95 | 98.98 / 71.83 | 98.61 / 60.93 | 98.93 / 70.54 | 41.82 | 29.610.17↓ |
| $2^{3}$ | 99.57 / 88.33 | 98.99 / 66.10 | 99.08 / 67.98 | 98.76 / 56.16 | 99.05 / 66.61 | 42.24 | 29.660.12↓ |
| $2^{4}$ | 99.70 / 85.98 | 99.17 / 62.30 | 99.28 / 64.76 | 99.01 / 51.97 | 99.25 / 63.22 | 42.13 | 29.610.17↓ |
| $2^{5}$ | 99.56 / 84.07 | 99.12 / 59.36 | 99.16 / 61.45 | 98.89 / 47.57 | 99.14 / 59.71 | 41.38 | 29.730.05↓ |
| $2^{6}$ | 99.78 / 85.21 | 99.47 / 60.38 | 99.50 / 62.25 | 99.31 / 48.55 | 99.48 / 60.50 | 42.93 | 29.720.06↓ |

Figure: Figure 3: Performance in sequential editing. We select the first 64 samples in the UnKEBench data set for sequential editing experiments.
Refer to caption: x3.png

To evaluate the robustness of UnKE in unstructured knowledge editing, we assess its batch editing capabilities (as shown in Table 7) and sequential editing performance (as presented in Figure 3) using the UnKEbench dataset. In the batch editing assessment, we observe that as the batch size increases, the model’s performance on the original task remains relatively stable, indicating the robustness of UnKE’s batch editing capabilities. However, there is a slight reduction in performance on paraphrased questions, which is expected. The simultaneous optimization of a larger number of keys marginally diminishes the model’s generalization ability for paraphrased questions. For sequential editing, we find that the performance of all methods declines as the number of edits increases. Nevertheless, UnKE exhibits the highest stability compared to other baseline methods, demonstrating its robustness in sequential editing scenarios. These findings underscore the effectiveness of UnKE in handling both batch and sequential editing tasks, highlighting its potential as a promising approach for unstructured knowledge editing.

## Appendix E Case Analysis of ROME, MEMIT and UnKE

Table 13 shows the generation cases of three different methods: ROME, MEMIT and UnKE. The methods of editing local key-value pairs, namely ROME and MEMIT, limit capabilities when it comes to complex unstructured knowledge editing tasks. These methods can only remember a small set of editing goals and are unable to fully retell the editing objectives. In contrast, UnKE exhibits greater proficiency in handling such tasks and is capable of conveying the editing goals.

## Appendix F Impact of hyperparameter L on model performance

**Table 8: Optimization layer $L$ selection experiment.**
| $L$ | Semantic Similarity | Lexical Similarity | FC. | General Ability |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Bert-Score | BLEU | Rouge-1 | Rouge-2 | Rouge-L | Fact-Score | MMLU |  |
| 5 | 98.30 / 90.15 | 95.02 / 70.30 | 94.81 / 70.86 | 92.98 / 60.28 | 94.59 / 69.57 | 40.37 | 29.560.22↓ |
| 6 | 99.23 / 91.51 | 97.24 / 72.29 | 97.54 / 73.72 | 96.55 / 64.28 | 97.45 / 72.60 | 42.11 | 29.720.06↓ |
| 7 | 98.63 / 76.85 | 98.77 / 78.62 | 98.33 / 70.66 | 98.73 / 77.70 | 99.61 / 93.09 | 42.49 | 29.720.06↓ |
| 8 | 99.62 / 94.29 | 98.57 / 80.91 | 98.79 / 83.02 | 98.24 / 76.23 | 98.73 / 82.13 | 40.86 | 29.680.10↓ |
| 9 | 98.09 / 93.17 | 92.71 / 74.39 | 94.35 / 79.47 | 91.99 / 70.99 | 94.05 / 78.38 | 41.33 | 29.700.08↓ |
| 10 | 95.53 / 91.82 | 81.50 / 67.10 | 86.14 / 74.02 | 80.39 / 63.46 | 85.42 / 72.66 | 39.72 | 29.710.07↓ |
| 11 | 90.04 / 86.73 | 68.96 / 56.72 | 76.01 / 67.03 | 66.68 / 53.70 | 74.85 / 65.28 | 27.33 | 29.640.14↓ |
| 12 | 87.47 / 84.90 | 53.17 / 44.92 | 65.17 / 59.16 | 52.43 / 43.74 | 63.57 / 57.22 | 22.78 | 29.670.11↓ |

In Section 3.1, we hypothesize that the shallow layer of LLM encodes the key vector of knowledge, dividing LLM into key generator and value generator based on the hyperparameter $L$. To investigate the influence of the value of $L$ on model performance, we conducted analytical experiments, as presented in Table 8.

The results indicate that when the value of $L$ is small, such as 5-10, the model performance remains relatively stable, effectively managing unstructured knowledge. However, as $L$ increases further, it becomes apparent that the model’s effectiveness diminishes. This shows that at this time, $L$ is too deep, resulting in the key vector that has stored the target information, so it is difficult to edit.

## Appendix G Correlation between automatic and human evaluation metrics

**Table 9: Correlation between human and automatic evaluation metrics.**
| Metrics | BLEU | Rouge-1 | Rouge-2 | Rouge-L | Bert-Score | FactScore |
| --- | --- | --- | --- | --- | --- | --- |
| Correctness | 98.550.0021 | 95.040.0132 | 95.740.0105 | 98.100.0031 | 97.520.0047 | 96.900.0065 |
| Similarity | 94.740.0144 | 91.540.0292 | 91.230.0308 | 94.500.0153 | 97.670.0042 | 92.180.0260 |
| Coherence | 95.640.0108 | 92.370.0250 | 91.900.0273 | 95.410.0117 | 98.680.0018 | 94.040.0173 |

**Table 10: Correlation between human and automatic evaluation metrics (Para.).**
| Metrics | BLEU | Rouge-1 | Rouge-2 | Rouge-L | Bert-Score |
| --- | --- | --- | --- | --- | --- |
| Correctness | 98.680.0018 | 92.380.0249 | 95.680.0107 | 97.830.0038 | 97.660.0043 |
| Similarity | 94.970.0135 | 89.130.0423 | 91.130.0313 | 94.500.0153 | 97.950.0035 |
| Coherence | 95.850.0101 | 89.880.0380 | 91.820.0277 | 95.380.0119 | 98.870.0014 |

Tables 9 and Table 10 display the Pearson correlation coefficients between the human evaluation metrics and the original question metrics and the paraphrase question metrics, respectively. Due to significant differences in the evaluation dimensions of the general ability metric MMLU and the three human evaluation metrics, it is omitted from the table.

Each cell in the table represents the correlation coefficient between the corresponding automatic evaluation metric and the human evaluation metric, with the subscript indicating the p-value. Almost all correlation coefficients are above 0.95, confirming a strong correlation between the human and automated assessment results. Additionally, the p-values for all metrics are below 0.05, indicating that the correlations are statistically significant.

## Appendix H Experiment Details

Table: Table 11: Comparison of running time of each method. Time is in hours.

Except for UnKE, we use EasyEdit (^4^44[https://github.com/zjunlp/EasyEdit](https://github.com/zjunlp/EasyEdit)) (Wang et al., )to implement all other editing methods, including fine-tuning. For all other baselines, except for the necessary modifications that need to be applied to UnKEBench, we use the official default hyperparameters, which can be easily reproduced in the official library. The optimizer type used when it comes to gradient descent is Adam. The following are their important hyperparameter configuration contents.

#### Fine-tuning

Fine-tuning consists of two variants: FT-L and FT-ALL, with the only distinction being the number of layers involved in parameter updates. The maximum length is set to 1024, and a learning rate of $5\times 10^{-4}$ is utilized. Each sample undergoes 25 optimization steps. The layer where FT-L parameters are updated is layer 7, which is consistent with UnKE.

#### ROME and MEMIT

The primary distinction between ROME and MEMIT lies in the number of editing layers. ROME focuses on editing the layer 7, while MEMIT targets the layers [4,5,6,7,8]. Both approaches undergo 25 optimization steps, utilizing a learning rate of $5^{-1}$, a weight attenuation coefficient of $1\times 10^{-3}$, and a KL factor of 0.0625. Before the editing process, approximately 100,000 Wikipedia samples need to be computed, which is a highly time-consuming task.

#### MEND

MEND enables concurrent edits by accumulating gradients from all edit examples and passing them through the hypernetwork simultaneously. It calculates parameter layers 29, 30, and 31 and utilizes a learning rate of $1\times 10^{-4}$. Due to the presence of numerous hyperparameters, it is advisable to refer to the official website or code library for detailed information.

Figure: Figure 4: The X-axis represents the number of entities contained in unstructured text, while the Y-axis indicates the proportion of sentences containing that number of entities among all sentences.
Refer to caption: x4.png

Table: Table 12: Demonstrating the application of ChatGPT (gpt-3.5-turbo) in generating some short question-answer pairs based on the unstructured text.

#### UnKE

UnKE employs a two-stage structuring process. In the first stage, the learning rate is set to 5e-1, with 25 optimization steps and a weight attenuation coefficient of 1e-3. In the second stage, the learning rate is set to 2e-4, and 50 optimization steps are performed. All experiments conducted on UnKE in this article focus on optimizing layer 7. During each optimization iteration, an additional 20 samples are randomly selected from the alpaca instruction fine-tuning data (^5^55[https://github.com/tatsu-lab/stanford_alpaca](https://github.com/tatsu-lab/stanford_alpaca)). It is important to note that this number is significantly less than what is required by ROME and MEMIT.

#### Time costs

We present the runtime of each knowledge editing method on UnKEBench. It is important to note that our evaluation approach differs from the EasyEdit framework. Instead, we edit a sample and subsequently allow the model to generate the corresponding problem results for evaluation. This process may take slightly longer. Additionally, ROME and MEMIT require additional time for calculating Wikipedia knowledge. MEND adds the time to calculate the one-stage model. Please refer to the Table 11 for detailed results. All experiments can be completed on an A800-80G graphics card.

## Appendix I The basic statistics of UnKEBench

As shown in Figure 4, only $10\%$ of the sentences contain 0-5 entities, which is a common range for structured text editing tasks. In contrast, over $90\%$ of the sentences contain more than 5 entities, highlighting the inherent complexity of unstructured text.

## Appendix J Broader Impacts

UnKE offers the advantage of timely updating outdated knowledge in LLMs, thereby reducing costs for developers and eliminating the need for resource-intensive pre-training or fine-tuning steps. However, it is important to acknowledge the potential misuse of UnKE by malicious actors who may attempt to inject harmful information into LLMs. To mitigate this risk, a knowledge detection system can be employed to identify and prevent the inclusion of malicious content.

Table: Table 13: This table presents the problems and their corresponding unstructured text after editing. It can be observed that the predicted text generated by UnKE is almost identical to the original text. However, the texts generated by methods like ROME and MEMIT only edit a few key knowledge points such as ’political’ and ’parliamentary reform’, while the detailed descriptions of these knowledge points are almost entirely incorrect.

## Peer Reviews

confidence: 4
contribution: 3
initial_rating: 5
presentation: 3
questions: 1. Maybe give an example of the proposed unstructured knowledge editing setting in the manuscript.
2. The introduced UnKEBench only uses counterfactual samples. How is the performance on real-world unstructured knowledge?
4. MEMIT and ROME mainly aim for structured knowledge. How do you use them for the unstructured knowledge in UnKEBench?
5. Why is the performance of FT-A so low?
6. How does IKE (with in-context learning) perform on unstructured knowledge editing?
3. Line 873, FT-ALL --> FT-A.
soundness: 3
strengths: 1. The proposed methods (non-local key-value storage and cause-driven optimization) are interesting as they can handle unstructured knowledge editing. They are quite different from previous methods.
2. The reported experiments are extensive. They show UnKE outperforms baseline models (like MEMIT and ROME) across multiple evaluation metrics, validating its effectiveness in handling unstructured knowledge editing.
3. The paper proposes a new benchmark for unstructured knowledge editing.
summary: This paper introduces a method called the unstructured knowledge editing method (UnKE).
Traditional knowledge editing methods are mainly focused on structured data (triples with subject, relations, and objects).
However, this paper argues that a vast amount of knowledge is unstructured, often complex, and presented as free-form text.
UnKE uses non-local block key-value storage and cause-driven optimization, effectively capturing and editing unstructured knowledge without sacrificing context. This paper also proposes a new dataset UnKEBench. It consists of paraphrased questions and counterfactual unstructured texts for knowledge editing.
weaknesses: 1. The motivation is quite similar to [1]. The differences should be discussed.
2. The constructed dataset UnkBench only uses counterfactual unstructured texts from ConflictQA. I want to see how UnKE performs on real-world unstructured knowledge as in [1].
3. The paper makes me feel confused about the input of the expected output of unstructured knowledge editing. It seems the input should be a question and the expected output should be a text.
4. The paper lacks some details about how to use MEMIT, ROME, and MEND for unstructured knowledge editing as they mainly aim for structured knowledge.


[1] Updating Language Models with Unstructured Facts: Towards Practical Knowledge Editing (https://arxiv.org/abs/2402.18909)

---

confidence: 5
contribution: 2
initial_rating: 3
presentation: 3
questions: refer to the weaknesses
soundness: 2
strengths: 1.	The introduction of non-local block key-value storage and cause-driven optimization effectively improves the representation and editing of unstructured knowledge, making the method more adaptable than traditional term-driven optimization approaches.
2.	It creates a new benchmark UnKEBench for unstructured knowledge editing.
3.	In experiments, the proposed UnKE outperforms baselines across lexical, semantic, and factual correctness metrics, with robust transferability across various LLM architectures and effective batch and sequential editing capabilities.
summary: This paper introduces UnKE, an approach that addresses limitations in existing knowledge editing methods that primarily handle structured knowledge. The proposed UnKE method expands upon current techniques through "non-local block key-value storage" and "cause-driven optimization" to enhance the handling of complex, unstructured knowledge. Experimental results on a new benchmark, UnKEBench, demonstrate that UnKE outperforms baseline models in unstructured and structured knowledge editing, achieving high accuracy and robustness in sequential and batch editing.
weaknesses: 1.	The paper claims that existing knowledge editing methods have primarily focused on modifying structured knowledge in large language models, but it is not correct. Fine-tuning based methods do not rely on structured knowledge, such as LoRA, RoseLoRA [1], and RECT [2]. In experiments, the paper should set the three methods as baselines as well.
2.	The evaluation metric of general ability is not reasonable. Simply evaluating the performance of edited models on MMLU can not show the general ability correctly. In Table 2, almost all the methods have the same performance on MMLU. If you want to evaluate the locality of edited models, you need to collect extra data which is close to the edited knowledge.
3.	The proposed method relies on the choice of layers to edit. From Table 7, if we choose different layers, the performance will vary significantly. It is difficult to apply to real-world applications.

[1] Wang H, Liu T, Zhao T, et al. RoseLoRA: Row and Column-wise Sparse Low-rank Adaptation of Pre-trained Language Model for Knowledge Editing and Fine-tuning[J]. arXiv preprint arXiv:2406.10777, 2024.
[2] Gu J C, Xu H X, Ma J Y, et al. Model editing can hurt general abilities of large language models[J]. arXiv preprint arXiv:2401.04700, 2024.

---

confidence: 5
contribution: 3
initial_rating: 5
presentation: 3
questions: - Why does unstructured knowledge contain more information? Intuitively, unstructured knowledge has more grammatical and structural words, which carry low information.
- What is the relationship between LEME and UnKEBench? If LEME and UnKEBench have similar contributions, the statement "the lack of a benchmark for editing unstructured knowledge" in the paper would not hold.
- In "EXPERIMENTS ON STRUCTURED KNOWLEDGE EDITING," why choose KEBench instead of knownedit? How does UnKE perform on knownedit?
soundness: 3
strengths: **Originality:**
- The paper introduces an approach to editing unstructured knowledge within large language models (LLMs), which is a novel contribution to the field.
- The proposal of the Unstructured Knowledge Editing (UnKE) method breaks new ground by extending the scope of knowledge editing beyond traditional structured knowledge.
- The concept of non-local block key-value storage and cause-driven optimization is innovative and addresses a previously unmet need for handling complex, unstructured information.
- The authors have developed a new benchmark dataset, UnKEBench, which provides a way to assess unstructured knowledge editing capabilities.

**Clarity:**
- The paper is well-organized and clearly structured, making it easy for readers to follow the progression of ideas and the logical flow of arguments.

**Significance:**
- The successful editing of unstructured knowledge has broad implications for various applications, including but not limited to information retrieval, question answering, and conversational agents.
- By demonstrating UnKE's effectiveness on both newly proposed and traditional datasets, the paper highlights the potential of the method to impact real-world applications where unstructured knowledge is prevalent.

Overall, the paper is a significant contribution to the field of knowledge editing, particularly in the area of knowledge editing within LLMs.
summary: This paper presents a novel approach to knowledge editing in large language models (LLMs), specifically targeting unstructured knowledge. The authors argue that current knowledge editing methods are limited in their ability to handle the complex and free-from information found in unstructured formats, which constitute a significant portion of real-world knowledge.

The key contributions of this paper are as follows:

1. **Unstructured Knowledge Editing (UnKE) Method**: The authors propose UnKE, a method that extends knowledge editing from structured knowledge to unstructured knowledge. This is a advancement as it addresses the gap in handling the majority of real-world knowledge that is not neatly packaged in structured formats.

2. **Cause-Driven Optimization**: The paper replaces term-driven optimization with a cause-driven approach, which edits the last token directly while preserving context. This avoids the need to locate specific terms and prevents the loss of contextual information, which is a common issue with term-driven methods.

3. **UnKEBench Dataset**: To evaluate the performance of UnKE, the authors develop a new benchmark dataset, UnKEBench, which is designed to be more challenging than existing structured editing benchmarks due to the complexity of unstructured knowledge.

4. **Experimental Results**: The paper demonstrates that UnKE outperforms baselines on the newly proposed UnKEBench dataset, as well as on KEBench. 

5. **Robustness Analysis**: The authors conduct robustness analysis experiments, confirming UnKE's ability to perform batch and sequential editing, and its superiority over baseline models in structured knowledge editing.

In summary, this paper makes a compelling case for the need to extend knowledge editing to unstructured data and provides a robust method and benchmark to facilitate this advancement. The proposed UnKE method shows promising results in accurately handling free-format unstructured knowledge, which is a good step forward for the field of knowledge editing in LLMs.
weaknesses: - Lack of baselines: Although UnKE has demonstrated quite good results, the baselines used for comparison are not the most advanced methods in the field. It would be more convincing if UnKE could be compared with state-of-the-art methods such as WISE, GRACE, and FT-M, and show better results. In particular, UnKE should against with non-term-driven optimization method GRACE for a more fairly comparison.
- Contributions of UnKEBench: First, before UnKEBench, there have already been works on long-form knowledge editing (e.g., LEME[1]), but this is not discussed in the paper. Second, UnKEBench is generated by ChatGPT and lacks steps to ensure data quality, such as human verification.
- Description inconsistent with reality: 
    - The paper hypothesizes that unstructured knowledge is distributed across multiple layers of the language model, but the experiment only edits one layer.
    - The paper claims that UnKE's cause-driven optimization can preserve pre-trained knowledge during the editing process. However, in the experiments, UnKE's ability to retain original knowledge is worse than the baseline (i.e., MMLU in Table 2 and Src-Acc and Tgt-Acc in Table 3).

[1] Rosati D, Gonzales R, Chen J, et al. Long-form evaluation of model editing[J]. arXiv preprint arXiv:2402.09394, 2024.

---

confidence: 5
contribution: 3
initial_rating: 6
presentation: 3
questions: The paper expressed is very clear.
soundness: 3
strengths: Pros
   1. proposed an Unstructured Knowledge Editing(UnKE)  method;
   2. constructed UnKEBench
summary: Based on the analysis of knowledge editing methods for LLMs, this article proposes two hypothesis for unstructured knowledge editing, and a method named Unstructured Knowledge Editing(UnKE)  ,which incorporates non-local block key-value storage and cause-driven optimization, enabling it to effectively represent and edit unstructured knowledge with ease. In order to address the limitations of existing knowledge editing benchmarks, which primarily focus on structured knowledge triples, the paper introduces UnKEBench, and  experimental results on UnKEBench demonstrate the superior performance of UnKE, significantly surpassing powerful baseline models on various evaluation metrics.
weaknesses: The article is fluent in writing and has a complete structure, but some expressions need improvement，for example, in the abstract, there is "unstructure knoledge",etc.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 2
questions: See weakness.
soundness: 3
strengths: 1.	The paper introduces Unstructured Knowledge Editing (UnKE), which addresses the limitations of existing methods by focusing on unstructured knowledge.

2.	The use of a newly proposed dataset (UnKEBench) with traditional datasets provides a strong evaluation.

3.	UnKE extends the method in both layer and token dimensions. It enhances the capacity for knowledge editing.

4.	The paper is generally well-written and easy to follow.
summary: This paper addresses the limitations of current knowledge editing methods in large language models, which primarily focus on structured knowledge. The paper introduces a new method called Unstructured Knowledge Editing (UnKE). A novel dataset for unstructured knowledge editing, UnKEBench, is also proposed.
weaknesses: 1.	The proposed method may be complicated, potentially posing challenges for real-world applications. The authors are suggested to give more details on computational resources and complexity analysis.

2.	The authors used LLAMA2 and QWEN1.5 models for evaluation. Since newer versions of these LLMs have been released, it is better to show the performance of UnKE on newer LLMs.

3.	The authors trimmed too much space. For example, check Figure 2 and Table 1.

4.	While a new benchmark is introduced, the paper might lack the detailed process of data processing and quality control steps, possibly limiting the quality of the benchmark.

Meta-review: This paper introduces UnKE, an innovative method for editing unstructured knowledge in LLMs, addressing the limitations of previous techniques that focused on structured knowledge. By incorporating non-local block key-value storage and cause-driven optimization, UnKE enhances the model's ability to handle complex, unstructured data.

The reviewers raised some questions about the paper's novelty compared to existing methods, the relevance of the newly constructed dataset UnKEBench, and the clarity of the method's input and output processes, particularly in relation to its practical implementation. During the rebuttal, the authors addressed these concerns by clarifying the distinctions between UnKE and previous methods, justifying the construction of UnKEBench, and providing further details on the operational framework of UnKE. The reviewers were generally satisfied with these responses, although they suggested that future work could benefit from broader comparisons with state-of-the-art methods and more rigorous validation of the dataset.

Decision: Accept (Poster)