potentialpaper

M2A: Synergizing Mathematical and Agentic Reasoning in Large Language Models

JunJian Wang, Xin Zhou, Qiran Xu, Kun Zhan

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. While reasoning has become a central capability of large language models (LLMs), the reasoning patterns required for different scenarios are often misaligned. Mathematical reasoning typically relies on intrinsic logic to solve closed-world problems in a single response, whereas agentic reasoning requires not only internal reasoning but also multi-turn interaction with external environments, interleaving thought and action. This misalignment prevents mathematical and agentic reasoning from effectively benefiting from each other, often yielding unstable reasoning behavior and only limited performance gains under multi-task learning. In this paper, we propose M2A, a novel paradigm that synergizes mathematical and agentic reasoning via model merging. To avoid overfitting to superficial reasoning patterns under joint training, M2A operates directly in parameter space: it identifies the feature subspace critical for agent behavior, and merges the mathematical reasoning task vector only along its null space, thereby injecting reasoning capability along directions that do not perturb agent behavior. Unlike SFT or RL, M2A requires no additional gradient-update and exposes the merging coefficient as a simple knob for controlling reasoning length. Experiments in a challenging real-world coding agent setting show that our method effectively extends agentic reasoning depth and delivers substantial performance improvements. Applied to a fine-tuned Qwen3-8B, M2A improves its SWE-Bench Verified resolved rate from 44.0% to 51.2% without retraining the model. Further experiments demonstrate that M2A generalizes across model families, agent scaffolds, and task domains.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
29 Apr 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)forumreviews ↓[1]PDF[1]
Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:45 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

The paper proposes M2A, a training-free model merging method that injects mathematical reasoning into a coding agent while preserving its think-act-observe behavior, by identifying an agent-behavior-critical subspace from behavior markers and projecting the math task vector into its null space before layer-wise merging. On SWE-Bench Verified, it improves a Qwen3-8B agent from 44.0% to 51.2% without additional gradient-based training, and the merge coefficient acts as a knob for reasoning length.

We find the problem timely and the motivation convincing, noting the paper makes a clear case that "longer reasoning" is the wrong target and that preserving interaction frequency is what matters. The method is seen as conceptually neat and more principled than simple task-vector merging, the main result is strong in its setting.

The main shared concern is that the empirical scope seems somewhat narrow relative to the generality of the claim: the core results are on one base model family, one agent scaffold, and one benchmark. The method depends on specific behavior markers and on several design choices (calibration trajectories, marker set, window radius, layer mask, beta), so its robustness across chat templates, tool APIs, and agent frameworks is not yet fully clear.

It would help to add several additional settings, such as a second base model family, a different agent scaffold, or a non-coding agent benchmark, and to show that M2A still beats naive merges while keeping interaction steps roughly flat.

Final justification

M2A is a training-free, null-space merging method that injects mathematical reasoning into an agent while preserving its think–act–observe behavior. The rebuttal's added model families, scaffolds, and non-coding benchmarks convincingly resolve the reviewers' generalization concerns. We encourage the authors to discuss why interaction-step preservation varies across environments in the camera-ready.

Area Chair z2vf · Meta-reviewOpenReview ↗
Read meta-review
Meta-review

The paper proposes M2A, a training-free model merging method that injects mathematical reasoning into a coding agent while preserving its think-act-observe behavior, by identifying an agent-behavior-critical subspace from behavior markers and projecting the math task vector into its null space before layer-wise merging. On SWE-Bench Verified, it improves a Qwen3-8B agent from 44.0% to 51.2% without additional gradient-based training, and the merge coefficient acts as a knob for reasoning length.

We find the problem timely and the motivation convincing, noting the paper makes a clear case that "longer reasoning" is the wrong target and that preserving interaction frequency is what matters. The method is seen as conceptually neat and more principled than simple task-vector merging, the main result is strong in its setting.

The main shared concern is that the empirical scope seems somewhat narrow relative to the generality of the claim: the core results are on one base model family, one agent scaffold, and one benchmark. The method depends on specific behavior markers and on several design choices (calibration trajectories, marker set, window radius, layer mask, beta), so its robustness across chat templates, tool APIs, and agent frameworks is not yet fully clear.

It would help to add several additional settings, such as a second base model family, a different agent scaffold, or a non-coding agent benchmark, and to show that M2A still beats naive merges while keeping interaction steps roughly flat.

Final justification

M2A is a training-free, null-space merging method that injects mathematical reasoning into an agent while preserving its think–act–observe behavior. The rebuttal's added model families, scaffolds, and non-coding benchmarks convincingly resolve the reviewers' generalization concerns. We encourage the authors to discuss why interaction-step preservation varies across environments in the camera-ready.

2 comments
Authors · CommentOpenReview ↗

Anonymized Code and Data for Reviewer

Dear Area Chair,

To address Reviewer 1SEc’s request for access to our code and calibration data, while complying with the NeurIPS no-link policy, we respectfully provide the anonymized repository below:

https://anonymous.4open.science/r/artifact-8d318550-8C8E/

The repository contains the model-merging code and calibration data used in our experiments. All materials have been anonymized.

Thank you for your time and assistance.

