Skip to main content
QUICK REVIEW

[Paper Review] Mitigating Catastrophic Forgetting in Large Language Models with Self-Synthesized Rehearsal

Jianheng Huang, Leyang Cui|arXiv (Cornell University)|Mar 2, 2024
Topic ModelingComputer Science3 citations
TL;DR

This paper proposes Self-Synthesized Rehearsal (SSR), a continual learning framework for large language models (LLMs) that mitigates catastrophic forgetting by generating synthetic training instances using the LLM itself, rather than relying on original training data. SSR uses in-context learning to create synthetic inputs and refines outputs with the latest LLM version, achieving performance comparable or superior to conventional rehearsal methods with higher data efficiency and robust generalization.

ABSTRACT

Large language models (LLMs) suffer from catastrophic forgetting during continual learning. Conventional rehearsal-based methods rely on previous training data to retain the model's ability, which may not be feasible in real-world applications. When conducting continual learning based on a publicly-released LLM checkpoint, the availability of the original training data may be non-existent. To address this challenge, we propose a framework called Self-Synthesized Rehearsal (SSR) that uses the LLM to generate synthetic instances for rehearsal. Concretely, we first employ the base LLM for in-context learning to generate synthetic instances. Subsequently, we utilize the latest LLM to refine the instance outputs based on the synthetic inputs, preserving its acquired ability. Finally, we select diverse high-quality synthetic instances for rehearsal in future stages. Experimental results demonstrate that SSR achieves superior or comparable performance compared to conventional rehearsal-based approaches while being more data-efficient. Besides, SSR effectively preserves the generalization capabilities of LLMs in general domains.

Motivation & Objective

  • Address catastrophic forgetting in continual learning of large language models when original training data is unavailable.
  • Overcome the limitations of conventional rehearsal-based methods that depend on storing and replaying real past data.
  • Develop a data-efficient, scalable, and practical continual learning framework for real-world LLM deployment.
  • Preserve both task-specific knowledge and generalization capabilities of LLMs across diverse NLP tasks.
  • Demonstrate that synthetic data generated by LLMs can outperform or match real data in rehearsal effectiveness.

Proposed method

  • Use the base LLM to generate synthetic instruction-following instances via in-context learning with few-shot demonstrations.
  • Refine the outputs of synthetic instances using the latest LLM version to preserve up-to-date knowledge and reduce distribution shift.
  • Apply K-means clustering to select diverse, high-quality synthetic instances for rehearsal, optionally using real data for supervision.
  • Train the LLM on a combination of new task data and selected synthetic instances to maintain performance on previous tasks.
  • Control the proportion of synthetic data via an SSR ratio ($\hat{r}$), balancing memory cost and performance.
  • Use perplexity and clustering-based selection to prioritize informative and representative synthetic samples.

Experimental results

Research questions

  • RQ1Can LLMs generate synthetic data that effectively preserves knowledge during continual learning without access to original training data?
  • RQ2How does the performance of rehearsal using synthetic data compare to that using real data in continual learning for LLMs?
  • RQ3What is the impact of synthetic input and output quality on model generalization and forgetting mitigation?
  • RQ4How effective is K-means clustering in selecting diverse and representative synthetic instances for rehearsal?
  • RQ5Can self-synthesized rehearsal maintain generalization capabilities on general-domain benchmarks like AlpacaEval and MMLU?

Key findings

  • SSR achieves performance comparable or superior to conventional rehearsal-based methods on SuperNI tasks, with higher data utilization efficiency.
  • Rehearsal using synthetic outputs (with real inputs) outperforms rehearsal using real inputs and outputs, indicating that synthetic data can be more effective than real data.
  • SSR with both synthetic inputs and outputs achieves intermediate but robust performance, sometimes surpassing real-data rehearsal, especially in reducing forgetting.
  • The loss curve shows that synthetic instances lead to faster and smoother optimization compared to real instances, likely due to reduced distribution gap.
  • Increasing the SSR ratio ($\hat{r}$) improves final average accuracy (AR), demonstrating scalability and potential for further gains.
  • SSR preserves generalization capabilities on AlpacaEval and MMLU, confirming its effectiveness in general-domain performance despite potential risks from biased synthetic content.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.