UniAdapt: A Universal Adapter for Knowledge Calibration

## Abstract

Abstract Large Language Models (LLMs) require frequent updates to correct errors and keep pace with continuously evolving knowledge in a timely and effective manner. Recent research in model editing has highlighted the challenges in balancing generalization and locality, especially in the context of lifelong model editing . We discover that inserting knowledge directly into the model often causes conflicts and potentially disrupts other unrelated pre-trained knowledge. To address this problem, we introduce UniAdapt, a uni versal adapt er for knowledge calibration. Inspired by the Mixture of Experts architecture and Retrieval-Augmented Generation, UniAdapt is designed with a vector-assisted router that is responsible for routing inputs to appropriate experts. The router maintains a vector store, including multiple shards, to construct routing vectors based on semantic similarity search results. UniAdapt is fully model-agnostic and designed for seamless plug-and-play integration. Experimental results show that UniAdapt outperforms existing lifelong model editors and achieves exceptional results in most metrics.

## 1 Introduction

Large Language Models (LLMs) have shown their outstanding abilities in understanding and generating texts, resulting in widespread deployment across various applications with significant social impacts Vaswani (); Radford et al. (). Although LLM is trained with up-to-date and highly accurate data, it still can make mistakes Huang et al. (), generating hallucinated responses. Furthermore, its world knowledge may quickly become out-dated. Due to computational cost, retraining or fine-tuning the model frequently is impractical. This demands a model editor that corrects the errors and keeps pace with continuously evolving knowledge in a timely and effective manner.

In recent years, model editing has emerged as a highly effective method for updating knowledge within LLMs. It aims to insert or update the responses for certain target queries, referred to as edits, while ensuring that responses on unrelated queries remain intact. For instance, ROME Meng et al. () locates and edits knowledge within LLMs. It treats a multi-layer perceptron (MLP) as a key-value store, where the key encodes a subject and the value encodes knowledge about that subject. ROME uses rank-one modification to insert key-value pairs into the MLP module directly. In contrast to ROME, MEND Mitchell et al. () trains a meta-network to edit the target LLM. The meta-network learns to generate parameter updates that adapt the LLM to perform well on a set of tasks, without modifying the original model weights. SERAC Mitchell et al. () takes a different approach. It utilizes an external cache to store edits. Rather than modifying the LLM itself, SERAC retrieves relevant information from the cache to augment the model’s responses when necessary. This allows SERAC to flexibly incorporate new knowledge without directly altering the LLM’s parameters. While these approaches can apply multiple edits sequentially, they often encounter challenges such as over-fitting and a tendency to forget previous edits quickly. In a harder setting, known as lifelong model editing, the editor is expected to insert thousands of edits effectively. Multiple approaches have been proposed. GRACE Hartvigsen et al. () constructs a codebook that caches the edits, enabling longer sequences of edits than prior works. In contrast, WISE Wang et al. () employs a dual parametric memory scheme that consists of a main memory for pre-trained knowledge and a side memory for edited knowledge. It further introduces an activation routing mechanism that determines which memory to access when given a query, thus optimizing the knowledge retrieval process. MEMoE Wang & Li () and LEMoE Wang & Li () introduce an adapter based on the Mixture of Experts (MoE) architecture. Their routing algorithm performs classification based on anchor embeddings, which overlooks the relation in a sentence and thus considers a dataset-specific approach. Despite the extensive effort, existing methods still suffer from either limited success in achieving generalizability (i.e., successfully introducing the new knowledge) or locality (i.e., successfully maintaining the model performance on unrelated knowledge).

To address the above-mentioned problem, we introduce UniAdapt, a universal adapter leveraging the MoE Shazeer et al. (); Fedus et al. () architecture and Retrieval-Augmented Generation (RAG) Lewis et al. (); Sachan et al. (); Asai et al. () for knowledge calibration. UniAdapt edits a model by adding an adapter to the selected MLP layer, never changing the model’s weights. The adapter comprises a vector-assisted router and multiple parallel experts. The core idea is that the router is responsible for routing relevant queries to the corresponding experts. Additionally, if no suitable expert is found, the output of the selected layer remains unaltered to save resources. To achieve this, the vector-assisted router maintains multiple shards of a vector store, storing the sentence embeddings of newly introduced knowledge. When a query is received, the router constructs a routing vector where each element represents the highest semantic similarity score regarding each shard. This routing vector determines which experts are activated to handle the current query. The output of our adapter is combined with the original output to achieve precise calibration. Overall, UniAdapt is a fully model-agnostic, plug-and-play, and cost-effective lifelong model editor.

Our contributions are summarized as follows.

- •
We analyze and identify the weakness of the existing lifelong model editors relying on memory, highlighting opportunities for potential enhancements.
- •
We develop UniAdapt, a lifelong model editor that is designed to route queries to the most relevant experts based on semantic similarity. Our architecture is model-agnostic.
- •
Our experiments show that UniAdapt outperforms existing lifelong model editors by a substantial margin. UniAdapt possesses the ability to memorize and generalize effectively, making it a superior choice for lifelong learning tasks.

## 2 Preliminaries

This section presents an overview of lifelong model editing and reviews state-of-the-art approaches that leverage memory to enhance the editing process. We also introduce common metrics used to evaluate the editor’s performance.

### 2.1 Lifelong Model Editing

The lifelong model editing task Hartvigsen et al. (); Wang et al. () involves making numerous updates to a pre-trained model over time, ensuring that it consistently refreshes its knowledge and stays aligned with the fast-changing information encountered in everyday life. This task modifies an initial base model $f_{\theta_{0}}$, parameterized by $\theta$ at the time step 0 0, using a dataset $D_{\textrm{edit}}=\{(\mathcal{X}_{e},\mathcal{Y}_{e})~{}|~{}(x_{1},y_{1}),
\cdots,(x_{T},y_{T})\}$. Formally, at the time step $T$, the model editor, denoted by ME, inserts the T-th edit into the model $f_{\theta_{T-1}}$ and produces an edited model $f_{\theta_{T}}$. Let $\mathcal{P}(\cdot)$ be a function that rephrases $x$ to a set of semantic equivalent inputs (we assume $x\in\mathcal{P}(x)$). The task of lifelong model editing is defined as follows:

$$ $f_{\theta_{T}}=\textrm{ME}(f_{\theta_{T-1}},x_{T},y_{T})~{}\textrm{s.t.}~{}f_{ \theta_{T}}(x)=\begin{cases}y_{e}&\textrm{ if }x\in\mathcal{P}(x_{e})\wedge(x_ {e},y_{e})\in{D}_{edit}\\ f_{\theta_{0}}(x)&\textrm{ otherwise}.\\ \end{cases}$ (1) $$