Best regards, The Authors

Authors · CommentOpenReview ↗

Dear Area Chair,

Thank you for recognizing the timely problem addressed by M2A, its convincing motivation, principled geometric design, and strong main result. We also appreciate your recognition that preserving interaction frequency—rather than merely increasing reasoning length—is central to effective agent reasoning.

During the rebuttal and discussion period, we focused directly on the shared concern about the generalization and robustness of M2A.

Generalization across models, scaffolds, and benchmarks

We carefully follow the suggestions from the Area Chair and reviewers, and extended our experiments to include a second model family, two additional coding-agent scaffolds, and the non-coding GAIA benchmark, with Task Arithmetic and RAIN-Merging as representative merging baselines. These results directly address the main concern: M2A transfers across model families, agent scaffolds, and task domains and consistently outperforms naive merging methods.

Model Scaffold SWE score Avg. reasoning length Avg. interaction steps
Llama3.1-8B-Agent OpenHands 17.6% 207.79 67.66
Task Arithmetic OpenHands 21.0% 483.38 43.73
RAIN-Merging OpenHands 20.4% 242.45 70.00
M2A OpenHands 23.0% 228.76 70.70

On Llama-3.1-8B, M2A achieves the highest SWE score while maintaining an interaction pattern close to the original agent, providing initial evidence that the method transfers beyond Qwen3-8B.

Model Scaffold SWE score Avg. reasoning length Avg. interaction steps
Agent-8B Mini-SWE-Agent 42.6% 179.08 168.00
Task Arithmetic Mini-SWE-Agent 43.5% 866.42 80.79
RAIN-Merging Mini-SWE-Agent 35.8% 179.40 189.56
M2A Mini-SWE-Agent 46.4% 294.97 169.99
Agent-8B R2E 46.6% 208.93 149.27
Task Arithmetic R2E 48.7% 847.47 70.70
RAIN-Merging R2E 46.8% 209.30 151.70
M2A R2E 49.8% 277.76 166.33

Mini-SWE-Agent and R2E are agent scaffolds that differ from OpenHands. Without any scaffold-specific retraining or recalibration, M2A consistently performs strongly on both settings, outperforming the naive merging baselines while maintaining a stable interaction pattern. Overall, these results indicate that M2A does not rely on a specific behavior marker design or a particular agent framework, and can generalize effectively across different scaffolds.

Model GAIA score Avg. reasoning length Avg. interaction steps
Agent-8B 73.33% 850 13.65
Task Arithmetic 66.1% 2759.1 11.04
RAIN-Merging 69.1% 2007.1 14.45
M2A 78.79% 959 19.22

On GAIA, M2A substantially outperforms both the original agent and the naive merging baselines, while preserving more interaction behavior than Task Arithmetic and RAIN-Merging. This result provides further evidence that M2A generalizes beyond coding agents and remains effective on non-coding agent benchmarks.

We also made the following additions in direct response to the individual reviews:

  • For Reviewer 1SEc, we clarified M2A’s distinction from RAIN-Merging, released anonymized code and calibration data, and added naive-merging comparisons.
  • For Reviewer EssE, we demonstrated robustness across calibration quality and scaffold sources, and validated the global-mean layer-selection rule against Top-(k) and fixed-threshold alternatives.
  • For Reviewer bJz5, we clarified that behavior markers represent general agent behavior, validated an different marker format on Llama-3.1-8B, and confirmed calibration–evaluation disjointness.

Although the reviewers have not yet provided follow-up feedback, we remain very happy to discuss any remaining questions. We hope these additional experiments and clarifications address the shared concerns and strengthen the evidence for the generality and robustness of M2A. We respectfully ask that they be considered in the final decision.

Best regards,

The Authors

Reviewer bJz5OpenReview ↗
Rating
4/6
Confidence
3/5
Quality
2/4
Clarity
3/4
Significance
4/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper proposes M2A, a training-free model merging method for transferring mathematical reasoning ability into a coding agent while preserving the agent's think-act-observe behavior. The key idea is to identify an agent-critical behavior subspace from special transition markers and project the mathematical reasoning task vector into the null space of that subspace before layer-wise merging. The main evaluation is on SWE-Bench Verified using a Qwen3-8B-based agent.

Strengths and weaknesses

Strengths

  • The problem is timely and well motivated: naive multi-task SFT and naive merging can increase reasoning length while harming interactive agent behavior.
  • The method is conceptually neat: behavior-marker calibration plus null-space projection gives a plausible mechanism for preserving interaction patterns.
  • The main result is strong in its setting: 44.0% to 51.2% resolved rate on SWE-Bench Verified, with ablations showing drops when removing mask, calibration, or null projection.
  • The trajectory-level analysis is useful; it supports the claim that M2A changes when the agent reasons and acts, not merely total reasoning length.
  • The appendix gives useful implementation and evaluation details, including OpenHands setup, hyperparameters, and calibration set/window ablations.

