跳到正文
论文阅读馆THE RESEARCH LIBRARY 查找论文
← 论文库AI 研究与应用 / 智能体协作与通信导出 ↗

PAPER / 2025

Cut the Crap:降低多智能体通信成本的 AgentPrune

Cut the Crap: An Economical Communication Pipeline for LLM-based Multi-Agent Systems

Guibin Zhang · Yanwei Yue · Zhixun Li · Sukwon Yun · Guancheng Wan · Kun Wang · Dawei Cheng · Jeffrey Xu Yu · Tianlong Chen

ICLR · 2025

30 秒读懂

输入是现有多智能体系统的通信图:空间边表示同轮代理之间的消息,时间边表示跨轮历史传递。AgentPrune 为这些边设置可训练掩码,学习哪些连接重要;轮内图还要满足顺序执行所需的无环结构。剪掉一条边意味着接收者不再读这条路径上的消息,而不是删除代理的能力或训练大模型权重。输出是更稀疏的通信结构,并由原来的代理继续完成任务。

Cut the Crap 提出 AgentPrune,目标是在多智能体协作中减少无用消息传递。多个代理可能反复阅读彼此的相似回答,增加输入 token 和费用,却没有相应收益。作者不去压缩每句话,而是优化“哪些代理之间需要传递消息”以及“哪些历史消息需要进入下一轮”。

先说结论

AgentPrune 学习并剪掉多智能体通信图中的部分连接,以较少的消息传递完成任务。实验展示成本收益,但并非所有设置都保持性能;原表中还存在部分成本比例不自洽,不能无条件照搬宣传数字。 (原文:PDF p.1, Abstract;PDF p.5, Section 3.1; Figure 4;PDF p.6, Sections 3.2–3.4;PDF p.8, experimental setup;PDF p.9, Table 3, AutoGen HumanEval rows;PDF p.9, Table 3, GPTSwarm MMLU and GSM8K rows)

论文为什么要做这件事

Cut the Crap 提出 AgentPrune,目标是在多智能体协作中减少无用消息传递。多个代理可能反复阅读彼此的相似回答,增加输入 token 和费用,却没有相应收益。作者不去压缩每句话,而是优化“哪些代理之间需要传递消息”以及“哪些历史消息需要进入下一轮”。 (原文:PDF p.1, Abstract)

核心方法到底怎么运转

输入是现有多智能体系统的通信图:空间边表示同轮代理之间的消息,时间边表示跨轮历史传递。AgentPrune 为这些边设置可训练掩码,学习哪些连接重要;轮内图还要满足顺序执行所需的无环结构。剪掉一条边意味着接收者不再读这条路径上的消息,而不是删除代理的能力或训练大模型权重。输出是更稀疏的通信结构,并由原来的代理继续完成任务。 (原文:PDF p.5, Section 3.1; Figure 4)

先短暂优化,再一次性剪枝

系统通过任务效用的策略梯度更新边掩码,同时用核范数近似低秩约束;只运行较短的学习阶段,再按权重大小保留重要边,后续轮次固定使用稀疏图。因此“一次性剪枝”不等于完全不需要优化或试运行。论文还限制了适用情形:代理数量应超过三个,通信结构不能只是过于简单的链或直接输出,不能宣传为任何协作流程都能无代价接入。 (原文:PDF p.6, Sections 3.2–3.4)

实验怎样检验这个方法

比较包含单代理推理、不同轮内通信结构与跨轮对话方法,并使用相同底座配置的多代理设置。任务包括一般推理、数学和代码生成;阅读时需同时比较任务分数、输入 token、输出 token 和成本,而不是只看剪枝比例。 (原文:PDF p.8, experimental setup)

结果说明了什么

在五个基于 GPT-4 的代理设置中,AutoGen 在 HumanEval 上的性能从 85.41 到 86.65,prompt tokens 从 492,273 到 315,105,费用从 8.828 美元到 7.342 美元。但 completion tokens 从 130,196 增至 139,714。这个例子支持减少输入传递带来的节约,而不支持“输入输出都下降”。这些是该基准整组实验的开销,不是每次普通提问的价格。 (原文:PDF p.9, Table 3, AutoGen HumanEval rows)

这篇论文哪里最强,哪里最危险

GPTSwarm 在 MMLU 上接入后性能从 83.98 降到 83.05,费用从 47.60 美元降到 23.05 美元,所以不能写成所有任务都同时更准更便宜。此外,GSM8K 的 prompt token 绝对值与括号内比例存在算术不一致:AutoGen 行为 4,327,740 对 3,791,251,却标为 59.9%;GPTSwarm 行为 14,005,945 对 3,526,035,却标为 39.4%。本导读保留这项原文疑点,不转述对应节省比例为已核实事实,也不擅自判断究竟是哪一个原始数字有误。 (原文:PDF p.9, Table 3, GPTSwarm MMLU and GSM8K rows)

读完后记住这三件事

输入是既有协作通信图,先学习边重要性,再一次性剪枝固定后续通信。模型本身不被裁剪,消息路径才被减少。其成本收益有条件且可能伴随性能下降,原表中不自洽的比例应保留疑点。 (原文:PDF p.1, Abstract;PDF p.5, Section 3.1; Figure 4;PDF p.6, Sections 3.2–3.4;PDF p.8, experimental setup;PDF p.9, Table 3, AutoGen HumanEval rows;PDF p.9, Table 3, GPTSwarm MMLU and GSM8K rows)