The edited model $f_{\theta_{T}}$ should produce a desired output $y_{e}$ for each in-scope input $x\in\mathcal{P}(x_{e})$ and $(x_{e},y_{e})\in{D}_{edit}$, while maintaining the original model’s performance $f_{\theta_{0}}(x)$ on an irrelevant input $(x,y)\in D_{irr}$ where $D_{irr}=\{(x,y)\mid x\notin\mathcal{P}(x_{e}),\forall x_{e}\in\mathcal{X}_{e}\}$. It also preserves knowledge from past edits $(x_{<T},y_{<T})\in D_{\textrm{edit}}$. Additionally, the result of applying $f_{\theta_{T}}$ to $x$ and $\mathcal{P}(x)$ should be identical.

To measure the efficiency of a model editor, the edited model is subject to evaluation using the following metrics.

Reliability: The edited model $f_{\theta_{T}}$ should generate the expected responses on intended edits:

$$ $\displaystyle\mathbb{E}_{(x_{e},y_{e})\in D_{\textrm{edit}}}~{}~{}\mathbbm{1} \{\textrm{argmax}_{y}f_{\theta_{T}}(y\mid x_{e})=y_{e}\}$ (2) $$

Locality: The edited model $f_{\theta_{T}}$ should retain original responses on inputs that are irrelevant to intended edits:

$$ $\displaystyle\mathbb{E}_{(x,y)\in D_{\textrm{irr}}}~{}~{}\mathbbm{1}\{\textrm{ argmax}_{y}f_{\theta_{T}}(y\mid x)=f_{\theta_{0}}(y\mid x)\}$ (3) $$

Generality: The model $f_{\theta_{T}}$ should generalize edits over other semantic equivalent inputs:

$$ $\displaystyle\mathbb{E}_{(x_{e},y_{e})\in D_{\textrm{edit}}}~{}~{}\mathbbm{1} \{\textrm{argmax}_{y}f_{\theta_{T}}(y\mid x)=y_{e}\}~{}\textrm{s.t.}~{}x\neq x _{e}\land x\in\mathcal{P}(x_{e})$ (4) $$

### 2.2 Lifelong Model Editing Using Memory

Multiple recent methods, shown in Table 1, incorporate memories and routing mechanisms to process inputs efficiently. The router is crucial in detecting and forwarding inputs to designated memories. If an input falls inside the scope of the existing edits, the router forwards it to the designated memory, which contains the new knowledge, thereby increasing reliability and generality. Conversely, inputs that fall outside of the edits are routed to the original model, maintaining locality. Due to the importance of the router Zhou et al. (); Dikkala et al. (), we prioritize optimizing routing mechanisms over memory enhancements. In the following, we discuss existing efforts on improving both routing inputs and routing algorithms and justify the design choices that we make for developing our method.

**Table 1: Different routing strategies of recent methods. Parametric memory encodes knowledge within the model’s parameters, whereas retrieval memory stores information in an external memory system for future access. Sentence embeddings preserve the semantic meaning of entire sentences, while activation scores represent the outputs from the activation layers of the neural network. Anchor embedding is formed by combining the embeddings of entities (such as subjects and objects) in a sentence with token embeddings through a concatenation operation.**
| Method | Memory | Router |  |  |
| --- | --- | --- | --- | --- |
| Parametric | Retrieval | Algorithm | Input |  |
| SERAC Mitchell et al. () | \faCheck | \faCheck | Binary classifier | Sentence embedding |
| GRACE Hartvigsen et al. () | \faTimes | \faCheck | Clustering | Activation score |
| WISE Wang et al. () | \faCheck | \faCheck | Activation routing | Activation score |
| MEMoE Wang & Li () | \faCheck | \faTimes | Knowledge anchor | Anchor embedding |
| LEMoE Wang & Li () | \faCheck | \faTimes | Knowledge anchor | Anchor embedding |
| UniAdapt | \faCheck | \faCheck | Vector-assisted routing | Sentence embedding |

Routing Input. Recent research opts for activation scores, sentence embeddings, or anchor embeddings to construct the routing vectors.
In our method, we rely on sentence embeddings over activation scores and anchor embeddings for the following reasons. First, the works Geva et al. (); Dai et al. () discover that activation scores at a specific block capture various patterns (i.e., shallow, semantic, or shallow + semantic). They also suggest that lower blocks capture shallow patterns, while upper blocks capture semantic patterns. However, there is no definitive evidence that the activation scores at any specific layer can effectively capture the complete semantics of the input. Anchor embedding enhances the classification algorithm within the router. However, this approach is dataset-specific. When applied to factual knowledge, anchor embedding overlooks the full sentence context, focusing only on the subject and objects. This may lead to misclassification if the relation between the entities changes. In contrast, sentence embeddings are widely recognized for their ability to compute the semantic similarity of the inputs Reimers (); Gao et al. (); Cer et al. (); Feng et al. (). Second, sentence embeddings are model-agnostic, which means that they remain the same across different target models (i.e., the models that we aim to edit). On the other hand, activation scores and anchor embeddings are model-specific, varying across different target models. This potentially compromises the generalizability of methods that rely on them.

Routing Algorithm. In recent studies, research on the routing algorithms primarily focuses on searching for thresholds for separating relevant and irrelevant input. In the binary classification settings, SERAC defines a single threshold $\beta=0.5$ for any pair of inputs. In multi-class classification settings, the clustering algorithm in GRACE creates multiple pairs of thresholds (i.e., deferral radius $\epsilon$) and corresponding cluster centers (i.e., key $\mathbb{K}_{i}$). For an input $x$, WISE computes its routing activation indicator $\Delta_{x}$ and compares it with a fixed threshold $\epsilon$ to either forward it to the main memory or a side memory. Additionally, the choice of the side memory is determined by the value of $\Delta_{x}$. In our work, we generalize the routing algorithms as a sub-class of MoE where a router aims to forward inputs to relevant experts.

To achieve an effective lifelong model editor, we design a model-agnostic adapter that harnesses the strength of sentence embeddings and the MoE architecture. By employing sentence embeddings, the adapter can capture the semantic meaning of inputs effectively. The MoE architecture operates without altering the model’s parameters, minimizing the potential conflicts with other unrelated pre-trained knowledge and preserving the overall performance.

## 3 Method

In this section, we present the details of UniAdapt, a universal adapter based on the MoE architecture and a vector-assisted routing strategy, as illustrated in Figure 1. UniAdapt is appended immediately after a selected MLP layer to calibrate the output.

### 3.1 UniAdapt Architecture

Figure: Figure 1: The architecture of UniAdapt inspired by MoE architecture. UniAdapt contains a router and multiple parallel feed-forward layers (a.k.a experts), denoted as $FFN_{1},FFN_{2},\cdots,FFN_{k}$. The router maintains a vector store containing multiple shards labeled $S_{1},S_{2},\cdots,S_{k}$. The matching colors of shards and experts indicate that each expert may hold knowledge relevant to queries associated with the shard. In the inference phase, the router computes a routing vector to selectively choose appropriate $FFNs$, ensuring precise calibration of the original MLP’s output (more details in 3.2).
Refer to caption: x1.png

