AgentPatch: Coarse-to-Fine Weak-Task Repair for Merging Agentic Multimodal Large Language Models
Summary
Introduces AgentPatch, a training-free coarse-to-fine repair framework for merging agentic multimodal large language models, addressing asymmetric capability preservation and behavior-critical forgetting.
View Cached Full Text
Cached at: 08/10/26, 07:58 AM
# AgentPatch: Coarse-to-Fine Weak-Task Repair for Merging Agentic Multimodal Large Language Models
Source: [https://arxiv.org/html/2608.06699](https://arxiv.org/html/2608.06699)
Zibo Shao1,2,3, Baochen Xiong1,2,3, Chengdong Xu4, Linhui Xiao2, Kaichen Li1,2,3, Haoran Gong2, Yan Li2, Yaguang Song2\\corresponding, Xiaoshan Yang1,2,3\\corresponding
###### Abstract
Agentic multimodal large language models \(MLLMs\) extend multimodal perception and reasoning with planning, tool use, and interaction in dynamic environments\. Yet current models are specialized for particular tools or environments, complicating consolidation into a single generalist\. We formulateAgentic MLLM Mergingand identify two challenges: asymmetric capability preservation, whereby capabilities with different interaction complexity are retained unevenly, producing weak tasks after merging, and behavior\-critical forgetting, whereby losing decisive actions can derail long\-horizon execution\. We proposeAgentPatch, a training\-free coarse\-to\-fine repair framework\. It selects a stable merged backbone, restores diluted weak\-task\-specific signals through Weak\-Task Unique Residual Recovery, and applies an Agent\-Guided Behavior\-Critical Patch that recovers decisive behaviors under explicit capability protection\. AgentPatch produces a single static checkpoint without routing or ensembles\. Experiments across six agentic and multimodal benchmarks show that AgentPatch improves diverse merged backbones, alleviates weak\-task degradation, and better balances weak\-task recovery with the preservation of complementary search and agentic visual processing capabilities\. Code is available athttps://github\.com/ziboshao/AgentPatch\.

\(a\) Weak\-task degradation\.

\(b\) Behavior\-critical degradation\.
Figure 1:Two challenges of agentic MLLM merging\.\(a\) Results on the development subsets show that merging methods preserve heterogeneous capabilities unevenly, causing severe weak\-task degradation\. \(b\) Losing a behavior\-critical action can change the environment state and trigger trajectory\-level failure\.## Introduction
Agentic multimodal large language models \(MLLMs\) are emerging as autonomous decision\-making models that integrate multimodal reasoning, external tool invocation, and interaction with dynamic environments\(Yaoet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib9)\)\. Building on recent advances in visual perception and cross\-modal reasoning\(Liuet al\.[2023](https://arxiv.org/html/2608.06699#bib.bib1); Liet al\.[2023](https://arxiv.org/html/2608.06699#bib.bib2); Zhuet al\.[2023](https://arxiv.org/html/2608.06699#bib.bib3); Daiet al\.[2023](https://arxiv.org/html/2608.06699#bib.bib4); Liet al\.[2024](https://arxiv.org/html/2608.06699#bib.bib5); Wanget al\.[2025](https://arxiv.org/html/2608.06699#bib.bib6); Baiet al\.[2025a](https://arxiv.org/html/2608.06699#bib.bib7)\), they can organize multi\-step actions, invoke tools when needed, and adapt their decisions according to environmental feedback\. These capabilities enable agentic MLLMs to tackle complex tasks involving information seeking, computer operation, and fine\-grained visual analysis\.
Despite their broad potential, many current agentic MLLMs remain specialized for particular capabilities or interaction environments\.
For example, search agents focus on multimodal information retrieval and evidence synthesis\(Wuet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib10); Genget al\.[2025](https://arxiv.org/html/2608.06699#bib.bib11)\); GUI agents translate evolving screen observations into grounded actions and multi\-step workflows\(Yeet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib14); Qinet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib15)\); and agentic visual processing models acquire fine\-grained evidence through operations such as cropping, zooming, and image manipulation\(Zhenget al\.[2025](https://arxiv.org/html/2608.06699#bib.bib12); Zhanget al\.[2025](https://arxiv.org/html/2608.06699#bib.bib13)\)\. Although these specialists achieve strong performance in their target domains, their capabilities often transfer poorly to settings with different action spaces, tool protocols, or trajectory distributions\(Fenget al\.[2026](https://arxiv.org/html/2608.06699#bib.bib35)\)\. Deploying separate expert checkpoints also incurs substantial storage, deployment, and system\-maintenance overhead\.
Model merging\(Garipovet al\.[2018](https://arxiv.org/html/2608.06699#bib.bib18); Draxleret al\.[2018](https://arxiv.org/html/2608.06699#bib.bib19); Wortsmanet al\.[2022](https://arxiv.org/html/2608.06699#bib.bib20); Choshenet al\.[2022](https://arxiv.org/html/2608.06699#bib.bib21)\)provides a cost\-effective and modular approach to building generalist agentic MLLMs\. By combining expert checkpoints with compatible architectures, typically derived from the same base model, model merging enables the transfer of complementary capabilities into a single model without additional end\-to\-end training\. Existing MLLM merging studies have largely focused on composing static multimodal capabilities under fixed input–output settings, including visual question answering, optical character recognition, chart understanding, visual grounding, multimodal reasoning, modality expansion, and cross\-modal alignment\(Sunget al\.[2023](https://arxiv.org/html/2608.06699#bib.bib27); Chenet al\.[2024](https://arxiv.org/html/2608.06699#bib.bib28); Duet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib31); Weiet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib30); Shaoet al\.[2026](https://arxiv.org/html/2608.06699#bib.bib34)\)\. In contrast, agentic MLLMs must operate across heterogeneous observations, tool protocols, action spaces, and long\-horizon interaction trajectories, making their capability integration substantially more challenging than static multimodal models\. Merging such interactive capabilities within a single MLLM remains underexplored\. We therefore formally introduce theAgentic MLLM Merging task, which aims to merge specialized agentic MLLMs developed for different tools and interactive environments into a single generalist model while maintaining balanced performance across diverse agentic tasks\.
Agentic MLLM merging makes two challenges particularly salient\. First,heterogeneous agentic capabilities are not preserved equally\. Their experts capture tasks with different interaction complexity and preservation difficulty, yet global averaging and task\-agnostic conflict\-resolution criteria do not explicitly account for this asymmetry\. Consequently, a merged model may retain some capabilities while substantially diluting another, producing a phenomenon we call*weak\-task degradation*\. As Figure[1](https://arxiv.org/html/2608.06699#S0.F1)\(a\) illustrates, representative methods, including Weight Averaging\(Wortsmanet al\.[2022](https://arxiv.org/html/2608.06699#bib.bib20)\), Task Arithmetic\(Ilharcoet al\.[2022](https://arxiv.org/html/2608.06699#bib.bib16)\), and TSVM\(Gargiuloet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib26)\), retain capabilities unevenly, with the largest expert\-to\-merge gap appearing on state\-dependent, multi\-step interaction\. Second,agentic success is trajectory\-sensitive and can hinge on individual behavior\-critical decisions\. Unlike a static prediction, each agent action changes subsequent observations, so a single incorrect retrieval, perception, or interaction decision can redirect the remaining trajectory\. In Figure[1](https://arxiv.org/html/2608.06699#S0.F1)\(b\), both models locate the target file, but replacing the expert’s long\-press with a click sends the merged model into an “Open with” loop and prevents completion\. We call the loss of such decisive patterns*behavior\-critical forgetting*\. Existing merging methods primarily optimize parameter\-level compatibility without explicitly identifying or protecting the localized behaviors that govern trajectory success\.
To address these challenges, we proposeAgentPatch, a training\-free, coarse\-to\-fine framework for weak\-task repair in agentic MLLM merging\. AgentPatch first performsStable Backbone Selectionto choose a reliable recipient from candidate training\-free merges\. To address weak\-task degradation, we introduceWeak\-Task Unique Residual Recovery, which identifies parameter updates unique to the weak\-task expert and selectively restores the signals diluted during merging\. Restricting recovery to weak\-task\-specific coordinates provides broad parameter\-level compensation while limiting interference with complementary capabilities\. To address behavior\-critical forgetting, we further introduce anAgent\-Guided Behavior\-Critical Patch\. It contrasts recipient and expert trajectories to compile repair and protection behaviors, localizes their associated behavior\-critical feed\-forward neurons, and applies Guardian\-constrained expert\-directed interpolation\. This behavior\-level refinement restores decisive execution patterns while preserving complementary agentic and multimodal capabilities\.
Our main contributions can be summarized as follows:
- •We formulate a newAgentic MLLM Mergingtask, which aims to integrate specialized agentic MLLMs for different tools and interactive environments into a unified generalist model while maintaining balanced performance across diverse agentic tasks\.
- •We proposeAgentPatch, a training\-free weak\-task repair framework for agentic MLLM merging\. AgentPatch combines stable backbone selection, weak\-task residual recovery, and behavior\-critical patching to restore degraded capabilities while reducing interference among different tasks\.
- •We establish systematic evaluation settings across multiple agentic and multimodal benchmarks\. Extensive experiments demonstrate that AgentPatch effectively alleviates weak\-task degradation and improves the overall balance of merged agentic MLLMs\.
## Related Work
### Model Merging
Model merging integrates multiple expert checkpoints into a single model without unified retraining or additional inference\-time cost\. Early approaches mainly rely on weight interpolation and task\-vector arithmetic\. Model Soup\(Wortsmanet al\.[2022](https://arxiv.org/html/2608.06699#bib.bib20)\)averages fine\-tuned checkpoints, while Task Arithmetic\(Ilharcoet al\.[2022](https://arxiv.org/html/2608.06699#bib.bib16)\)represents task\-specific knowledge as parameter differences and composes capabilities through vector arithmetic\. To mitigate interference, TIES\-Merging\(Yadavet al\.[2023](https://arxiv.org/html/2608.06699#bib.bib17)\)removes conflicting updates through trimming and sign consensus, whereas DARE\(Yuet al\.[2024](https://arxiv.org/html/2608.06699#bib.bib22)\)improves merging via random dropping and rescaling of task\-vector elements\. Recent methods further improve merging robustness through parameter selection and optimization strategies\. Model Stock\(Janget al\.[2024](https://arxiv.org/html/2608.06699#bib.bib44)\)explores interpolation among fine\-tuned models, while KnOTS\(Stoicaet al\.[2024](https://arxiv.org/html/2608.06699#bib.bib24)\)aligns task\-vector subspaces for better compatibility\. Extending to MLLMs, RobustMerge\(Zenget al\.[2025](https://arxiv.org/html/2608.06699#bib.bib32)\)and OptMerge\(Weiet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib30)\)study merging across multimodal tasks and modalities, while PivotMerge\(Shaoet al\.[2026](https://arxiv.org/html/2608.06699#bib.bib34)\)introduces post\-alignment merging to integrate cross\-modal projectors learned from heterogeneous multimodal pre\-training\. More recently, ARM\(Fenget al\.[2026](https://arxiv.org/html/2608.06699#bib.bib35)\)extends merging to interactive LLM agents, while complementary LLM\-agent research studies execution\-time multi\-agent workflow adaptation\(Xuet al\.[2026b](https://arxiv.org/html/2608.06699#bib.bib45)\)\. However, merging multimodal agents with heterogeneous observations, tools, and long\-horizon interaction behaviors remains underexplored\.
### Agentic MLLMs
Agentic MLLMs combine multimodal perception and reasoning with autonomous decision making, tool use, and sustained interaction with dynamic environments\. A recent survey organizes this area along three dimensions: agentic internal intelligence, including reasoning, reflection, and memory; external tool invocation, including search and visual processing; and environment interaction in virtual or physical worlds\(Yaoet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib9)\)\. Representative systems have developed along specialized capability axes\. Agentic search models learn when and how to issue text or image queries and synthesize retrieved evidence\(Wuet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib10); Genget al\.[2025](https://arxiv.org/html/2608.06699#bib.bib11)\); agentic visual processing models iteratively crop or zoom images to acquire fine\-grained evidence\(Zhenget al\.[2025](https://arxiv.org/html/2608.06699#bib.bib12); Zhanget al\.[2025](https://arxiv.org/html/2608.06699#bib.bib13)\); and GUI agents translate screen observations and interaction histories into grounded actions\(Yeet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib14); Qinet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib15)\)\. Although these directions all involve multi\-step decision making, they differ substantially in observations, tool protocols, action spaces, supervision, and reward design\. Existing work therefore largely optimizes each capability within its own environment\. Our work is complementary: rather than training another domain\-specific agent, we study how independently developed search, GUI\-interaction, and agentic visual processing experts can be consolidated into one agentic MLLM without joint retraining\.
## Methodology
Figure 2:Overview of AgentPatch\. Starting from search, GUI\-interaction, and agentic visual processing experts derived from a shared base model, AgentPatch first selects a stable merged backbone\. It then restores weak\-task\-exclusive updates diluted during merging through coarse parameter\-level residual recovery\. Finally, the Diagnoser–Guardian–Compiler \(DGC\) workflow contrasts recipient and expert trajectories, compiles behavior\-critical repair and protection spans, maps them to behavior\-critical FFN neurons, and applies a Guardian\-constrained expert\-directed patch\.### Task Definition
In this section, we formalize the Agentic MLLM Merging task, including its setting, constraints, and evaluation principle\. LetM0M\_\{0\}denote a base MLLM with parameters𝜽0\\boldsymbol\{\\theta\}\_\{0\}, and let\{Mk\}k∈𝒦\\\{M\_\{k\}\\\}\_\{k\\in\\mathcal\{K\}\}be a set of expert checkpoints derived from the shared base model\. We assume that these experts have compatible architectures and aligned parameterization, while being specialized for heterogeneous agentic capabilities or interactive environments\. Each expert induces a task vector
𝝉k=𝜽k−𝜽0,\\boldsymbol\{\\tau\}\_\{k\}=\\boldsymbol\{\\theta\}\_\{k\}\-\\boldsymbol\{\\theta\}\_\{0\},\(1\)where𝜽k\\boldsymbol\{\\theta\}\_\{k\}denotes the parameters of expertMkM\_\{k\}\.
Agentic MLLM Merging aims to construct a single generalist checkpoint through a merging procedure𝒜\\mathcal\{A\}:
𝜽∗=𝒜\(𝜽0,\{𝝉k\}k∈𝒦\)\.\\boldsymbol\{\\theta\}^\{\*\}=\\mathcal\{A\}\\\!\\left\(\\boldsymbol\{\\theta\}\_\{0\},\\\{\\boldsymbol\{\\tau\}\_\{k\}\\\}\_\{k\\in\\mathcal\{K\}\}\\right\)\.\(2\)We consider a training\-free setting, where𝒜\\mathcal\{A\}introduces no gradient\-based optimization or joint multi\-environment training\. The resulting model is deployed as a single checkpoint without expert routing or ensemble inference\.
For each capabilitykk, letℰk\\mathcal\{E\}\_\{k\}denote its associated evaluation environments or benchmarks, and letSk\(𝜽\)S\_\{k\}\(\\boldsymbol\{\\theta\}\)be the corresponding aggregate score, with all metrics normalized such that higher values indicate better performance\. We define the expert\-relative degradation of an arbitrary checkpoint𝜽\\boldsymbol\{\\theta\}as
Dk\(𝜽\)=Sk\(𝜽k\)−Sk\(𝜽\)max\(Sk\(𝜽k\),ϵs\)\.D\_\{k\}\(\\boldsymbol\{\\theta\}\)=\\frac\{S\_\{k\}\(\\boldsymbol\{\\theta\}\_\{k\}\)\-S\_\{k\}\(\\boldsymbol\{\\theta\}\)\}\{\\max\\\!\\left\(S\_\{k\}\(\\boldsymbol\{\\theta\}\_\{k\}\),\\epsilon\_\{s\}\\right\)\}\.\(3\)whereϵs\>0\\epsilon\_\{s\}\>0is a small constant that prevents division by zero\. The desired merged model should achieve strong aggregate performance while limiting the largest expert\-relative degradation\.
Evaluation places the merged model in heterogeneous interactive environments and complementary multimodal benchmarks\. The former assess its ability to process evolving observations, select actions, invoke tools, and complete multi\-step tasks, while the latter measure whether general multimodal capabilities remain preserved\. Accordingly, merging quality is evaluated jointly through capability\-specific scores, aggregate performance, and worst\-capability degradation\.
### Stable Backbone Selection
We first construct a stable merged backbone as the recipient for subsequent repair\. Different training\-free merging operators may preserve expert capabilities unevenly and introduce distinct interference patterns; applying repair to an imbalanced initialization may therefore amplify existing capability gaps\. We thus compare candidate backbones produced by multiple merging operators\.
Let𝒢\\mathcal\{G\}denote the set of candidate merging operators\. Each operator𝒢g\\mathcal\{G\}\_\{g\},g∈𝒢g\\in\\mathcal\{G\}, produces a candidate from the shared base and expert task vectors:
𝜽\(g\)=𝒢g\(𝜽0,\{𝝉k\}k∈𝒦\),\\boldsymbol\{\\theta\}^\{\(g\)\}=\\mathcal\{G\}\_\{g\}\\left\(\\boldsymbol\{\\theta\}\_\{0\},\\\{\\boldsymbol\{\\tau\}\_\{k\}\\\}\_\{k\\in\\mathcal\{K\}\}\\right\),\(4\)Candidate selection is performed on fixed development subsets covering all target capabilities, while the test sets remain unseen\. Rather than optimizing an individual capability, we select the candidate with the highest unweighted mean of normalized capability scores:
g∗=argmaxg∈𝒢1\|𝒦\|∑k∈𝒦Sk\(𝜽\(g\)\),𝜽\(1\)=𝜽\(g∗\),g^\{\*\}=\\arg\\max\_\{g\\in\\mathcal\{G\}\}\\frac\{1\}\{\|\\mathcal\{K\}\|\}\\sum\_\{k\\in\\mathcal\{K\}\}S\_\{k\}\\\!\\left\(\\boldsymbol\{\\theta\}^\{\(g\)\}\\right\),\\qquad\\boldsymbol\{\\theta\}^\{\(1\)\}=\\boldsymbol\{\\theta\}^\{\(g^\{\*\}\)\},\(5\)We then identify its weakest\-preserved capability on the same subsets as
w=argmaxk∈𝒦Dk\(𝜽\(1\)\)\.w=\\arg\\max\_\{k\\in\\mathcal\{K\}\}D\_\{k\}\\\!\\left\(\\boldsymbol\{\\theta\}^\{\(1\)\}\\right\)\.\(6\)
This stage provides both the recipient𝜽\(1\)\\boldsymbol\{\\theta\}^\{\(1\)\}and the target capabilitywwfor the subsequent coarse\-to\-fine repair\.
### Weak\-Task Unique Residual Recovery
Although the selected backbone provides a stable starting point, it may still preserve some expert capabilities substantially less effectively than others\. Directly injecting the complete task vector of the weakest\-preserved expert may recover task\-specific signals, but can also perturb parameter coordinates modified by other experts, thereby introducing negative transfer\. We therefore perform a coarse parameter\-level repair restricted to updates unique to the weak\-task expert\.
Letw∈𝒦w\\in\\mathcal\{K\}denote the weakest\-preserved capability identified on the calibration set\. For each scalar parameter coordinatepp, we define the activity indicator of expertkkas
Akp=𝟏\[\|τkp\|\>ϵ\],k∈𝒦,A\_\{k\}^\{p\}=\\mathbf\{1\}\\\!\\left\[\\left\|\\tau\_\{k\}^\{p\}\\right\|\>\\epsilon\\right\],\\qquad k\\in\\mathcal\{K\},\(7\)whereϵ\\epsilonfilters negligible parameter variations\. The weak\-task unique mask is then defined as
Uwp=Awp∏k∈𝒦∖\{w\}\(1−Akp\)\.U\_\{w\}^\{p\}=A\_\{w\}^\{p\}\\prod\_\{k\\in\\mathcal\{K\}\\setminus\\\{w\\\}\}\\left\(1\-A\_\{k\}^\{p\}\\right\)\.\(8\)This mask retains coordinates modified by the weak\-task expert while excluding those that are also active in any other expert\.
We recover the missing weak\-task residual by interpolating the selected backbone toward the corresponding expert only on these coordinates:
𝜽\(2\)=𝜽\(1\)\+β𝐔w⊙\(𝜽w−𝜽\(1\)\),\\boldsymbol\{\\theta\}^\{\(2\)\}=\\boldsymbol\{\\theta\}^\{\(1\)\}\+\\beta\\,\\mathbf\{U\}\_\{w\}\\odot\\left\(\\boldsymbol\{\\theta\}\_\{w\}\-\\boldsymbol\{\\theta\}^\{\(1\)\}\\right\),\(9\)whereβ\\betacontrols the recovery strength and⊙\\odotdenotes element\-wise multiplication\. Unlike directly adding the complete expert task vector, this operation restores only the expert\-directed residual on weak\-task\-exclusive coordinates, providing broad capability compensation while limiting interference with the remaining experts\. As a coarse parameter\-level repair, however, it does not distinguish which local actions or behavior patterns are decisive for successful interaction, motivating the subsequent behavior\-critical patch\.
### Agent\-Guided Behavior\-Critical Patch
The coarse repair cannot distinguish behavior patterns that are decisive for successful interaction\. The final stage therefore identifies trajectory gaps, traces the corresponding feed\-forward neurons, excludes neurons associated with protected capabilities, and softly interpolates the remaining neurons toward the weak\-task expert\.
#### Agent\-Guided Behavior Specification
For each calibration task, we collect paired trajectories generated on the same task by the repaired recipient𝜽\(2\)\\boldsymbol\{\\theta\}^\{\(2\)\}and the weak\-task expert𝜽w\\boldsymbol\{\\theta\}\_\{w\}; all calibration tasks are disjoint from the test tasks\. The*Diagnoser*compares each pair and identifies behavior gaps for which the recipient fails while the expert succeeds\. The corresponding expert behaviors form the*repair evidence*\.
To reduce collateral degradation, the*Guardian*gathers*protection evidence*from behaviors that the recipient already performs correctly, including successful interaction patterns, valid action formats, and capabilities inherited from other experts\. The*Compiler*then converts the repair and protection evidence into token\-level span selectors while preserving their environment and trajectory\-step provenance\. Together, these three analysis agents form the Diagnoser–Guardian–Compiler \(DGC\) workflow and produce two collections of behavior spans: desired expert spans to be restored and recipient spans whose associated functionality should be protected\. DGC is used only during offline checkpoint construction to produce auditable token\-span selectors and introduces no analysis\-agent dependency at inference time\.
#### Behavior\-Conditioned Neuron Scoring
We apply teacher forcing to the fixed behavior trajectories and record feed\-forward activations only at the compiled token positions\. Let𝐳tℓ\\mathbf\{z\}^\{\\ell\}\_\{t\}denote the intermediate FFN activation of widthdffd\_\{\\mathrm\{ff\}\}at tokenttin layerℓ\\ell\. The output contributed by neuronjjiszt,jℓ𝐖outℓ\[:,j\]z^\{\\ell\}\_\{t,j\}\\mathbf\{W\}^\{\\ell\}\_\{\\mathrm\{out\}\}\[:,j\]\.
Let𝒟rrep\\mathcal\{D\}^\{\\mathrm\{rep\}\}\_\{r\}denote the expert trajectories associated with repair grouprr, and let𝒯e,rrep\\mathcal\{T\}^\{\\mathrm\{rep\}\}\_\{e,r\}be the selected behavior\-token positions in trajectoryee\. We compute the trajectory\-balanced activation of neuronjjas
aℓrjrep=1\|𝒟rrep\|∑e∈𝒟rrep1\|𝒯e,rrep\|∑t∈𝒯e,rrep\|zt,jℓ,w\|,a^\{\\mathrm\{rep\}\}\_\{\\ell rj\}=\\frac\{1\}\{\|\\mathcal\{D\}^\{\\mathrm\{rep\}\}\_\{r\}\|\}\\sum\_\{e\\in\\mathcal\{D\}^\{\\mathrm\{rep\}\}\_\{r\}\}\\frac\{1\}\{\|\\mathcal\{T\}^\{\\mathrm\{rep\}\}\_\{e,r\}\|\}\\sum\_\{t\\in\\mathcal\{T\}^\{\\mathrm\{rep\}\}\_\{e,r\}\}\\left\|z^\{\\ell,w\}\_\{t,j\}\\right\|,\(10\)wherezt,jℓ,wz^\{\\ell,w\}\_\{t,j\}is obtained from the weak\-task expert\. Averaging first within each trajectory prevents longer action sequences from dominating the estimate\.
Activation magnitude alone does not reflect how strongly a neuron affects the layer output\. We therefore incorporate the norm of its outgoing projection and define
cℓrjrep=aℓrjrep‖𝐖outℓ,w\[:,j\]‖2\.c^\{\\mathrm\{rep\}\}\_\{\\ell rj\}=a^\{\\mathrm\{rep\}\}\_\{\\ell rj\}\\left\\\|\\mathbf\{W\}^\{\\ell,w\}\_\{\\mathrm\{out\}\}\[:,j\]\\right\\\|\_\{2\}\.\(11\)This score favors neurons that are both active on the desired behavior and capable of substantially influencing downstream representations\. For each repair grouprr, we retain a group\-level fractionqrq\_\{r\}of the highest\-scoring neurons in every layer:
ℛrℓ=TopK\(\{cℓrjrep\}j=1dff,⌈qrdff⌉\)\.\\mathcal\{R\}^\{\\ell\}\_\{r\}=\\operatorname\{TopK\}\\\!\\left\(\\\{c^\{\\mathrm\{rep\}\}\_\{\\ell rj\}\\\}\_\{j=1\}^\{d\_\{\\mathrm\{ff\}\}\},\\left\\lceil q\_\{r\}d\_\{\\mathrm\{ff\}\}\\right\\rceil\\right\)\.\(12\)
#### Balanced Selection and Guardian Exclusion
Calibration environments may contain different numbers of trajectories or behavior groups, so a global selection budget can favor evidence\-rich environments\. We therefore select neurons independently within each group usingqrq\_\{r\}before taking their union, maintaining balanced contributions across heterogeneous environments\.
Protection neurons are identified analogously from protected recipient spans\. Specifically, activations and output contributions are computed using the recipient𝜽\(2\)\\boldsymbol\{\\theta\}^\{\(2\)\}\. Letcℓpjprotc^\{\\mathrm\{prot\}\}\_\{\\ell pj\}denote the resulting contribution score for protection grouppp\. With a protection fractionqguardq\_\{\\mathrm\{guard\}\}, we define
𝒫pℓ=TopK\(\{cℓpjprot\}j=1dff,⌈qguarddff⌉\)\.\\mathcal\{P\}^\{\\ell\}\_\{p\}=\\operatorname\{TopK\}\\\!\\left\(\\\{c^\{\\mathrm\{prot\}\}\_\{\\ell pj\}\\\}\_\{j=1\}^\{d\_\{\\mathrm\{ff\}\}\},\\left\\lceil q\_\{\\mathrm\{guard\}\}d\_\{\\mathrm\{ff\}\}\\right\\rceil\\right\)\.\(13\)The final repair set is
ℳℓ=\(⋃rℛrℓ\)∖\(⋃p𝒫pℓ\)\.\\mathcal\{M\}^\{\\ell\}=\\left\(\\bigcup\_\{r\}\\mathcal\{R\}^\{\\ell\}\_\{r\}\\right\)\\setminus\\left\(\\bigcup\_\{p\}\\mathcal\{P\}^\{\\ell\}\_\{p\}\\right\)\.\(14\)We refer to the surviving neurons inℳℓ\\mathcal\{M\}^\{\\ell\}as*behavior\-critical neurons*\. A neuron associated with any protected behavior is excluded from editing, even when it also receives a high repair score\. This conservative Guardian mechanism prioritizes capability preservation over aggressive weak\-task recovery\.
#### Expert\-Directed Whole\-Neuron Interpolation
Letϕjℓ\\boldsymbol\{\\phi\}^\{\\ell\}\_\{j\}denote the complete parameter block associated with neuronjj, including its incoming and outgoing connections\. For every selected neuronj∈ℳℓj\\in\\mathcal\{M\}^\{\\ell\}, we update
ϕjℓ,\(3\)=\(1−α\)ϕjℓ,\(2\)\+αϕjℓ,w\.\\boldsymbol\{\\phi\}^\{\\ell,\(3\)\}\_\{j\}=\(1\-\\alpha\)\\boldsymbol\{\\phi\}^\{\\ell,\(2\)\}\_\{j\}\+\\alpha\\boldsymbol\{\\phi\}^\{\\ell,w\}\_\{j\}\.\(15\)All unselected parameters remain unchanged\. Unlike hard neuron replacement, this soft expert\-directed interpolation preserves most of the recipient representation while selectively restoring behavior\-critical expert signals\.
## Experiments
Table 1:Test\-set performance across agentic and multimodal benchmarks\. All values are percentages, and higher is better\. Bold and underlined numbers indicate the best and second\-best results, respectively, among merging methods with an available score\. The overall score is reported only when all six task results are available\.### Experimental Setup
##### Models\.
We conduct all experiments with Qwen2\.5\-VL\-7B\(Baiet al\.[2025b](https://arxiv.org/html/2608.06699#bib.bib8)\)as the shared base architecture\. The three source experts are MMSearch\-R1\-7B for agentic multimodal search\(Wuet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib10)\), GUI\-Owl\-7B for GUI interaction\(Yeet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib14)\), and DeepEyes\-7B for agentic visual processing\(Zhenget al\.[2025](https://arxiv.org/html/2608.06699#bib.bib12)\)\. AgentPatch produces one static checkpoint and uses neither expert routing nor ensemble inference at test time\.
##### Benchmarks\.
We evaluate six benchmarks covering three task types\. MMSearch\(Jianget al\.[2024](https://arxiv.org/html/2608.06699#bib.bib36)\)and FactualVQA\(Wuet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib10)\)assess agentic multimodal search; AndroidWorld\(Rawleset al\.[2024](https://arxiv.org/html/2608.06699#bib.bib37)\)and OSWorld\(Xieet al\.[2024](https://arxiv.org/html/2608.06699#bib.bib38)\)evaluate GUI interaction in mobile and desktop environments; V\*Bench\(Wu and Xie[2023](https://arxiv.org/html/2608.06699#bib.bib39)\)and HR\-Bench 8K\(Wanget al\.[2024](https://arxiv.org/html/2608.06699#bib.bib40)\)assess agentic visual processing through fine\-grained visual search and high\-resolution image understanding\.
##### Baselines\.
We compare AgentPatch with representative training\-free merging methods, including Weight Averaging\(Wortsmanet al\.[2022](https://arxiv.org/html/2608.06699#bib.bib20)\), Task Arithmetic\(Ilharcoet al\.[2022](https://arxiv.org/html/2608.06699#bib.bib16)\), TIES\-Merging\(Yadavet al\.[2023](https://arxiv.org/html/2608.06699#bib.bib17)\), TSVM\(Gargiuloet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib26)\), Iso\-CTS\(Marczaket al\.[2025](https://arxiv.org/html/2608.06699#bib.bib41)\), OptMerge\(Weiet al\.[2025](https://arxiv.org/html/2608.06699#bib.bib30)\), ACE\-Merging\(Xuet al\.[2026a](https://arxiv.org/html/2608.06699#bib.bib43)\), and DC\-Merge\(Zhanget al\.[2026](https://arxiv.org/html/2608.06699#bib.bib42)\)\.
##### Implementation details\.
We construct candidate backbones using Weight Averaging, Task Arithmetic, TIES\-Merging, and TSVM, and select TSVM on the fixed calibration partitions\. The same calibration results identify GUI interaction as the weakest\-preserved capability, which is targeted by the subsequent repair stages\. The activity threshold, unique\-residual coefficient, and per\-group Guardian protection ratio are set toϵ=10−5\\epsilon=10^\{\-5\},0\.150\.15, and0\.010\.01, respectively\. We interpolate the selected behavior\-critical neurons toward GUI\-Owl\-7B with coefficient0\.020\.02\. No gradients or test examples are used during checkpoint construction\.
### Main Results
Table[1](https://arxiv.org/html/2608.06699#Sx4.T1)first confirms the complementary specialization of the three source experts\. MMSearch\-R1\-7B performs best among the experts on both search benchmarks, GUI\-Owl\-7B leads on both GUI benchmarks, and DeepEyes\-7B leads on both agentic visual processing benchmarks\. Each expert’s advantage is concentrated in its target task type, motivating the consolidation of their complementary capabilities into a single agentic MLLM\.
Conventional merging improves coverage but does not reliably resolve this imbalance\. Weight Averaging and Task Arithmetic obtain overall scores of 49\.3 and 48\.0, respectively\. Among the stronger structure\-aware baselines, TSVM provides the most balanced initialization, reaching 54\.5 on average, while other approaches attain competitive results on individual visual benchmarks but remain weaker on GUI interaction\.
AgentPatch achieves the best complete overall result, improving the TSVM backbone from 54\.5 to 56\.6\. It improves MMSearch, FactualVQA, AndroidWorld, OSWorld, and HR\-Bench 8K while preserving V\*Bench performance\. In particular, the gains on both AndroidWorld and OSWorld show that weak\-task repair transfers across mobile and desktop interaction environments rather than overfitting to a single GUI benchmark\. At the same time, the model remains close to the search expert on MMSearch and FactualVQA and to the visual expert on V\*Bench, demonstrating a better balance between weak\-task recovery and preservation of complementary capabilities\.
### Ablation Studies
Table 2:Component ablation by task type\. Search averages MMSearch and FactualVQA; GUI averages AndroidWorld and OSWorld; Visual averages V\*Bench and HR\-Bench 8K\. Avg\. is the mean over all six benchmarks\.Figure 3:Effect of weak\-task residual support relative to the TSVM backbone\. Weak\-Task Active uses all coordinates active in the weak\-task expert, whereas Weak\-Task Unique retains only coordinates inactive in the other experts\. Each task type averages the same two test benchmarks as in Table[2](https://arxiv.org/html/2608.06699#Sx4.T2); Avg\. is the mean over all six benchmarks\.Table 3:Core design ablation for the behavior\-critical patch\. Random Neurons replaces behavior\-conditioned localization with layer\-matched random selection, while w/o Guardian disables protected\-neuron exclusion\.##### Component\-wise contributions\.
Table[2](https://arxiv.org/html/2608.06699#Sx4.T2)evaluates the two repair stages on the selected TSVM backbone\. Weak\-Task Unique Residual Recovery raises the overall average from 54\.5 to 56\.2 while improving Search from 47\.0 to 51\.0 and GUI from 38\.5 to 39\.8\. The behavior\-critical patch further raises GUI from 39\.8 to 41\.3 and Visual from 77\.7 to 79\.0, yielding the best average of 56\.6\. These complementary gains support the coarse\-to\-fine design: parameter\-level recovery broadly restores weak\-task signals, while behavior\-level refinement strengthens decisive interaction patterns and preserves the integrated capability balance\.
##### Effect of unique residual support\.
Figure[3](https://arxiv.org/html/2608.06699#Sx4.F3)compares all active coordinates of the weak\-task expert with its unique subset while keeping the backbone and residual strength fixed\. Although the active region raises GUI from 39\.8 to 41\.1, it reduces Search and Visual by 1\.1 and 1\.6 points and lowers the overall average from 56\.2 to 55\.6\. The weak\-task\-unique mask therefore does more than sparsify the update: excluding coordinates also active in other experts yields a better balance between weak\-task recovery and preservation of complementary capabilities\.
##### Effect of behavior localization and capability protection\.
Table[3](https://arxiv.org/html/2608.06699#Sx4.T3)disentangles the two core designs in the behavior\-critical patch\. Replacing behavior\-conditioned localization with layer\-matched random neurons reduces GUI by 5\.6 points and the overall average by 2\.2 points despite a higher Search score, showing that the gain does not arise from arbitrary sparse writing\. Disabling Guardian exclusion similarly lowers GUI by 5\.0 points, Visual by 0\.6 points, and the overall average by 2\.4 points\. The full design achieves the strongest balance, demonstrating the complementary roles of behavior\-critical localization and Guardian\-based protection in weak\-task repair and capability preservation\.
### Analysis
Figure 4:Sensitivity to the unique\-residual coefficientβ\\beta, reported as performance change from the TSVM backbone\.##### Sensitivity to residual strength\.
Figure[4](https://arxiv.org/html/2608.06699#Sx4.F4)varies only the interpolation coefficientβ\\betain Equation[9](https://arxiv.org/html/2608.06699#Sx3.E9)\. The intermediate valueβ=0\.15\\beta=0\.15achieves the best overall balance, with the highest Search average and an overall score of 56\.2\. Increasingβ\\betato 0\.20 further improves GUI, but stronger residual injection shifts the balance away from Search and Visual\. Atβ=0\.30\\beta=0\.30, the overall score returns to that of the original backbone\. The trend confirms that weak\-task recovery is not monotonic: moderate interpolation restores task\-specific signals, whereas overly strong injection increasingly interferes with complementary capabilities\.
Table 4:Generalization across merged recipients\. Each cell reports the task\-type or six\-benchmark average before and after applying AgentPatch\. GUI averages AndroidWorld and OSWorld\.
##### Generalization across merged recipients\.
Table[4](https://arxiv.org/html/2608.06699#Sx4.T4)applies the same AgentPatch pipeline to TSVM and Iso\-CTS, with behavior\-critical neurons localized separately for each recipient\. For TSVM, AgentPatch improves the GUI average by 2\.8 points and the overall six\-benchmark average by 2\.1 points; for Iso\-CTS, the corresponding gains are 2\.7 and 1\.1 points\. The consistent improvements across recipients show that the repair is not tied to a single backbone construction rule\.
Figure 5:Qualitative examples of behavior\-critical recovery\. Both models execute the shared correct prefix, but the selected backbone omits or misgrounds a decisive action\. AgentPatch recovers the action and completes the task\.
##### Case study of behavior\-critical recovery\.
Figure[5](https://arxiv.org/html/2608.06699#Sx4.F5)illustrates how a single localized action can determine the outcome of an otherwise correct trajectory\. In the Markor example, both models create the target note and enter its content, but the selected backbone terminates without saving it; AgentPatch restores the missingclick\(Save\)action and completes the task\. In the Chrome example, both models reach the Safe Browsing page, yet the selected backbone clicks beside the Enhanced Protection radio button\. AgentPatch grounds the action on the intended control and succeeds\. These cases show that AgentPatch preserves shared correct prefixes while recovering the behavior\-critical actions that turn near\-complete trajectories into successful executions\.
## Conclusion
This paper introduced Agentic MLLM Merging, a new setting for consolidating specialists that operate with heterogeneous tools, observations, and interaction environments\. We identified two central challenges in this setting: weak\-task degradation caused by asymmetric capability preservation and the loss of behavior\-critical patterns that determine long\-horizon task success\. To address them, we proposed AgentPatch, a training\-free, coarse\-to\-fine framework that selects a stable merged backbone, restores weak\-task\-exclusive residuals, and applies an agent\-guided behavior\-critical patch with explicit capability protection\. Experiments across six agentic and multimodal benchmarks show that AgentPatch improves the overall balance of the merged model, strengthens weak interactive capabilities across mobile and desktop environments, and better preserves complementary search and agentic visual processing skills\. These findings show that effective agentic model consolidation requires more than resolving global parameter conflicts: task\-specific residuals and localized behaviors governing trajectory success must also be recovered\. This yields a deployable generalist checkpoint without joint retraining or inference\-time routing\.
## References
- S\. Bai, Y\. Cai, R\. Chen, K\. Chen, X\. Chen, Z\. Cheng, L\. Deng, W\. Ding, C\. Gao, C\. Ge,et al\.\(2025a\)Qwen3\-VL technical report\.arXiv preprint arXiv:2511\.21631\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p1.1)\.
- S\. Bai, K\. Chen, X\. Liu, J\. Wang, W\. Ge, S\. Song, K\. Dang, P\. Wang, S\. Wang, J\. Tang, H\. Zhong, Y\. Zhu, M\. Yang, Z\. Li, J\. Wan, P\. Wang, W\. Ding, Z\. Fu, Y\. Xu, J\. Ye, X\. Zhang, T\. Xie, Z\. Cheng, H\. Zhang, Z\. Yang, H\. Xu, and J\. Lin \(2025b\)Qwen2\.5\-VL technical report\.External Links:2502\.13923,[Link](https://arxiv.org/abs/2502.13923)Cited by:[Models\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px1.p1.1)\.
- Model composition for multimodal large language models\.arXiv preprint arXiv:2402\.12750\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p4.1)\.
- L\. Choshen, E\. Venezian, N\. Slonim, and Y\. Katz \(2022\)Fusing finetuned models for better pretraining\.arXiv preprint arXiv:2204\.03044\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p4.1)\.
- W\. Dai, J\. Li, D\. Li, A\. Tiong, J\. Zhao, W\. Wang, B\. Li, P\. N\. Fung, and S\. Hoi \(2023\)InstructBLIP: towards general\-purpose vision\-language models with instruction tuning\.Advances in Neural Information Processing Systems36,pp\. 49250–49267\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p1.1)\.
- F\. Draxler, K\. Veschgini, M\. Salmhofer, and F\. A\. Hamprecht \(2018\)Essentially no barriers in neural network energy landscape\.InInternational Conference on Machine Learning,pp\. 1309–1318\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p4.1)\.
- Y\. Du, X\. Wang, C\. Chen, J\. Ye, Y\. Wang, P\. Li, M\. Yan, J\. Zhang, F\. Huang, Z\. Sui,et al\.\(2025\)Adamms: model merging for heterogeneous multimodal large language models with unsupervised coefficient optimization\.InProceedings of the Computer Vision and Pattern Recognition Conference,pp\. 9413–9422\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p4.1)\.
- Z\. Feng, K\. Chen, S\. Zhao, K\. Xiong, Y\. Wang, M\. Yu, J\. Nian, C\. Xiao, Y\. Cao, and Y\. Jiang \(2026\)ARM: role\-conditioned neuron transplantation for training\-free generalist llm agent merging\.arXiv preprint arXiv:2601\.07309\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p3.1),[Model Merging](https://arxiv.org/html/2608.06699#Sx2.SSx1.p1.1)\.
- A\. A\. Gargiulo, D\. Crisostomi, M\. S\. Bucarelli, S\. Scardapane, F\. Silvestri, and E\. Rodola \(2025\)Task singular vectors: reducing task interference in model merging\.InProceedings of the Computer Vision and Pattern Recognition Conference,pp\. 18695–18705\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p5.1),[Baselines\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px3.p1.1)\.
- T\. Garipov, P\. Izmailov, D\. Podoprikhin, D\. P\. Vetrov, and A\. G\. Wilson \(2018\)Loss surfaces, mode connectivity, and fast ensembling of DNNs\.Advances in Neural Information Processing Systems31\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p4.1)\.
- X\. Geng, P\. Xia, Z\. Zhang, X\. Wang, Q\. Wang, R\. Ding, C\. Wang, J\. Wu, Y\. Zhao, K\. Li,et al\.\(2025\)Webwatcher: breaking new frontier of vision\-language deep research agent\.arXiv preprint arXiv:2508\.05748\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p3.1),[Agentic MLLMs](https://arxiv.org/html/2608.06699#Sx2.SSx2.p1.1)\.
- G\. Ilharco, M\. T\. Ribeiro, M\. Wortsman, S\. Gururangan, L\. Schmidt, H\. Hajishirzi, and A\. Farhadi \(2022\)Editing models with task arithmetic\.arXiv preprint arXiv:2212\.04089\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p5.1),[Model Merging](https://arxiv.org/html/2608.06699#Sx2.SSx1.p1.1),[Baselines\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px3.p1.1)\.
- D\. Jang, S\. Yun, and D\. Han \(2024\)Model stock: all we need is just a few fine\-tuned models\.InEuropean Conference on Computer Vision,pp\. 207–223\.Cited by:[Model Merging](https://arxiv.org/html/2608.06699#Sx2.SSx1.p1.1)\.
- D\. Jiang, R\. Zhang, Z\. Guo, Y\. Wu, J\. Lei, P\. Qiu, P\. Lu, Z\. Chen, C\. Fu, G\. Song, P\. Gao, Y\. Liu, C\. Li, and H\. Li \(2024\)MMSearch: benchmarking the potential of large models as multi\-modal search engines\.arXiv preprint arXiv:2409\.12959\.Cited by:[Benchmarks\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px2.p1.1)\.
- F\. Li, R\. Zhang, H\. Zhang, Y\. Zhang, B\. Li, W\. Li, Z\. Ma, and C\. Li \(2024\)LLaVA\-NeXT\-Interleave: tackling multi\-image, video, and 3D in large multimodal models\.arXiv preprint arXiv:2407\.07895\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p1.1)\.
- J\. Li, D\. Li, S\. Savarese, and S\. Hoi \(2023\)BLIP\-2: bootstrapping language\-image pre\-training with frozen image encoders and large language models\.InInternational Conference on Machine Learning,pp\. 19730–19742\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p1.1)\.
- H\. Liu, C\. Li, Q\. Wu, and Y\. J\. Lee \(2023\)Visual instruction tuning\.Advances in Neural Information Processing Systems36,pp\. 34892–34916\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p1.1)\.
- D\. Marczak, S\. Magistri, S\. Cygert, B\. Twardowski, A\. D\. Bagdanov, and J\. van de Weijer \(2025\)No task left behind: isotropic model merging with common and task\-specific subspaces\.InInternational Conference on Machine Learning,Cited by:[Baselines\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px3.p1.1)\.
- Y\. Qin, Y\. Ye, J\. Fang, H\. Wang, S\. Liang, S\. Tian, J\. Zhang, J\. Li, Y\. Li, S\. Huang,et al\.\(2025\)Ui\-tars: pioneering automated gui interaction with native agents\.arXiv preprint arXiv:2501\.12326\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p3.1),[Agentic MLLMs](https://arxiv.org/html/2608.06699#Sx2.SSx2.p1.1)\.
- C\. Rawles, S\. Clinckemaillie, Y\. Chang, J\. Waltz, G\. Lau, M\. Fair, A\. Li, W\. Bishop, W\. Li, F\. Campbell\-Ajala, D\. Toyama, R\. Berry, D\. Tyamagundlu, T\. Lillicrap, and O\. Riva \(2024\)AndroidWorld: a dynamic benchmarking environment for autonomous agents\.arXiv preprint arXiv:2405\.14573\.Cited by:[Benchmarks\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px2.p1.1)\.
- Z\. Shao, B\. Xiong, X\. Yang, Y\. Song, Q\. Zhang, H\. Chen, and C\. Xu \(2026\)PivotMerge: bridging heterogeneous multimodal pre\-training via post\-alignment model merging\.arXiv preprint arXiv:2604\.22823\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p4.1),[Model Merging](https://arxiv.org/html/2608.06699#Sx2.SSx1.p1.1)\.
- G\. Stoica, P\. Ramesh, B\. Ecsedi, L\. Choshen, and J\. Hoffman \(2024\)Model merging with SVD to tie the knots\.arXiv preprint arXiv:2410\.19735\.Cited by:[Model Merging](https://arxiv.org/html/2608.06699#Sx2.SSx1.p1.1)\.
- Y\. Sung, L\. Li, K\. Lin, Z\. Gan, M\. Bansal, and L\. Wang \(2023\)An empirical study of multimodal model merging\.arXiv preprint arXiv:2304\.14933\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p4.1)\.
- W\. Wang, Z\. Gao, L\. Gu, H\. Pu, L\. Cui, X\. Wei, Z\. Liu, L\. Jing, S\. Ye, J\. Shao,et al\.\(2025\)InternVL3\.5: advancing open\-source multimodal models in versatility, reasoning, and efficiency\.arXiv preprint arXiv:2508\.18265\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p1.1)\.
- W\. Wang, L\. Ding, M\. Zeng, X\. Zhou, L\. Shen, Y\. Luo, and D\. Tao \(2024\)Divide, conquer and combine: a training\-free framework for high\-resolution image perception in multimodal large language models\.arXiv preprint arXiv:2408\.15556\.Cited by:[Benchmarks\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px2.p1.1)\.
- Y\. Wei, R\. Cheng, W\. Jin, E\. Yang, L\. Shen, L\. Hou, S\. Du, C\. Yuan, X\. Cao, and D\. Tao \(2025\)Unifying multimodal large language model capabilities and modalities via model merging\.arXiv preprint arXiv:2505\.19892\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p4.1),[Model Merging](https://arxiv.org/html/2608.06699#Sx2.SSx1.p1.1),[Baselines\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px3.p1.1)\.
- M\. Wortsman, G\. Ilharco, S\. Y\. Gadre, R\. Roelofs, R\. Gontijo\-Lopes, A\. S\. Morcos, H\. Namkoong, A\. Farhadi, Y\. Carmon, S\. Kornblith,et al\.\(2022\)Model soups: averaging weights of multiple fine\-tuned models improves accuracy without increasing inference time\.InInternational Conference on Machine Learning,pp\. 23965–23998\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p4.1),[Introduction](https://arxiv.org/html/2608.06699#Sx1.p5.1),[Model Merging](https://arxiv.org/html/2608.06699#Sx2.SSx1.p1.1),[Baselines\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px3.p1.1)\.
- J\. Wu, Z\. Deng, W\. Li, Y\. Liu, B\. You, B\. Li, Z\. Ma, and Z\. Liu \(2025\)Mmsearch\-r1: incentivizing lmms to search\.arXiv preprint arXiv:2506\.20670\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p3.1),[Agentic MLLMs](https://arxiv.org/html/2608.06699#Sx2.SSx2.p1.1),[Models\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px1.p1.1),[Benchmarks\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px2.p1.1)\.
- P\. Wu and S\. Xie \(2023\)V\*: guided visual search as a core mechanism in multimodal LLMs\.arXiv preprint arXiv:2312\.14135\.Cited by:[Benchmarks\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px2.p1.1)\.
- T\. Xie, D\. Zhang, J\. Chen, X\. Li, S\. Zhao, R\. Cao, J\. H\. Toh, Z\. Cheng, D\. Shin, F\. Lei, Y\. Liu, Y\. Xu, S\. Zhou, S\. Savarese, C\. Xiong, V\. Zhong, and T\. Yu \(2024\)OSWorld: benchmarking multimodal agents for open\-ended tasks in real computer environments\.arXiv preprint arXiv:2404\.07972\.Cited by:[Benchmarks\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px2.p1.1)\.
- B\. Xu, H\. Wu, H\. Lin, W\. Huang, B\. Zhu, Y\. Shu, and C\. Qin \(2026a\)ACE\-merging: data\-free model merging with adaptive covariance estimation\.arXiv preprint arXiv:2603\.02945\.Cited by:[Baselines\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px3.p1.1)\.
- C\. Xu, K\. Ke, Z\. Liu, J\. Wei, Z\. Shao, W\. Guo, and C\. Yu \(2026b\)EvoMAS: learning execution\-time workflows for multi\-agent systems\.arXiv preprint arXiv:2605\.08769\.Cited by:[Model Merging](https://arxiv.org/html/2608.06699#Sx2.SSx1.p1.1)\.
- P\. Yadav, D\. Tam, L\. Choshen, C\. A\. Raffel, and M\. Bansal \(2023\)Ties\-merging: resolving interference when merging models\.Advances in Neural Information Processing Systems36,pp\. 7093–7115\.Cited by:[Model Merging](https://arxiv.org/html/2608.06699#Sx2.SSx1.p1.1),[Baselines\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px3.p1.1)\.
- H\. Yao, R\. Zhang, J\. Huang, J\. Zhang, Y\. Wang, B\. Fang, R\. Zhu, Y\. Jing, S\. Liu, G\. Li,et al\.\(2025\)A survey on agentic multimodal large language models\.arXiv preprint arXiv:2510\.10991\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p1.1),[Agentic MLLMs](https://arxiv.org/html/2608.06699#Sx2.SSx2.p1.1)\.
- J\. Ye, X\. Zhang, H\. Xu, H\. Liu, J\. Wang, Z\. Zhu, Z\. Zheng, F\. Gao, J\. Cao, Z\. Lu,et al\.\(2025\)Mobile\-agent\-v3: fundamental agents for gui automation\.arXiv preprint arXiv:2508\.15144\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p3.1),[Agentic MLLMs](https://arxiv.org/html/2608.06699#Sx2.SSx2.p1.1),[Models\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px1.p1.1)\.
- L\. Yu, B\. Yu, H\. Yu, F\. Huang, and Y\. Li \(2024\)Language models are super mario: absorbing abilities from homologous models as a free lunch\.InInternational Conference on Machine Learning,Cited by:[Model Merging](https://arxiv.org/html/2608.06699#Sx2.SSx1.p1.1)\.
- F\. Zeng, H\. Guo, F\. Zhu, L\. Shen, and H\. Tang \(2025\)RobustMerge: parameter\-efficient model merging for mllms with direction robustness\.InThe Thirty\-ninth Annual Conference on Neural Information Processing Systems,Cited by:[Model Merging](https://arxiv.org/html/2608.06699#Sx2.SSx1.p1.1)\.
- H\. Zhang, Z\. Zhou, M\. Luo, S\. Di, M\. Zhang, and T\. Wei \(2026\)DC\-merge: improving model merging with directional consistency\.InProceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition,Cited by:[Baselines\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px3.p1.1)\.
- Y\. Zhang, X\. Lu, S\. Yin, C\. Fu, W\. Chen, X\. Hu, B\. Wen, K\. Jiang, C\. Liu, T\. Zhang,et al\.\(2025\)Thyme: think beyond images\.InNeurIPS 2025 Fourth Workshop on Deep Learning for Code,Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p3.1),[Agentic MLLMs](https://arxiv.org/html/2608.06699#Sx2.SSx2.p1.1)\.
- Z\. Zheng, M\. Yang, J\. Hong, C\. Zhao, G\. Xu, L\. Yang, C\. Shen, and X\. Yu \(2025\)Deepeyes: incentivizing" thinking with images" via reinforcement learning\.arXiv preprint arXiv:2505\.14362\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p3.1),[Agentic MLLMs](https://arxiv.org/html/2608.06699#Sx2.SSx2.p1.1),[Models\.](https://arxiv.org/html/2608.06699#Sx4.SSx1.SSSx4.Px1.p1.1)\.
- D\. Zhu, J\. Chen, X\. Shen, X\. Li, and M\. Elhoseiny \(2023\)MiniGPT\-4: enhancing vision\-language understanding with advanced large language models\.arXiv preprint arXiv:2304\.10592\.Cited by:[Introduction](https://arxiv.org/html/2608.06699#Sx1.p1.1)\.
Supplementary Material for AgentPatch: Coarse\-to\-Fine Weak\-Task Repair for Merging Agentic Multimodal Large Language ModelsZibo Shao1,2,3, Baochen Xiong1,2,3, Chengdong Xu4, Linhui Xiao2, Kaichen Li1,2,3, Haoran Gong2, Yan Li2, Yaguang Song2\\corresponding, Xiaoshan Yang1,2,3\\corresponding
## AAdditional Method Details
### A\.1Overall Algorithm
Algorithm 1AgentPatch: Training\-Free Coarse\-to\-Fine Weak\-Task Repair0:Base
𝜽0\\boldsymbol\{\\theta\}\_\{0\}; aligned experts
\{𝜽k\}k∈𝒦\\\{\\boldsymbol\{\\theta\}\_\{k\}\\\}\_\{k\\in\\mathcal\{K\}\}; merging operators
𝒢\\mathcal\{G\}; calibration partitions
\{𝒞k\}k∈𝒦\\\{\\mathcal\{C\}\_\{k\}\\\}\_\{k\\in\\mathcal\{K\}\}
0:Final merged checkpoint
𝜽\(3\)\\boldsymbol\{\\theta\}^\{\(3\)\}
1:Stage 1: Stable backbone selection
2:
𝝉k←𝜽k−𝜽0,∀k∈𝒦\\boldsymbol\{\\tau\}\_\{k\}\\leftarrow\\boldsymbol\{\\theta\}\_\{k\}\-\\boldsymbol\{\\theta\}\_\{0\},\\ \\forall k\\in\\mathcal\{K\}
3:foreach merging operator
g∈𝒢g\\in\\mathcal\{G\}do
4:
𝜽\(g\)←𝒢g\(𝜽0,\{𝝉k\}k∈𝒦\)\\boldsymbol\{\\theta\}^\{\(g\)\}\\leftarrow\\mathcal\{G\}\_\{g\}\(\\boldsymbol\{\\theta\}\_\{0\},\\\{\\boldsymbol\{\\tau\}\_\{k\}\\\}\_\{k\\in\\mathcal\{K\}\}\)
5:
S¯g←\|𝒦\|−1∑k∈𝒦Sk\(𝜽\(g\)\)\\bar\{S\}\_\{g\}\\leftarrow\|\\mathcal\{K\}\|^\{\-1\}\\sum\_\{k\\in\\mathcal\{K\}\}S\_\{k\}\(\\boldsymbol\{\\theta\}^\{\(g\)\}\)
6:endfor
7:
g∗←argmaxgS¯gg^\{\*\}\\leftarrow\\arg\\max\_\{g\}\\bar\{S\}\_\{g\},
𝜽\(1\)←𝜽\(g∗\)\\boldsymbol\{\\theta\}^\{\(1\)\}\\leftarrow\\boldsymbol\{\\theta\}^\{\(g^\{\*\}\)\}
8:
w←argmaxkDk\(𝜽\(1\)\)w\\leftarrow\\arg\\max\_\{k\}D\_\{k\}\(\\boldsymbol\{\\theta\}^\{\(1\)\}\)
9:Stage 2: Weak\-task unique residual recovery
10:
Uwp←𝟏\[\|τwp\|\>ϵ\]∏k≠w𝟏\[\|τkp\|≤ϵ\]U\_\{w\}^\{p\}\\leftarrow\\mathbf\{1\}\[\|\\tau\_\{w\}^\{p\}\|\>\\epsilon\]\\prod\_\{k\\neq w\}\\mathbf\{1\}\[\|\\tau\_\{k\}^\{p\}\|\\leq\\epsilon\]
11:
𝜽\(2\)←𝜽\(1\)\+β𝐔w⊙\(𝜽w−𝜽\(1\)\)\\boldsymbol\{\\theta\}^\{\(2\)\}\\leftarrow\\boldsymbol\{\\theta\}^\{\(1\)\}\+\\beta\\mathbf\{U\}\_\{w\}\\odot\(\\boldsymbol\{\\theta\}\_\{w\}\-\\boldsymbol\{\\theta\}^\{\(1\)\}\)
12:Stage 3: Agent\-guided behavior\-critical patch
13:Collect paired weak\-task trajectories
ℋrep\\mathcal\{H\}^\{\\mathrm\{rep\}\}and successful recipient trajectories
ℋprot\\mathcal\{H\}^\{\\mathrm\{prot\}\}\.
14:
\(𝒮rep,𝒮prot\)←DGC\(ℋrep,ℋprot\)\(\\mathcal\{S\}^\{\\mathrm\{rep\}\},\\mathcal\{S\}^\{\\mathrm\{prot\}\}\)\\leftarrow\\operatorname\{DGC\}\(\\mathcal\{H\}^\{\\mathrm\{rep\}\},\\mathcal\{H\}^\{\\mathrm\{prot\}\}\)
15:
cℓrjrep←aℓrjrep‖𝐖outℓ,w\[:,j\]‖2c^\{\\mathrm\{rep\}\}\_\{\\ell rj\}\\leftarrow a^\{\\mathrm\{rep\}\}\_\{\\ell rj\}\\\|\\mathbf\{W\}^\{\\ell,w\}\_\{\\mathrm\{out\}\}\[:,j\]\\\|\_\{2\}
16:
cℓpjprot←aℓpjprot‖𝐖outℓ,\(2\)\[:,j\]‖2c^\{\\mathrm\{prot\}\}\_\{\\ell pj\}\\leftarrow a^\{\\mathrm\{prot\}\}\_\{\\ell pj\}\\\|\\mathbf\{W\}^\{\\ell,\(2\)\}\_\{\\mathrm\{out\}\}\[:,j\]\\\|\_\{2\}
17:
ℛℓ←⋃rTopK\(cℓr:rep,⌈qrdff⌉\)\\mathcal\{R\}^\{\\ell\}\\leftarrow\\bigcup\_\{r\}\\operatorname\{TopK\}\(c^\{\\mathrm\{rep\}\}\_\{\\ell r:\},\\lceil q\_\{r\}d\_\{\\mathrm\{ff\}\}\\rceil\)
18:
𝒫ℓ←⋃pTopK\(cℓp:prot,⌈qguarddff⌉\)\\mathcal\{P\}^\{\\ell\}\\leftarrow\\bigcup\_\{p\}\\operatorname\{TopK\}\(c^\{\\mathrm\{prot\}\}\_\{\\ell p:\},\\lceil q\_\{\\mathrm\{guard\}\}d\_\{\\mathrm\{ff\}\}\\rceil\)
19:
ℳℓ←ℛℓ∖𝒫ℓ\\mathcal\{M\}^\{\\ell\}\\leftarrow\\mathcal\{R\}^\{\\ell\}\\setminus\\mathcal\{P\}^\{\\ell\}
20:
𝜽\(3\)←𝜽\(2\)\\boldsymbol\{\\theta\}^\{\(3\)\}\\leftarrow\\boldsymbol\{\\theta\}^\{\(2\)\}
21:foreach
j∈ℳℓj\\in\\mathcal\{M\}^\{\\ell\}and layer
ℓ\\elldo
22:
ϕjℓ,\(3\)←\(1−α\)ϕjℓ,\(2\)\+αϕjℓ,w\\boldsymbol\{\\phi\}^\{\\ell,\(3\)\}\_\{j\}\\leftarrow\(1\-\\alpha\)\\boldsymbol\{\\phi\}^\{\\ell,\(2\)\}\_\{j\}\+\\alpha\\boldsymbol\{\\phi\}^\{\\ell,w\}\_\{j\}
23:endfor
24:return
𝜽\(3\)\\boldsymbol\{\\theta\}^\{\(3\)\}
Algorithm[1](https://arxiv.org/html/2608.06699#alg1)gives an executable summary of the complete AgentPatch pipeline\. In particular, backbone selection produces the recipient𝜽\(1\)\\boldsymbol\{\\theta\}^\{\(1\)\}and the weakest\-preserved capabilityww, which jointly determine the subsequent repair target\. DGC is invoked only during offline checkpoint construction, so the procedure outputs a single static checkpoint with no analysis\-agent, expert\-routing, or ensemble dependency at inference time\.
### A\.2Development and Test Partitions
Table[1](https://arxiv.org/html/2608.06699#S1.T1)specifies the fixed partitions used throughout the paper\. For each benchmark, the development partition supports candidate selection, weak\-capability identification, or offline repair construction, whereas the reported test partition is its disjoint complement\.
Table 1:Development and test partitions\. “Pool” denotes the complete evaluated benchmark pool\. We report both the development share of the pool and its size relative to the test complement\.
### A\.3Stable Backbone Selection Details
We instantiate the candidate set𝒢\\mathcal\{G\}with Weight Averaging, Task Arithmetic, TIES\-Merging, and TSVM\. All four candidates use the same base and aligned expert checkpoints and are evaluated with identical inference protocols on fixed calibration partitions\. No test example participates in candidate selection or weak\-capability identification\.
For capabilitykk, letℬk\\mathcal\{B\}\_\{k\}be its associated calibration benchmarks and letsb\(𝜽\)∈\[0,1\]s\_\{b\}\(\\boldsymbol\{\\theta\}\)\\in\[0,1\]denote the score of model𝜽\\boldsymbol\{\\theta\}on benchmarkbbafter metric normalization\. We aggregate the benchmarks belonging to the same capability as
Sk\(𝜽\)=1\|ℬk\|∑b∈ℬksb\(𝜽\)\.S\_\{k\}\(\\boldsymbol\{\\theta\}\)=\\frac\{1\}\{\|\\mathcal\{B\}\_\{k\}\|\}\\sum\_\{b\\in\\mathcal\{B\}\_\{k\}\}s\_\{b\}\(\\boldsymbol\{\\theta\}\)\.\(1\)Following the main paper, withϵs\>0\\epsilon\_\{s\}\>0denoting a small constant that prevents division by zero, we measure the preservation of capabilitykkby its expert\-relative degradation
Dk\(𝜽\)=Sk\(𝜽k\)−Sk\(𝜽\)max\(Sk\(𝜽k\),ϵs\),D\_\{k\}\(\\boldsymbol\{\\theta\}\)=\\frac\{S\_\{k\}\(\\boldsymbol\{\\theta\}\_\{k\}\)\-S\_\{k\}\(\\boldsymbol\{\\theta\}\)\}\{\\max\\\!\\left\(S\_\{k\}\(\\boldsymbol\{\\theta\}\_\{k\}\),\\epsilon\_\{s\}\\right\)\},\(2\)Because each capability has two benchmarks, this aggregation is equivalent to the unweighted mean over the six development scores\. Table[2](https://arxiv.org/html/2608.06699#S1.T2)compares every candidate on the same current development partitions\. TSVM provides the highest six\-benchmark average and is selected as𝜽\(1\)\\boldsymbol\{\\theta\}^\{\(1\)\}\. We then identify the weakest\-preserved capability asw=argmaxk∈𝒦Dk\(𝜽\(1\)\)w=\\arg\\max\_\{k\\in\\mathcal\{K\}\}D\_\{k\}\(\\boldsymbol\{\\theta\}^\{\(1\)\}\), which selects GUI interaction\. Subsequent stages therefore use the TSVM recipient and GUI expert evidence\. The common evaluator assigns zero to TIES\-Merging on the two search partitions because its checkpoint yields no valid extracted answers\.
Table 2:Performance \(%\) of all Stage\-1 candidate backbones on the six fixed development partitions\. The average is the unweighted mean of the six scores; WA and TA denote Weight Averaging and Task Arithmetic\.
### A\.4Implementation Hyperparameters
Table[3](https://arxiv.org/html/2608.06699#S1.T3)consolidates the concrete settings used to construct the reported AgentPatch checkpoint\. Ratios in Stage 3 are applied per behavior group and per layer\. The protection budget counts group\-balanced Guardian calibration examples, not protected neurons; the latter are obtained by taking the union of the per\-group selections\.
Table 3:Complete implementation settings for the reported AgentPatch model\.
## BDGC Workflow and Behavior Evidence Construction
The Diagnoser–Guardian–Compiler \(DGC\) workflow translates execution\-level evidence into auditable behavior spans for the final repair stage\. DGC determines*which behaviors*should be restored or protected, while the behavior\-conditioned activation procedure determines*where*they are represented\. Table[5](https://arxiv.org/html/2608.06699#S2.T5)summarizes the evidence contract that separates the three agents\.
### B\.1Trajectory Evidence Pools
For each calibration taskii, we record its benchmark and task identifiers, instruction, environment observations, serialized action sequence, and evaluator outcome\. The repaired recipient𝜽\(2\)\\boldsymbol\{\\theta\}^\{\(2\)\}and the weak\-task expert𝜽w\\boldsymbol\{\\theta\}\_\{w\}are executed on the same task, forming a paired record
ei=\(bi,ui,τi\(2\),τiw,yi\(2\),yiw\),e\_\{i\}=\\left\(b\_\{i\},u\_\{i\},\\tau\_\{i\}^\{\(2\)\},\\tau\_\{i\}^\{w\},y\_\{i\}^\{\(2\)\},y\_\{i\}^\{w\}\\right\),\(3\)wherebib\_\{i\}anduiu\_\{i\}identify the benchmark and task,τi\(2\)\\tau\_\{i\}^\{\(2\)\}andτiw\\tau\_\{i\}^\{w\}are the two trajectories, andyi\(2\)y\_\{i\}^\{\(2\)\}andyiwy\_\{i\}^\{w\}are their evaluator outcomes\. The two evidence pools are deliberately separated:
Repair Evidence Pool Paired same\-task trajectories𝜽\(2\)\\boldsymbol\{\\theta\}^\{\(2\)\}: verified underperformance𝜽w\\boldsymbol\{\\theta\}\_\{w\}: verified corrective behaviorOutput: expert behavior spansProtection Evidence Pool Recipient\-success bankCorrect weak\-task behaviorsComplementary capabilities to preserveOutput: recipient behavior spans
Repair evidence consists exclusively of paired records admitted to the fixed strict\-gap pool; support records are not promoted into repair targets\. Complete trajectories provide the environment state and execution context surrounding each action\. Protection evidence instead comes from successful recipient behaviors and complementary capabilities to preserve\. All calibration tasks are disjoint from the test partitions\.
### B\.2Diagnoser: Mining Behavior\-Critical Gaps
The*Diagnoser*aligns the recipient and expert trajectories and locates a behaviorally meaningful divergence associated with the expert’s advantage\. It jointly considers the task instruction, observations, action arguments, evaluator feedback, and the actions following the divergence\. The result is expressed as a reusable workflow behavior rather than as a task\-specific command string\. In the GUI\-targeted instantiation reported here, examples include establishing the correct input focus, invoking the required interaction type, navigating the appropriate menu hierarchy, and confirming a state\-changing operation\.
Each diagnosed group records its behavioral intent, target environment, failure mode, matcher hints, and exact source records\. The benchmark, task identifier, and supporting action step make every repair behavior traceable to an observed gap\. Related gaps may share a behavior group, but all strict source records are retained\. Only expert\-supported spans receive theboostpolarity; incorrect recipient actions assist diagnosis but are not compiled into a negative update branch\.
### B\.3Guardian: Constructing Protection Evidence
The*Guardian*identifies behaviors whose associated parameters should be excluded from repair\. It operates on the recipient\-success bank and groups evidence by the capability being preserved\. In the GUI\-targeted instantiation reported here, protection evidence includes already\-correct interaction workflows and valid action formats, together with complementary capabilities such as search\-query formulation, evidence\-grounded answers, fine\-grained visual judgment, high\-resolution reasoning, and general tool\-use schemas\. Failure\-only records may reveal a potential interference risk, but they cannot by themselves establish a protection group\.
Every protection group retains typed provenance linking it to recipient\- or shared\-success examples\. Guardian proposes no weight changes and never converts protected examples into repair targets\. Its selectors instead define the protected neuron union, so editing is constrained by evidence of functionality already present in the recipient rather than by a generic distance heuristic\.
### B\.4Compiler: Executable Span Selectors and Auditing
The*Compiler*converts the Diagnoser and Guardian outputs into two canonical collections: repair groups and protection groups\. A compiled group contains a name, behavior tokens, executable matchers, source\-task provenance, and evidence references\. Matchers use literal, regular\-expression, parsed action\-field, or within\-action sequence rules\. Because activation calibration serializes one action record at a time, a multi\-step workflow description is retained as group\-level intent, while every selected span must be grounded in an action that is actually present in the corresponding trajectory\.
For a serialized action sequencexix\_\{i\}and a matched character interval\[air,bir\)\[a\_\{ir\},b\_\{ir\}\)from grouprr, tokenizer offset mappings convert the match into behavior\-token positions
𝒯i,r=\{t\|offset\(xi,t\)∩\[air,bir\)≠∅\}\.\\mathcal\{T\}\_\{i,r\}=\\left\\\{t\\;\\middle\|\\;\\operatorname\{offset\}\(x\_\{i,t\}\)\\cap\[a\_\{ir\},b\_\{ir\}\)\\neq\\emptyset\\right\\\}\.\(4\)The resulting repair positions select expert tokens, whereas protection positions select recipient tokens\. The Compiler narrows overly broad selectors and records unresolved repair–protection conflicts; final protection is enforced at the neuron level by Guardian exclusion\. It also enforces two fail\-closed provenance checks: the union of repair\-group sources must cover all supplied strict gaps, and every protection group must be backed by recipient\-success evidence\.
Table[4](https://arxiv.org/html/2608.06699#S2.T4)traces an AndroidWorld Markor calibration example from a recipient–expert gap to an executable repair selector paired with independent recipient\-success protection evidence\.
Table 4:An audited DGC compilation trace\. The repair and protection branches originate from different trajectory records and meet only at Compiler overlap resolution\.Table 5:Evidence contract of the DGC workflow\. Each agent has a distinct evidence source, compiled artifact, and safety constraint\.
### B\.5DGC Prompt Templates
The DGC agents use structured prompt templates with strict JSON outputs\. The templates below provide the parameterized instruction and input–output framework used by DGC\. Run\-specific payloads—including trajectories, screenshots, and behavior profiles—are replaced with descriptive placeholders in angle brackets\.
At the framework level, DGC accepts trajectories from any identified weak capability\. Since GUI interaction is identified as the weakest\-preserved capability in our experiments, the instantiated payload schemas below use AndroidWorld and OSWorld trajectories as repair evidence, while search and visual behaviors provide complementary protection evidence\.
Table 6:Prompt I/O schema summary for the reported DGC instantiation\. The templates expose the same information boundaries as the implementation: repair is expert\-directed, protection is recipient\-success\-grounded, and compilation is deterministic and auditable\.Diagnoser prompt template\.The Diagnoser prompt asks the agent to read paired recipient–expert weak\-task trajectories and identify behavior\-critical gaps where the expert provides a clear corrective behavior\. The prompt explicitly disables negative suppression: every editable target must move the recipient toward the expert on expert\-supported spans\.
\\MakeFramed\\FrameRestore
Prompt 1\. Diagnoser behavior\-gap template\.
\[SYSTEM PROMPT\]
You are the Behavior\-Critical Gap Diagnoser for expert\-directed weak\-task repair\. Read the supplied paired trajectories and identify behavior\-critical gaps for which the current merged model underperforms while the weak\-task expert provides a concrete corrective behavior\. Use only the supplied evidence\. Compare the task instruction, observations, actions, evaluator feedback, and subsequent environment states; do not infer an unsupported success or failure\.
Use only strict\_gap\_records\. Every output group must cite at least one supplied strict\-gap record, and the union of source\_records over all groups must cover every supplied strict gap\. When context\_policy\.mode is full, inspect the complete trajectory and retain all distinct provenance\. Support records must not be promoted into repair groups\.
Describe reusable workflow behaviors rather than memorizing task titles\. Matchers must select the expert\-side corrective action spans and must be executable as literal, regular\-expression, JSON\-field, or within\-action sequence matchers\. Prefer selectors that generalize across similar actions, while retaining exact source records and evidence references\. Emit no negative suppression or protection groups\. Every repair group must target the LLM and set target\_modules to exactly \["llm"\]\. Return one valid JSON object and no surrounding Markdown\.
\[USER PROMPT\]
```
{
"payload_version": "<PAYLOAD_VERSION>",
"context_policy": {
"mode": "full",
"record_omission_allowed": false,
"action_window": "complete_trajectory"
},
"selection_policy": {
"primary_evidence":
"current_bad_expert_better",
"support_anchors": "disabled",
"required_source_type": "strict_gap"
},
"strict_gap_records":
<PAIRED_RECIPIENT_EXPERT_TRAJECTORIES>,
"record_counts": <STRICT_GAP_COUNT_AUDIT>,
"multimodal_context":
<OPTIONAL_SCREENSHOT_EVIDENCE>
}
```
\[OUTPUT: STRICT JSON\]
```
{
"agent_role": "behavior_gap_miner",
"behavior_gap_groups": [{
"name": "<GROUP_NAME>",
"intent": "<REPAIR_INTENT>",
"current_failure": "<OBSERVED_GAP>",
"expert_repair_direction":
"<EXPERT_SUPPORTED_BEHAVIOR>",
"tokens": ["<TOKEN_OR_PHRASE>"],
"matchers": [{
"type": "literal|regex|json_field|sequence",
"pattern": "<EXECUTABLE_PATTERN>",
"field": "<OPTIONAL_JSON_FIELD>",
"value": "<OPTIONAL_FIELD_VALUE>",
"case_sensitive": false
}],
"target_benchmark": ["android_world|osworld"],
"target_failure_modes": ["<FAILURE_MODE>"],
"failure_type":
"perception|cross_modal_alignment|reasoning|"
"tool_action|mixed",
"target_modules": ["llm"],
"source_type": "strict_gap",
"source_records": [{
"benchmark": "android_world|osworld",
"task_id": "<TASK_ID>"
}],
"evidence_refs": ["<TASK_AND_STEP_REFERENCE>"],
"priority": <INTEGER>,
"confidence": <VALUE_IN_[0,1]>,
"rationale": "<EVIDENCE_GROUNDED_REASON>"
}],
"notes": ["<OPTIONAL_NOTE>"]
}
```
\\endMakeFramed
Guardian prompt template\.The Guardian prompt is deliberately grounded in behavior that the recipient already performs correctly\. This prevents the protection branch from becoming a generic list of desirable capabilities and keeps protected regions tied to observed recipient competence\.
\\MakeFramed\\FrameRestore
Prompt 2\. Guardian protection template\.
\[SYSTEM PROMPT\]
You are the Guard Behavior Miner for protected repair\. Identify recipient\-owned behaviors whose associated FFN neurons should be protected while repairing the weak capability\. Read cross\-task evidence from search and FactualVQA, fine\-grained visual reasoning, and GUI interaction\.
Build protection groups primarily from success\_examples, current\_success\_examples, shared\_success\_examples, and current\_only\_success\_examples\. Failure or expert\-better examples may explain risk, but they cannot by themselves establish that the recipient owns a behavior\. Never describe a failure\-only pattern as a protected success\. When full context is supplied, inspect every typed success set and preserve distinct evidence provenance\.
Protect search\-query formulation, evidence\-grounded answers, numerical precision, visual attribute and spatial reasoning, and valid GUI action schemas when supported by successful recipient evidence\. Every protection group must retain exact evidence references and executable matchers that can select recipient\-side calibration spans\. Do not propose repair, boost, or suppression targets\. Set target\_modules to \["llm"\] for the reported decoder\-FFN patch\. Return one valid JSON object and no surrounding Markdown\.
\[USER PROMPT\]
```
{
"payload_version": "<PAYLOAD_VERSION>",
"context_policy": {
"mode": "full",
"example_omission_allowed": false
},
"current_model": "<RECIPIENT_MODEL>",
"task_profiles": {
"search": <SEARCH_BEHAVIOR_PROFILES>,
"vision": <VISUAL_BEHAVIOR_PROFILES>,
"gui": <GUI_BEHAVIOR_PROFILES>
},
"multimodal_context":
<OPTIONAL_SCREENSHOT_METADATA>,
"gui_pairwise_evidence":
<OPTIONAL_PAIRED_GUI_CONTEXT>
}
```
Each task profile contains its metrics and typed example\_sets; the actual success, shared\-success, current\-only\-success, and failure examples are inserted at the placeholders above\.
\[OUTPUT: STRICT JSON\]
```
{
"agent_role": "guard_behavior_miner",
"protected_behavior_groups": [{
"name": "<GROUP_NAME>",
"intent": "<PROTECTION_INTENT>",
"tokens": ["<TOKEN_OR_PHRASE>"],
"matchers": [{
"type": "literal|regex|json_field|sequence",
"pattern": "<EXECUTABLE_PATTERN>",
"field": "<OPTIONAL_JSON_FIELD>",
"value": "<OPTIONAL_FIELD_VALUE>",
"case_sensitive": false
}],
"source_tasks": ["<SOURCE_BENCHMARK>"],
"protected_capability": "<CAPABILITY>",
"target_modules": ["llm"],
"risk_if_modified": "<INTERFERENCE_RISK>",
"evidence_refs": ["<SUCCESS_EVIDENCE_REF>"],
"priority": <INTEGER>,
"confidence": <VALUE_IN_[0,1]>
}],
"notes": ["<OPTIONAL_NOTE>"]
}
```
\\endMakeFramed
Compiler prompt template\.The Compiler prompt converts the two mined evidence sets into the exact selector format consumed by activation calibration\. Its central role is to preserve provenance while preventing broad or conflicting repair selectors from overriding protected behavior\.
\\MakeFramed\\FrameRestore
Prompt 3\. Compiler selector template\.
\[SYSTEM PROMPT\]
You are the Selector Compiler for expert\-directed behavior\-gap repair\. Combine the Diagnoser behavior\-gap groups and Guardian protection groups into the executable selector specification consumed by activation calibration\. Preserve valid matcher fields and convert matcher hints into literal, regular\-expression, JSON\-field, or within\-action sequence matchers\.
Compile Diagnoser groups as repair behavior spans with polarity="boost" and target\_span\_role="positive"; compile Guardian groups as protection behavior spans with polarity="protect" and target\_span\_role="protected"\. This workflow has no negative suppression branch\. All repair and protection groups target the LLM in the reported decoder\-FFN patch\.
Protection takes precedence over repair\. If a repair selector overlaps a protected behavior, narrow the repair selector or record the conflict for hard Guardian exclusion\. Avoid broad selectors that match generic action tokens\. Because each calibration text serializes one action, do not emit multi\-action workflow descriptions as sequence matchers; every repair group must retain a matcher that directly selects its source action JSON\.
Preserve source\_type, source\_records, matchers, and evidence\_refs\. The union of compiled repair sources must cover every required strict\-gap record\. The canonical groups are the top\-level repair\_token\_groups and protected\_token\_groups; keep the auxiliary selector lists in next\_repair\_spec empty to prevent duplication\. Return raw JSON only\.
\[USER PROMPT\]
```
{
"context_policy": {
"mode": "full",
"group_field_omission_allowed": false,
"provenance_omission_allowed": false
},
"agent_b": {
"agent_role": "behavior_gap_miner",
"behavior_gap_groups": <DIAGNOSER_OUTPUT>,
"notes": <DIAGNOSER_NOTES>
},
"agent_g": {
"agent_role": "guard_behavior_miner",
"protected_behavior_groups": <GUARDIAN_OUTPUT>,
"notes": <GUARDIAN_NOTES>
},
"required_source_records":
<STRICT_GAP_COVERAGE_LIST>,
"serialized_trajectories":
<CALIBRATION_TRAJECTORIES>
}
```
\[OUTPUT: STRICT JSON\]
```
{
"agent_role": "selector_compiler",
"repair_token_groups": [{
"name": "<GROUP_NAME>",
"tokens": ["<TOKEN_OR_PHRASE>"],
"polarity": "boost",
"target_span_role": "positive",
"matchers": [<EXECUTABLE_MATCHER_OBJECTS>],
"target_benchmark": ["android_world|osworld"],
"target_failure_modes": ["<FAILURE_MODE>"],
"failure_type": "<FAILURE_TYPE>",
"target_modules": ["llm"],
"source_type": "strict_gap",
"source_records": [<SOURCE_RECORDS>],
"priority": <INTEGER>,
"confidence": <VALUE_IN_[0,1]>,
"evidence_refs": ["<TASK_AND_STEP_REFERENCE>"]
}],
"protected_token_groups": [{
"name": "<GROUP_NAME>",
"tokens": ["<TOKEN_OR_PHRASE>"],
"polarity": "protect",
"target_span_role": "protected",
"matchers": [<EXECUTABLE_MATCHER_OBJECTS>],
"source_tasks": ["<SOURCE_BENCHMARK>"],
"protected_capability": "<CAPABILITY>",
"target_modules": ["llm"],
"reason": "<INTERFERENCE_RISK>",
"evidence_refs": ["<SUCCESS_EVIDENCE_REF>"]
}],
"conflict_resolution": {
"rules": ["<PROTECTION_PRECEDENCE_RULE>"],
"resolved_conflicts": ["<CONFLICT_AUDIT>"]
},
"calibration_policy": {
"positive_examples": ["<REPAIR_EXAMPLE_REF>"],
"negative_or_protected_examples":
["<PROTECTION_EXAMPLE_REF>"],
"selection_rule": "<SELECTION_RULE>"
},
"next_repair_spec": {
"selector_groups": [],
"protected_selector_groups": [],
"suggested_modules": ["llm"],
"notes": ["<OPTIONAL_NOTE>"]
}
}
```
\\endMakeFramed
This prompt design makes the analysis agents inspect rich execution evidence while keeping the compiled artifact small and machine\-checkable\. The workflow additionally applies deterministic validation to verify strict\-gap coverage, success\-grounded Guardian provenance, and executable matcher fields\. The downstream patcher uses only the frozen selectors and trajectories; the prompt templates are not invoked during model inference\.
### B\.6Compiled Evidence Audit
After compilation, selectors and task/step provenance are frozen\. The selector audit in Table[7](https://arxiv.org/html/2608.06699#S2.T7)reports the compiled artifacts consumed by teacher\-forced activation collection and whole\-neuron interpolation\.
Table 7:Compiled selector audit used to construct the final static checkpoint\.These artifacts are used only during offline construction of the static AgentPatch checkpoint and introduce no analysis\-agent dependency at inference time\.
## CAdditional Analyses
### C\.1Layer\-Wise Distribution of Repair Regions
Figure 1:Layer\-wise distribution of repair candidates before and after Guardian exclusion\.Figure[1](https://arxiv.org/html/2608.06699#S3.F1)visualizes where the behavior\-critical patch acts across the 28 decoder layers\. Repair candidates occur throughout the network rather than concentrating in a narrow block of late layers, indicating that the localization procedure selects repair candidates across the network\. Guardian exclusion removes a substantial subset in every layer while retaining a smaller behavior\-directed patch\. In total, the 12,887 pre\-Guardian candidates are reduced to 5,352 patched neurons\. This distribution illustrates that the Guardian does not simply protect a small set of exceptional layers; it constrains editing wherever repair evidence overlaps behavior regions associated with capabilities to preserve\.
### C\.2Decoupling Single\- and Cross\-Environment Repair Evidence
Figure 2:Effect of using AndroidWorld\-only, OSWorld\-only, and joint repair evidence under the same final budget of 5,352 repair neurons\.Figure[2](https://arxiv.org/html/2608.06699#S3.F2)isolates the contribution of combining behavior evidence from AndroidWorld and OSWorld\. AndroidWorld\-only and OSWorld\-only repair are budget\-matched to Full AgentPatch, so their comparison does not benefit from editing different numbers of neurons\. The joint variant achieves the strongest GUI, Visual, and overall results, reaching 41\.3, 79\.0, and 56\.6, respectively\. These results show that the two evidence sources provide complementary behavioral coverage: jointly compiling their repair groups yields a more balanced patch than specializing the same editing budget to either environment alone\.
### C\.3Qualitative Examples
Figure[3](https://arxiv.org/html/2608.06699#S4.F3)presents paired execution examples from the three agentic task families\. Across the two search cases, AgentPatch forms or interprets the decisive retrieval evidence more precisely, leading to the correct entity or event\-time answer\. In GUI interaction, the repaired model retains behavior\-critical operations—selecting the folder action and applying the required person filter—that determine whether the requested workflow is completed\. The visual\-processing cases further show that preserving the relevant visual context and correctly mapping the inspected spatial relation can change the final outcome\. Together, these examples illustrate that the repair is reflected in complete agentic trajectories rather than only in their final answers\.
## DLimitations
AgentPatch currently operates on experts derived from a shared base model with aligned parameter structures, consistent with standard model\-merging settings\. Constructing the behavior\-critical patch requires offline calibration trajectories and analysis\-agent calls, introducing a one\-time preprocessing cost; however, the resulting model remains a single static checkpoint with no additional inference overhead\. Our experiments focus on merging three expert models, and future work could evaluate the scalability of the same workflow under merging settings with different numbers of experts\.
Figure 3:Qualitative comparison between TSVM and AgentPatch across Search, GUI interaction, and Visual Processing\. Each task family contains two paired evaluation examples\. The boxes summarize recorded model, tool, or environment actions, and the displayed trajectory lengths follow the corresponding executions\. Red and green endpoints denote unsuccessful and successful task outcomes, respectively\.Similar Articles
HyperRepair: Recovering Forgotten General Capabilities of Fine-Tuned Language Models
HyperRepair is a framework that recovers the general capabilities of fine-tuned language models while retaining domain specialization at inference cost only, using a hypernetwork that generates a Repairing Side Net from activation fingerprints. It is evaluated across two model families, 12 LoRA adaptation datasets, and 15 general benchmarks, achieving 93.4% of base models' general score while keeping 99.5% of fine-tuned domain performance.
PatchBoard: Schema-Grounded State Mutation for Reliable and Auditable LLM Multi-Agent Collaboration
PatchBoard replaces natural-language dialogue in LLM multi-agent systems with validated JSON Patch mutations over a shared structured state, achieving higher success rates and significantly lower token usage on ALFWorld benchmarks.
PatchHolmes: Agentic Patch Retrieval via Listwise Selection
PatchHolmes, accepted at AACL-IJCNLP 2026, uses an agentic listwise selection approach to pair software vulnerabilities with their fixing commits, achieving 59.95% Recall@1 versus 34.61% for pointwise baselines by having the agent inspect the full candidate list and reading ~96k tokens per query on a frozen open-weight model.
Task-Aware Federated Fine-Tuning for MoE-based Large Language Models
The paper proposes FedTAR, a task-aware federated fine-tuning method for MoE-based large language models that aligns local updates with task preferences to preserve expert specialization and improve performance under heterogeneous data.
Scratchpad Patching: Decoupling Compute from Patch Size in Byte-Level Language Models
This paper introduces Scratchpad Patching, a technique for tokenizer-free language models that decouples compute from patch size by dynamically refreshing context within patches to reduce patch lag.