Weaknesses

  • The empirical scope is narrow for the strength of the claim. The core result is one base model family, one agent task domain, and one main benchmark.
  • The method depends on specific behavior markers such as think/tool-call delimiters. It is not fully clear how robust the approach is across different chat templates, tool APIs, or agent frameworks.
  • The calibration data are agent trajectories from the same style of agent. More analysis is needed on whether M2A generalizes to different trajectory distributions.
  • The merge-strength “control knob” is interesting, but it relies on empirical tuning. The choice of calibration trajectories, marker set, window radius, layer mask, and beta may all affect the degree of preservation versus reasoning transfer. I conern that this would make this method hard to tune.
Questions
  • How sensitive is M2A to the exact choice of behavior markers and to agent frameworks that do not expose explicit think/tool delimiters?
  • Does the method still improve performance on non-coding agent benchmarks, or on coding agent tasks outside SWE-Bench Verified?
  • Can the authors report results with a second base model family or a different agent scaffold?
  • Are the 100 calibration trajectories disjoint from all evaluation instances and from related issue repositories?
Limitations

A key limitation is that M2A’s behavior preservation depends on the quality of the estimated agent-critical subspace. The paper estimates this subspace from hidden states around a small set of behavior markers such as thinking and tool-call delimiters. This is reasonable for the authors’ agent format, but may not capture all directions that govern agentic behavior, especially in frameworks with different prompting styles, implicit tool use, or less structured interaction traces. Conversely, some useful mathematical reasoning directions may overlap with the protected subspace and be removed by the null-space projection.

The empirical validation is also relatively narrow. The main controlled results are on one Qwen3-8B-based agent, one OpenHands-style scaffold, and SWE-Bench Verified. It remains unclear whether the same projection strategy transfers to other agent environments, non-coding tasks, different tool APIs, or larger/different model families. The method also involves several design choices, including marker selection, calibration trajectories, window radius, layer mask, and merge strength beta; although the paper includes some ablations, a more principled selection criterion would strengthen the work.

Formatting concerns

No formating concerns.

2 comments
Authors · RebuttalOpenReview ↗
Rebuttal

Response to Reviewer bJz5

Thank you for the thoughtful and constructive review. We especially appreciate your recognition of the paper’s motivation, strong empirical results, and trajectory-level analysis, as well as your valuable suggestions on generalization and robustness. We added experiments to examine the dependence of M2A on behavior markers, agent frameworks, model families, and evaluation domains.

Q1. Sensitivity to behavior markers

M2A is not tied to specific delimiter tokens; it only requires identifiable boundaries between reasoning, action, and environment feedback.

  1. Marker choice. A behavior marker can be any boundary in the serialized trajectory, rather than a specific token such as <think>, #Thought, <function_call>, or an XML tag. Even when a framework does not use special delimiters, ordinary text or turn boundaries separating reasoning, actions, and observations can serve as behavior markers. n our original experiments, we use Qwen3-8B’s native tool-calling format with <think>, </think>, <tool_call>, and </tool_call>. For Llama-3.1-8B, which does not support native tool calling, we instead adopt an XML-style function format, using <think>, </think>, <function=>, and </function>.
Model Scaffold SWE score Avg. reasoning length Avg. interaction steps
Agent-8B-Llama3.1 OpenHands 17.6% 148.01 68.02
M2A OpenHands 23.0% 158.36 65.78

With this different marker format, M2A still improves the SWE score by 5.4 percentage points, while keeping interaction steps nearly unchanged. This suggests that the method is not sensitive to one specific set of delimiter tokens.

  1. Frameworks without explicit delimiters. Current open-weight agent models generally expose tool-call or turn boundaries that can be used for calibration. Some closed commercial models accessed through APIs may hide their reasoning or internal delimiters. However, M2A requires access to model parameters for model merging and therefore currently applies to open-weight models rather than closed API-only systems. We will clarify this scope and the flexibility of behavior-marker selection in the revision. M2A does not depend on a particular literal behavior marker or agent framework. The markers are simply a way to locate transitions between reasoning, action, and observation in the serialization used by a given agent. For agents without explicit <think> delimiters, the same procedure can use tool-call boundaries and assistant–environment turn transitions.

Q2. Generalization to non-coding agent benchmarks

M2A also improves performance on non-coding agent benchmarks.

We evaluated M2A on BFCL V4 for agentic function calling and GAIA for general agent question answering.

Model Domain BFCL V4 score Avg. reasoning length Avg. interaction steps
Agent-8B Agentic function calling 31.67% 1928 18.80
M2A Agentic function calling 34.01% 2291 18.10
Model Domain GAIA score Avg. reasoning length Avg. interaction steps
Agent-8B General agent QA 73.33% 850 13.65
M2A General agent QA 78.79% 959 19.22

M2A improves performance by 2.34 points on BFCL V4 and 5.46 points on GAIA. These results show that its benefits extend beyond coding tasks to general agent scenarios involving function calling, tool use, and multi-step question answering. M2A can generalize beyond coding agents to general-domain agent tasks.

Q3. Generalization to another model family and agent scaffold

M2A generalizes to both a second model family and different agent scaffolds.

For model-family generalization, we trained Agent-8B-Llama3.1 from Llama-3.1-8B using the same training data as Agent-8B.

Model Scaffold SWE score Avg. reasoning length Avg. interaction steps
Agent-8B-Llama3.1 OpenHands 17.6% 148.01 68.02
M2A OpenHands 23.0% 158.36 65.78

