Towards Minimizing Feature Drift in Model Merging: Layer-wise Task Vector Fusion for Adaptive Knowledge Integration

Wen-Ju Sun, Qing-Yong Li, Wen Wang, Yang Liu, Yangli-Ao Geng +1 more
5/1/2025
24 citations
lora-peft-merging

Official code: SunWenJu123/model-merging (11 stars, Python, last commit 2026-06-16).

Abstract

Multi-task model merging aims to consolidate knowledge from multiple fine-tuned task-specific experts into a unified model while minimizing performance degradation. Existing methods primarily approach this by minimizing differences between task-specific experts and the unified model, either from a parameter-level or a task-loss perspective.

Show full abstract

However, parameter-level methods exhibit a significant performance gap compared to the upper bound, while task-loss approaches entail costly secondary training procedures. In contrast, we observe that performance degradation closely correlates with feature drift, i.e., differences in feature representations of the same sample caused by model merging. Motivated by this observation, we propose Layer-wise Optimal Task Vector Merging (LOT Merging), a technique that explicitly minimizes feature drift between task-specific experts and the unified model in a layer-by-layer manner. LOT Merging can be formulated as a convex quadratic optimization problem, enabling us to analytically derive closed-form solutions for the parameters of linear and normalization layers. Consequently, LOT Merging achieves efficient model consolidation through basic matrix operations. Extensive experiments across vision and vision-language benchmarks demonstrate that LOT Merging significantly outperforms baseline methods, achieving improvements of up to 4.4% (ViT-B/32) over state-of-the-art approaches. The source code is available at https://github.com/SunWenJu123/model-merging.

View on arXivView PDF

Code Implementations(1)

110PythonSep 23, 20255 months ago

Similar Papers

Cite this paper

@article{sun2025towards,
  title  = {Towards Minimizing Feature Drift in Model Merging: Layer-wise Task Vector Fusion for Adaptive Knowledge Integration},
  author = {Wen-Ju Sun and Qing-Yong Li and Wen Wang and Yang Liu and Yangli-Ao Geng and Boyang Albert Li},
  year   = {2025},
  eprint = {2505.23859},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2505.23859},
  url    = {https://doi.org/10.48550/arXiv.2505.23859},
  journal = {Neural Information Processing Systems}
}

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/2505.23859.svg)](https://codeofpaper.com/paper/2505.23859)

Discussion