arXiv:2601.18255cs.LGcs.AI2026-01被引 1

提出新方法保护大模型代码生成能力,避免遗忘。

Beyond Retention: Orchestrating Structural Safety and Plasticity in Continual Learning for LLMs

  • 通过唤醒机制识别旧任务关键参数空间,实现正交更新。
  • 在四任务序列中保持代码生成性能,而传统重放方法会严重下降。
  • 适合关注大模型结构安全性的研究者与开发者。

大语言模型持续学习面临稳定(保留旧知识)与可塑性(学习新任务)的平衡难题。尽管经验回放(ER)是缓解灾难性遗忘的标准方法,但其对多样化能力的影响仍不明确。本文揭示了ER行为中的关键矛盾:在鲁棒的非结构化任务上(如过往NLP分类任务)能带来正向迁移,但在脆弱的结构化领域(如代码生成)却导致严重负向迁移(编码准确率显著下降)。这表明ER以牺牲结构完整性为代价换取广泛巩固。为此,我们提出正交子空间唤醒(OSW),通过短暂唤醒阶段识别旧任务关键参数子空间,并对新任务施加正交更新,为已有知识结构提供数学上的“安全保证”。在四个任务序列的实证结果表明,OSW在传统回放失效的情况下仍能有效保护脆弱的代码生成能力,同时保持对新任务的高可塑性。研究强调评估结构安全性与平均保留率同等重要。

原文摘要 · Abstract (English)

Continual learning in Large Language Models (LLMs) faces the critical challenge of balancing stability (retaining old knowledge) and plasticity (learning new tasks). While Experience Replay (ER) is a standard countermeasure against catastrophic forgetting, its impact across diverse capabilities remains underexplored. In this work, we uncover a critical dichotomy in ER's behavior: while it induces positive backward transfer on robust, unstructured tasks (e.g., boosting performance on previous NLP classification tasks through repeated rehearsal), it causes severe negative transfer on fragile, structured domains like code generation (e.g., a significant relative drop in coding accuracy). This reveals that ER trades structural integrity for broad consolidation. To address this dilemma, we propose \textbf{Orthogonal Subspace Wake-up (OSW)}. OSW identifies essential parameter subspaces of previous tasks via a brief "wake-up" phase and enforces orthogonal updates for new tasks, providing a mathematically grounded "safety guarantee" for established knowledge structures. Empirical results across a diverse four-task sequence demonstrate that OSW uniquely succeeds in preserving fragile coding abilities where Replay fails, while simultaneously maintaining high plasticity for novel tasks. Our findings emphasize the necessity of evaluating structural safety alongside average retention in LLM continual learning.

持续学习大模型代码生成结构安全

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