M2A improves the SWE score by 5.4 percentage points, while keeping the average interaction steps nearly unchanged. This confirms that M2A is effective beyond the Qwen3 model family.

For scaffold generalization, we directly evaluated the Agent-8B and M2A models trained and calibrated with OpenHands on Mini-SWE-Agent and R2E, without scaffold-specific retraining or recalibration. Both scaffolds differ from OpenHands in their tool definitions, tool-call formats, and interaction protocols.

Model Scaffold SWE score Avg. reasoning length Avg. interaction steps
Agent-8B Mini-SWE-Agent 42.6% 146.22 153.87
M2A Mini-SWE-Agent 46.4% 224.56 156.70
Agent-8B R2E 46.6% 171.37 134.01
M2A R2E 49.8% 251.51 155.44

Without scaffold-specific adaptation, M2A improves the SWE score by 3.8 points on Mini-SWE-Agent and 3.2 points on R2E. These results show that M2A is not tied to the OpenHands tool format or interaction protocol.We will include the full results and experimental details in the revision.

Q4. Calibration data and disjointness

The calibration data are disjoint from the evaluation instances and trajectories, as stated in Appendix B.1. The instances come from the open-source dataset Scale-SWE. All of our code and data will be made publicly available.

Authors · CommentOpenReview ↗

We hope our rebuttal can address your concerns. We would be very happy to discuss any remaining questions. If you find that your concerns have been resolved, we would sincerely appreciate it it if you could consider increasing your score.

Reviewer EssEOpenReview ↗
Rating
5/6
Confidence
3/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper proposes M2A, a training-free model merging method for integrating mathematical reasoning capability with agentic reasoning capability in large language models. The core motivation is that mathematical reasoning models typically favor single-turn, long-chain internal reasoning, whereas software engineering agents need to maintain a multi-turn think-act-observe interaction loop with the environment. Therefore, direct multi-task SFT or naive model merging may increase reasoning length while disrupting the behavioral pattern required for agent-environment interaction.

M2A formulates this as a problem of “behavior-preserving capability fusion.” The method first identifies agent-behavior-critical subspaces using hidden states around behavioral switching markers such as reasoning delimiters and tool-call delimiters. It then projects the mathematical reasoning task vector into the null space of these protected directions. Finally, it performs adaptive layer-wise merging by combining norm-based layer-wise merge coefficient calibration with a similarity-aware layer mask. Experiments show that, on SWE-Bench Verified, M2A improves the resolved rate of Agent-8B from 44.0% to 51.2% without additional gradient-based training, while also improving performance on mathematical benchmarks. The method further provides a controllable merge strength parameter for adjusting reasoning length.

Strengths and weaknesses

This paper studies an important and timely problem: how to transfer stronger internal reasoning capabilities into LLM agents without damaging their behavioral patterns for interacting with external environments. The paper provides a fairly thorough analysis of the differences between mathematical reasoning and agentic reasoning, and the experiments demonstrate that “longer reasoning” does not necessarily lead to better agent performance. The design of M2A is clear: it first estimates agent-behavior-critical directions, and then injects mathematical reasoning updates only into the orthogonal complement of those directions. This design has a clear geometric interpretation and is more principled than simple task-vector merging.

The experimental results are reasonably convincing. On SWE-Bench Verified, M2A achieves a clear improvement over the Agent-8B baseline and outperforms several model merging baselines. The paper also provides valuable behavioral analyses, including average reasoning length, number of interaction steps, number of searches and inspections before the first edit, number of edits, and termination reason distributions. These analyses support the authors’ central claim: M2A does not simply make the model “think longer,” but instead encourages the agent to reason more carefully at key decision points and shift toward more evidence-grounded actions.

However, the evaluation scope remains somewhat narrow. The main agent evaluation is concentrated on SWE-Bench Verified and uses one primary model family together with a specific coding-agent scaffold. Since the paper positions the method as a general mechanism for combining mathematical reasoning and agentic reasoning, validation in more agent environments, such as web navigation, tool-use QA, data analysis agents, or other coding-agent scaffolds, would more strongly support its generality. It is currently not fully clear whether the behavior marker calibration can generalize robustly across chat templates, tool formats, and agent frameworks.

In addition, the method depends on several design choices whose robustness could be further clarified, including the source of calibration trajectories, the marker set, the window radius, the layer mask threshold, and the modules involved in merging. The paper already provides useful ablations for some factors, but the impact of the calibration data distribution remains an important question. For example, if the calibration trajectories come from a different agent, a weaker agent, or a different tool schema, it is still unclear whether the protected behavioral subspace would remain stable.

In terms of originality, M2A builds on existing ideas from null-space projection and model merging, but applies them to a meaningful new problem: preserving multi-turn agent behavior while injecting mathematical reasoning capability. The marker-based estimation of behavioral subspaces and adaptive layer-wise merging make the method more than a direct application of existing null-space merging approaches. Overall, the paper is clearly written, although some implementation details are mainly placed in the appendix. The main text could further explain the practical computational cost and sensitivity of the projection operator.

