一句话:提出开源命令行与网页工具 MergeSE,让软件工程研究者无需训练即可合并 HuggingFace 编码器检查点,并诊断、评估与导出合并模型。
微调后的代码模型常表现为领域专家,在分布偏移下性能急剧下降:在克隆检测场景中,同语言克隆上训练的模型跨语言时 F1 下降 71%,多任务模型在未见过的 AI 生成克隆上仅 0.151 F1。配套研究表明,事后模型合并可在无训练数据的情况下达到多任务性能的 93%,并对未见克隆类型的泛化能力提升 4 倍,但缺少实用工具支持检查点兼容性诊断、专家合并、SE 基准验证与部署导出。为此,作者提出 MergeSE:一个面向 HuggingFace 编码器检查点的免训练模型合并开源 CLI 与网页工具,内置覆盖漏洞检测、缺陷预测、代码坏味检测等九类 SE 分类任务的注册表,提供 tasks、inspect、merge、evaluate、export 五种操作,支持 TIES、DARE-TIES、Wudi、PCB 与平均五种合并算法,能检测跨任务分类头不匹配、产生可复现的确定性输出并内置基准样例。评估显示两个 124M 参数检查点的完整合并可在 CPU 上 5 秒内完成,端到端验证表明其输出与参考实现一致,并能从领域专家模型恢复跨域性能。
Fine-tuned code models often behave as domain specialists and can degrade sharply under distribution shift: in our clone-detection setting, a model trained on same-language clones drops 71% F1 on cross-language clones, while multi-task training falls to 0.151 F1 on unseen AI-generated clones. Our companion study shows that post-hoc model merging can address this fragmentation, achieving 93% of multi-task performance without training data while generalizing 4× better to unseen clone types. However, no practical tool exists that lets SE researchers diagnose checkpoint compatibility, merge specialists, validate results on SE benchmarks, and export models for deployment. We present MergeSE, an open-source CLI and web tool for training-free model merging of HuggingFace encoder checkpoints. While motivated by OOD generalization in clone detection, MergeSE supports SE classification workflows more broadly through a built-in registry of nine task types, including vulnerability detection, defect prediction, and code-smell detection. MergeSE provides five operations: tasks, inspect, merge, evaluate, and export. It supports five merging algorithms, including TIES, DARE-TIES, Wudi, PCB, and averaging; detects cross-task classification-head mismatches; produces seedable deterministic outputs; and includes bundled benchmark samples for smoke-test reproduction. A full merge of two 124M-parameter checkpoints completes in under 5 seconds on CPU. End-to-end validation confirms that MergeSE-produced checkpoints match reference implementations and recover cross-domain performance from domain-specific specialists. The tool is available online at https://mergese.usask.ca, and the development repository is at https://github.com/srlabUsask/MergeSE.
@inproceedings{paperbot12593,
title = {MergeSE: Post-Hoc Model Merging for Software Engineering Tasks without Retraining},
author = {Palash R. Roy and Banani Roy and Kevin A. Schneider and Chanchal K. Roy},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3834630}
}