Table of Contents
Fetching ...

ReasonAny: Incorporating Reasoning Capability to Any Model via Simple and Effective Model Merging

Junyao Yang, Chen Qian, Dongrui Liu, Wen Shen, Yong Liu, Jing Shao

TL;DR

ReasonAny tackles the problem of merging reasoning capabilities with domain-specific expertise without destructive interference. It introduces Contrastive Gradient Identification to locate reasoning subspaces in low-gradient regions and task subspaces in high-gradient regions, then resolves conflicts with exclusion and a weighted, disjoint composition. Across safety, biomedicine, and finance benchmarks, ReasonAny significantly outperforms baselines while preserving safety and domain knowledge, and it remains robust across model families and scales. This training-free approach offers a practical, scalable route to deploy multi-domain reasoning-enabled large language models with controlled behavior.

Abstract

Large Reasoning Models (LRMs) with long chain-of-thought reasoning have recently achieved remarkable success. Yet, equipping domain-specialized models with such reasoning capabilities, referred to as "Reasoning + X", remains a significant challenge. While model merging offers a promising training-free solution, existing methods often suffer from a destructive performance collapse: existing methods tend to both weaken reasoning depth and compromise domain-specific utility. Interestingly, we identify a counter-intuitive phenomenon underlying this failure: reasoning ability predominantly resides in parameter regions with low gradient sensitivity, contrary to the common assumption that domain capabilities correspond to high-magnitude parameters. Motivated by this insight, we propose ReasonAny, a novel merging framework that resolves the reasoning-domain performance collapse through Contrastive Gradient Identification. Experiments across safety, biomedicine, and finance domains show that ReasonAny effectively synthesizes "Reasoning + X" capabilities, significantly outperforming state-of-the-art baselines while retaining robust reasoning performance.

ReasonAny: Incorporating Reasoning Capability to Any Model via Simple and Effective Model Merging

TL;DR

ReasonAny tackles the problem of merging reasoning capabilities with domain-specific expertise without destructive interference. It introduces Contrastive Gradient Identification to locate reasoning subspaces in low-gradient regions and task subspaces in high-gradient regions, then resolves conflicts with exclusion and a weighted, disjoint composition. Across safety, biomedicine, and finance benchmarks, ReasonAny significantly outperforms baselines while preserving safety and domain knowledge, and it remains robust across model families and scales. This training-free approach offers a practical, scalable route to deploy multi-domain reasoning-enabled large language models with controlled behavior.

Abstract

Large Reasoning Models (LRMs) with long chain-of-thought reasoning have recently achieved remarkable success. Yet, equipping domain-specialized models with such reasoning capabilities, referred to as "Reasoning + X", remains a significant challenge. While model merging offers a promising training-free solution, existing methods often suffer from a destructive performance collapse: existing methods tend to both weaken reasoning depth and compromise domain-specific utility. Interestingly, we identify a counter-intuitive phenomenon underlying this failure: reasoning ability predominantly resides in parameter regions with low gradient sensitivity, contrary to the common assumption that domain capabilities correspond to high-magnitude parameters. Motivated by this insight, we propose ReasonAny, a novel merging framework that resolves the reasoning-domain performance collapse through Contrastive Gradient Identification. Experiments across safety, biomedicine, and finance domains show that ReasonAny effectively synthesizes "Reasoning + X" capabilities, significantly outperforming state-of-the-art baselines while retaining robust reasoning performance.
Paper Structure (60 sections, 13 equations, 5 figures, 14 tables, 1 algorithm)

This paper contains 60 sections, 13 equations, 5 figures, 14 tables, 1 algorithm.

Figures (5)

  • Figure 1: ReasonAny overcomes the destructive performance collapse in model merging, evaluated via GSM8K accuracy and max - current harmfulness score as Safety Score on Safety-Tuned bench. Methods in purple and blue bounds show the loss in specialized ability and reasoning capability, respectively. By reaching the top-right corner, ReasonAny preserves robust reasoning capability without compromising specialized utility.
  • Figure 2: Gradients Nuclear Norm Analysis and Additive Experiment Results. The top sub-figure shows gradient analysis across ($Q, K, V, O$) projection matrices at all layers. The top-left, top-middle, and top-right panels display Nuclear Norms for DeepSeek-R1-Distill Qwen-7B, Qwen-14B, and Llama-8B respectively, revealing that long-CoT induces significantly lower gradients than Short-CoT. The bottom sub-figures display additive experiments validating that reasoning capability lies in low-gradient regions. By merging weights from 10%, 5%, and 1% of highest and lowest gradient into base models, results across the top-left, top-middle, and top-right sub-figures consistently demonstrate that reasoning capability depends on weights associated with low gradients.
  • Figure 3: Experimental Results and Workflow of ReasonAny. Experimental results on Safety (top-left), Biomedicine, and Finance (top-right) benchmarks demonstrate ReasonAny, shown in light blue background, significantly outperforming baselines. ReasonAny Workflow (bottom) employs Contrastive Gradient Identification (bottom-right) to isolate low-gradient reasoning and high-gradient task weights and Exclusion (bottom-middle) step disjoint masks that merge specialized capabilities without compromising reasoning capabilities.
  • Figure 4: The left and left panel illustrates the Mean Absolute Difference (MAD) for Qwen2.5-7B and Qwen2.5-14B, quantifying the average magnitude difference across layers.
  • Figure 5: Comparing Linear, Task Arithmetic, TIES, DARE and LED merging on a Qwen2.5-7B ReasonAny model. Bold indicates previous method weaknesses; bold blue highlights ReasonAny's strengths.