LLM-based multi-agent systems exhibit strong collaborative capabilities but often suffer from redundant communication and excessive token overhead. Existing methods typically enhance efficiency through pretrained GNNs or greedy algorithms, but often isolate pre- and post-task optimization, lacking a unified strategy. To this end, we present SafeSieve, a progressive and adaptive multi-agent pruning algorithm that dynamically refines the inter-agent communication through a novel dual-mechanism. SafeSieve integrates initial LLM-based semantic evaluation with accumulated performance feedback, enabling a smooth transition from heuristic initialization to experience-driven refinement. Unlike existing greedy Top-k pruning methods, SafeSieve employs 0-extension clustering to preserve structurally coherent agent groups while eliminating ineffective links. Experiments across benchmarks (SVAMP, HumanEval, etc.) showcase that SafeSieve achieves 94.01% average accuracy while reducing token usage by 12.4%-27.8%. Results further demonstrate robustness under prompt injection attacks (1.23% average accuracy drop). In heterogeneous settings, SafeSieve reduces deployment costs by 13.3% while maintaining performance. These results establish SafeSieve as an efficient, GPU-free, and scalable framework for practical multi-agent systems. Our code can be found here: https://github.com/csgen/SafeSieve
翻译:基于大型语言模型(LLM)的多智能体系统展现出强大的协作能力,但常存在通信冗余与令牌开销过大的问题。现有方法通常通过预训练图神经网络(GNN)或贪心算法提升效率,但往往将任务前优化与任务后优化割裂,缺乏统一策略。为此,我们提出SafeSieve——一种渐进自适应的多智能体剪枝算法,通过新颖的双重机制动态优化智能体间通信。SafeSieve将基于LLM的初始语义评估与累积性能反馈相结合,实现了从启发式初始化到经验驱动优化的平滑过渡。不同于现有的贪心Top-k剪枝方法,SafeSieve采用0-扩展聚类技术,在保留结构连贯的智能体群组的同时消除无效连接。在多个基准测试(SVAMP、HumanEval等)上的实验表明,SafeSieve在平均准确率达到94.01%的同时,将令牌使用量降低12.4%-27.8%。结果进一步显示其在提示注入攻击下具有鲁棒性(平均准确率仅下降1.23%)。在异构场景中,SafeSieve在保持性能的同时降低13.3%的部署成本。这些结果确立了SafeSieve作为一种高效、无需GPU且可扩展的实用多智能体系统框架。我们的代码可见:https://github.com/csgen/SafeSieve