代码从哪里读

原始来源入口。已访问论文给出的官方仓库。阅读重点是轮内和跨轮连接、掩码优化与剪枝前后的 token 统计;本轮未调用付费模型,未以代码复算原表中可疑的成本比例。

原文证据

将主张放回条件与原文定位中理解。

定义

沟通越多并不一定越有效

原文摘录
Published as a conference paper at ICLR 2025 C UT THE C RAP : A N E CONOMICAL C OMMUNICATION P IPELINE FOR LLM- BASED M ULTI -AGENT S YSTEMS Guibin Zhang1† , Yanwei Yue1† , Zhixun Li2† , Sukwon Yun3 , Guancheng Wan4 , Kun Wang5∗, Dawei Cheng1,6 , Jeffrey Xu Yu2 , Tianlong Chen3 1 Tongji University 2 The Chinese University of Hong Kong 3 University of North Carolina at Chapel Hill 4 Wuhan University 5 Nanyang Technological University 6 Shanghai AI Laboratory A BSTRACT Recent advancements in large language model (LLM)-powered agents have shown that collective intelligence can significantly outperform individual capabilities, largely attributed to the meticulously designed inter-agent communication topolo- gies. Though impressive in performance, existing multi-agent pipelines inher- ently introduce substantial token overhead, as well as increased economic costs, which pose challenges for their large-scale deployments. In response to this challenge, we propose an economical, simple, and robust multi-agent commu- nication framework, termed AgentPrune, which can seamlessly integrate into mainstream multi-agent systems and prunes redundant or even malicious com- munication messages. Technically, AgentPrune is the first to identify and for- mally define the communication redundancy issue present in current LLM-based multi-agent pipelines, and efficiently performs one-shot pruning on the spatial- temporal message-passing graph, yielding a token-economic and high-performing communication topology. Extensive experiments across six benchmarks demon- strate that AgentPrune (I) achieves comparable results as state-of-the-art topolo- gies at merely $5.6 cost compared to their $43.7, (II) integrates seamlessly into existing multi-agent frameworks with 28.1% ∼ 72.8% ↓ token reduction, and (III) successfully defend against two types of agent-based adversarial attacks with 3.5% ∼ 10.8% ↑ performance boost. The source code is available at https://github.com/yanweiyue/AgentPrune. 1 I NTRODUCTION Large Language Model (LLM) based agents (Richards & et al., 2023; Naka- jima, 2023; Reworkd, 2023) have demon- strated strong performance across a di- verse range of tasks, including reasoning (Yao et al., 2023b), code generation (Shinn et al., 2023), and even more complex ap- plications like video gaming (Wang et al., 2023) and autopilot systems (Jin et al., 2023). Recent endeavors have shown that combining implicitly or explicitly differ- ent LLM-based agents into a team can out- perform a single agent in handling com- plex tasks (Du et al., 2023b; Liang et al., 2023; Wang et al., 2023c; Jiang et al., 2023; Shinn et al., 2023; Zheng et al., Figure 1: The workflow of existing LLM-based (problem- 2023; Wu et al., 2023), which supports the solving) multi-agent systems. The agent-agent communica- presence of human-esque collaborative in- tion occurs at both intra- and inter-dialogue stages. telligence in multi-agent systems (Zhang et al., 2023b). In practice, previous research has explored approaches in which instances of LLMs, referred to as agents (Wang et al., 2024b; Xi et al., 2023; ∗ Kun Wang is the corresponding author, † denotes equal contributions. 1

条件:仅限本地原始PDF的 Abstract;不同表格与实验不合并

指标:Cut the Crap 提出 AgentPrune,目标是在多智能体协作中减少无用消息传递。多个代理可能反复阅读彼此的相似回答,增加输入 token 和费用,却没有相应收益。作者不去压缩每句话,而是优化“哪些代理之间需要传递消息”以及“哪些历史消息需要进入下一轮”。

PDF p.1PDF p.1, Abstract

以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。

方法

把轮内和跨轮通信变成可学习的边

