Learning without Forgetting

Zhizhong Li, Derek Hoiem

Abstract

"Learning without Forgetting" (LwF) introduces a strategy to add new tasks to a Convolutional Neural Network (CNN) using only data from the new task, while preventing the model from losing its original capabilities. By leveraging knowledge distillation to "mimic" the old network's responses on new images, LwF provides a middle ground between feature extraction and full joint training without requiring access to massive legacy datasets.

Introduction: The Challenge of Catastrophic Forgetting

In the ideal world of "lifelong learning," a vision system should get smarter over time, adding new skills (like recognizing specific bird species) without forgetting old ones (like general object recognition). However, standard deep learning suffers from Catastrophic Forgetting: if a model is fine-tuned on a new task, the weights shift significantly, causing performance on the original task to plummet.

The standard solution is Joint Training, where the model is retrained on both old and new data. However, as the number of tasks grows, storing and processing all that "legacy" data becomes infeasible due to storage costs, privacy concerns, or proprietary restrictions. The authors tackle the challenge of how to adapt a network to a new task using only new data, while keeping the old skills intact.

Methodology

The authors propose Learning without Forgetting (LwF). The core idea is to use the original network as a "teacher" for itself.

  1. Initialization: Take a pre-trained network with shared parameters ($\theta_s$) and old task-specific layers ($\theta_o$). Add a new, randomly initialized task layer ($\theta_n$).
  2. Recording Responses: Pass the new task's images through the original network. Record the output probabilities (responses) for the old tasks. These serve as "soft labels" that represent what the model currently knows.
  3. Training: Train the network to minimize a combined loss function:
  4. New Task Loss: Standard cross-entropy using the ground truth labels for the new data.
  5. Old Task Loss: A Knowledge Distillation loss that encourages the network's new outputs for the old tasks to match the "recorded responses" from step 2.
  6. Optimization: The process involves a "warm-up" step (training only the new layer) followed by joint optimization of all parameters ($\theta_s, \theta_o, \theta_n$).
Comparison of different training strategies for adding new tasks to a CNN.

As shown in the figure above, LwF differs from Fine-tuning (which ignores old tasks) and Feature Extraction (which freezes the shared layers and often underperforms on the new task).

Experimental Setup

The researchers evaluated LwF across several prominent image classification benchmarks:

  • Large-scale "Old" Tasks: ImageNet (1,000 object classes) and Places365 (365 scene categories).
  • Diverse "New" Tasks: PASCAL VOC 2012 (general objects), CUB-200-2011 (birds), MIT Indoor Scenes, and MNIST (digits).
  • Architectures: The experiments primarily used AlexNet, with some verification on VGGnet.

Discussion: Key Insights

  • The Regularization Surprise: LwF often outperforms standard fine-tuning on the new task. Preserving old knowledge acts as a form of regularization, preventing overfitting to the new (often smaller) dataset.
  • Data as a Proxy: LwF effectively uses the new task's images as a proxy for the old task's distribution. Even if the images are different (e.g., using bird photos to "remind" the model how to see general objects), the soft labels provide enough signal to keep the shared features relevant for the old task.
  • Efficiency: LwF is significantly faster to train than joint training because it doesn't need to iterate through millions of old images. It also results in a single, compact network rather than a collection of specialized models.

Results

  • Old Task Preservation: In the ImageNet $\rightarrow$ VOC scenario, LwF maintained an old task accuracy of 56.2%, whereas standard fine-tuning dropped it to 55.3%. While joint training is the "upper bound" (56.9%), LwF gets remarkably close without the data overhead.
  • New Task Performance: On CUB (birds), LwF achieved 57.7% accuracy, beating both feature extraction (52.5%) and standard fine-tuning (57.0%).
  • Task Similarity Matters: LwF performs best when the new task is somewhat related to the old one. When adding MNIST (digits) to an ImageNet (objects) model, performance on the old task dropped significantly because the simple digits lacked the visual complexity needed to maintain object recognition features.

Conclusion and Future Work

While LwF works well for adding one or two tasks, performance on the very first task begins to degrade as more tasks are added sequentially (cumulative drift). Additionally, if the new data is extremely different from the old data, the "proxy" effect fails. Future work includes exploring how to maintain a small set of unlabeled "representative" images from the old domain to bridge the domain gap, and extending this framework beyond classification to semantic segmentation and object detection.

Summary updated

BibTeX
@article{li2018learning,
  author = {Zhizhong Li and Derek Hoiem},
  title = {{Learning without Forgetting}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2018},
  doi = {10.1109/tpami.2017.2773081},
}
Figure