arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.07147cs.LGcs.AIcs.CLcs.MAcs.SE
收藏

一种用于有状态推理时搜索的多智能体框架

A Multi-Agent Framework for Stateful Inference-Time Search

Carnegie Mellon University(卡内基梅隆大学);Nutanix(Nutanix公司)

Arshika Lalan, Rajat Ghosh, Aditya Kolsur, Debojyoti Dutta

AI总结:

提出有状态多智能体进化搜索框架,结合持久状态、对抗性变异和进化保留,在单元测试生成中显著提升覆盖率。

摘要:

近期研究探索了智能体推理时技术以执行结构化的多步推理。然而,由于缺乏持久状态,无状态推理在多步任务上往往表现不佳。此外,针对特定任务进行微调或指令微调通常能实现表面级的代码生成,但在需要更深层推理和长时程依赖的任务上仍然脆弱。为解决这些局限性,我们提出了有状态多智能体进化搜索,这是一种免训练框架,不同于先前的无状态方法,它结合了(i)持久推理时状态,(ii)对抗性变异,以及(iii)进化保留。我们通过生成边界用例,在自动化单元测试生成中展示了其有效性。我们利用进化搜索过程生成鲁棒的边界用例,其中专门的智能体依次提出、变异并评分候选方案。一个控制器在代际间维持持久状态,而进化保留确保了在所有可能用例中的多样性和探索。这产生了一个通用智能体,能够在未见过的代码库中发现鲁棒且高覆盖率的边界用例。实验表明,我们的有状态多智能体推理框架在覆盖率上相对于无状态单步基线取得了显著提升,这些实验在诸如HumanEval和TestGenEvalMini等主流单元测试基准上,并使用三个不同的LLM家族——Llama、Gemma和GPT进行。这些结果表明,将持久推理时状态与进化搜索相结合,实质性地改善了单元测试生成。

英文摘要:

Recent work explores agentic inference-time techniques to perform structured, multi-step reasoning. However, stateless inference often struggles on multi-step tasks due to the absence of persistent state. Moreover, task-specific fine-tuning or instruction-tuning often achieve surface-level code generation but remain brittle on tasks requiring deeper reasoning and long-horizon dependencies. To address these limitations, we propose stateful multi-agent evolutionary search, a training-free framework that departs from prior stateless approaches by combining (i) persistent inference-time state, (ii) adversarial mutation, and (iii) evolutionary preservation. We demonstrate its effectiveness in automated unit test generation through the generation of edge cases. We generate robust edge cases using an evolutionary search process, where specialized agents sequentially propose, mutate, and score candidates. A controller maintains persistent state across generations, while evolutionary preservation ensures diversity and exploration across all possible cases. This yields a generalist agent capable of discovering robust, high-coverage edge cases across unseen codebases. Experiments show our stateful multi-agent inference framework achieves substantial gains in coverage over stateless single-step baselines, evaluated on prevalent unit-testing benchmarks such as HumanEval and TestGenEvalMini and using three diverse LLM families - Llama, Gemma, and GPT. These results indicate that combining persistent inference-time state with evolutionary search materially improves unit-test generation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