原文摘录
Published as a conference paper at ICLR 2025 {Question} How many arithmetic sequences of consecutive odd integers sum to 240? N iterations Original Communication Topology After applying AgentPrune Thinker 1 Thinker 2 Thinker 1 Thinker 2 ✉️ Input: ✉️ Input: ✉️ Input: {Question} ✉️ Input: {Question} {Question} {Answer 1} {Question} {Answer 1} 🙋 Output: The terms of the 🙋 Output: Suppose the sequence are: 🙋 Output: Based on previous arithmetic sequence has n consecutive 🙋 Output: We factor 240 to a, a+2, ..., a+2(n-1) ... response, we factor 240 to explore odd integers, starting with the first explore possible n: Thus, the values of n that work are n possible n: term a. The terms of the sequence 240=2^4×3×5 378 tokens 240=2^4×3×5 are: a, a+2, ..., a+2(n-1) ... Thus, the ...After checking possible values, we = 6,8,10,12,20, because n should be ...we argue that the valid values of n that work are n argue that the valid sequences occur for Spatial pruning smaller than 24. Therefore, the sequences occur for n=1,2,4,...,20, = 6,8,10,12,20. Therefore, the answer n=1,2,4,...,40, because n should not be answer to the question is 5. because n should not be greater than 24. to the question is 5. greater than 24. The answer is 12. The answer is 8. {Answer 1} {Answer 2} {Answer 1} {Answer 2} 378 tokens 432 tokens 432 tokens 402 token 402 token 378 tokens 378 tokens Thinker 3 Summarizer Thinker 3 Summarizer ✉️ Input: {Question} ✉️ Input: {Question} ✉️ Input: {Question} ✉️ Input: {Question} {Answer 1} {Answer 2} {Answer 1} {Answer 1} {Answer 1} {Answer 2} {Answer 2} {Answer 2} 🙋 Output: I generally agree with 🙋 Output: Answer 1 set n<24, {Answer 3} the second response. Following the which is not reasonable. We write the 261 tokens 299 token {Answer 3} given paradigm, I will (1) set up the consecutive sum as: (n/2)(4n + 8) = 240 🙋 Output: The two thinkers' sequence; (2) calculate the sum of the 🙋 Output: The three thinkers' By factoring the quadratic equation, we answers are 12,12, respectively. They sequence; (3) Solve for a; (4) Check arrive at the solution n = 12. Hence, use different reason processes and answers are 5,8,8, respectively. each valid n. ... Answer 2 is correct. The answer to the receive the same result. I think the According to the analysis, I think the Therefore, the answer is 8. problem should be 12. answer to the problem is 12. answer to the problem is 8. {Answer 3} {Conclusion} {Answer 3} {Conclusion} Temporal pruning {Utterance history} {Utterance history} {Answer 1} {Conclusion} {Conclusion} {Answer 2} {Answer 3} {Answer 3} ✉️Prompt for next round: Given the last round's utterance: {Utterance history}, please ... Intra-iteration token: (378×3+432×2+261) Intra-iteration token: 378+402×2+299 7,295 tokens 3,425 tokens Inter-iteration token: (378+432+261+188)×4 Inter-iteration token: (299+187)×4 Figure 4: The overview of our proposed AgentPrune. 3.1 S PATIAL - TEMPORAL G RAPH C OMMUNICATION Given an arbitrary LLM-MA system and its corresponding spatial-temporal communication graph G, the task of AgentPrune is to discover its sparse yet equally high-performing counterpart G sub . The objective is essentially a graph sparsification problem (Spielman & Srivastava, 2008; Chen et al., 2023b), whose goal is to identify the essential graph connections and discard the less critical ones. To achieve this, following classical practices in graph sparsification (Chen et al., 2021b; Wang et al., 2023a; Zhang et al., 2024a), we relax the original binary communication graph G by transforming its edge elements from binary values to continuous variables, denoted as G̃. We have: A(G) = {AS , AT }, A(G̃) = A({G̃ S , G̃ T }) = {AS ⊙ SS , AT ⊙ ST }, (7) S T |V|×|V| where A(G) obtains the adjacency matrix of input graph G, and A , A ∈ {0, 1} represent the spatial and temporal adjacency matrices, respectively. Specifically, Ax [i, j] = 1 indicates that eij ∈ E x , and 0 otherwise. It is important to note that both AS and AT are predefined by the LLM-MA system. SS , ST ∈ R|V|×|V| are differentiable graph masks. As mentioned in Section 2, we require the interaction topology to be a DAG to ensure that agent input/output (I/O) can be processed sequentially. Therefore, we leverage a DAGSampling function to transform the original G̃ S into a DAG: Ĝ S ← DAGSampling(G̃ S ), whose procedure is described in Algorithm 2. 3.2 O PTIMIZING S PATIAL - TEMPORAL C ONNECTIVITY With Ĝ S and G̃ T in hand, we aim to optimize them toward both high-performance and token ef- ficiency. To this end, we introduce two optimization objectives for Ĝ S and G̃ T : ❶ distribution approximation, ensuring accurate estimation of their underlying probability distributions, and ❷ low-rank sparsity, which promotes a more efficient and sparse structure (Li et al., 2024). The first objective ensures that the magnitudes of the graph masks correctly reflect the importance of different communication channels, facilitating subsequent redundancy pruning, and the second ensures that the learned connectivity remains sparse and robust. Formally, we define the following objective: distribution approximation low-rank sparsity z h }| i{ z X }| { X S T X arg max EĜ S ,G T ∼G ϕ {Ĝ , G̃ } − rank(S ), s. t. ||AX − SX ||F ≤ δ, (8) SS ,ST ∈S X ∈{S,T } X ∈{S,T } 5

条件:仅限本地原始PDF的 Section 3.1; Figure 4;不同表格与实验不合并

指标:输入是现有多智能体系统的通信图:空间边表示同轮代理之间的消息,时间边表示跨轮历史传递。AgentPrune 为这些边设置可训练掩码,学习哪些连接重要;轮内图还要满足顺序执行所需的无环结构。剪掉一条边意味着接收者不再读这条路径上的消息,而不是删除代理的能力或训练大模型权重。输出是更稀疏的通信结构,并由原来的代理继续完成任务。

PDF p.5PDF p.5, Section 3.1; Figure 4

以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。

方法

先短暂优化,再一次性剪枝