The core idea of UniAdapt is to introduce several MoE-style experts to facilitate knowledge updates and learning, while keeping all the original parameters of LLM frozen to maintain its original behavior. Figure 1 introduces the forward pass of UniAdapt. UniAdapt consists of a router and multiple parallel experts. This module is appended to the original MLP to calibrate the original knowledge. The outputs of all experts are aggregated as a weighted sum to produce the final output. This choice aligns with recent experimental findings based on knowledge probing technologies, i.e., the MLP layers store knowledge Geva et al. (). Unlike traditional MoE, the router has a vector store for sentence embeddings. Given a token $x_{i}$ within the input sequence $x$ = $\{x_{i}\}_{i=1}^{L}$, our adapter with $K$ experts computes a gate decision vector $\mathcal{G}$ that decides which expert to send the token $x_{i}$ to. This is defined as follows.

$$ $\displaystyle\mathcal{G}=\textrm{H}\circ\textrm{Top}_{k}(R(x))$ (5) $$

where $R(\cdot)$ defines a routing strategy (refer to details in 3.2). Note that the router makes the routing decision based on the whole sentence $x$. Consequently, all tokens $x_{i}$ within the sentence $x$ are directed to the same experts. The function $\textrm{Top}_{k}(\cdot)$ keeps only the top-k values and sets all others to zero. The function $H$ is the Heaviside step function that outputs 1 for any non-negative input and 0 otherwise. Once the gate decision vector $\mathcal{G}$ is obtained, the corresponding output $h_{i}$ is generated through a weighted aggregation of each expert’s computation on $x_{i}$, as follows:

$$ $\displaystyle h_{i}=\sum_{k=1}^{K}\mathcal{G}_{k}\cdot W_{k}\cdot x_{i}$ (6) $$

where $W_{k}$ represents the linear projection weights of the $k$-th expert, and the gate decision $\mathcal{G}_{k}$ determines the contribution of the $k$-th expert to the output $h_{i}$. For efficiency, experts with $\mathcal{G}_{k}=0$ do not require computation.

Overall, the forward pass of the UniAdapt layer, combined with the frozen original parameters $W_{0}$, can be expressed as:

$$ $\displaystyle h_{i}=\underbrace{\color[rgb]{0.72,0,0}W_{0}\cdot x_{i}}_{ \textrm{old knowledge}}+\underbrace{\color[rgb]{0,0.5,1}\lambda\sum_{k=1}^{K} \mathcal{G}_{k}\cdot W_{k}\cdot\overbrace{\color[rgb]{0.72,0,0}(W_{0}\cdot x_{ i})}^{\color[rgb]{0,0,0}\textrm{old knowledge}}}_{\textrm{knowledge update}}$ (7) $$

where $\lambda$ is a non-negative weighting coefficient used to balance the old knowledge and the knowledge update. The formula (7) shows that UniAdapt can minimize the knowledge update by setting $\lambda$ close to 0 to retain the original output.

### 3.2 Vector-Assisted Router

The core concept of UniAdapt is that the router has its own vector store to streamline the routing process. Our goal is to direct inputs that share similar knowledge with the edits to the appropriate experts, while inputs unrelated to any edits will bypass expert activation, leaving the output unchanged. To achieve this, we start with training a router to distinguish between related and unrelated inputs using our modified loss function. Once trained, the router’s parameters are frozen. We fine-tune the adapter to incorporate edits using the default loss function of the model. In the following, we introduce the details of the router.

Router Construction. Similar to the existing approaches De Cao et al. (); Mitchell et al. (; ), our vector-assisted router is trained with a dataset. To decide whether an input $x$ is in $\mathcal{P}(x_{e})$ of some edit $x_{e}$, we introduce a threshold $\epsilon$. If the similarity score $\Delta(x,x_{e})\geq\epsilon$, $x$ is considered an in-scope input of $x_{e}$. Otherwise, $x$ is irrelevant to $x_{e}$. Thus, we want the similarity scores of in-scope edits to be larger than out-scope edits by a large margin.

$$ $\displaystyle\textrm{min}\{\Delta(x_{i},x_{e})\}\gg\textrm{max}\{\Delta(x_{o}, x_{e})\},\forall x_{e}\in\mathcal{X}_{e},x_{i}\in\mathcal{P}(x_{e}),x_{o} \notin\mathcal{P}(x_{e})$ (8) $$

Note that when the number of edits increases, we observe that even though the edit $x$ is related to $x_{e}$ and not to $x_{a}$, there are numerous cases where $\Delta(x,x_{e})<\Delta(x,x_{a})$. Therefore, we want to distinguish between in-scope edits of multiple edits. That is,

$$ $\displaystyle\textrm{min}\{\Delta(x_{i},x_{e})\}\gg\textrm{max}\{\Delta(x_{i}, x_{a})\},\forall x_{e}\in\mathcal{X}_{e},x_{a}\in\mathcal{X}_{e}\land x_{a} \neq x_{e},x_{i}\in\mathcal{P}(x_{e})$ (9) $$

To achieve both objectives in (8) and (9), we design a loss that is inspired by the multiple negative ranking loss Henderson et al. (). For a single in-scope edit $x_{e}\in\mathcal{X}_{e}$, we form a batch of $K$ sentence pairs that contain a positive pair $(x_{e},x_{i})$ where $x_{i}\in\mathcal{P}(x_{e})\land x_{i}\neq x_{e}$ and $K-1$ negative pairs $(x_{e},x_{a})$ where $x_{a}\in\mathcal{X}_{e}\land x_{a}\neq x_{e}$. The training goal is to minimize the data’s approximated mean negative log probability. For a single batch, the loss is:

$$ $\displaystyle\mathcal{L}=-\frac{1}{K}\sum_{i=1}^{K}\left[\Delta(x_{e},x_{i})- \textrm{log}\sum_{a=1}^{K-1}e^{\Delta(x_{e},x_{a})}\right]$ (10) $$

The loss aims to maximize the distance between a positive pair and multiple negative pairs. Note that the objective in (8) is typically satisfied by most pre-trained sentence embedding frameworks Reimers (); Gao et al. (). Therefore, fine-tuning them with the loss function in (10) is sufficient to produce accurate similarity scores.

Routing Strategy. Similar to SERAC, we need a memory to store the edits to make semantic similarity queries. Unlike SERAC, we aim to store sentence embeddings (rather than the sentences themselves) in a vector store, both to reduce memory usage and to ensure compatibility with a wide range of frameworks Douze et al. (); Johnson et al. (). An example illustrating the functionality of the router is shown in Figure 2.

