模仿人类学习过程,用反向流程提升代码生成效率
Cogito, ergo sum: A Neurobiologically-Inspired Cognition-Memory-Growth System for Code Generation
- 采用先调试后编码再规划的反向流程,模拟人类成长式学习
- 通过类海马体记忆模块实现相似任务快速检索,降低计算开销
- 构建全能型智能体,适合需要持续进化能力的代码生成场景
基于多智能体系统(MAS)的大语言模型在提升代码生成效率和准确性方面表现优异。然而,现有方法多遵循规划-编码-调试的传统顺序,违背了人类学习过程中的成长驱动特性。此外,多智能体间频繁交互带来高昂计算成本。本文提出Cogito,一种受神经生物学启发的多智能体框架,通过更低成本增强代码生成中的问题求解能力。具体而言,Cogito采用反向流程:先调试、再编码、最后规划,模仿人类知识逐步积累的过程。为此,设计了一个具有不同功能的类海马体记忆模块,与流水线协同工作,实现相似任务的快速检索。在此成长式学习模型下,Cogito在各阶段不断积累知识与认知技能,最终形成一个具备全能力的超级角色智能体,完成代码生成任务。大量实验表明,Cogito在性能和效率上均优于代表性基线模型。代码已公开于https://anonymous.4open.science/r/Cogito-0083。
原文摘要 · Abstract (English)
Large language models based Multi Agent Systems (MAS) have demonstrated promising performance for enhancing the efficiency and accuracy of code generation tasks. However,most existing methods follow a conventional sequence of planning, coding, and debugging,which contradicts the growth-driven nature of human learning process. Additionally,the frequent information interaction between multiple agents inevitably involves high computational costs. In this paper,we propose Cogito,a neurobiologically inspired multi-agent framework to enhance the problem-solving capabilities in code generation tasks with lower cost. Specifically,Cogito adopts a reverse sequence: it first undergoes debugging, then coding,and finally planning. This approach mimics human learning and development,where knowledge is acquired progressively. Accordingly,a hippocampus-like memory module with different functions is designed to work with the pipeline to provide quick retrieval in similar tasks. Through this growth-based learning model,Cogito accumulates knowledge and cognitive skills at each stage,ultimately forming a Super Role an all capable agent to perform the code generation task. Extensive experiments against representative baselines demonstrate the superior performance and efficiency of Cogito. The code is publicly available at https://anonymous.4open.science/r/Cogito-0083.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。