Exploring Model Kinship for Merging Large Language Models

Yedi Hu, Yunzhi Yao, Ningyu Zhang, Shumin Deng, Huajun Chen · DOI

Abstract

Model merging has emerged as a cost-effective alternative to multi-task fine-tuning, yet the process remains largely empirical and prone to performance plateaus. This paper introduces Model Kinship, a metric that quantifies the relatedness between Large Language Models (LLMs) based on weight variations relative to a common base. By drawing a parallel between iterative model merging and biological evolution, we identify "inbreeding"—the merging of highly similar models—as a primary cause of performance stagnation. We propose a kinship-aware merging strategy that strategically incorporates distinct models to escape local optima and achieve superior multi-task performance. Our results on the Mistral-7B architecture demonstrate that this approach achieves higher performance ceilings and improves computational efficiency.

Introduction

The rapid proliferation of specialized LLMs has spurred interest in model merging—the combination of multiple models into a single, versatile system without additional training. While iterative merging (often termed "Model Evolution") has shown promise, it frequently encounters a "saturation stage" where performance gains diminish. This paper addresses the lack of a principled understanding of these dynamics by introducing the concept of Model Kinship to guide the evolutionary path toward better generalization.

The Biological Analogy of Model Merging

The researchers propose that model merging is analogous to biological breeding. In this framework, model weights represent "genetic" information. Just as biological diversity is essential for the health and adaptation of a species, diversity in the model pool is crucial for continued performance improvement.

The conceptual analogy between biological wheat breeding and iterative model merging.

As shown in the analogy above, "Model Evolution" involves selecting high-performing "parents" to produce superior "offspring." However, if the parents are too closely related (high kinship), the resulting model suffers from "inbreeding," leading to a plateau in multi-task capabilities where further merges yield diminishing returns.

Quantifying Model Kinship

To operationalize this analogy, we define Model Kinship ($r$) as the similarity between weight variations ($\delta$) of two models relative to a shared base model. We evaluated three similarity functions: Pearson Correlation Coefficient (PCC), Cosine Similarity (CS), and Euclidean Distance (ED). Empirical analysis reveals a strong negative correlation (up to -0.77 for CS) between model kinship and potential merge gains. High kinship scores (e.g., PCC > 0.9) serve as a reliable indicator that the models have converged, suggesting that further merging within that lineage will yield negligible benefits.

Kinship-Aware Merging Strategy

Standard greedy merging algorithms typically select the top-$k$ performing models for the next generation. Our proposed strategy introduces an exploration step to maintain diversity:

  1. Selection: Identify the best-performing model in the current pool.
  2. Diversity Pairing: Instead of simply merging with the second-best model, we merge the top performer with the model that exhibits the lowest kinship (highest diversity) to it.
  3. Merging: Weights are combined using techniques like Spherical Linear Interpolation (SLERP).

This approach intentionally introduces weight-space shifts that allow the process to "jump" out of local optima.

Evolutionary Dynamics and Saturation

Our experiments identify a two-phase evolutionary path: an Improving Stage, where the model balances multiple tasks, and a Saturation Stage, where kinship becomes too high for further progress.

Average task performance and merge gain across generations, illustrating the saturation point and the benefit of diverse evolutionary paths.

As illustrated in the performance plots, vanilla greedy strategies often saturate early (e.g., by Generation 2). In contrast, the kinship-guided strategy successfully bypasses these plateaus, continuing to improve task performance through later generations by incorporating diverse model weights.

Key Results

  • Superior Performance: On the Mistral-7B architecture, the kinship-aware strategy achieved an average score of 69.13, outperforming vanilla greedy baselines (68.72) and one-step merging techniques like TIES or Dare-TIES.
  • Computational Efficiency: By using kinship as an early-stopping criterion (stopping when PCC > 0.9), researchers can reduce computation time by approximately 30% with minimal impact on final performance gains.
  • Robustness: The correlation between weight-space kinship and functional task performance holds across various benchmarks, including Winogrande (reasoning), GSM8k (math), and TruthfulQA.

Conclusion and Future Work

Model Kinship provides a biological map for navigating the complex landscape of LLM merging. By recognizing and avoiding "inbreeding," researchers can guide model evolution toward higher performance ceilings. Future work will explore the applicability of these principles to non-Transformer architectures and the integration of active feedback loops, such as reward models, to further refine the selection process.

Summary updated

BibTeX
@misc{hu2024exploring,
  author = {Yedi Hu and Yunzhi Yao and Ningyu Zhang and Shumin Deng and Huajun Chen},
  title = {{Exploring Model Kinship for Merging Large Language Models}},
  year = {2024},
  eprint = {2410.12613},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.12613},
}
Figure