We have multiple experts to handle input queries. A router is used to distribute the input queries, and only a few experts are activated to enhance knowledge capacity Wang et al. (). To efficiently utilize these experts, we would like to dynamically route inputs to the most relevant experts and balance the number of edits calibrated by each expert. To achieve this goal, we propose a vector store sharding mechanism. We equally divide the embeddings of $N$ edits into $K$ shards, each shard stores around $N/K$ embeddings where $K$ is the number of experts. Given an input $x=\{x_{i}\}_{i=0}^{L}$ and a shard $S_{k}$, the router computes the routing score for each shard as follows:

$$ $\displaystyle\alpha_{k}=\textrm{max}\{\Delta(x,x_{e})~{}|~{}\forall x_{e}\in S _{k}\}-\epsilon$ (11) $$

where $\epsilon$ is a non-negative threshold derived from the router construction step. The routing score is in the range $[-1,1]$, if $\alpha_{k}$ is close to $1$ then the input is the most similar to the shard $S_{k}$ and the router likely activates the expert $E_{k}$ to handle the input. If $\alpha_{k}\leq 0$ the expert $E_{k}$ is deactivated to reduce resource consumption. Given the routing scores for all shards, the decision vector is formed as follows:

$$ $\displaystyle R(x)=(\alpha_{1},\dots,\alpha_{j},\dots,\alpha_{K})$ (12) $$

Figure: Figure 2: An example of the router’s functionality, similar to a retriever in RAG. Instead of retrieving related documents, the router computes decision vectors based on the similarity scores. The similarity scores [1.0, 0.4, 0.3] indicate that there are three shards. The first shard has the highest similarity score thus the answer will be stored in expert 1 (also known as FFN1).
Refer to caption: x2.png

## 4 Experiments

In this section, we first present our experimental setup. Then, we discuss the performance of our method on two settings: single editing and lifelong editing.

### 4.1 Experiment Setups

Datasets and Metrics. We use two prominent model editing datasets: zsRE Levy et al. () and Counterfact Meng et al. () for performance evaluation. zsRE is a context-free Question-Answering (QA) dataset built upon zero-shot relation extraction. Counterfact is a more challenging dataset containing factual knowledge with diverse subjects, relations, and linguistic variations. We evaluate the capability of UniAdapt using Reliability, Generality, and Locality (defined in Sect 2.1) along with the average scores over these metrics. Specifically, each edit record contains an editing pair $(x_{e},y_{e})$ along with a related edit $x_{r}$ and an unrelated edit $x_{o}$. The Reliability assesses if the edited model can recall the response $y_{e}$ from $x_{e}$. The Generality evaluates whether the edited model can produce $y_{e}$ given $x_{r}$. The Locality measures whether the edited model produces a consistent response for $x_{r}$ both before and after the edit.

Baselines. We compare UniAdapt with multiple recently proposed baselines. We categorize them into non-memory based methods including FT-L Meng et al. (), MEND Mitchell et al. (), MEMIT Meng et al. () and memory-based methods including SERAC Mitchell et al. (), GRACE Hartvigsen et al. (), WISE Wang et al. (). Note that we exclude the results of
MEMoe Wang & Li () and LEMoE Wang & Li (), as their source code has not yet been made available.

FT-L is a direct fine-tuning method that aims to limit the extent of weight modifications. MEND is a meta-learning method that learns auxiliary models to predict weight changes in the editing model. MEMIT inserts thousands of key-value pairs into multiple layers of the network by considering a feed-forward layer as linear associative memory.

SERAC uses external memory to explicitly cache the edits and route an input query to either the counterfact model or the original model. GRACE replaces the hidden states of inputs if its activation scores fall inside a cluster of a codebook. WISE routes an input query to either side memories or the main memory using activation scores.

Implementation Details: We apply our edits to GPT2-XL and LLaMA2-7B. Our router is built on top of SBERT Reimers & Gurevych () for similarity scores computation. We opt for two tasks: single editing and lifelong editing tasks. For single editing, following Meng et al. (), the batch size is set to 5, we evaluate edits and roll back to the initial state after each batch of edits. For lifelong editing, the batch size is set to 5. We insert 1000 edits and evaluate without rolling back. For the baselines, WISE is only implemented for LLaMA2-7B and MEMIT is only implemented for GPT2-XL.

### 4.2 Main Results

**Table 2: Main editing results with the number of edits $T\!=\!1$. Bold is the best result, and underline is the second-best result.**
| Method | Model | ZsRE | Counterfact |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Reliability↑ | Generality↑ | Locality↑ | Score↑ | Reliability↑ | Generality↑ | Locality↑ | Score↑ |  |  |
| GRACE | GPT2-XL | 0.34 | 0.00 | 1.00 | 0.45 | 0.00 | 0.00 | 1.00 | 0.33 |
| FT | 0.57 | 0.30 | 0.88 | 0.58 | 0.93 | 0.16 | 0.73 | 0.61 |  |
| MEMIT | 0.65 | 0.50 | 1.00 | 0.72 | 0.62 | 0.24 | 0.99 | 0.62 |  |
| SERAC | 0.43 | 0.29 | 0.85 | 0.52 | 0.44 | 0.01 | 0.95 | 0.47 |  |
| MEND | 0.07 | 0.07 | 0.99 | 0.37 | 0.00 | 0.00 | 0.97 | 0.32 |  |
| UniAdapt | 1.00 | 0.99 | 1.00 | 1.00 | 1.00 | 0.96 | 0.98 | 0.98 |  |
| GRACE | LLaMA2-7B | 0.97 | 0.00 | 0.34 | 0.44 | 1.00 | 0.00 | 0.78 | 0.59 |
| FT | 0.55 | 0.47 | 0.86 | 0.63 | 0.45 | 0.25 | 0.28 | 0.33 |  |
| SERAC | 0.52 | 0.41 | 1.00 | 0.64 | 0.45 | 0.12 | 1.00 | 0.52 |  |
| MEND | 0.07 | 0.06 | 0.87 | 0.33 | 0.03 | 0.03 | 0.88 | 0.31 |  |
| WISE | 1.00 | 0.94 | 1.00 | 0.98 | 1.00 | 0.76 | 1.00 | 0.92 |  |
| UniAdapt | 0.97 | 0.96 | 1.00 | 0.98 | 0.97 | 0.95 | 0.98 | 0.97 |  |

Single Editing. We evaluate the performance of UniAdapt in the single editing setting, $T$=$1$, and compute the average of 1000 runs. The evaluation results are shown in Table 2. We observe that UniAdapt consistently outperforms baselines across all tested models and most metrics. The results are balanced as it achieves scores of at least $0.97$ in all metrics. In the zsRE setting, UniAdapt achieves scores of 1.00 and 0.98 on GPT2-XL and LLaMA2, respectively, achieving improvements of 28% and 0% over the second-best competitor. Similarly, the improvements are 36% and 5% in the Counterfact setting. A closer investigation shows that other tools often sacrifice their generality to achieve higher locality. GRACE and MEND achieve 0.0 in generality but 1.0 in the locality within the zsRE setting of GPT2-XL. Overall, this result demonstrates the efficacy and stability of UniAdapt’s capability on handling a hard dataset (i.e., Counterfact).

