arXiv:2508.04676cs.CLcs.AI2025-08被引 2

用通用文本重放缓解大模型持续学习中的遗忘问题

GeRe: Towards Efficient Anti-Forgetting in Continual Learning of LLM via General Samples Replay

  • 用预训练文本作为通用回放样本,简单稳定地防止遗忘
  • 仅需少量固定样本即可同时保持通用能力与任务性能
  • 适合关注大模型持续学习效率的研究者和开发者

大语言模型的持续学习能力对推动通用人工智能至关重要。然而,在多个领域持续微调时,常出现灾难性遗忘:1)通用能力显著退化;2)先前任务性能急剧下降。为此,我们提出通用样本重放(GeRe)框架,利用常规预训练文本实现高效抗遗忘。在GeRe下,我们进一步引入神经状态约束优化方法,通过基于阈值的边际(TM)损失,维持重放学习中的激活状态一致性。首次验证:少量固定预收集的通用回放样本即可同时解决两类遗忘问题——保留通用能力并提升跨任务整体表现。事实上,前者可自然促进后者。控制实验表明,相比传统标签拟合、基于KL散度的输出模仿及特征模仿(L1/L2),TM方法在各类重放策略中均表现更优且更具鲁棒性。本工作为未来大模型高效重放提供了新路径。代码与数据见 https://github.com/Qznan/GeRe。

原文摘要 · Abstract (English)

The continual learning capability of large language models (LLMs) is crucial for advancing artificial general intelligence. However, continual fine-tuning LLMs across various domains often suffers from catastrophic forgetting, characterized by: 1) significant forgetting of their general capabilities, and 2) sharp performance declines in previously learned tasks. To simultaneously address both issues in a simple yet stable manner, we propose General Sample Replay (GeRe), a framework that use usual pretraining texts for efficient anti-forgetting. Beyond revisiting the most prevalent replay-based practices under GeRe, we further leverage neural states to introduce a enhanced activation states constrained optimization method using threshold-based margin (TM) loss, which maintains activation state consistency during replay learning. We are the first to validate that a small, fixed set of pre-collected general replay samples is sufficient to resolve both concerns--retaining general capabilities while promoting overall performance across sequential tasks. Indeed, the former can inherently facilitate the latter. Through controlled experiments, we systematically compare TM with different replay strategies under the GeRe framework, including vanilla label fitting, logit imitation via KL divergence and feature imitation via L1/L2 losses. Results demonstrate that TM consistently improves performance and exhibits better robustness. Our work paves the way for efficient replay of LLMs for the future. Our code and data are available at https://github.com/Qznan/GeRe.

持续学习大模型遗忘缓解样本重放

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。