arXiv:2607.25614cs.LGcs.CL2026-07被引 1

用外部记忆模块让大模型学专长不丢通用能力

MemSFT: Mitigating Alignment Tax with an External Parametric Memory

论文配图:MemSFT: Mitigating Alignment Tax with an External Parametric Memory
图 1 · 摘自论文原文
  • 用可插拔参数化记忆替代检索,避免微调损伤主干
  • 在生物、地质、法律领域提升专业表现,通用能力几乎不变
  • 记忆可复用于不同规模模型,适合需要专精又怕遗忘的场景

将大语言模型(LLM)适配特定领域常导致对通用任务的性能严重下降,即‘对齐税’。我们提出MemSFT,通过一个即插即用的参数化记忆模块,将领域专业化与主干参数更新解耦。该记忆经过训练,可模仿非参数检索器在领域数据上的行为,从而记住领域知识与模式。一旦在特定领域训练完成,记忆可跨不同尺寸的模型复用。生成时,一个学习到的路由机制在每步解码中动态融合记忆与主干的输出分布,实现领域知识的选择性调用。在从Qwen3-8B到Qwen3-235B-A22B的多个模型上,对生物学、地质学和法律领域的评估表明,MemSFT持续提升领域性能,且对通用性能影响极小;而全量微调则在通用任务上出现严重遗忘。结果表明,该方法实现了通用能力与领域知识在参数层面的解耦,为大模型提供新专长而不牺牲通用性。

原文摘要 · Abstract (English)

Adapting Large Language Models (LLMs) to specialized domains often incurs an alignment tax, as fine-tuning on domain-specific tasks can cause catastrophic forgetting and substantially degrade performance on general tasks. We propose MemSFT, which mitigates the alignment tax by decoupling domain specialization from backbone parameter updates through a plug-and-play parametric memory. The memory is trained to imitate the behavior of a non-parametric retriever operating over domain data, thereby memorizing knowledge and patterns that would otherwise be accessed through retrieval. Once trained on a specific domain, the memory can be reused across LLMs of different sizes. During generation, a learned router dynamically fuses the output distributions of the memory and backbone at each decoding step, allowing domain expertise to be invoked selectively. Across biology, geoscience, and law, evaluations with models ranging from Qwen3-8B to Qwen3-235B-A22B show that MemSFT consistently improves domain performance with negligible degradation in general performance, whereas full SFT suffers severe forgetting on general tasks. Overall, our results demonstrate a practical path to decoupling general model capabilities from domain-specific knowledge at the parameter level, thereby equipping LLMs with new specialized capabilities without compromising their general capabilities.

大模型领域适应记忆模块参数效率

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