Although the results of UniAdapt vary across different datasets like other baselines, it demonstrates consistent performance across different model architectures. Specifically, the difference remains below 3% in all metrics and under 2% in the average score. For the average score, the discrepancies in GRACE, FT, and SERAC range from 1% to 28%. FT is considered the least stable tool as its difference is 28%. In summary, the results indicate that UniAdapt not only achieves the highest scores but also maintains stability across diverse models.

**Table 3: Main editing results with the number of edits $T$=$1000$. Bold is the best result, and underline is the second-best result.**
| Method | Model | ZsRE | Counterfact |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Reliability↑ | Generality↑ | Locality↑ | Score↑ | Reliability↑ | Generality↑ | Locality↑ | Score↑ |  |  |
| GRACE | GPT2-XL | 0.34 | 0.00 | 1.00 | 0.45 | 0.00 | 0.00 | 0.99 | 0.33 |
| FT | 0.07 | 0.05 | 0.02 | 0.05 | 0.19 | 0.07 | 0.00 | 0.09 |  |
| MEMIT | 0.51 | 0.45 | 0.31 | 0.42 | 0.82 | 0.55 | 0.05 | 0.47 |  |
| SERAC | 0.19 | 0.19 | 0.85 | 0.41 | 0.00 | 0.00 | 0.96 | 0.32 |  |
| MEND | 0.21 | 0.20 | 0.99 | 0.47 | 0.00 | 0.00 | 0.99 | 0.33 |  |
| UniAdapt | 0.98 | 0.93 | 1.00 | 0.97 | 0.98 | 0.53 | 0.91 | 0.81 |  |
| GRACE | LLaMA2-7B | 0.98 | 0.01 | 0.34 | 0.44 | 0.99 | 0.00 | 0.77 | 0.59 |
| FT | 0.16 | 0.14 | 0.04 | 0.11 | 0.04 | 0.01 | 0.01 | 0.02 |  |
| SERAC | 0.36 | 0.35 | 1.00 | 0.57 | 0.15 | 0.12 | 1.00 | 0.42 |  |
| MEND | 0.29 | 0.29 | 0.85 | 0.48 | 0.15 | 0.12 | 0.96 | 0.41 |  |
| WISE | 0.83 | 0.77 | 1.00 | 0.87 | 0.42 | 0.26 | 0.64 | 0.44 |  |
| UniAdapt | 0.96 | 0.80 | 1.00 | 0.92 | 0.99 | 0.57 | 0.94 | 0.83 |  |

Lifelong Editing. We evaluate the performance of UniAdapt in the lifelong editing setting, $T$=$1000$. The evaluation results are shown in table 3. The results clearly show a decline in the performance across all methods as $T$ increases from 1 to 1000. For example, FT and MEMIT experience a drop of over 50% and 20% respectively in almost all settings. This is attributed to the fact that new edits tend to overwrite previous ones. Among these methods, UniAdapt shows a negligible decline on the easier zsRE, and a significant advantage in terms of generalizing ability on Counterfact. A further analysis reveals that UniAdapt significantly outperforms the nearest competitor by a large margin. In the GPT2-XL setting, UniAdapt has a remarkable gap of around 40% over MEMIT on the zsRE dataset. In the LLaMA2-7B setting, UniAdapt proves to be the best with around 40% difference compared to WISE in the Counterfact dataset. In both datasets, our overall score is the highest, significantly outperforming the other methods. Furthermore, while the lifelong editing setting has proved to be more challenging than the single editing setting, UniAdapt maintains impressive stability across models. The difference remains below 7% in all metrics and under 5% in the average score. In summary, UniAdapt excels at learning extensive new knowledge while preserving other unrelated pre-trained knowledge.

### 4.3 Ablation Studies

In this section, we examine the effects of various hyper-parameters on the performance of UniAdapt. Given that zsRE has been extensively evaluated in numerous studies, we have implemented lifelong editing settings on the zsRE dataset with LLaMA2-7b.

Figure: (a) Effect of Target Layer
Refer to caption: extracted/5892055/images/target_layer.png

Effect of the Target Layer. We conduct multiple experiments to assess the impact of the choice of target layer on the performance. We sequentially append UniAdapt to the MLP module of each transformer block and evaluate the performance of UniAdapt with 1000 edits. The results are illustrated in Figure 3 across various target layers. While locality remains stable, both reliability and generality encounter significant fluctuations, peaking at layer 3 and reaching their lowest point at the final layer. Our finding aligns with the work Zhao et al. () that confirms the importance of editing the model at layer 3. Notably, regardless of the layer modified, generality consistently hits the lowest accuracy among all metrics, indicating that it is the most challenging metric to improve. Overall, performance tends to decline sharply as the target layer approaches the last layer.

Effect of the Number of Experts. We perform multiple experiments to study how the number of experts impacts the performance. Due to computational resource limitations, we sequentially set the number of experts to values in the range $[1\textendash 10]$ and evaluate UniAdapt’s performance with 1000 edits. Figure 3 illustrates the performance of UniAdapt with different numbers of experts. We find that the locality of model editing does not change with the number of experts, i.e., there is neither a decrease nor a performance improvement. This is expected because only relevant inputs are forwarded to experts. The reliability exhibits slight fluctuation (i.e., going upward and then downward) when the number of experts increases. Furthermore, it consistently remains above 0.95 across all scenarios. Unlike reliability and locality, the generalization of knowledge fluctuates with the number of experts, peaking when the number of experts is 4, i.e., increasing the number of experts initially boosts overall performance, but eventually leads to a decline. We hypothesize that the reason is that while having more experts can enhance recall by providing specialized knowledge, it may also make it more challenging for the router to effectively choose the most suitable experts.

Effect of $\epsilon$. We conduct multiple experiments to evaluate the impacts of $\epsilon$ on the performance. We sequentially set the $\epsilon$ to values in the range $[0.1\textendash 0.9]$ and evaluate UniAdapt’s performance after 1000 edits. Figure 3 depicts the performance of UniAdapt across various $\epsilon$. The results show that $\epsilon$ has little impact on the reliability and generality. In contrast, locality increases sharply as $\epsilon$ is raised from 0.1 to 0.6. This can be attributed to the behavior of the router at low $\epsilon$ values. With a low $\epsilon$, the router tends to misclassify unrelated inputs, while relevant inputs remain unchanged. As $\epsilon$ increases, the router becomes more selective and only forwards inputs that are highly likely to be relevant, leading to higher locality.

