Abstract
Large Language Models (LLMs) often struggle to update their knowledge because new information conflicts with outdated facts already embedded in their weights. We propose F-Learning (Forgetting before Learning), a two-stage paradigm that utilizes parametric arithmetic to subtract weights associated with old knowledge before fine-tuning on new data. Our experiments on Llama-2-7B and GPT-2-XL demonstrate that this "clear the deck" approach leads to more reliable and stable model updates compared to standard fine-tuning and specialized model editing techniques.
Introduction
LLMs are essentially snapshots of the internet at their time of training. When real-world facts change—such as political leadership or scientific consensus—the model’s internal knowledge becomes obsolete. The standard approach to addressing this is secondary fine-tuning on new data. However, this often results in "gradient conflict," where the model attempts to learn new facts while the old, contradictory facts remain active in its parameters. This is analogous to trying to pour fresh water into a cup already full of dirty water; the resulting mixture is compromised.
Methodology: The F-Learning Framework
The core of our approach is the F-Learning framework, which treats model weights as variables in an equation—a concept known as parametric arithmetic. The process follows two distinct stages:
- Old Knowledge Forgetting: The base model is first fine-tuned on the obsolete knowledge. We calculate the difference between these updated weights and the original weights to identify the specific "knowledge parameters." We then subtract a portion of this difference from the original model, effectively "unlearning" the specific facts.
- New Knowledge Learning: The model, now in a state of "forgetfulness" regarding the target topic, undergoes standard Supervised Fine-Tuning (SFT) on the new knowledge.
We evaluated this method using both Full Fine-Tuning and LoRA (Low-Rank Adaptation). We observed that subtracting LoRA parameters—which target only a small fraction of the model—was often sufficient to disrupt old knowledge patterns without risking the total model collapse associated with broader weight manipulation.
Experimental Setup
We tested F-Learning on two standard benchmarks for model editing:
- ZsRE (Zero-shot Relation Extraction): A QA dataset testing relations (e.g., "Where was X born?") including rephrased questions to evaluate true understanding versus rote memorization.
- COUNTERFACT: A challenging dataset designed to test how deeply ingrained original associations are by requiring the model to adopt counterfactual information.
These datasets were adapted to simulate knowledge updates by splitting them into "old" and "new" versions of the same facts.
Key Results
F-Learning was compared against standard fine-tuning and popular editing methods like ROME and MEMIT using Llama-2-7B and GPT-2-XL.
Performance and Generalization
On the ZsRE dataset with Llama-2-7B, F-Learning achieved a Reliability score of 84.65%, significantly outperforming standard full fine-tuning (81.02%) and LoRA (43.10%). Furthermore, the model demonstrated superior generalization, successfully answering rephrased versions of new facts, which indicates deeper integration of the updated knowledge.
Efficiency and Locality
While F-Learning requires an extra training stage, it proves highly efficient at scale. For batch updates of 100 facts, F-Learning completed the process in approximately 50 seconds, whereas the "locate-and-edit" method ROME required over 1,800 seconds. Additionally, F-Learning maintained high Locality, meaning it could forget specific facts (like a political figure's role) without damaging unrelated capabilities like mathematical reasoning or general coding skills.
Conclusion
F-Learning demonstrates that explicit forgetting is a powerful prerequisite for effective learning in LLMs. By removing the parameters representing outdated facts, we eliminate the gradient conflicts that hinder traditional fine-tuning. Future work will focus on refining the hyper-parameter $\lambda$ (the rate of forgetting) to prevent irrelevant content generation and exploring the application of this paradigm in multi-modal domains.
Summary updated