Questions
  1. How well does M2A generalize beyond SWE-Bench Verified and the OpenHands-style scaffold? In particular, it would be important to evaluate M2A under other widely used coding-agent harnesses, such as Claude Code- or Codex-style environments, where the tool interfaces, action formats, interaction protocols, and edit-execution loops may differ substantially from OpenHands. Such results would help clarify whether the proposed behavior-preserving merge captures general agentic reasoning patterns, rather than behaviors specific to a particular scaffold.

  2. How sensitive is the method to the source and quality of calibration trajectories? A valuable experiment would be to compare calibration using strong trajectories, weak trajectories, trajectories from different scaffolds, and randomly failed trajectories.

  3. The layer mask uses global average similarity as the threshold. Would alternatives such as top-k layer selection, a tunable threshold, or a continuous soft mask provide better stability? A small-scale ablation would help determine whether this design choice is critical.

  4. Can the method be extended to more general-domain agents, such as deep research agents? Intuitively, the mechanism seems potentially general beyond the coding domain.

Limitations

See Questions.

Final justification

After considering the rebuttal, subsequent discussion, and the additional experimental evidence provided by the authors, I recommend 5: Accept.

  • Generalization concern resolved. My original concern was that the main evaluation was concentrated on SWE-Bench Verified with an OpenHands-style scaffold. The added experiments on Mini-SWE-Agent and R2E show consistent improvements without retraining or recalibration, which provides useful evidence that M2A is not tightly coupled to a single agent scaffold or tool format.

  • Robustness concerns were substantially addressed. The authors provided additional analyses of calibration-source quality and layer-selection strategies. The results suggest that M2A is relatively robust to successful/failed trajectories and cross-scaffold calibration data, while the global-mean similarity rule performs favorably compared with Top-(k) and fixed-threshold alternatives.

Overall, the rebuttal has addressed my main concerns, and the remaining issues are primarily opportunities for further validation rather than fundamental weaknesses of the method. I therefore support acceptance and encourage the authors to include the additional rebuttal/discussion experiments and corresponding details in the camera-ready version.

Formatting concerns

Not found.

2 comments
Authors · RebuttalOpenReview ↗
Rebuttal

Response to Reviewer EssE

Thank you for the careful reading and for recognizing that M2A improves how an agent coordinates reasoning and action, rather than merely producing longer reasoning traces. Your questions led us to add several experiments on generalization and robustness.

Q1. Generalization to another agent scaffold

M2A does not rely on a specific scaffold: it calibrates general agent behavior patterns rather than scaffold-specific tool formats or interaction rules. Although Claude Code and Codex are widely used, their complete commercial scaffolds are not publicly available that allows us to replace the underlying model with our merged model and conduct experiments. To evaluate cross-scaffold generalization, we therefore added experiments on two open-source coding-agent scaffolds, Mini-SWE-Agent and R2E. Both use different tool definitions, tool-call formats, and interaction protocols from OpenHands. Agent-8B and M2A were trained and calibrated only with OpenHands trajectories, and were directly transferred to these scaffolds without retraining or recalibration.

Model Scaffold SWE score Avg. reasoning length Avg. interaction steps
Agent-8B Mini-SWE-Agent 42.6% 146.22 153.87
M2A Mini-SWE-Agent 46.4% 224.56 156.70
Agent-8B R2E 46.6% 171.37 134.01
M2A R2E 49.8% 251.51 155.44

M2A consistently improves coding-agent performance on both scaffolds, outperforming the original Agent model. These results show that M2A is not tied to a specific scaffold or tool format, but generalizes across different coding-agent frameworks. We will include the full results and experimental details in the revision.

Q2. Sensitivity to calibration-source quality

Our calibration does not depend on trajectory success, because it captures the Agent’s think–act–observe behavior rather than learning from successful solutions. Our calibration data are constructed by randomly sampling 100 interaction steps from different rollout trajectories generated by the Agent model. These trajectories include both successful and failed runs, and the task instances come from the open-source dataset Scale-SWE. The sampling does not depend on whether the final trajectory succeeds or fails. The key requirement is that the calibration data remain on-policy, i.e., generated by the same Agent model whose behavior is being preserved.

We agree that the experiment you proposed is valuable. Due to the limited rebuttal time and computational resources, we may not be able to complete this full study during the discussion period, but we will include it in our follow-up experiments.

Q3. Ablation of the layer-selection rule

The global-mean similarity rule performs better than the tested top-(k) alternatives and does not require an additional hyperparameter.

We agree that comparing alternative layer-selection rules is valuable. Due to limited rebuttal time and computational resources, we focused on a top-(k) ablation, comparing the global-mean rule with Top-(5) and Top-(10) selection.

Layer selection Selected layers SWE score Avg. reasoning length Avg. interaction steps
Global mean similarity 14–28 51.2% 327.40 178.00
Top-(5) 18–22 46.2% 247.49 159.49
Top-(10) 16–25 45.6% 292.54 151.71

The global-mean rule outperforms Top-(5) and Top-(10) by 5.0 and 5.6 percentage points, respectively. It adapts automatically to the layer-similarity distribution and avoids introducing an additional (k) or manually tuned threshold. We will clarify that the middle-layer pattern in Figure 9(b) is selected automatically by this rule rather than manually specified.

