MemSFT: Mitigating Alignment Tax with an External Parametric Memory
Jiarui Wang, Xiang Shi, Jiaqi Cao, Rubin Wei, Xiquan Wang, Hao Sun, Jingzhi Wang, Zhiqi Yang, Qipeng Guo, Bowen Zhou, Zhouhan Lin
Abstract
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.
Create a lesson
Metadata
- Categories
- cs.LG, cs.CL
- Comments
- 33 pages, 11 figures, 13 tables
Related papers
AlignPre: Skill-Aligned Post-Training for Latent-Free Generative Precipitation Nowcasting
Shared title terminologycs.LGDemin Yu, Kenghong Lin, Xutao Li
Mitigating Overgeneralization in RND via Spectral Target Design
Shared title terminologycs.LGMinseok Jeong, Yechan Lee, Hyewon Choi et al.
State Space Attention: Learning Context-Dependent Memory Retention
Shared title terminologycs.LGEge Çakar, Cengiz Pehlevan
The Geometry Is the Memory: Task-Density Routing for Continual LoRA
Shared title terminologycs.LGAlireza Heidari, Thomas Veasey, Mariano Tepper
Collaborative Weighting with Pessimistic Critic for Mitigating Overestimation in Off-Policy Reinforcement Learning
Shared title terminologycs.LGGong Gao, Xiao Lai, Ziqi Xie et al.
Understanding LoRA as Knowledge Memory: An Empirical Analysis
Shared title terminologycs.LGSeungju Back, Dongwoo Lee, Naun Kang et al.