Effect of top-k routing. We conduct multiple experiments to evaluate the impacts of top-k routing on UniAdapt’s performance. We sequentially set $K$ to values in the range $[1\textendash 5]$, fix the number of experts at 5, and evaluate our performance after 1000 edits. Figure 3 depicts the performance of UniAdapt across various $K$. The results show that the locality remains unchanged across the different $K$ values.
However, reliability and generality consistently decrease as $K$ increases. This suggests that while top-k routing does not impact locality, it hurts reliability and generality as the number of routing options increases. Interestingly, the best overall performance is achieved when $K$=$1$, indicating that using a single optimal routing path leads to the highest reliability and generality. As $K$ increases, the UniAdapt becomes less focused and may allocate resources to less relevant routing options, leading to decreased performance in terms of reliability and generality.

Scale up to 6K. We conduct multiple experiments to assess the capability of UniAdapt on handling long continual edits. We sequentially scale the number of edits to $2000$, $3000$, and $6000$ and report our results along with WISE (the second-best competitor in our experiments) in Table 4. From the results, we observe that UniAdapt remains the best editor. WISE experiences a significant decline in both generality and reliability, dropping from 0.64 to 0.48 and 0.70 to 0.50 respectively. This is expected because WISE tends to incorrectly select the side memory when the number of edits increases. UniAdapt experiences a slight decrease of less than 0.02 in both metrics. Overall, the results highlight UniAdapt’s exceptional performance on handling long continual edits, which makes it a practical solution.

**Table 4: Scaling to 6000 edits on zsRE dataset with LLaMA2-7b**
| Method | T | Reliability↑ | Generality↑ | Locality↑ | Score↑ |
| --- | --- | --- | --- | --- | --- |
| WISE | 2000 | 0.70 | 0.64 | 1.00 | 0.78 |
| UniAdapt | 0.97 | 0.80 | 0.99 | 0.92 |  |
| WISE | 3000 | 0.64 | 0.58 | 1.00 | 0.74 |
| UniAdapt | 0.96 | 0.77 | 0.99 | 0.91 |  |
| WISE | 6000 | 0.50 | 0.48 | 1.00 | 0.66 |
| UniAdapt | 0.95 | 0.79 | 0.98 | 0.90 |  |

## 5 Related Work

Lifelong model editing is an active research area with many attempts Wang et al. (); Meng et al. (); Yu et al. () demonstrating encouraging results. Recently, MoE gained significant research attention for enhancing the performance of large language models. They have shown their potential in various applications. In the following, we highlight some of the most relevant works.

Model editing. UniAdapt is related to model editing which aims to update knowledge of pre-trained LLMs. Instead of retraining the model which is infeasible, the task of model editing is to fine-tune the model by either directly modifying the model parameters or dynamically loading new knowledge from external storage. MEND Mitchell et al. () trains a meta-network that modifies the parameters of the target model. ROME Meng et al. () insert key-value pairs into a layer of a feed-forward layer by considering the layer as linear associative memory. While MEND and ROME are effective, they suffer from low locality. To address this, SERAC Mitchell et al. () employs a router mechanism that directs inputs to the appropriate model (i.e., either the new model or the original model). IKE Zheng et al. () teaches the targeted model to revise the output with high-quality demonstrations. Both SERAC and IKE achieve comparable results to MEND and ROME.

Lifelong model editing. UniAdapt is closely related to lifelong model editing, where thousands of edits are inserted continually. MEMIT Meng et al. () extends ROME to insert thousands of key-value pairs. GRACE Hartvigsen et al. () assigns knowledge into multiple clusters, allowing the system to query and apply appropriate patches when needed. MELO Yu et al. () extends GRACE by using dynamic Lora to store patches. WISE Wang et al. () relies on activation scores to route inputs to either the main memory or side memory. Overall, these tools employ a routing mechanism, except for MEMIT. Both MEMoE Wang & Li () and LEMoE Wang & Li () rely on anchor embeddings to distribute tokens to the corresponding experts.

Spare Mixture of Experts (SMoE). UniAdapt is closely related to SMoE, where a gate network or router is responsible for dispatching tokens to a subset of experts. The work Fedus et al. () introduces an approach named switch transformer to scale neural networks up to a trillion parameters. It selectively activates relevant experts for each input.  Shazeer et al. () features a trainable gating network to optimize expert selection.

## 6 Conclusion

In this work, we present UniAdapt, a universal adapter for knowledge calibration. UniAdapt is fully model-agnostic and designed for seamless plug-and-play integration. It has MoE-style architecture and is attached to the MLP layer to calibrate the original output. The router with multiple shards can precisely forward queries to the experts that store knowledge and make no modifications when the queries are irrelevant. The experimental results show that UniAdapt achieves the significantly improved performance on various models and datasets.

## Appendix A Appendix

### A.1 Description of Datasets

We utilized two standard datasets: zsRE Levy et al. () and Counterfact Meng et al. (). Table 5 illustrates examples from these datasets, where each row has three pairs: ($x_{e},y_{e}$), $(x_{irr},y_{irr})$ and ($\mathcal{P}(x_{e}),y_{e}$) for the evaluation. ZsRE is a context-free Question-answering (QA) dataset containing factual information. In contrast, Counterfact focuses on counterfactual information. Compared to zsRE, the Counterfact dataset is considered more challenging to apply, as it attempts to erase the model’s existing contradictory information. Consequently, it often yields lower accuracy. In our experiments with these datasets, we adopt the version proposed by Yao et al. ()

**Table 5: Editing dataset example**
| # | zsRE | Counterfact |
| --- | --- | --- |
| $x_{e},y_{e}$ | Which college or university is related with Mobolaji Johnson? Royal Military Academy Sandhurst | The native language of Francis Jammes is German |
| $x_{irr},y_{irr}$ | nq question: where were the olympics held in the 1980s? Moscow, Soviet Union | The mother tongue of Frédéric Bastiat is French |
| $\mathcal{P}(x_{e}),y_{e}$ | Which university or university is associated with Mobolaji Johnson? Royal Military Academy Sandhurst | Where Francis Jammes is from, people speak the language of German |

### A.2 Training Details

In our reported results in Table 2 and Table 3, UniAdaptis reported with the following hyper-parameters: number of experts = 1, $\epsilon$ = 0.6, TopK = 1, edited layer = 0, and number of epochs to train the adapter = 25. It is worth noting that this configuration is not our best — our optimal setup uses an edited layer of 3 and 4 experts.

### A.3 Additional Experiments

In general, an adapter’s effectiveness heavily depends on the layers selected for editing. Choosing the right layer for a specific dataset is crucial to achieving high accuracy. In addition to the results presented in the main content, we explored modifying different layers of two primary models: GPT2-XL and LLaMA2-7B, to identify the optimal layer for editing. Table 6 shows that for GPT2-XL, layer 16 achieves the highest score of 0.83, with layers 1 and 17 tying for second at 0.82. For LLaMA2-7B, layer 4 performs best, followed closely by layer 3. Overall, the best layer for editing varies between models. However, layer 0 emerges as a reliable choice, consistently yielding relatively high accuracy across models. Moreover, earlier layers typically yield better results than later ones.