Q4. General-domain agents

The reviewer’s intuition is correct: M2A can indeed generalize beyond coding agents to general-domain agent tasks. Due to limited time and resources, we do not currently have the infrastructure required to evaluate a full deep-research agent. We therefore added experiments on two established general-domain agent benchmarks: agentic function calling on BFCL V4 and general agent question answering on GAIA.

Model Domain BFCL V4 score Avg. reasoning length Avg. interaction steps
Agent-8B Agentic function calling 31.67% 1928 18.80
M2A Agentic function calling 34.01% 2291 18.10
Model Domain GAIA score Avg. reasoning length Avg. interaction steps
Agent-8B General agent QA 73.33% 850 13.65
M2A General agent QA 78.79% 959 19.22

M2A improves performance by 2.34 points on BFCL V4 and 5.46 points on GAIA. These results provide direct evidence that M2A is not limited to coding agents and can also benefit general-domain agents involving function calling, tool use, and multi-step question answering.

Authors · CommentOpenReview ↗

Additional Results on Calibration Sources and Layer Selection

Following our rebuttal, we further added experiments on calibration-source quality and tunable layer-selection thresholds.

Q2. Sensitivity to calibration-source quality

Thank you for suggesting this valuable experiment. In the rebuttal, we explained why M2A should be insensitive to calibration-trajectory quality. We now provide empirical results using successful rollouts, failed rollouts, randomly sampled trajectories, and trajectories from different scaffolds.

Calibration source SWE score Avg. reasoning length Avg. interaction steps
Randomly sampling 51.2% 327.4 178.0
Failed rollouts 50.6% 299.29 165.77
Successed rollouts 50.2% 291.53 162.59
Mix scaffold (50% Mini-SWE-Agent, 50% R2E) 50.0% 302.9 166.67

For the mixed-scaffold setting, we constructed the calibration set using trajectories from Mini-SWE-Agent and R2E, performed merging with this calibration set, and evaluated the resulting model with OpenHands. Across all calibration sources, the performance differences are consistently small, indicating that M2A is not sensitive to the specific choice of trajectories, whether they are successful, failed, or from different scaffolds. Random sampling performs slightly better, because it provides greater trajectory diversity. Overall, these results support the robustness of M2A to both calibration-source quality and scaffold distribution.

Q3. Ablation of the layer-selection rule

In the rebuttal, we compared the global-mean rule with Top-(k) selection. We further add experiments using tunable similarity thresholds as an alternative layer-selection mechanism.

Layer selection # merged layers SWE score Avg. reasoning length Avg. interaction steps
Global mean similarity(0.03) 14~28 51.2% 327.4 178.0
Top-(5) 18~22 46.2% 247.49 159.49
Top-(10) 16~25 45.6% 292.54 151.71
Fixed threshold (0.04) 15–25 49.6% 283.15 165.34
Fixed threshold (0.05) 17–23 50% 308.22 154.29

Although tuned thresholds improve over Top-(k), they still underperform the global-mean rule. The global-mean rule remains the best-performing choice while avoiding an additional threshold hyperparameter.

We hope our rebuttal and official comment can address your concerns. We would be very happy to discuss any remaining questions. If you find that your concerns have been resolved, we would sincerely appreciate it it if you could consider increasing your score.

Reviewer 1SEcOpenReview ↗
Rating
4/6
Confidence
4/5
Quality
2/4
Clarity
3/4
Significance
3/4
Originality
2/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

Training-free merging of a math model into a coding agent that preserves the agent's interaction behavior via null-space projection. On SWE-Bench Verified, Qwen3-8B goes 44.0 → 51.2 (Avg@3) while keeping interaction-step count basically flat, and the merge strength β acts as a knob for reasoning length.

Strengths and weaknesses

Strength

  1. The method is well-motivated and the diagnosis is convincing: Table 1 makes a clear case that "longer reasoning" is the wrong target (multi-task SFT lengthens reasoning but drops resolved rate), and that the real goal is preserving interaction frequency. The method follows directly from that diagnosis.
  2. This is a genuinely practical result. Training-free, 1 GPU and ~2 hours (Table 8), and the merged 8B beats several 8–32B SFT/RL agents in Table 1. For people who can't run agent RL, that matters.
  3. The trajectory analysis (Table 2) and the two case studies (App. G) tell a coherent story — more search/inspection before the first edit, fewer edits — that goes beyond the aggregate number and gives a mechanism for why it helps.

Weakness

  1. Novelty over RAIN-Merging [12] needs to be stated plainly. Null-space-projected merging to preserve a model's "thinking format" is exactly RAIN's idea; M2A re-targets it to agent behavior markers and adds layer-wise α + mask. That's a reasonable contribution, but the paper should own the delta rather than describe RAIN only in the related work.
  2. Will the merging code and the calibration recipe (including what "Scale-SWE trajectories" are) be available during the discussion period? Without them, the parameter-space pipeline is hard to verify.
  3. All results are Qwen3-8B on SWE-Bench Verified, and the method leans on model-specific choices (template marker tokens, the "merge middle layers" pattern in Fig. 9b), so it's unclear whether it generalizes. Since M2A is training-free, one extra setting would settle this — a different base model (e.g., Llama-3.1-8B) or a second agent benchmark (e.g., GAIA). If M2A still beats the naive merges while keeping interaction steps roughly flat (not just longer reasoning).
