MemSFT:用外部参数化内存缓解对齐惩罚

MemSFT: Mitigating Alignment Tax with an External Parametric Memory

精选理由

你想微调模型干专业活又怕它变傻?MemSFT加个记忆模块,领域知识涨了,通用能力不掉,比全参数微调靠谱。

AI 摘要

MemSFT提出一种可插拔的参数化内存模块,用于在不更新骨干网络参数的情况下注入领域知识。该内存通过模仿非参数检索器在领域数据上的行为来习得知识,并可跨不同规模的LLM复用。在生成时,学习到的路由器动态融合内存和骨干网络的输出分布。在生物、地理、法律三个领域,使用Qwen3-8B到Qwen3-235B-A22B的评估显示,MemSFT显著提升领域性能且通用性能几乎无下降,而全参数微调则遭受严重的通用性能遗忘。结果表明,该方法能在参数级别分离通用能力与领域知识。

原文 · arXiv cs.LG

MemSFT: Mitigating Alignment Tax with an External Parametric Memory

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.