原文摘录
Published as a conference paper at ICLR 2025 where S and G represent the viable parameter space, ϕ(·) serves as the utility evaluator for the input multi-agent framework, rank(·) calculates the rank of matrix, and δ is the noise level. Next, we will provide a detailed explanation of the implementation of these two optimization objectives. Distribution Approximation The first term in Equation (8) encourages {SS , ST } towards the maximization of the system’s utility. However, since ϕ(·) often depends on external APIs (Li et al., 2023b) or compilers (Chen et al., 2021a) for evaluation, it is generally non-differentiable. Therefore, we employ policy gradient (Williams, 1992) to make Equation (8) tractable: M h  i 1 X  S T    ∇S EĜ S ,G̃ T ∼G ϕ {Ĝ S , G̃ T } ≈ ϕ {Ĝk , G̃k } ∇S log pS ({ĜkS , G̃kT }) , (9) M k=1   Y  Y  S T pS {Ĝk , G̃k } = 1eij ∈E S SS [i, j] · 1eij ∈E T ST [i, j] (10) where S = {SS , ST }, {Ĝ S , G̃ T }M S T S T k=1 are independently sampled from {Ĝ , G̃ }, pS ({Ĝk , G̃k }) calculates the probability of the sampled structure, and 1(·) is an indicator function. Low-rank Sparsity The second term in Equation (8) promotes the graph masks {SS , ST } to be low-rank, which not only filters out informative agent communications but also aids in removing redundant, noisy, and even malicious messages, which has been demonstrated in recent studies, showing that low-rank graphs are more robust to network attacks (Entezari et al., 2020; Ennadir et al., 2024). We will empirically validate AgentPrune’s ability to enhance multi-agent robustness in Section 4.4. However, directly optimizing the rank minimization is NP-hard, so we replace the rank function with the nuclear norm as an alternative, reformulating this term as follows: arg min X ∈{S,T } ||SX ||∗ , s. t. ||AX − SX ||F ≤ δ, P (11) SS ,ST ∈S P where ||S||∗ = i σi , and σi represents the i-th singular value of S. Guided by Equation (8), we iteratively optimize the spatial-temporal connectivity in conjunction with the multi-agent conversa- tion over K ′ rounds, where K ′ ≪ K. 3.3 O NE - SHOT P RUNING We dynamically optimize {SS , ST } for only K ′ iterations, rather than the full K iterations, because prior work on Early-bird (EB) and Graph EB has demonstrated that limited training can also con- struct high-quality benchmarks reflecting the topology distribution (Achille et al., 2018; You et al., 2019; Zhang et al., 2024b), which also aligns with AgentPrune’s token-saving initiation. To elim- inate redundancy in the current communication structure, we perform one-shot magnitude pruning on the optimized graph masks S (either SS or ST ):    B = 1 A ̸= 0 ∧ TopK S, |A| × (1 − p%) , (12) where TopK(S, x%) return the largest x% elements in matrix S, and p% is the pruning ratio. By applying the binary masks to the original topology, we obtain sparse, compact, and communication- minimizing connectivity G sub , where A(G sub ) = {AS ⊙BS , AT ⊙BT }. In the subsequent (K −K ′ ) rounds, the entire framework’s message passing pipeline is strictly constrained by G sub , and agents are continuously optimized to refine the solution for query q. 3.4 A PPLICATION AND A NALYSIS Algorithm Pipeline As a plug-and-play module, AgentPrune can be harmoniously embedded in mainstream multi-agent frameworks to facilitate token-efficient communication, provided that the number of agents exceeds three and the communication structure is moderately organized (e.g., chain or direct-output structures are too simple to be applicable). When combined with AgentPrune, mul- tiple agents first undergo K ′ rounds of interactions alongside trainable graph masks, which are then one-shot pruned to yield the sparse G sub , leveraged for the subsequent (K − K ′ ) rounds of opti- mization. We summarize all the notations used in Appendix B and the comprehensive algorithmic workflow in Appendix C. Multi-Query Training For complex tasks like repository-level code generation (Qian et al., 2023; Liu et al., 2024), multi-turn dialogues are often inevitable. However, for simpler tasks that involve a 6

条件:仅限本地原始PDF的 Sections 3.2–3.4;不同表格与实验不合并

指标:系统通过任务效用的策略梯度更新边掩码,同时用核范数近似低秩约束;只运行较短的学习阶段,再按权重大小保留重要边,后续轮次固定使用稀疏图。因此“一次性剪枝”不等于完全不需要优化或试运行。论文还限制了适用情形:代理数量应超过三个,通信结构不能只是过于简单的链或直接输出,不能宣传为任何协作流程都能无代价接入。

PDF p.6PDF p.6, Sections 3.2–3.4

以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。

方法

实验怎样检验这个方法

