Catastrophic forgetting is when a neural network loses previously learned abilities after being trained on new data. The weights that encoded the old knowledge are overwritten while the model optimises for the new task. In LLMs, it typically shows up after fine-tuning: the model gets better at the target task but worse at general reasoning, other languages or safety behaviour.
Key takeaways
- It happens because all knowledge is stored in shared weights.
- The effect is strongest with narrow data, high learning rates and many epochs.
- Mixing general data into fine-tuning is the simplest effective defence.
- LoRA and other PEFT methods reduce it by freezing the base model.
- It was first described in neural network research by McCloskey and Cohen in 1989.
Catastrophic forgetting explained in simple terms
Imagine a doctor who spends a year doing nothing but reading dermatology papers, seeing only skin cases and being tested only on skin conditions. Their dermatology improves, but their cardiology gets rusty because nothing reinforces it. Neural networks are worse than humans at this: the same parameters store everything, so new learning actively overwrites old patterns rather than sitting beside them.
How to spot it
| Symptom | What it suggests |
|---|---|
| Model answers the fine-tuned task well but general questions poorly | Classic forgetting |
| Responses become repetitive or match one narrow format | Overfitted to the new data |
| Other languages degrade | Language abilities overwritten |
| Safety refusals weaken | Alignment training partly undone |
| Benchmark scores fall outside the target domain | Broad capability loss |
The only reliable way to detect this is to evaluate on general benchmarks and older tasks before and after fine-tuning, not just on the new task.
A worked example
A company fine-tunes an assistant on 5,000 short support replies for 5 epochs at a high learning rate. Afterwards, it answers support questions well, but when a user asks a general question it still replies in short, clipped support language, and it no longer refuses an unsafe request it previously declined. Both are signs of catastrophic forgetting. Reducing to 2 epochs, lowering the learning rate, mixing in general instruction data and switching to LoRA usually resolves it.
How to prevent it
| Method | How it helps |
|---|---|
| Mix in general data | Include a share of broad instruction data alongside task data |
| Lower learning rate | Smaller updates disturb existing weights less |
| Fewer epochs | Less repeated pressure on the same weights |
| LoRA and adapters | Base weights stay frozen, so the original model is preserved |
| Freeze lower layers | Keep general representations intact |
| Replay or rehearsal | Reinsert samples of earlier training data |
| Regularisation methods | Techniques such as elastic weight consolidation penalise changes to important weights |
| Evaluate broadly | Detect losses before deployment |
Forgetting and continued pretraining
Continued pretraining on domain text can also cause forgetting, especially if the new corpus is narrow. A common remedy is to mix a portion of general pretraining data into the domain corpus, often a substantial share, to keep broad abilities alive.
Why it happens technically
Fine-tuning moves weights in the direction that reduces loss on the new data. Nothing in that objective preserves performance on data the model no longer sees. Without a signal to keep old behaviour, it decays. This is sometimes called the stability-plasticity dilemma: models must be plastic enough to learn and stable enough to remember.
Limitations of current fixes
- Mixing data increases training cost.
- PEFT reduces but does not fully eliminate forgetting.
- Measuring forgetting requires a good general evaluation suite.
- There is always a trade-off between specialising and staying general.