**Table 6: Counterfact dataset. Editing performance across all layers**
|  | GPT2-XL | LLaMA2-7B |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Layer | Reliability↑ | Generality↑ | Locality↑ | Score↑ | Reliability↑ | Generality↑ | Locality↑ | Score↑ |
| 0 | 0.98 | 0.53 | 0.91 | 0.81 | 0.99 | 0.57 | 0.94 | 0.83 |
| 1 | 1.00 | 0.55 | 0.91 | 0.82 | 1.00 | 0.70 | 0.94 | 0.88 |
| 2 | 1.00 | 0.50 | 0.91 | 0.80 | 1.00 | 0.77 | 0.94 | 0.90 |
| 3 | 1.00 | 0.35 | 0.91 | 0.75 | 1.00 | 0.79 | 0.94 | 0.91 |
| 4 | 1.00 | 0.47 | 0.91 | 0.80 | 0.98 | 0.83 | 0.94 | 0.92 |
| 5 | 1.00 | 0.27 | 0.91 | 0.73 | 0.98 | 0.72 | 0.94 | 0.88 |
| 6 | 0.82 | 0.24 | 0.91 | 0.66 | 0.99 | 0.68 | 0.94 | 0.87 |
| 7 | 1.00 | 0.41 | 0.91 | 0.77 | 0.96 | 0.65 | 0.94 | 0.85 |
| 8 | 1.00 | 0.47 | 0.91 | 0.79 | 0.99 | 0.62 | 0.94 | 0.85 |
| 9 | 1.00 | 0.52 | 0.91 | 0.81 | 0.99 | 0.56 | 0.94 | 0.83 |
| 10 | 1.00 | 0.51 | 0.91 | 0.81 | 0.88 | 0.33 | 0.94 | 0.72 |
| 11 | 1.00 | 0.53 | 0.91 | 0.81 | 0.98 | 0.47 | 0.94 | 0.80 |
| 12 | 1.00 | 0.46 | 0.91 | 0.79 | 0.98 | 0.51 | 0.94 | 0.81 |
| 13 | 1.00 | 0.43 | 0.91 | 0.78 | 0.94 | 0.43 | 0.94 | 0.77 |
| 14 | 0.94 | 0.42 | 0.91 | 0.76 | 0.99 | 0.45 | 0.94 | 0.79 |
| 15 | 1.00 | 0.42 | 0.91 | 0.78 | 0.95 | 0.35 | 0.94 | 0.75 |
| 16 | 1.00 | 0.57 | 0.91 | 0.83 | 0.99 | 0.49 | 0.95 | 0.81 |
| 17 | 1.00 | 0.55 | 0.91 | 0.82 | 0.93 | 0.38 | 0.94 | 0.75 |
| 18 | 1.00 | 0.37 | 0.91 | 0.76 | 0.99 | 0.45 | 0.94 | 0.80 |
| 19 | 1.00 | 0.53 | 0.91 | 0.81 | 0.96 | 0.41 | 0.94 | 0.77 |
| 20 | 1.00 | 0.39 | 0.91 | 0.77 | 0.99 | 0.47 | 0.94 | 0.80 |
| 21 | 1.00 | 0.33 | 0.91 | 0.75 | 0.97 | 0.42 | 0.94 | 0.78 |
| 22 | 1.00 | 0.53 | 0.91 | 0.81 | 0.98 | 0.42 | 0.94 | 0.78 |
| 23 | 1.00 | 0.40 | 0.91 | 0.77 | 0.99 | 0.46 | 0.94 | 0.80 |
| 24 | 1.00 | 0.53 | 0.91 | 0.81 | 0.99 | 0.47 | 0.94 | 0.80 |
| 25 | 1.00 | 0.36 | 0.91 | 0.76 | 0.96 | 0.42 | 0.94 | 0.78 |
| 26 | 1.00 | 0.48 | 0.91 | 0.80 | 0.97 | 0.42 | 0.94 | 0.78 |
| 27 | 1.00 | 0.46 | 0.91 | 0.79 | 0.96 | 0.39 | 0.94 | 0.76 |
| 28 | 0.98 | 0.45 | 0.91 | 0.78 | 0.88 | 0.32 | 0.94 | 0.72 |
| 29 | 0.53 | 0.16 | 0.91 | 0.54 | 0.99 | 0.42 | 0.94 | 0.78 |
| 30 | 0.99 | 0.40 | 0.91 | 0.77 | 0.87 | 0.32 | 0.94 | 0.71 |
| 31 | 1.00 | 0.47 | 0.91 | 0.80 | 0.70 | 0.30 | 0.94 | 0.65 |
| 32 | 1.00 | 0.33 | 0.91 | 0.75 |  |  |  |  |
| 33 | 1.00 | 0.29 | 0.91 | 0.73 |  |  |  |  |
| 34 | 1.00 | 0.30 | 0.91 | 0.74 |  |  |  |  |
| 35 | 0.99 | 0.26 | 0.91 | 0.72 |  |  |  |  |
| 36 | 0.97 | 0.28 | 0.91 | 0.72 |  |  |  |  |
| 37 | 0.98 | 0.28 | 0.91 | 0.72 |  |  |  |  |
| 38 | 0.99 | 0.26 | 0.91 | 0.72 |  |  |  |  |
| 39 | 0.91 | 0.20 | 0.91 | 0.68 |  |  |  |  |
| 40 | 0.95 | 0.25 | 0.91 | 0.70 |  |  |  |  |
| 41 | 0.92 | 0.22 | 0.91 | 0.68 |  |  |  |  |
| 42 | 0.94 | 0.21 | 0.91 | 0.69 |  |  |  |  |
| 43 | 0.93 | 0.21 | 0.91 | 0.69 |  |  |  |  |
| 44 | 0.89 | 0.20 | 0.91 | 0.67 |  |  |  |  |
| 45 | 0.91 | 0.22 | 0.91 | 0.68 |  |  |  |  |
| 46 | 0.93 | 0.21 | 0.91 | 0.68 |  |  |  |  |
| 47 | 0.82 | 0.17 | 0.91 | 0.63 |  |  |  |  |

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 6
presentation: 3
questions: Please refer to the previous section.
soundness: 3
strengths: 1. Lifelong model editing for LLMs is a promising research direction. The concept is crucial for developing LLM that can continually learn and adapt without requiring full retraining.

