Mitigating Catastrophic Forgetting in Large Language Models with Self-Synthesized Rehearsal

Jianheng Huang, Leyang Cui, Ante Wang, Chengyi Yang, Xinting Liao +3 more
3/2/2024
cs.CLcs.AI

No official code found. Best implementation: XMUDeepLIT/SSR (17 stars, Apache-2.0, last commit 2024-10-21).

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.

View on arXivView PDF

Code Implementations(1)

XMUDeepLIT/SSRCommunity100%
Apache-2.0

Code for "Mitigating Catastrophic Forgetting in Large Language Models with Self-Synthesized Rehearsal" (ACL 2024)

172Shell, PythonMay 17, 20242 years agoApache-2.0
catastrophic-forgettingcontinual-learningllmrehearsal

Similar Papers

Cite this paper

@article{huang2024mitigating,
  title  = {Mitigating Catastrophic Forgetting in Large Language Models with Self-Synthesized Rehearsal},
  author = {Jianheng Huang and Leyang Cui and Ante Wang and Chengyi Yang and Xinting Liao and Linfeng Song and Junfeng Yao and Jinsong Su},
  year   = {2024},
  eprint = {2403.01244},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.01244v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.01244.svg)](https://codeofpaper.com/paper/2403.01244)

Discussion