MemSFT: Mitigating Alignment Tax with an External Parametric Memory

Jiarui Wang, Xiang Shi, Jiaqi Cao, Rubin Wei, Xiquan Wang +6 more
7/28/2026
5 citations
cs.LGcs.CL

No official code found. Best implementation: JruiWang/MemSFT (28 stars, Apache-2.0, last commit 2026-07-30).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

JruiWang/MemSFTCommunity69%
Apache-2.0

The official implementation of the paper "MemSFT: Mitigating Alignment Tax with an External Parametric Memory".

280Jul 30, 20264 months agoApache-2.0

Similar Papers

Cite this paper

@article{wang2026memsft,
  title  = {MemSFT: Mitigating Alignment Tax with an External Parametric Memory},
  author = {Jiarui Wang and Xiang Shi and Jiaqi Cao and Rubin Wei and Xiquan Wang and Hao Sun and Jingzhi Wang and Zhiqi Yang and Qipeng Guo and Bowen Zhou and Zhouhan Lin},
  year   = {2026},
  eprint = {2607.25614},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.25614v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.25614.svg)](https://codeofpaper.com/paper/2607.25614)

Discussion