Lifelong Language Knowledge Distillation

Yung-Sung Chuang, Shang-Yu Su, Yun-Nung Chen

Abstract

Lifelong Language Learning (LLL) aims to enable models to learn a sequence of tasks without forgetting previous knowledge. However, neural networks typically suffer from "catastrophic forgetting," where new information overwrites existing weights. This paper presents Lifelong Language Knowledge Distillation (L2KD), a method that utilizes specialized "disposable teachers" for each new task. By distilling knowledge from these teachers into a generalist student model and employing generative replay, L2KD significantly narrows the performance gap between sequential learning and multi-task learning to as little as 0.7%.

The Problem of Catastrophic Forgetting

In an ideal scenario, an AI would learn incrementally, mastering one task and then moving to the next while retaining previous skills. In reality, training a model on Task B often degrades its performance on Task A. While Multi-task Learning (MTL)—training on all tasks simultaneously—solves this, it is often impractical for real-world applications where data arrives in a stream. Recent state-of-the-art methods like LAMOL use "generative replay" to remind the model of old tasks, but a performance lag relative to MTL persists. L2KD aims to close this remaining gap.

Methodology

L2KD introduces a knowledge distillation (KD) framework into the lifelong learning pipeline. Instead of the LLL model learning directly from raw data, it acts as a "student" that mimics a specialized "teacher."

Conceptual comparison between standard lifelong learning (top) and the proposed L2KD approach using teachers (bottom).

The L2KD Pipeline

For every new task encountered, the process follows three steps:

  1. Train a Teacher: A separate, temporary model is trained specifically on the new task until it reaches peak performance.
  2. Distill to the Student: The LLL student model is trained to mimic the teacher's behavior on the new task.
  3. Generative Replay: To prevent forgetting, the student also trains on "pseudo-data" it generates itself, representing older tasks.

Distillation Strategies

The authors experimented with three variants:

  • Word-KD: The student matches the teacher's exact probability distribution for every word.
  • Seq-KD: The student learns from the teacher's "best guess" (greedy decode) output, which effectively denoises the data.
  • Seq-KDsoft: A hybrid approach where the student mimics the teacher's distribution specifically on sequences the teacher generated.
The language model architecture used for solving target tasks in a question-answering format.

Tasks are formulated as sequence generation problems using a unified format: [Context; Question; Answer]. This allows the model to handle diverse tasks—from SQL generation to text classification—within a single generative framework.

Key Insights

  • The Denoising Effect: Seq-KD performed exceptionally well on noisy tasks like summarization. Because the teacher model produces a simplified, "cleaner" version of the target text compared to raw human data, the student finds it easier to learn without exhausting its capacity, leaving more room to remember old tasks.
  • Robustness to Task Order: Lifelong learning is usually sensitive to the order of tasks. L2KD (specifically Seq-KDsoft) significantly reduced performance variance across different task permutations.
  • Efficiency via Disposability: Unlike methods that require keeping old models, L2KD's teachers are discarded after distillation, keeping the final deployment memory-efficient.

Results and Performance

L2KD achieved state-of-the-art results across several benchmarks:

  • Closing the Gap: On sequence generation tasks, L2KD improved the baseline LAMOL score from 54.9 to 57.1. This is within 0.7% of the multi-task "upper bound" of 57.8.
  • Classification Boost: In text classification, L2KD outperformed existing methods by approximately 2% on average.
  • Faster Convergence: Distillation allowed the model to reach high performance on new tasks significantly faster than learning from raw data alone.

Conclusion and Future Work

L2KD demonstrates that specialized teachers can bridge the gap between sequential and simultaneous learning. While it introduces training overhead by requiring a new teacher for each task, the gains in performance and retention are substantial. Future research may explore applying this to massive-scale models like GPT-4 or integrating it with parameter-isolation techniques.

Summary updated

BibTeX
@inproceedings{chuang2020lifelong,
  author = {Yung-Sung Chuang and Shang-Yu Su and Yun-Nung Chen},
  title = {{Lifelong Language Knowledge Distillation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-main.233},
}
Figure