IF-MAP: Influence-Function-Inspired Agent Prioritization in Multi-Agent Systems
Organizations: The Chinese University of Hong Kong, Shenzhen · Harbin Institute of Technology · School of Engineering and Applied Sciences, Harvard University
Abstract
Improving every agent in an LLM-based multi-agent system can be prohibitively costly, making it important to identify which agent should be prioritized to achieve the greatest system-level gain with limited resources. Failure attribution can inform this decision, but an agent's responsibility for failures does not directly reveal the system-level gains achievable by improving it. We therefore introduce IF-MAP, an influence-function-inspired method for identifying agents with high potential for system-level improvement. For each agent, IF-MAP measures end-to-end loss changes under controlled semantic prompt perturbations, fits a regularized local response model in a low-dimensional prompt-embedding subspace, and uses the estimated response norm as a priority score. This black-box procedure requires no access to model parameters or gradients and produces agent priorities that can guide subsequent improvement effort. We evaluate IF-MAP across six multi-agent workflows spanning code generation, question answering, and mathematical reasoning, using the same priorities for prompt optimization and model upgrades. Optimizing the selected agents' prompts achieves a macro-average gain of 3.81 percentage points, compared with 1.85 for uniform agent selection. Across five target models, upgrading the selected agents yields macro-average gains of 7.62-16.42 percentage points, compared with 3.81-8.62 for uniform agent selection. Despite its probing overhead, IF-MAP reduces Qwen3-8B and DeepSeek-V3.2 token use by 74.2% and 35.2%, respectively, relative to optimizing every agent, and reduces target-model tokens by 63.6-64.9% relative to upgrading every agent. These results support the use of IF-MAP to identify promising agents and direct improvement effort toward greater end-to-end performance gains.
Figures & tables
| Algorithm | HumanEval | MBPP | NQ | DROP | HotpotQA | MATH | Macro (6) | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| IF-MAP (ours) | +4.44 | 0.556 | +7.91 | 0.889 | +2.14 | 0.778 | +4.99 | 1.000 | +1.53 | 0.556 | +1.85 | 0.667 | +3.81 | 0.741 |
| Who&When-AAO | +3.23 | -0.222 | +3.02 | 0.222 | +2.14 | 0.333 | +4.99 | 1.000 | +1.53 | 0.333 | +1.38 | -0.035 | +2.72 | 0.272 |
| A2P | +3.23 | -0.556 | +3.02 | 0.000 | +2.14 | 0.333 | +4.99 | 1.000 | +1.53 | 0.333 | +1.38 | 0.004 | +2.72 | 0.186 |
| Adapted locator | +4.55 | 0.816 | +5.27 | 0.516 | -0.11 | -0.333 | +2.98 | 0.333 | -0.55 | -0.778 | -0.40 | -0.713 | +1.96 | -0.026 |
| AgentRx | +3.74 | -0.161 | +0.16 | -0.411 | +2.14 | 0.333 | +4.99 | 1.000 | +1.53 | 0.333 | +1.05 | -0.084 | +2.27 | 0.169 |
| Algorithm | HumanEval | MBPP | NQ | DROP | HotpotQA | MATH | Macro (6) | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| A. Qwen3-32B / Qwen3-235B-A22B / Qwen3.7-Plus (mean) | ||||||||||||||
| IF-MAP (ours) | +17.31 | 0.778 | +13.41 | 0.889 | +17.40 | 0.778 | +10.19 | 1.000 | +8.03 | 0.630 | +8.80 | 0.578 | +12.52 | 0.775 |
| Who&When-AAO | +14.88 | 0.494 | +7.67 | 0.222 | +17.40 | 0.333 | +10.19 | 1.000 | +8.03 | 0.556 | +3.76 | 0.035 | +10.32 | 0.440 |
| A2P | +14.88 | 0.111 | +7.67 | 0.000 | +17.40 | 0.333 | +10.19 | 1.000 | +8.03 | 0.556 | +3.76 | 0.099 | +10.32 | 0.350 |
| Adapted locator | +14.85 | 0.816 | +8.84 | 0.516 | -0.47 | -0.333 | +8.82 | 0.333 | +0.36 | -0.556 | +2.22 | -0.305 | +5.77 | 0.079 |
| Prompt optimization | Model upgrades | |||
| Method | Gain (pp) | Gain (pp) | ||
| IF-MAP | ||||
| Scoring-rule ablation | ||||
| w/ I-abs | ||||
| w/ MeanAbs | ||||
| Probe-budget comparison | ||||
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
| Workflow | Probing | Optimization | Validation | Test | Nodes |
|---|---|---|---|---|---|
| HumanEval | 45 | 43 | 43 | 33 | 3 |
| MBPP | 115 | 113 | 113 | 86 | 4 |
| NQ | 268 | 266 | 266 | 266 | 3 |
| DROP | 268 | 266 | 266 | 200 | 2 |
| HotpotQA | 268 | 266 | 266 | 200 | 3 |
| MATH (reduced execution) | 80 | 80 | 80 | 121 | 5 |
| Workflow | Intervenable nodes |
|---|---|
| HumanEval | CustomCodeGenerate, ScEnsemble, Test |
| MBPP | CodeGenerate, ScEnsemble, Test, FixCode |
| NQ | AnswerGenerate, ScEnsemble, FormatAnswer |
| DROP | Solve, Format |
| HotpotQA | AnswerGenerate, ScEnsemble, FormatAnswer |
| MATH | Programmer, RefineAnswer, DetailedSolution, GenerateSolution, ScEnsemble |
| Mechanism | Intended revision |
|---|---|
| Downstream interface | Clarify what the next operator needs and how this operator must provide it, without changing the workflow’s interface. |
| Decomposition control | Make the allocation or ordering of reasoning steps explicit, keeping the original task and output requirements. |
| Ambiguity resolution | Resolve an underspecified term, priority, or instruction that could admit incompatible interpretations. |
| Semantic precision | Sharpen the meaning of an existing instruction rather than merely adding emphasis. |
| Verification | Add or refine a task-relevant internal check while preserving the required externally visible answer. |
| Edge cases | Clarify boundary conditions or exceptional cases in a task-general way, not by copying development answers. |
| Model-upgrade target / average | ||||||||
|---|---|---|---|---|---|---|---|---|
| Workflow | Node | Prompt optimization | 32B | 3.7-plus | 235B | DeepSeek V3.2 | GPT-5 nano | MeanGain |
| HumanEval | CustomCodeGenerate | |||||||
| ScEnsemble | ||||||||
| Test | ||||||||
| MBPP | CodeGenerate | |||||||
| ScEnsemble | ||||||||
| Workflow | Target | gain (pp) | Workflow | Target | gain (pp) | ||
|---|---|---|---|---|---|---|---|
| HumanEval | 32B | DROP | 32B | ||||
| 3.7-plus | 3.7-plus | ||||||
| 235B | 235B | ||||||
| DeepSeek-V3.2 | DeepSeek-V3.2 | ||||||
| GPT-5 nano | GPT-5 nano | ||||||
| MBPP | 32B | HotpotQA | 32B |
| Workflow | Upgrade target | Agent ranking (mean gain, pp) |
|---|---|---|
| HumanEval | Qwen3-32B | CustomCodeGenerate (+15.152) Test (+4.242) ScEnsemble (+0.606) |
| Qwen3-235B-A22B | CustomCodeGenerate (+24.242) Test (+9.091) ScEnsemble (+0.000) | |
| Qwen3.7-Plus | CustomCodeGenerate (+27.273) Test (+9.091) ScEnsemble (+0.000) | |
| DeepSeek-V3.2 | CustomCodeGenerate (+18.788) Test (+9.697) ScEnsemble (+0.000) | |
| GPT-5 nano | CustomCodeGenerate (+24.849) Test (+8.485) ScEnsemble (+0.606) | |
| MBPP | Qwen3-32B | Test (+7.442) CodeGenerate (+6.744) FixCode (+0.930) ScEnsemble (-0.233) |
| Workflow | Upgrade target | Agent ranking (mean gain, pp) |
|---|---|---|
| DROP | Qwen3-32B | Solve (+6.633) Format (+3.425) |
| Qwen3-235B-A22B | Solve (+11.126) Format (+7.346) | |
| Qwen3.7-Plus | Solve (+12.822) Format (+7.448) | |
| DeepSeek-V3.2 | Solve (+8.969) Format (+4.947) | |
| GPT-5 nano | Solve (+6.503) Format (+2.658) | |
| HotpotQA | Qwen3-32B | AnswerGenerate (+5.739) ScEnsemble (+0.403) FormatAnswer (+0.359) |
| Algorithm | HumanEval | MBPP | NQ | DROP | HotpotQA | MATH | Macro (6) | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| IF-MAP (ours) | +4.44 | 0.556 | +7.91 | 0.889 | +2.14 | 0.778 | +4.99 | 1.000 | +1.53 | 0.556 | +1.85 | 0.667 | +3.81 | 0.741 |
| Who&When-AAO | +3.23 | -0.222 | +3.02 | 0.222 | +2.14 | 0.333 | +4.99 | 1.000 | +1.53 | 0.333 | +1.38 | -0.035 | +2.72 | 0.272 |
| A2P | +3.23 | -0.556 | +3.02 | 0.000 | +2.14 | 0.333 | +4.99 | 1.000 | +1.53 | 0.333 | +1.38 | 0.004 | +2.72 | 0.186 |
| Adapted locator | +4.55 | 0.816 | +5.27 | 0.516 | -0.11 | -0.333 | +2.98 | 0.333 | -0.55 | -0.778 | -0.40 | -0.713 | +1.96 | -0.026 |
| AgentRx | +3.74 | -0.161 | +0.16 | -0.411 | +2.14 | 0.333 | +4.99 | 1.000 | +1.53 | 0.333 | +1.05 | -0.084 | +2.27 | 0.169 |
| Algorithm | HumanEval | MBPP | NQ | DROP | HotpotQA | MATH | Macro (6) | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| A. Qwen3-32B | ||||||||||||||
| IF-MAP (ours) | +11.52 | 0.778 | +7.44 | 0.889 | +10.63 | 0.778 | +6.63 | 1.000 | +5.74 | 0.778 | +3.76 | 0.600 | +7.62 | 0.804 |
| Who&When-AAO | +10.30 | 0.494 | +6.74 | 0.222 | +10.63 | 0.333 | +6.63 | 1.000 | +5.74 | 1.000 | +1.65 | 0.176 | +6.95 | 0.538 |
| A2P | +10.30 | 0.111 | +6.74 | 0.000 | +10.63 | 0.333 | +6.63 | 1.000 | +5.74 | 1.000 | +1.65 | 0.219 | +6.95 | 0.444 |
| Adapted locator | +9.70 | 0.816 | +4.88 | 0.516 | -0.30 | -0.333 | +5.56 | 0.333 | +0.40 | -0.111 | -0.91 | -0.102 | +3.22 | 0.187 |
| Algorithm | HumanEval | MBPP | NQ | DROP | HotpotQA | MATH | Macro (6) | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| D. DeepSeek-V3.2 | ||||||||||||||
| IF-MAP (ours) | +15.76 | 0.778 | +12.33 | 0.889 | +23.08 | 0.778 | +8.97 | 1.000 | +5.18 | 0.556 | +9.59 | 0.246 | +12.48 | 0.708 |
| Who&When-AAO | +12.53 | 0.494 | +8.60 | 0.222 | +23.08 | 0.333 | +8.97 | 1.000 | +5.18 | 0.333 | +2.20 | -0.704 | +10.09 | 0.280 |
| A2P | +12.53 | 0.111 | +8.60 | 0.000 | +23.08 | 0.333 | +8.97 | 1.000 | +5.18 | 0.333 | +2.20 | -0.639 | +10.09 | 0.190 |
| Adapted locator | +14.24 | 0.816 | +8.29 | 0.516 | +1.70 | -0.333 | +7.63 | 0.333 | +1.47 | -0.778 | +3.86 | -0.074 | +6.20 | 0.080 |
| Prompt optimization | Model upgrades | ||||
| Workflow | Score | Gain (pp) | Gain (pp) | ||
| HumanEval | |||||
| MBPP | |||||
| Prompt optimization | Model upgrades | ||||
| Workflow | Probes | Gain (pp) | Gain (pp) | ||
| HumanEval | 3 | ||||
| 5 | |||||
| Full | |||||
| MBPP | 3 | ||||
| 5 | |||||
| Method | Qwen3-8B requests | Qwen tokens (M) | DeepSeek-V3.2 requests | DeepSeek tokens (M) |
|---|---|---|---|---|
| IF-MAP | ||||
| Who&When-AAO | ||||
| A2P | ||||
| Adapted locator | ||||
| AgentRx | ||||
| CHIEF |
| Method | Qwen3-8B requests | Qwen tokens (M) | DeepSeek-V3.2 (TextGrad) requests | DeepSeek (TextGrad) tokens (M) |
|---|---|---|---|---|
| IF-MAP | ||||
| Full-Agent PromptOpt |
| Target | Method | Qwen3-8B requests | Qwen3-8B tokens (M) | DeepSeek-V3.2 (selection) requests | DeepSeek-V3.2 (selection) tokens (M) | Target model (upgrade) requests | Target model (upgrade) tokens (M) |
|---|---|---|---|---|---|---|---|
| Qwen3-32B | IF-MAP | ||||||
| Qwen3-32B | FullSwap | ||||||
| Qwen3-235B-A22B | IF-MAP | ||||||
| Qwen3-235B-A22B | FullSwap | ||||||
| Qwen3.7-Plus | IF-MAP | ||||||
| Qwen3.7-Plus | FullSwap |
Multi-Agent LLM Systems
Multi-agent large language model systems coordinate multiple AI agents to solve tasks through communication, specialization, shared tools, and memory.
See all 1,001 papers