arXiv:2412.07393cs.CLcs.AI2024-12被引 9

让大模型像人一样记新知识,不重训也能持续学习。

CMT: A Memory Compression Method for Continual Knowledge Learning of Large Language Models

  • 用记忆压缩技术存新知识,模型参数不变防遗忘。
  • 在StreamingQA上提升4.07点EM和4.19点F1,跨模型有效。
  • 适合需要长期更新知识的大模型应用,如智能客服。

大型语言模型需适应数据、任务和用户偏好的持续变化。由于模型规模庞大且训练成本高,频繁重训不可行,但更新又必不可少。为此,本文提出压缩记忆训练(CMT)方法,一种高效在线适配框架,具备强知识保留能力。受人类记忆机制启发,CMT将新文档信息压缩并存入记忆库;回答相关问题时,模型从记忆库聚合文档记忆以增强应答。模型参数在训练与推理中保持不变,降低灾难性遗忘风险。为进一步提升记忆的编码、检索与聚合效果,提出三项通用灵活技术:记忆感知目标、自匹配机制与顶聚合策略。在三个持续学习数据集(StreamingQA、SQuAD、ArchivalQA)上的大量实验表明,该方法显著提升模型在多个基础模型(如Llama-2-7b)上的适应性与鲁棒性,在StreamingQA上分别取得+4.07 EM和+4.19 F1的提升。

原文摘要 · Abstract (English)

Large Language Models (LLMs) need to adapt to the continuous changes in data, tasks, and user preferences. Due to their massive size and the high costs associated with training, LLMs are not suitable for frequent retraining. However, updates are necessary to keep them in sync with rapidly evolving human knowledge. To address these challenges, this paper proposes the Compression Memory Training (CMT) method, an efficient and effective online adaptation framework for LLMs that features robust knowledge retention capabilities. Inspired by human memory mechanisms, CMT compresses and extracts information from new documents to be stored in a memory bank. When answering to queries related to these new documents, the model aggregates these document memories from the memory bank to better answer user questions. The parameters of the LLM itself do not change during training and inference, reducing the risk of catastrophic forgetting. To enhance the encoding, retrieval, and aggregation of memory, we further propose three new general and flexible techniques, including memory-aware objective, self-matching and top-aggregation. Extensive experiments conducted on three continual learning datasets (i.e., StreamingQA, SQuAD and ArchivalQA) demonstrate that the proposed method improves model adaptability and robustness across multiple base LLMs (e.g., +4.07 EM & +4.19 F1 in StreamingQA with Llama-2-7b).

持续学习大模型记忆压缩

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