Harnessing Optimization Dynamics for Curvature-Informed Model Merging

Pouria Mahdavinia, Hamed Mahdavi, Niloofar Mireshghallah, Mehrdad Mahdavi · DOI

Abstract

Recent research has uncovered that the "second-moment" statistics typically discarded after training AI models serve as a valuable, "free" map of a model's internal geometry. Leveraging this data, researchers developed Optimization Trajectory Aware (OTA) Merging, a framework designed to resolve conflicting updates between specialized models. By performing surgical, curvature-informed merges, OTA significantly outperforms standard averaging techniques, offering a scalable path toward multi-talented models without the overhead of retraining.

Introduction: The Challenge of Model Interference

Large Language Models (LLMs) are frequently fine-tuned into "experts" for specialized domains such as mathematics or software engineering. However, deploying a separate model for every task is computationally prohibitive. Model merging offers a solution by consolidating these experts into a single unified model.

The primary obstacle to effective merging is interference. When the weights of a math expert and a coding expert are simply averaged, their distinct knowledge bases often clash. This results in a "jack of all trades, master of none" that fails to match the performance of the original specialized models. While simple linear averaging is a common heuristic, it lacks a principled, geometry-aware foundation to minimize these conflicts.

Methodology: Optimization Trajectory Aware (OTA) Merging

The OTA framework utilizes second-moment estimates (the exp_avg_sq values from optimizers like Adam) as a proxy for the Fisher Information Matrix. This matrix acts as a map, identifying which parameters are most critical (curved) for a specific task.

The framework operates in two stages:

  1. Fast Fisher Grafting (FFG): This denoising step uses curvature data to distinguish essential parameter updates from noise. Updates deemed low-importance are reverted to the base model's values, creating "sparse" experts that retain only domain-essential knowledge.
  2. Curvature-Aware Aggregation: Instead of uniform averaging, OTA merges denoised experts using a weighted scheme based on local curvature. Parameters that are "stiff" or highly sensitive for a task are prioritized during the merge.

To ensure scalability for massive models, the authors implemented a rank-1 compression method. This reduces the storage requirements for curvature maps by over 99%, bringing them down from gigabytes to megabytes.

Key Insights: Geometry and Localization

A central finding of this work is the Shared Geometry Hypothesis: independently trained experts often converge to basins with remarkably similar curvature structures. This explains why linear merging works at all—the models are naturally aligned in their perception of parameter importance.

Furthermore, FFG reveals that task-specific knowledge is not distributed uniformly. It tends to concentrate in early attention layers (specifically query/key projections) and token embeddings.

Visualization of task localization via FFG, showing how specific parameters are dedicated to different domains.

In these localized regions, FFG induces a low-rank structure, indicating that only a few specific directions in the parameter space are utilized to acquire new skills.

Performance Evaluation

The researchers evaluated OTA using the Tulu-3 SFT mixture, covering mathematics, coding, and instruction following. Performance was measured using the OLMES toolkit.

OTA achieved a state-of-the-art average score of 0.582, surpassing strong baselines such as TIES (0.565) and Linear Averaging (0.551). Ablation studies highlighted that the FFG denoising step is the most critical component for reducing negative transfer between tasks.

Radar plot comparing OTA-Merging performance against various baselines across multiple benchmarks.

The rank-1 compressed version of OTA maintained a high score of 0.571, proving that the method remains effective even with minimal storage overhead.

Limitations and Future Directions

The main requirement for OTA is the availability of optimizer states from the fine-tuning process. While these are often saved during training, they are rarely included in public model releases. Additionally, this study focused on Supervised Fine-Tuning (SFT); future work is needed to explore curvature dynamics during Reinforcement Learning from Human Feedback (RLHF). The authors suggest that curvature-informed approaches could also benefit model pruning and continual learning.

Summary updated

BibTeX
@misc{mahdavinia2025harnessing,
  author = {Pouria Mahdavinia and Hamed Mahdavi and Niloofar Mireshghallah and Mehrdad Mahdavi},
  title = {{Harnessing Optimization Dynamics for Curvature-Informed Model Merging}},
  year = {2025},
  eprint = {2509.11167},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.11167},
}
Figure