# Learning without Forgetting

Learning without Forgetting adds a new task by distilling old-task outputs on new images

Zhizhong Li, Derek Hoiem · arXiv · 2016-6-29

- **Problem** Fine-tuning a CNN on a new task erodes its old-task accuracy, because the shared layers drift. Old training data is often unavailable, so joint training is not an option.
- **Method** Learning without Forgetting trains on new-task images only. Before training, it records the original network's outputs on those images, then keeps the outputs close to those records.
- **Results** On ImageNet to CUB with AlexNet, old-task accuracy was 54.7 with Learning without Forgetting, compared to 50.9 for fine-tuning.

## Why adding a task erodes the old one

Adding a capability to a deployed CNN usually means training on new data, and the data for the old tasks may be unrecorded or too costly to reuse. The network is split into shared parameters θs, old task-specific parameters θo, and new task-specific parameters θn. Fine-tuning reuses the shared layers but lets them move, so the old-task output layer no longer matches the features it reads.

Feature extraction leaves the original network untouched, but the frozen shared layers may miss what the new task needs. Joint training avoids both problems, yet it needs the old images and labels, which this setting assumes are unavailable.

## The key idea: keep old outputs, not old data

The key idea is to record how the original network answers on the new images, then train so that the network keeps answering the same way on them. The new images thus serve as the probe for old-task behaviour, and the recorded outputs act as the old-task targets. The authors describe this as close to joint training, with the difference that the old images and labels are no longer needed.

Preserving outputs on these new images was found to act as a regularizer, which the authors did not expect. The authors note that the new images may sample the old domain poorly, yet preserving outputs on them still kept old-task performance.

## One training run, step by step

Before training, the original network runs on the new images to produce the old-task probabilities, and new output nodes get random weights θn. The number of new parameters equals the number of new classes times the width of the last shared layer, a very small share of the network.

For the new task the loss is the multinomial logistic loss, \\\\(L\_{new}(y\_n,\\hat y\_n) = -y\_n \\cdot \\log \\hat y\_n\\\\), where \\\\(\\hat y\_n\\\\) is the softmax output. For each old task the authors use a knowledge distillation loss, which raises the recorded and current probabilities to the power 1/T, renormalizes them, and takes the cross-entropy between the two.

Raising to the power 1/T with T above 1 increases the weight of smaller probabilities, and the authors set T = 2.

Training minimizes λo times the old-task loss, plus the new-task loss, plus a regularizer R, with λo set to 1 for most experiments. R is a weight decay of 0.0005. Raising λo favours old-task performance over new-task performance, so varying λo traces a trade-off between the two.

Training runs in two stages, with θs and θo frozen while θn converges, and then all weights train together. The warm-up stage matters much for fine-tuning but little for LwF, so it is a fair-comparison step rather than a core ingredient.

## Single new task results

On ImageNet→CUB with AlexNet, LwF scored 54.7 old and 57.7 new. Fine-tuning scored 50.9 old and 57.0 new on the same pair, so it gave up old-task accuracy with little new-task gain.

The new-task gain over fine-tuning was not expected, and the authors attribute it to output preservation acting as a regularizer. Fine-tuning's old-task score was 3.8 points below LwF on ImageNet→CUB, so the old-task gap is the more consistent one.

The new-task advantage has exceptions: fine-tuning beat LwF on new-task accuracy for Places365→CUB and on ImageNet→MNIST. The authors explain that CUB is very dissimilar to Places365, so both fine-tuning and LwF drift the shared parameters.

With VGG, joint training outperformed consistently, and LwF's old-task result was worse than with AlexNet.

## Adding tasks one by one and smaller training sets

When tasks were added in stages, the old-task responses were recomputed each time, as if the earlier data were gone. LwF beat fine-tuning, feature extraction, LFL and fine-tuning FC for most added tasks.

Subsampling CUB to 30%, 10% and 3% kept the same ranking of methods. The gap between LwF and the others tended to grow with more data, though the authors say the correlation is not definitive.

## Alternatives that did not help

Making more layers task-specific gave no consistent advantage, although it costs more storage. Network expansion scored 57.0 old and 54.0 new on ImageNet→CUB, compared to 54.7 and 57.7 for LwF. So expansion protects the old task but gives up new-task accuracy, and adding LwF on top costs more without a clear gain.

Lowering the learning rate of the shared layers to 10% did not preserve old accuracy: fine-tuning scored 52.2 old on ImageNet→CUB. An L2 penalty that pulls shared weights toward their original values lands between feature extraction and fine-tuning.

Among response-preserving losses, the knowledge distillation loss slightly outperformed L1, L2 and cross-entropy, though the margin is small. The authors believe regularizing outputs works better than regularizing parameters, because many small weight changes can produce large output changes.