原文摘录
Published as a conference paper at ICLR 2025 MMLU HumanEval GSM8K Token consumption (10^x) Token consumption (10^x) Token consumption (10^x) Accuracy (%) Pass@1 (%) Accuracy (%) Figure 5: Visualization of performance and prompt token consumption. This scatter plot illustrates the per- formance metrics and prompt token consumption of different multi-agent communication topologies across MMLU, HumanEval, and GSM8K. The diameter of each point is proportional to its y-axis value. Baselines We compare AgentPrune with three series of multi-agent communication paradigms, namely: (1) Single agent execution methods, including Chain-of-Thought prompting (CoT; Wei et al. (2022)), (2) Complexity-based prompting (ComplexCoT; Fu et al. (2022)), and (3) Self- Consistency (SC; Wang et al. (2023b)); (2) Spatial communication methods, including chain, tree, star, complete graph, layered graph and random graph1 from MacNet (Qian et al., 2024), LLM- Blender (Jiang et al., 2023), and GPTSwarm (Zhuge et al., 2024); (3) Temporal communication methods, including PHP (Zheng et al., 2023), LLM-Debate (Du et al., 2023b), DyLAN (Liu et al., 2023b). Detailed introductions and implementations of the baselines are in Appendix G.1. Implementation Details We accessed the GPT models via the OpenAI API, and mainly tested on gpt-3.5-turbo-0301 (gpt-3.5) and gpt-4-1106-preview (gpt-4). We set the temperature at 1 during the generation. We set the dialogue round K = 2 for mathematical and general reasoning tasks, and K = 4 for code generation tasks. For multi-query settings, we vary Q′ ∈ {5, 10, 20} and fix M = 10. We generate different agent profiles using gpt-4. The pruning ratio is chosen among {50%, 30%}. More experimental details are in Appendix G.2. 4.2 P ERFORMANCE & C OST C OMPARISON (RQ1) To evaluate whether AgentPrune achieves a dual Table 2: Performance on the HumanEval benefit of token savings and task completion, we Benckmark with more baselines. The best and integrate it with three predefined spatial commu- runner-up results are bolded and underlined, re- nication topologies: the complete graph, layered spectively. graph, and random graph, denoted as AgentPrune- Method Pass@1 ∆ C, AgentPrune-L, and AgentPrune-R, respec- Vanilla 71.68 - tively. For the temporal communication topology, AutoGen [2023] 85.41 ↑11.97 we consistently employ the fully connected LLM- Reflexion [2023] 91.40 ↑19.72 Debate-style structure. Tables 1 and 2 presents CodeT+Parsel [2023a] 85.10 ↑13.42 a performance comparison of various communica- MetaGPT [2023] 85.90 ↑14.22 tion paradigms within five gpt-4-based multi-agent ANPL [2024] 86.60 ↑14.92 systems, and Figures 5 and 17 to 19 visualizes the AgentPrune-C 89.38 ↑17.70 performance and token cost of different methods. AgentPrune-R 90.30 ↑18.62 Our observations (Obs.) are as follows: Obs.❶ Not all multi-agent topologies consistently deliver collective intelligence. As illustrated in Table 1, certain topologies, such as star/tree structures, fail to consistently improve performance for multi- agent systems, even resulting in performance drops of 0.17% ∼ 3.97%. In contrast, single-agent prompting methods like CoT or ComplexCoT demonstrate much more stable and significant im- provements. Obs.❷ The high performance of existing multi-agent systems comes at a substan- tial economical cost. From Table 1, we observe that the top-performing baselines, GPTSwarm and DyLAN, achieve pass@1 improvements of 16.81% and 18.02% on HumanEval, respectively; how- ever, this is accompanied by extremely high economic costs. As shown in Figure 5, the prompt token consumption of GPTSwarm and DyLAN is 2.4 ∼ 5.3× that of the random graph structure. Obs.❸ AgentPrune achieves a double win in economic savings and utility. Among the three variants, AgentPrune-R delivers consistently impressive performance, achieving 90.3% on HumanEval and 95.8% on GSM8K. Importantly, this performance does not come at a high token cost: on both Hu- manEval and GSM8K, the token consumption of AgentPrune is less than 40% that of DyLAN. Overall, AgentPrune excels in both task completion and token efficiency. 1 Detailed explanations of these topologies are placed in Appendix F. 8

条件:仅限本地原始PDF的 experimental setup;不同表格与实验不合并

指标:比较包含单代理推理、不同轮内通信结构与跨轮对话方法,并使用相同底座配置的多代理设置。任务包括一般推理、数学和代码生成;阅读时需同时比较任务分数、输入 token、输出 token 和成本,而不是只看剪枝比例。

PDF p.8PDF p.8, experimental setup

以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。

结果

节约输入并不等于所有 token 都减少

