Introduction
Large language models (LLMs) like BERT and T5 function as massive implicit knowledge bases, storing facts within their parameters. However, updating this knowledge—for instance, correcting outdated information or removing sensitive data—remains a significant challenge. Standard fine-tuning often leads to "catastrophic forgetting," where the model loses previously learned information while attempting to incorporate new facts. This paper investigates a formal task for "modifying memories": updating specific factual knowledge without degrading overall model performance.
Methodology: Constrained Fine-tuning
The authors approach knowledge modification as a constrained optimization problem. The objective is to minimize loss on modified facts while ensuring model weights $\theta$ do not deviate excessively from their original state $\theta_0$.
The primary technique employed is Constrained Fine-tuning. Specifically, the researchers found that applying an $\ell_\infty$ norm constraint ($\|\theta - \theta_0\| \le \delta$)—limiting the maximum change for any individual weight—yielded the most stable results. To implement this, they used Projected Gradient Descent (PGD) with a modified Adam optimizer, projecting weights back into the valid constraint region after each update step.
Furthermore, the study explores Layer-wise Modification, targeting specific Transformer blocks rather than the entire network. This is compared against models with explicit memory modules, such as "Facts as Expert" (FaE), to determine if architectural changes are necessary for efficient editing.
Experimental Setup
The researchers adapted the T-REx and zsRE (Zero-shot Relation Extraction) datasets to create benchmarks for fact modification. These datasets involve changing the "object" of specific facts and providing multiple phrasings (evidences) to ensure the model learns the underlying concept rather than just a specific string.
Results and Analysis
The experiments demonstrate that unconstrained fine-tuning is ineffective, as it destroys the model's existing knowledge base. In contrast, constrained fine-tuning (FT+FTM) allows the model to absorb new information while maintaining high performance on unmodified facts.
As shown in Table 2, a BERT-Base model using FT+FTM on Block 11 achieved 77.84% accuracy on modified facts ($\mathfrak{A}_{\mathcal{M}}$) while retaining 43.40% accuracy on unmodified facts ($\mathfrak{A}_{\mathcal{F}\setminus\mathcal{S}}$). Without these constraints, accuracy on unmodified facts typically drops to near zero.
Layer Sensitivity and Pre-training
A key finding of the study is the importance of layer selection. While later layers (e.g., Block 11) are effective for small-scale modifications, initial layers (e.g., Block 0) prove more robust as the volume of modified facts increases.
Table 3 further illustrates that pre-training is essential; models initialized randomly (RI+FTM) fail to learn modified facts effectively. This suggests that the modification process leverages the linguistic representations developed during the initial pre-training phase.
Discussion and Limitations
While constrained fine-tuning is highly effective for dozens or hundreds of facts, the model's capacity is not infinite. As the number of modifications reaches the thousands, performance on unmodified facts begins to decline. Additionally, the current approach does not explicitly address "multi-hop" logical consistency—ensuring that changing one fact (e.g., birthplace) correctly propagates to related facts (e.g., nationality). Future research may focus on automating layer selection and improving the scalability of these memory edits.
Summary updated