## Limitations

The authors frame joint training as an upper bound, but LwF swaps old images for new images, and that substitution may lower performance. Old-task accuracy still dropped with LwF on ImageNet→MNIST, where the hand-written characters give poor indirect supervision for the old task.

Joint training stayed ahead on the old task in several settings, so LwF doesn't match it everywhere. The VGG results cover only two task pairs, ImageNet→CUB and ImageNet→Scenes.

The authors selected epochs using only the new-task validation score, which favours the new task. Results are means over three runs, and the authors note that stopping one or two epochs later can move the scores.

## Paper info

- **Authors**: Zhizhong Li, Derek Hoiem
- **Venue**: arXiv · Preprint
- **First published**: 2016-6-29
- **Added**: 2026-11-12
- **Updated**: 2017-2-14
- **Version**: v3
- **arXiv**: 1606.09282
- **Category**: cs.CV · cs.LG · stat.ML
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1606.09282v3) · [PDF ↗](https://arxiv.org/pdf/1606.09282v3)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Zhizhong Li, Derek Hoiem (2016). Learning without Forgetting. arXiv:1606.09282v3. https://arxiv.org/abs/1606.09282v3

**BibTeX**

```
@misc{li2016learning,
  title = {{Learning without Forgetting}},
  author = {Zhizhong Li and Derek Hoiem},
  year = {2016},
  eprint = {1606.09282},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1606.09282v3}
}
```

## Other paper commentary

- [Learning Deconvolution Network for Semantic Segmentation](https://refivu.com/en/papers/9a41459e-1e6d-4d79-b532-13493bd8cf30-learning-deconvolution-network-for-semantic-segmentation.md)
- [UNet++: Redesigning Skip Connections to Exploit Multiscale Features in Image Segmentation](https://refivu.com/en/papers/5be5e543-8f10-4ce6-ae1e-1194b9773c52-unet-redesigning-skip-connections-to-exploit-multiscale.md)
- [Restormer: Efficient Transformer for High-Resolution Image Restoration](https://refivu.com/en/papers/df4b04d0-730a-42b5-952f-56ce280f457e-restormer-efficient-transformer-for-high-resolution-image.md)
- [Striving for Simplicity: The All Convolutional Net](https://refivu.com/en/papers/a95bd630-88c1-480e-8223-b0666111b3e5-striving-for-simplicity-the-all-convolutional-net.md)
- [Deep Visual-Semantic Alignments for Generating Image Descriptions](https://refivu.com/en/papers/f477c9f4-e68d-4089-85ea-7f883a691c98-deep-visual-semantic-alignments-for-generating-image.md)
- [YOLOv10: Real-Time End-to-End Object Detection](https://refivu.com/en/papers/fb17ace4-31a0-4dc8-975c-8509c4e6723c-yolov10-real-time-end-to-end-object-detection.md)
- [XNOR-Net: ImageNet Classification Using Binary Convolutional Neural Networks](https://refivu.com/en/papers/a24ab4a0-5bb0-49ce-a4e8-1e280720a977-xnor-net-imagenet-classification-using-binary-convolutional.md)
- [Variational Inference: A Review for Statisticians](https://refivu.com/en/papers/9499b5e2-6ec4-4fcc-8d8e-4709801c41a4-variational-inference-a-review-for-statisticians.md)
- [Qwen2 Technical Report](https://refivu.com/en/papers/edc7be28-5a87-45ae-afa8-a9b7e9819cd7-qwen2-technical-report.md)
- [OPT: Open Pre-trained Transformer Language Models](https://refivu.com/en/papers/dd696b35-00bf-4198-8591-a1a5b74fa7d4-opt-open-pre-trained-transformer-language-models.md)
- [Efficient Processing of Deep Neural Networks: A Tutorial and Survey](https://refivu.com/en/papers/587cab8c-6795-4edf-94db-5f485a9b553b-efficient-processing-of-deep-neural-networks-a-tutorial.md)
- [Bidirectional LSTM-CRF Models for Sequence Tagging](https://refivu.com/en/papers/7f421939-0d02-43b3-b25f-86a13896fd18-bidirectional-lstm-crf-models-for-sequence-tagging.md)

## Terms in this paper

- [Fine-tuning](https://refivu.com/en/terms/66a12665f507-fine-tuning)
- [joint training](https://refivu.com/en/terms/cdf0dc15beb4-joint-training)
- [Feature Extraction](https://refivu.com/en/terms/f22ee0a5f12b-feature-extraction)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/3784f887-f12a-406c-9f7c-0b1573555ee3-learning-without-forgetting)