原文摘录
Published as a conference paper at ICLR 2025 Table 3: Performance and cost comparison before/after combining AgentPrune. We evaluated the per- formance and economical cost of AgentPrune in conjunction with two classic multi-agent systems, under a five gpt-4-based setting. “# Prompt tokens” refers to the total number of tokens input, while “# Completion tokens” accounts for the total number of tokens output by the API. Dataset Method Performance # Prompt Tokens # Completion Tokens Cost (USD) AutoGen 82.13 486, 034 89, 224 $7.537 MMLU +AgentPrune 82.78(↑ 0.65) 349, 583(71.9%) 86, 582 $6.093(80.8%) AutoGen 85.41 492, 273 130, 196 $8.828 HumanEval +AgentPrune 86.65(↑ 1.24) 315, 105(64.0%) 139, 714 $7.342(83.1%) AutoGen 90.06 4, 327, 740 998, 042 $73.21 GSM8K +AgentPrune 92.85(↑ 2.79) 3, 791, 251(59.9%) 1, 156, 884 $59.60(81.4%) GPTSwarm 83.98 3, 055, 230 569, 124 $47.60 MMLU +AgentPrune 83.05(↓ 0.93) 990, 312(32.4%) 439, 551 $23.05(48.4%) GPTSwarm 88.49 2, 736, 136 1, 004, 616 $57.49 HumanEval +AgentPrune 88.96(↑ 0.47) 745, 617(27.2%) 745, 926 $29.80(51.8%) GPTSwarm 89.74 14, 005, 945 3, 156, 916 $234.76 GSM8K +AgentPrune 90.58(↑ 0.84) 3, 526, 035(39.4%) 730, 552 $57.17(24.3%) Figure 6: Performance under adversarial attack. We compare the accuracy (%) of various multi-agent frameworks before and after prompt attacks on MMLU. “w/ AP” indicates the integration with AgentPrune. 4.3 P LUG - IN INTO E XISTING F RAMEWORKS (RQ2) As a plug-in, AgentPrune can be seamlessly combined with mainstream multi-agent pipelines, ef- fectively reducing the economic costs associated with LLM token throughput while maintaining the original performance levels. To validate our argument, we combined AgentPrune with two repre- sentative LLM-MA frameworks, AutoGen and GPTSwarm. With the results presented in Table 3 and Table 5, we offer the following two key observations: Obs.❹ Scaling multi-agent collabora- tion is costly. Comparing Table 3 and Table 5, we observe that for the GPTSwarm on the GSM8K dataset, optimizing a three-agent system incurs a cost of $97.23, while the expense for a five-agent system skyrockets to $234.76, with the total token count reaching 1.7e + 7. AutoGen, on the other hand, has relatively lower costs because it does not involve the iterative optimization of the commu- nication topology as extensively as GPTSwarm (Zhuge et al., 2024). Nevertheless, it still requires $73.21 on the GSM8K benchmark, which comprises up to 8.5K data entries. Obs.❺ AgentPrune is an economically friendly assistant. When applied to HumanEval+AutoGen, AgentPrune achieves a 36% reduction in prompt tokens and saves $1.486. In tasks with larger datasets, the economic sav- ings become even more pronounced: on GSM8K+GPTSwarm, AgentPrune reduces 60.6% of the prompt token consumptions and saves a cost of up to $177.58, with even a performance increase of 0.84%. Overall, AgentPrune serves as a token-efficient plug-in, effectively fostering the develop- ment of larger and more cost-effective multi-agent systems. 4.4 ROBUSTNESS V ERIFICATION (RQ3) AgentPrune can not only eliminate unnecessary communications but also remove malicious mes- sages. To validate this, we design two types of adversarial attacks for the multi-agent frameworks: the agent prompt attack and agent replacement attack. The former attacks the role prompts of the agents, while the latter attacks the LLM’s generation process, with detailed implementation elaborated in Appendix G.4. We observe that: Obs.❻ Existing LLM-MA frameworks often lack adversarial robustness. Despite variations in performance, most frameworks experience significant declines when subjected to both types of attacks. As shown in Figures 6 and 20, the chain-like struc- ture suffers a performance drop of up to 20.8% due to its oversimplistic topology. AutoGen and Dy- LAN similarly experience accuracy declines ranging from 3.2% to 6.2%. Obs.❼ AgentPrune sig- nificantly enhances multi-agent robustness. Figure 6 demonstrates that combining AgentPrune 9

条件:仅限本地原始PDF的 Table 3, AutoGen HumanEval rows;不同表格与实验不合并

指标:在五个基于 GPT-4 的代理设置中,AutoGen 在 HumanEval 上的性能从 85.41 到 86.65,prompt tokens 从 492,273 到 315,105,费用从 8.828 美元到 7.342 美元。但 completion tokens 从 130,196 增至 139,714。这个例子支持减少输入传递带来的节约,而不支持“输入输出都下降”。这些是该基准整组实验的开销,不是每次普通提问的价格。

PDF p.9PDF p.9, Table 3, AutoGen HumanEval rows

以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。

限制

省钱仍可能损失性能,原表也有不自洽处

原文摘录
Published as a conference paper at ICLR 2025 Table 3: Performance and cost comparison before/after combining AgentPrune. We evaluated the per- formance and economical cost of AgentPrune in conjunction with two classic multi-agent systems, under a five gpt-4-based setting. “# Prompt tokens” refers to the total number of tokens input, while “# Completion tokens” accounts for the total number of tokens output by the API. Dataset Method Performance # Prompt Tokens # Completion Tokens Cost (USD) AutoGen 82.13 486, 034 89, 224 $7.537 MMLU +AgentPrune 82.78(↑ 0.65) 349, 583(71.9%) 86, 582 $6.093(80.8%) AutoGen 85.41 492, 273 130, 196 $8.828 HumanEval +AgentPrune 86.65(↑ 1.24) 315, 105(64.0%) 139, 714 $7.342(83.1%) AutoGen 90.06 4, 327, 740 998, 042 $73.21 GSM8K +AgentPrune 92.85(↑ 2.79) 3, 791, 251(59.9%) 1, 156, 884 $59.60(81.4%) GPTSwarm 83.98 3, 055, 230 569, 124 $47.60 MMLU +AgentPrune 83.05(↓ 0.93) 990, 312(32.4%) 439, 551 $23.05(48.4%) GPTSwarm 88.49 2, 736, 136 1, 004, 616 $57.49 HumanEval +AgentPrune 88.96(↑ 0.47) 745, 617(27.2%) 745, 926 $29.80(51.8%) GPTSwarm 89.74 14, 005, 945 3, 156, 916 $234.76 GSM8K +AgentPrune 90.58(↑ 0.84) 3, 526, 035(39.4%) 730, 552 $57.17(24.3%) Figure 6: Performance under adversarial attack. We compare the accuracy (%) of various multi-agent frameworks before and after prompt attacks on MMLU. “w/ AP” indicates the integration with AgentPrune. 4.3 P LUG - IN INTO E XISTING F RAMEWORKS (RQ2) As a plug-in, AgentPrune can be seamlessly combined with mainstream multi-agent pipelines, ef- fectively reducing the economic costs associated with LLM token throughput while maintaining the original performance levels. To validate our argument, we combined AgentPrune with two repre- sentative LLM-MA frameworks, AutoGen and GPTSwarm. With the results presented in Table 3 and Table 5, we offer the following two key observations: Obs.❹ Scaling multi-agent collabora- tion is costly. Comparing Table 3 and Table 5, we observe that for the GPTSwarm on the GSM8K dataset, optimizing a three-agent system incurs a cost of $97.23, while the expense for a five-agent system skyrockets to $234.76, with the total token count reaching 1.7e + 7. AutoGen, on the other hand, has relatively lower costs because it does not involve the iterative optimization of the commu- nication topology as extensively as GPTSwarm (Zhuge et al., 2024). Nevertheless, it still requires $73.21 on the GSM8K benchmark, which comprises up to 8.5K data entries. Obs.❺ AgentPrune is an economically friendly assistant. When applied to HumanEval+AutoGen, AgentPrune achieves a 36% reduction in prompt tokens and saves $1.486. In tasks with larger datasets, the economic sav- ings become even more pronounced: on GSM8K+GPTSwarm, AgentPrune reduces 60.6% of the prompt token consumptions and saves a cost of up to $177.58, with even a performance increase of 0.84%. Overall, AgentPrune serves as a token-efficient plug-in, effectively fostering the develop- ment of larger and more cost-effective multi-agent systems. 4.4 ROBUSTNESS V ERIFICATION (RQ3) AgentPrune can not only eliminate unnecessary communications but also remove malicious mes- sages. To validate this, we design two types of adversarial attacks for the multi-agent frameworks: the agent prompt attack and agent replacement attack. The former attacks the role prompts of the agents, while the latter attacks the LLM’s generation process, with detailed implementation elaborated in Appendix G.4. We observe that: Obs.❻ Existing LLM-MA frameworks often lack adversarial robustness. Despite variations in performance, most frameworks experience significant declines when subjected to both types of attacks. As shown in Figures 6 and 20, the chain-like struc- ture suffers a performance drop of up to 20.8% due to its oversimplistic topology. AutoGen and Dy- LAN similarly experience accuracy declines ranging from 3.2% to 6.2%. Obs.❼ AgentPrune sig- nificantly enhances multi-agent robustness. Figure 6 demonstrates that combining AgentPrune 9