Questions

see weakness

Limitations

yes

Final justification

They address my main concerns on the RAIN comparison, calibration details, and generalization beyond Qwen3-8B / SWE-Bench. I am raising my score from 3 → 4.

Formatting concerns

no

3 comments
Authors · RebuttalOpenReview ↗
Rebuttal

Response to Reviewer 1SEc

Thank you for recognizing the practical value of M2A, the strength of its results, and the evidence provided by our trajectory analysis. Following your suggestions, we added experiments that address the main concern about generalization and clarified how M2A differs from RAIN-Merging.

Q1. Comparison with RAIN-Merging

Thank you for recognizing M2A’s contributions! We mention in the Introduction that our work was inspired by RAIN-Merging and briefly discuss it in the Related Work section. We also agree that the distinction between the two methods should be stated more explicitly. Below, we provide a more comprehensive comparison, and we will add a section in the revised version to discuss their similarities and differences.

M2A takes inspiration from RAIN-Merging but addresses a different problem:

RAIN-Merging M2A
Starting model Large reasoning model Multi-turn agent model
Injected capability Instruction following Mathematical reasoning
Protected behavior Single-response thinking format Multi-turn think–act–observe transitions
Calibration signal Thinking format Agent behavior pattern
Merge control Instruction-attention Layer-wise norm calibration + Similarity-aware Layer Mask
Primary goal Preserve reasoning format while improving instruction following Preserve agent interaction while improving internal reasoning

RAIN protects the structured thinking format of a reasoning model, whereas M2A identifies and protects agent behavior pattern. M2A also introduces layer-wise scale calibration and a similarity-aware mask for balancing the two task vectors, which doesn't require complex instruction-attention calculations. This methodological difference is reflected in the results: on SWE-Bench Verified, M2A substantially outperforms RAIN-Merging (51.2% vs. 43.2%).

Q2. Code and calibration recipe

We would be glad to provide the code and data. However, due to NeurIPS policy, we can only share the anonymized code repository with the AC via an Official Comment. The repository includes the merging code and the calibration data used in our experiments. Beyond that, all of our code and data will be made publicly available.

Regarding the calibration recipe, Scale-SWE is an open-source dataset introduced in Immersion in the GitHub Universe: Scaling Coding Agents to Mastery, which contains SWE tasks together with their corresponding execution environments. We randomly sampled around 300 distinct tasks from Scale-SWE and used our SFT-trained Agent-8B model to solve them, resulting in 300 successful or failed task trajectories. Each trajectory consists of multiple rounds of think–action–observation interactions. We sampled 100 individual interaction steps from these 300 trajectories and used them as calibration data. Thus, the calibration samples cover different tasks, both successful and failed trajectories, and different interaction step within each trajectory, thereby reducing potential sampling bias. We will include these details in a future version of the paper.

Q3. Generalization beyond Qwen3-8B, OpenHands, and SWE-Bench Verified

We agree that generalization is crucial and consider it a key strength of our method. To further validate this, we conducted additional experiments showing that M2A generalizes across model families, agent scaffolds, and benchmarks. Due to limited rebuttal time and computational resources, we focused on the following core experiments covering these three dimensions. Different model family. We trained Agent-8B-Llama3.1 from Llama-3.1-8B using the same training data as Agent-8B.

Model Scaffold SWE score Avg. reasoning length Avg. interaction steps
Llama3.1-8B-Agent OpenHands 17.6% 207.79 67.66
M2A OpenHands 23.0% 228.76 70.70

M2A improves the SWE-Bench score by 5.4 percentage points on Llama-3.1-8B, while keeping the average interaction steps nearly stable, demonstrating that the method is effective beyond the Qwen3 model family.

Different agent scaffolds. Agent-8B and M2A were trained and calibrated only with OpenHands trajectories, and were then directly evaluated on Mini-SWE-Agent and R2E without scaffold-specific retraining or recalibration. These scaffolds use different tool definitions, tool-call formats, and interaction protocols.

Model Scaffold SWE score Avg. reasoning length Avg. interaction steps
Agent-8B Mini-SWE-Agent 42.6% 179.08 168.00
M2A Mini-SWE-Agent 46.4% 294.97 169.99
Agent-8B R2E 46.6% 208.93 149.27
M2A R2E 49.8% 277.76 166.33

Without any scaffold-specific adaptation, M2A improves the SWE-Bench score by 3.8 points on Mini-SWE-Agent and 3.2 points on R2E, showing that its gains transfer across different tool and interaction protocols.

Different benchmarks. We also directly evaluated Agent-8B and M2A on agentic function calling and general agent QA benchmarks.

Model Domain BFCL V4 score Avg. reasoning length Avg. interaction steps
Agent-8B Agentic function calling 31.67% 1928 18.80
M2A Agentic function calling 34.01% 2291 18.10
Model Domain GAIA score Avg. reasoning length Avg. interaction steps
Agent-8B General agent QA 73.33% 850 13.65
M2A General agent QA 78.79% 959 19.22

