Glossary
Catastrophic forgetting
Catastrophic forgetting is the tendency of a neural network to lose previously learned knowledge or skills when its weights are trained on new data.
Catastrophic forgetting is the tendency of a neural network to lose knowledge or skills it learned earlier when its weights are updated on new data. Train a model on task A, then train it further on task B, and its performance on task A can fall sharply, sometimes to near chance, even though nothing about task A was removed on purpose. The effect was first described in connectionist research in the late 1980s, where it was also called catastrophic interference, and it remains one of the central problems in continual learning. For people building with language models it matters in two places: when fine-tuning a model, and when deciding whether an agent should learn by changing its weights or by storing what it learns outside them.
Why catastrophic forgetting happens
A neural network stores everything it knows in one shared set of parameters. Knowledge of grammar, facts about the world and the ability to follow a particular output format are all spread across the same weights rather than kept in separate compartments. Gradient descent adjusts those weights to reduce the loss on whatever data the model is currently seeing, and it has no record of which weights mattered for earlier tasks. If the new data pulls a weight in a direction that hurts an old task, the optimiser moves it anyway, because the old task is not in the current loss.
The severity depends on how different the new data is from the old, how many training steps are taken and how large the learning rate is. A short pass over data similar to the original distribution may cause little damage. A long run on a narrow task, such as a single domain or a single output style, can overwrite general abilities the original training took far longer to build. Larger models tend to be somewhat more robust because they have more capacity to accommodate new patterns, but scale alone does not remove the effect.
Catastrophic forgetting in large language models
For an LLM, the most common trigger is fine-tuning. A team takes a capable general model and trains it further on a few thousand examples from their domain. The model gets better at the target task and quietly gets worse at others: it may lose some coding ability, follow general instructions less reliably, or become worse at reasoning in areas the fine-tuning data never touched. The same pressure appears in instruction tuning and RLHF, where improvements in helpfulness or safety can come with measurable losses elsewhere, a cost sometimes called the alignment tax.
Forgetting is also one reason models cannot simply be updated with new facts every day. Continued training on recent data to move a model past its knowledge cutoff risks degrading what it already knew, and checking for that damage requires broad evaluation across many tasks, not only the new one. Providers therefore retrain or refresh models in large, carefully mixed runs rather than in small daily increments.
How to reduce catastrophic forgetting
Continual learning research has produced several families of mitigation. None eliminates the problem, and most trade some ability to learn new material for better retention of old material.
Approach | How it works | Trade-off |
|---|---|---|
Rehearsal or replay | Mix a share of the original training data, or examples that resemble it, into the new training run | Needs access to old data, or good synthetic data to stand in for it |
Regularisation | Penalise changes to weights that were important for earlier tasks, as in elastic weight consolidation | Adds computation and only approximates which weights matter |
Parameter isolation | Train a small set of new parameters and freeze the rest, as with adapters or LoRA | Limits how much the model can learn from the new data |
Distillation | Use the original model as a teacher so the updated model keeps producing similar outputs on general inputs | Requires running both models during training; see distillation |
Lower learning rates and shorter runs | Change the weights less | Learns less of the new task as well |
Parameter-efficient methods are the most common choice in practice. Because LoRA trains small low-rank matrices alongside frozen base weights, the base model is left intact, and the adapter can be removed or swapped. Studies comparing LoRA with full fine-tuning have generally found that it learns less from the new data and forgets less of the old, which is a fair summary of the whole field: retention and plasticity pull against each other. Whatever method is used, the check is the same. Keep a golden dataset that covers the abilities you care about, including ones unrelated to the fine-tuning goal, and run it before and after training.
Catastrophic forgetting versus agent memory
Catastrophic forgetting is a training term. It describes what happens to a model’s weights, and it has little to do with whether an AI agent remembers a user from one week to the next. The two are often confused because both involve “forgetting”, but they happen at different layers of a system.
An agent built on a hosted model does not change the model’s weights when it talks to someone. Each call is stateless, and anything the agent appears to remember is supplied by the application through the context window. When such an agent forgets a user’s preferences, the cause is missing state, not damaged weights: nothing stored the preference, or retrieval failed to bring it back. The fix is a stateful design with proper agent memory, and no amount of continual-learning research applies to it.
The comparison is still useful, because it explains why most production systems keep learning out of the weights. If an agent learned each user’s preferences by fine-tuning, every update would risk degrading general abilities, facts could not be inspected or corrected, one user’s data would be blended into weights shared with others, and deleting a user’s data on request would mean retraining. Storing what the agent learns as explicit memories avoids all four problems. New facts are added without touching anything else, wrong facts can be edited, each user’s memories stay separate, and deletion is a single operation. Our post on why agents shouldn’t learn in their weights makes this argument at length, and the RAG vs fine-tuning and embeddings vs fine-tuning entries compare the options for knowledge more generally.
Forgetting that memory systems should do
External memory has its own version of the problem, and it runs in the opposite direction. A memory store that never forgets fills with duplicates and outdated facts until retrieval returns conflicting results, a slow failure described under memory drift. Here the goal is deliberate, selective forgetting: superseding a fact when it changes through contradiction resolution, merging duplicates through memory consolidation, and letting unused details fade through memory decay. The difference from catastrophic forgetting is control. A weight update forgets indiscriminately as a side effect, while a memory system forgets specific items for stated reasons and can keep a record of what changed. The post on why forgetting is a feature covers when an agent should let go.
A worked example
A legal technology company fine-tunes an open model on 20,000 annotated contracts to improve clause extraction. Accuracy on clause extraction rises from 81% to 93%. A month later, support tickets show that the same model now writes weaker summaries of emails and occasionally ignores formatting instructions it used to follow. Re-running a broad evaluation set confirms a drop of several points on general instruction following. The team retrains with a LoRA adapter instead of full fine-tuning and mixes in 10% general instruction data as replay. Clause accuracy settles at 91% and general performance returns close to the original level.
The same company also wants its assistant to remember each client’s preferred clause wording and past negotiating positions. Fine-tuning per client would repeat the forgetting problem for every client and mix confidential positions into shared weights. Instead, those preferences are stored as memories scoped to each client, retrieved when the assistant drafts, and updated when a position changes. The model’s weights stay fixed and the assistant still learns. Agents of this kind are described under legal agents.
Related ideas
In-context learning lets a model adapt to examples in its prompt without any weight change, so it cannot cause catastrophic forgetting, though it only lasts for one call. Procedural memory in agents, stored as instructions or skills, plays a similar role to new skills learned in training without the risk to existing ones. In neuroscience, the brain is thought to avoid catastrophic interference partly by replaying memories during sleep and keeping fast and slow learning systems separate, an idea that inspired replay methods in machine learning.
Where Exabase fits
Exabase does not train or fine-tune models, so it does not address catastrophic forgetting in weights. It provides the alternative this entry describes: a place for agents to learn without changing the model. Exabase Memory extracts facts, preferences and events from conversations, stores them as discrete memories and keeps them current, so an agent can learn continuously while the underlying model stays untouched. Memories can be added automatically or written directly, as the creating memories guide shows, and individual memories can be corrected through the update memory endpoint.
The M-1 engine handles the controlled forgetting described above: it resolves contradictions as facts change, consolidates duplicates and prunes stale content, while memories created with the immutable flag are never modified by that process. Each user’s memories can live in a separate Base, so learning for one user never leaks into another. The agent memory solution page explains the approach, and Exabase vs Mem0 compares it with another memory layer.
Frequently asked questions
What is catastrophic forgetting in simple terms?
It is when a neural network gets worse at something it already knew after being trained on something new, because the new training changes the same weights that held the old knowledge.
Does fine-tuning an LLM cause catastrophic forgetting?
It can. Fine-tuning on a narrow dataset often improves the target task while reducing performance on unrelated tasks. Parameter-efficient methods such as LoRA, replay of general data and broad evaluation before and after training reduce the risk.
How do you prevent catastrophic forgetting?
You can reduce it rather than prevent it entirely. The main techniques are replaying old data, regularising important weights, training only a small set of new parameters, distillation from the original model and using smaller, shorter updates.
Is catastrophic forgetting the reason chatbots forget conversations?
No. Chat assistants forget because their application did not store or retrieve the earlier information. The model’s weights do not change during a conversation, so nothing is being overwritten.
What is the difference between catastrophic forgetting and memory decay?
Catastrophic forgetting is an uncontrolled loss of knowledge in a model’s weights during training. Memory decay is a deliberate design choice in an external memory store, where items lose weight over time unless they are used or reinforced.
Can agents learn continuously without catastrophic forgetting?
Yes, by storing what they learn outside the model. An agent that writes facts and preferences to a memory store learns from every interaction while its weights stay fixed, so there is nothing to overwrite.
Related pages: Fine-tuning, LoRA, Long-term memory, Memory decay, RAG vs agent memory, Stateful AI, Agent memory solution, Agents shouldn’t learn in their weights, Long-term memory use case, Best agent memory platforms