条件:仅限本地原始PDF的 Table 3, GPTSwarm MMLU and GSM8K rows;不同表格与实验不合并

指标:GPTSwarm 在 MMLU 上接入后性能从 83.98 降到 83.05,费用从 47.60 美元降到 23.05 美元,所以不能写成所有任务都同时更准更便宜。此外,GSM8K 的 prompt token 绝对值与括号内比例存在算术不一致:AutoGen 行为 4,327,740 对 3,791,251,却标为 59.9%;GPTSwarm 行为 14,005,945 对 3,526,035,却标为 39.4%。本导读保留这项原文疑点,不转述对应节省比例为已核实事实,也不擅自判断究竟是哪一个原始数字有误。

PDF p.9PDF p.9, Table 3, GPTSwarm MMLU and GSM8K rows

以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。

读完,试着回答

论文研究什么问题?

Cut the Crap 提出 AgentPrune,目标是在多智能体协作中减少无用消息传递。多个代理可能反复阅读彼此的相似回答,增加输入 token 和费用,却没有相应收益。作者不去压缩每句话,而是优化“哪些代理之间需要传递消息”以及“哪些历史消息需要进入下一轮”。

已有方法缺口在哪里?

Cut the Crap 提出 AgentPrune,目标是在多智能体协作中减少无用消息传递。多个代理可能反复阅读彼此的相似回答,增加输入 token 和费用,却没有相应收益。作者不去压缩每句话,而是优化“哪些代理之间需要传递消息”以及“哪些历史消息需要进入下一轮”。

输入是什么?

既有多智能体系统的轮内与跨轮通信图、任务输入,以及用于优化连接的任务效用反馈。

机制是什么?

输入是现有多智能体系统的通信图:空间边表示同轮代理之间的消息,时间边表示跨轮历史传递。AgentPrune 为这些边设置可训练掩码,学习哪些连接重要;轮内图还要满足顺序执行所需的无环结构。剪掉一条边意味着接收者不再读这条路径上的消息,而不是删除代理的能力或训练大模型权重。输出是更稀疏的通信结构,并由原来的代理继续完成任务。

输出是什么?

输入是既有协作通信图,先学习边重要性,再一次性剪枝固定后续通信。模型本身不被裁剪,消息路径才被减少。其成本收益有条件且可能伴随性能下降,原表中不自洽的比例应保留疑点。

适用边界是什么?

GPTSwarm 在 MMLU 上接入后性能从 83.98 降到 83.05,费用从 47.60 美元降到 23.05 美元,所以不能写成所有任务都同时更准更便宜。此外,GSM8K 的 prompt token 绝对值与括号内比例存在算术不一致:AutoGen 行为 4,327,740 对 3,791,251,却标为 59.9%;GPTSwarm 行为 14,005,945 对 3,526,035,却标为 39.4%。本导读保留这项原文疑点,不转述对应节省比例为已核实事实,也不擅自判断究竟是哪一个原始数字有误。

还有什么未解决?

改变输入分布、模型版本或评价条件后,本页结论是否仍适用?

技术附录

问题与已有方法

问题设定