M2A improves performance by 2.34 points on BFCL V4 and 5.46 points on GAIA, indicating that its benefits extend beyond coding agent and can generalize to other agent task such as function calling and general agent QA.

Authors · CommentOpenReview ↗

Additional Results on Naive Merging Baselines

To address your question—“If M2A still beats the naive merges while keeping interaction steps roughly flat (not just longer reasoning)”—we further added experiments with naive merging methods. We selected Task Arithmetic and RAIN-Merging as two representative model-merging baselines and conducted comparisons across different model families, agent scaffolds, and benchmarks. Overall, M2A demonstrates superior performance compared to other naive merging methods across different models, scaffolds, and benchmarks.

Model Scaffold SWE score Avg. reasoning length Avg. interaction steps
Llama3.1-8B-Agent OpenHands 17.6% 207.79 67.66
Task Arithmetic OpenHands 21.0% 483.38 43.73
RAIN-Merging OpenHands 20.4% 242.45 70.00
M2A OpenHands 23.0% 228.76 70.70

On Llama-3.1-8B, M2A achieves a higher SWE score than both Task Arithmetic and RAIN-Merging, providing initial evidence that its advantage transfers beyond the Qwen3-8B model family. Although M2A and RAIN-Merging currently exhibit similar reasoning lengths and interaction steps, we did not extensively tune the merging strength for Llama-3.1-8B due to the limited time. Since this coefficient controls the reasoning length and performance of M2A, further tuning may yield additional gains. The result is consistent with our results on Qwen3-8B: M2A generalizes to a different model family and outperforms the naive merging baselines.

Model Scaffold SWE score Avg. reasoning length Avg. interaction steps
Agent-8B Mini-SWE-Agent 42.6% 179.08 168.00
Task Arithmetic Mini-SWE-Agent 44.6% 810.45 79.57
RAIN-Merging Mini-SWE-Agent 34.8% 205.27 183.44
M2A Mini-SWE-Agent 46.4% 294.97 169.99
Agent-8B R2E 46.6% 208.93 149.27
Task Arithmetic R2E 49.4% 841.53 70.16
RAIN-Merging R2E 46% 200.77 150.13
M2A R2E 49.8% 277.76 166.33

On Mini-SWE-Agent and R2E scaffold, Task Arithmetic uses approximately three times the reasoning length and reduces the interaction steps by more than half, whereas M2A retains an interaction pattern close to the original agent. Although Task Arithmetic and M2A achieve similar SWE scores on R2E, the naive merging baselines were evaluated with only a single run due to limited computational resources and may exhibit performance variance. In contrast, M2A consistently delivers strong performance across different scaffolds while preserving the agent’s interaction behavior.

Model GAIA score Avg. reasoning length Avg. interaction steps
Agent-8B 73.33% 850 13.65
Task Arithmetic 66.1% 2759.1 11.04
RAIN-Merging 69.1% 2007.1 14.45
M2A 78.79% 959 19.22

On GAIA, M2A substantially outperforms both the original Agent-8B and the naive merging baselines, while preserving more interaction behavior than Task Arithmetic and RAIN-Merging. This result provides further evidence that M2A generalizes beyond coding agents and remains effective on non-coding agent benchmarks.

We will continue to refine these experiments and include the full results in the revision. We hope our rebuttal and official comment can address your concerns. We would greatly appreciate your feedback, and we are glad to discuss any remaining questions. If you find that your concerns have been resolved, we would sincerely appreciate it it if you could consider increasing your score.

Authors · CommentOpenReview ↗

Updated Results for Merging Baselines

We further completed three evaluation runs for Task Arithmetic and RAIN-Merging on both Mini-SWE-Agent and R2E, and updated their SWE scores to Avg@3.

Model Scaffold SWE score Avg. reasoning length Avg. interaction steps
Agent-8B Mini-SWE-Agent 42.6% 179.08 168.00
Task Arithmetic Mini-SWE-Agent 43.5% 866.42 80.79
RAIN-Merging Mini-SWE-Agent 35.8% 179.40 189.56
M2A Mini-SWE-Agent 46.4% 294.97 169.99
Agent-8B R2E 46.6% 208.93 149.27
Task Arithmetic R2E 48.7% 847.47 70.70
RAIN-Merging R2E 46.8% 209.30 151.70
M2A R2E 49.8% 277.76 166.33

The updated Avg@3 results provide a clearer answer to your question: M2A consistently outperforms naive merging methods across different scaffolds, achieving the best SWE performance on both while maintaining an interaction pattern close to the original agent.

Task Arithmetic obtains performance gains mainly with approximately three times longer reasoning and more than halved interaction steps. RAIN-Merging preserves interaction frequency but provides limited or inconsistent performance improvements. In contrast, M2A consistently balances stronger performance with preservation of multi-turn interaction behavior across both scaffolds.

We hope these updated results further address your concern. We would be very happy to discuss any remaining questions, and if you find the concern resolved, we would sincerely appreciate your reconsideration of the rating.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…