Preserving Knowledge in Large Language Model with Model-Agnostic Self-Decompression

Zilun Zhang, Yutao Sun, Tiancheng Zhao, Leigang Sha, Ruochen Xu, Kyusong Lee, Jianwei Yin · OpenReview

Abstract: Humans can retain old knowledge while learning new information, but Large Language Models (LLMs) often suffer from catastrophic forgetting when post-pretrained or supervised fine-tuned (SFT) on domain-specific data. Moreover, for Multimodal Large Language Models (MLLMs) which are composed of the LLM base and visual projector (e.g. LLaVA), a significant decline in performance on language benchmarks was observed compared to their single-modality counterparts. To address these challenges, we introduce a novel model-agnostic self-decompression method, Tree Generation (TG), that decompresses knowledge within LLMs into the training corpus. This paper focuses on TG-SFT, which can synthetically generate SFT data for the instruction tuning steps. By incorporating the dumped corpus during SFT for MLLMs, we significantly reduce the forgetting problem.

Introduction: The Challenge of Catastrophic Forgetting

When general-purpose Large Language Models (LLMs) are fine-tuned for specialized tasks—such as adapting LLaMA into the multimodal LLaVA—they often suffer from catastrophic forgetting. While the model gains new capabilities, such as image description, its performance on core language benchmarks (logic, math, and coding) frequently plummets. This "forgetting tax" creates a significant barrier to creating versatile, multi-capable agents.

Catastrophic Forgetting Observation: As training steps increase for multimodal tasks, language benchmark scores (LLM BMK) typically decline while multimodal scores (MLLM BMK) rise.

Current solutions like Parameter-Efficient Fine-Tuning (PEFT) often limit peak performance, while Replay Buffers require access to original, often proprietary, pre-training data. This research proposes treating the LLM as a "lossless compressor" of human knowledge and introduces a method to "decompress" that internal knowledge into a portable, synthetic dataset without needing the original source material.

Methodology: Tree Generation (TG)

The core innovation is Tree Generation (TG), a recursive, model-agnostic algorithm that prompts an LLM to generate a diverse synthetic corpus through self-dialogue.

The Tree Generation (TG) framework: A recursive process of generating questions and answers to decompress internal model knowledge into a diverse synthetic corpus.

The TG Process

  1. Initialization: The model starts with a general system prompt and generates $N_1$ diverse initial questions.
  2. Layered Expansion: The process alternates between Question Layers (odd) and Answer Layers (even).
  3. Recursive Dialogue: The algorithm can proceed multiple "turns" deep, where the model asks follow-up questions based on previous context, simulating a natural conversation.
  4. Semantic Deduplication (SD): To ensure the knowledge tree branches into diverse topics rather than repeating common facts, the authors employ Maximal Marginal Relevance (MMR) and SentenceBERT embeddings to filter redundant outputs.

Two primary configurations were tested: Wide-Tree (many shallow, 1-turn questions) and Balance-Tree (fewer initial topics but deeper, multi-turn conversations).

Experimental Results

The researchers evaluated the method using a 100K language-only corpus generated via TG, mixed into standard multimodal instruction tuning datasets.

Key Findings

  • Restoring Intelligence: Standard LLaVA fine-tuning caused the LLM backbone's average score to drop from 53.41 to 50.60. By applying TG-SFT (Balance-Tree), the score was restored to 53.47, effectively eliminating the forgetting tax.
  • Multimodal Parity: The method successfully preserved language intelligence without sacrificing vision-language performance, maintaining a 65.04 average across multimodal benchmarks.
  • Depth Over Breadth: The "Balance-Tree" approach outperformed the "Wide-Tree" approach, suggesting that multi-turn dialogues are more effective at decompressing nuanced, complex knowledge.
  • Synthetic vs. Human Data: Synthetic data generated by TG performed nearly as well as high-quality, human-curated datasets like ShareGPT in preventing forgetting.

Discussion and Limitations

While TG-SFT offers a powerful model-agnostic solution, it is not without limitations. The method can create a hallucination loop, where the model decompresses and reinforces its own factual errors. Additionally, the authors noted a decline in performance on math-heavy benchmarks (e.g., GSM8K), as the model often generated incorrect or overly simplistic calculations during self-decompression. Future work may explore using stronger models to decompress knowledge into smaller models, acting as a form of self-contained knowledge distillation.

Summary updated

Abstract

Humans can retain old knowledge while learning new information, but Large Language Models (LLMs) often suffer from catastrophic forgetting when post-pretrained or supervised fine-tuned (SFT) on domain-specific data. Moreover, for Multimodal Large Language Models (MLLMs) which are composed of the LLM base and visual projector (e.g. LLaVA), a significant decline in performance on language benchmarks was observed compared to their single-modality counterparts. To address these challenges, we introduce a novel model-agnostic self-decompression method, Tree Generation (TG), that decompresses knowledge within LLMs into the training corpus. This paper focuses on TG-SFT, which can synthetically generate SFT data for the instruction tuning steps. By incorporating the dumped corpus during SFT for MLLMs, we significantly reduce the forgetting problem.
BibTeX
@misc{zhang2024preserving,
  author = {Zilun Zhang and Yutao Sun and Tiancheng Zhao and Leigang Sha and Ruochen Xu and Kyusong Lee and Jianwei Yin},
  title = {{Preserving Knowledge in Large Language Model with Model-Agnostic Self-Decompression}},
  year = {2024},
  eprint = {2406.11354},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.11354},
}
Figure