Cut the Crap 提出 AgentPrune,目标是在多智能体协作中减少无用消息传递。多个代理可能反复阅读彼此的相似回答,增加输入 token 和费用,却没有相应收益。作者不去压缩每句话,而是优化“哪些代理之间需要传递消息”以及“哪些历史消息需要进入下一轮”。 Cut the Crap 提出 AgentPrune,目标是在多智能体协作中减少无用消息传递。多个代理可能反复阅读彼此的相似回答,增加输入 token 和费用,却没有相应收益。作者不去压缩每句话,而是优化“哪些代理之间需要传递消息”以及“哪些历史消息需要进入下一轮”。

方法与组成

核心思路

输入是现有多智能体系统的通信图:空间边表示同轮代理之间的消息,时间边表示跨轮历史传递。AgentPrune 为这些边设置可训练掩码,学习哪些连接重要;轮内图还要满足顺序执行所需的无环结构。剪掉一条边意味着接收者不再读这条路径上的消息,而不是删除代理的能力或训练大模型权重。输出是更稀疏的通信结构,并由原来的代理继续完成任务。

主要发现

  • 标题

    节约输入并不等于所有 token 都减少

    证据

    在五个基于 GPT-4 的代理设置中,AutoGen 在 HumanEval 上的性能从 85.41 到 86.65,prompt tokens 从 492,273 到 315,105,费用从 8.828 美元到 7.342 美元。但 completion tokens 从 130,196 增至 139,714。这个例子支持减少输入传递带来的节约,而不支持“输入输出都下降”。这些是该基准整组实验的开销,不是每次普通提问的价格。

    限制

    以本段给出的指标、对照和限制解释;不外推为通用质量保证或已完成复现。

    原文定位

    PDF p.9, Table 3, AutoGen HumanEval rows

概念定位

是什么

输入是现有多智能体系统的通信图:空间边表示同轮代理之间的消息,时间边表示跨轮历史传递。AgentPrune 为这些边设置可训练掩码,学习哪些连接重要;轮内图还要满足顺序执行所需的无环结构。剪掉一条边意味着接收者不再读这条路径上的消息,而不是删除代理的能力或训练大模型权重。输出是更稀疏的通信结构,并由原来的代理继续完成任务。

为什么重要

Cut the Crap 提出 AgentPrune,目标是在多智能体协作中减少无用消息传递。多个代理可能反复阅读彼此的相似回答,增加输入 token 和费用,却没有相应收益。作者不去压缩每句话,而是优化“哪些代理之间需要传递消息”以及“哪些历史消息需要进入下一轮”。

图表导读

  • PDF 页

    9

    标题

    PDF p.9, Table 3, AutoGen HumanEval rows

    解释

    在五个基于 GPT-4 的代理设置中,AutoGen 在 HumanEval 上的性能从 85.41 到 86.65,prompt tokens 从 492,273 到 315,105,费用从 8.828 美元到 7.342 美元。但 completion tokens 从 130,196 增至 139,714。这个例子支持减少输入传递带来的节约,而不支持“输入输出都下降”。这些是该基准整组实验的开销,不是每次普通提问的价格。

核心概念

  • 名称

    把轮内和跨轮通信变成可学习的边

    解释

    输入是现有多智能体系统的通信图:空间边表示同轮代理之间的消息,时间边表示跨轮历史传递。AgentPrune 为这些边设置可训练掩码,学习哪些连接重要;轮内图还要满足顺序执行所需的无环结构。剪掉一条边意味着接收者不再读这条路径上的消息,而不是删除代理的能力或训练大模型权重。输出是更稀疏的通信结构,并由原来的代理继续完成任务。

    原文定位

    PDF p.5, Section 3.1; Figure 4

    证据来源

    paper_supported

  • 名称

    先短暂优化,再一次性剪枝

    解释

    系统通过任务效用的策略梯度更新边掩码,同时用核范数近似低秩约束;只运行较短的学习阶段,再按权重大小保留重要边,后续轮次固定使用稀疏图。因此“一次性剪枝”不等于完全不需要优化或试运行。论文还限制了适用情形:代理数量应超过三个,通信结构不能只是过于简单的链或直接输出,不能宣传为任何协作流程都能无代价接入。

    原文定位

    PDF p.6, Sections 3.2–3.4

    证据来源

    paper_supported

章节阅读

  • 页码

    1

    作用

    problem

    关键问题

    沟通越多并不一定越有效

    状态

    read

  • 页码

    5

    作用

    method

    关键问题

    把轮内和跨轮通信变成可学习的边

    状态

    read

  • 页码

    6

    作用

    method

    关键问题

    先短暂优化,再一次性剪枝

    状态

    read

  • 页码

    8

    作用

    method

    关键问题

    实验怎样检验这个方法

    状态

    read

  • 页码

    9

    作用

    result

    关键问题

    节约输入并不等于所有 token 都减少

    状态

    read

  • 页码

    9

    作用

    limitation

    关键问题

    省钱仍可能损失性能,原表也有不自洽处

    状态

    read

批判性阅读

最低充分结论

GPTSwarm 在 MMLU 上接入后性能从 83.98 降到 83.05,费用从 47.60 美元降到 23.05 美元,所以不能写成所有任务都同时更准更便宜。此外,GSM8K 的 prompt token 绝对值与括号内比例存在算术不一致:AutoGen 行为 4,327,740 对 3,791,251,却标为 59.9%;GPTSwarm 行为 14,005,945 对 3,526,035,却标为 39.4%。本导读保留这项原文疑点,不转述对应节省比例为已核实事实,也不擅自判断究竟是哪一个原始数字有误。

继续阅读

相关论文

同一研究空间