2. The experimental results demonstrate the effectiveness of the UniAdapt framework. By integrating a Mixture of Experts with the idea of  RAG, the paper shows improvements in model adaptability and performance on benchmarks designed to test these aspects.
summary: The main contribution of the paper is the development of UniAdapt, a universal adapter for lifelong model editing in Large Language Models (LLMs) that efficiently integrates new knowledge. The pursuit of lifelong model editing for LLMs is highly pertinent given the growing demand for adaptable AI systems. The concept is crucial for developing models that can continually learn and adapt without requiring full retraining.UniAdapt uses semantic similarity to route queries to the appropriate experts, significantly improving the model’s ability to adapt and generalize over traditional methods.
weaknesses: **Weakness 1**

The core motivation, as stated in the abstract:
>“We discover that inserting knowledge directly into the model often causes conflicts and potentially disrupts other unrelated pre-trained knowledge”

This motivation lacks novelty as reducing the disruption to pre-trained knowledge while inserting new information is a foundational objective of the entire knowledge editing field (*measured by the locality metric*), as extensively discussed in foundational papers such as “Fast Model Editing at Scale.”



**Weakness 2**

The paper’s primary contribution is applying the concept of a Mixture of Experts to the knowledge editing field. While technically sound, this application does not introduce many new insights into the field. Moreover, the implementation is described as complex and the overall concept may not engage the community due to its incremental nature rather than a groundbreaking innovation.


While the paper presents valid improvements in certain performance metrics for the chosen datasets, the novelty is somewhat limited, and the implementation is not elegant. Considering the high standards of ICLR, the paper could be seen as a borderline case. My overall score would be 5.5, reflecting a neutral to slightly positive evaluation but acknowledging the concerns regarding novelty and implementation complexity.

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 3
questions: See above.
soundness: 3
strengths: 1. UniAdapt's plug-and-play nature allows it to integrate with various LLMs without altering their original parameters, making it an adaptable and versatile solution for different base models.

2. By combining MoE with a vector-assisted router, UniAdapt selectively routes updates to specific ``experts'', effectively preserving existing knowledge while incorporating new information. This selective routing maintains a balance between reliability and generality.

3. The paper provides experimental evidence to show that UniAdapt performs better than baseline methods. UniAdapt performs well in datasets like zsRE and Counterfact.
summary: The paper presents a novel approach to updating LLMs with new information without compromising existing knowledge. Traditional model-editing techniques often disrupt previous knowledge or fail to generalize well. UniAdapt addresses this by introducing a MoE architecture combined with a vector-assisted router, which selectively directs relevant queries to specific ``experts'' based on semantic similarity. This method allows seamless updates without altering the model’s core parameters, preserving unrelated knowledge effectively.

Experimental results on datasets such as zsRE and Counterfact demonstrate UniAdapt’s reliability in handling updates, generalizing edits, and maintaining unrelated knowledge compared to other methods. By keeping model stability high across thousands of sequential edits, UniAdapt emerges as a scalable, model-agnostic solution for maintaining LLMs with up-to-date knowledge, ideal for lifelong learning in dynamic environments.
weaknesses: 1. The experiments were limited to GPT2-XL and LLaMA2-7B, which may not be sufficient to generalize the results. It would be helpful to include results on state-of-the-art LLMs across a range of model sizes (e.g., 13B and 70B) for more comprehensive insights.

2. Regarding the effect of the target layer, it would be interesting to explore the effects of editing multiple layers simultaneously. Since layer behaviors might differ across models, further investigation on other models would be valuable to confirm similar patterns. Without this, the generalizability of the findings may be constrained.

3. UniAdapt's vector-assisted routing adds complexity, which may increase computational overhead. It would be beneficial to provide cost analysis for both training and inference.

---

confidence: 5
contribution: 2
initial_rating: 5
presentation: 3
questions: The author states that the proposed method primarily aims to address the conflicts caused by directly inserting knowledge into the model. Which experimental result in the paper demonstrates the mitigation of this issue?
soundness: 3
strengths: UniAdapt is fully model-agnostic and designed for seamless plug-and-play integration.
summary: This paper proposes  a universal adapter for knowledge calibration (UniAdapt). The experimental results show that UniAdapt achieves the significantly improved performance on various models and datasets.
weaknesses: The experimental analysis is not sufficiently thorough:

 - There is no analysis of the resource consumption of different methods, such as inference time and memory usage.
 -  The baselines are inconsistent across different vanilla models. Specifically, in Table 2, different base models use different baselines—for example, WISE is only applied to LLaMA2-7B, and MEMIT only to GPT2-XL. Why did the author choose this experimental setup?
 -  There is a lack of Out-of-Distribution evaluation.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 2
questions: - When scaling up to 6k, what's the MoE setting such as the TopK and number of the experts.
soundness: 3
strengths: 1. The experimental results are compelling, showing that UniAdapt outperforms existing lifelong model editors. The paper provides detailed metrics and comparisons, demonstrating the adapter's ability to memorize and generalize effectively.
summary: The paper addresses the challenge of updating and maintaining Large Language Models (LLMs) in a timely and effective manner.  To mitigate the lifelong editing problem, they introduce UniAdapt, a universal adapter designed for knowledge calibration. UniAdapt leverages a Mixture of Experts (MoE) architecture and Retrieval-Augmented Generation (RAG) to route inputs to the most relevant experts based on semantic similarity. The router maintains a vector store with multiple shards to construct routing vectors, ensuring precise calibration of the model's output. The adapter is designed to be fully model-agnostic and plug-and-play, making it versatile for various LLMs. Experimental results demonstrate that UniAdapt outperforms existing lifelong model editors in most metrics, showcasing its effectiveness in balancing generalization and locality.
weaknesses: - The citation format in the paper is not correct, making the reading difficult.
- The baseline is not comprehensive, the author just compared it with the WISE but other MoE methods like MEMoE and LEMoE are not considered. I think this would weaken the discussion in Table 1 and the contribution of the work as MoE is not a novel thing and the contribution should be more clear.
- The vector store here would be extra parameters and when the number of edits grows this would lead to more memory requirement and time computing, which makes me concerned about the efficiency of the proposed method. It's better to show an Inference Time Analysis.

Meta-review: The main contribution of this paper is the development of UniAdapt, a universal adapter for lifelong model editing in Large Language Models (LLMs) that efficiently integrates new knowledge. The concept of lifelong model editing is highly relevant given the increasing demand for adaptable AI systems. This approach is crucial for developing models that can continuously learn and adapt without requiring full retraining. UniAdapt leverages semantic similarity to route queries to the appropriate experts, significantly enhancing the model's ability to adapt and generalize compared to traditional methods. However, the core motivation about reducing conflicts when inserting new knowledge into the model is not novel, as it has already been a key objective in the knowledge editing field, particularly addressed by foundational work like "Fast Model Editing at Scale." The application of the Mixture of Experts concept to knowledge editing is new but does not introduce  new insights. The contribution feels incremental, and the implementation is described as complex, potentially limiting its appeal to the community. It is recommended that the author revise the paper according to the reviewers' suggestions and include additional experiments.

Decision: Reject