Neuro-inspired AI framework uses reverse-order learning to enhance code generation

Neuro-inspired AI framework uses reverse-order learning to enhance code generation

A neurobiology-inspired multi-agent framework for enhanced code generation
Overview of Cogito. The upper section illustrates the learning process of the Super-Role stored in the memory module. The lower section provides a detailed explanation of the process: initially, it assumes the role of the debugger within the group, followed by transitions to the coder and planner roles. After completing the learning cycle, the final answer is provided by the Super-Role. Credit: Li et al.

Large language models (LLMs), such as the model behind OpenAI’s popular platform ChatGPT, have been found to successfully tackle a wide range of language processing and text generation tasks. Some of these models have also shown some promise for the generation of programming code, particularly when deployed in sets as part of so-called multi-agent systems.

Researchers at Jilin University and the Hong Kong University of Science and Technology recently developed Cogito, a new multi-agent system that could enhance the automated, AI-based generation of programming code. This system, presented in a paper posted to the arXiv preprint server, is inspired by the neurobiological processes that allow humans to complete complex tasks step-by-step, following a structured approach.

“Under the guidance of the corresponding author, Professor Wang Qi, we decided to focus our research on the code generation tasks of LLM-AGENT,” Yanlong Li, first author of the paper, told Tech Xplore. “Psychology and the process of human growth have inspired us to complete this research, and the results have been quite promising.”

The main goal of the recent work by Prof. Qi, Li and their colleagues was to improve the performance of LLMs on programming code generation tasks. To do this, the researchers developed a new system that reverses the typical sequence in which code generation sub-tasks are performed.

Typically, the generation of programming code starts off with planning (i.e., structuring the overall logic of code), followed by the coding process and de-bugging (i.e., fixing errors in the code). The new framework developed by this research group reverses this sequence, starting from debugging, to then produce code and subsequently plan changes aimed at refining it.

“Our framework consists of an answer-generation process and a memory module,” explained Li. “For a given task, there are three roles in the group: Planner, Coder, and Debugger, each performing their respective functions to generate the answer. The role responsible for generating the final answer will sequentially play the roles of Debugger, Coder, and Planner across different groups.”

Cogito, the system developed by Li and his colleagues, also features a memory module that mirrors the functioning of the hippocampus, a key region of the human brain. This module is designed to rapidly retrieve information acquired in the past, to improve the learning process.

Essentially, Cogito accumulates experience while completing the debugging, coding and planning stage. Subsequently, it leverages the experience it accumulated to generate a final version of the requested programming code.

“The unique characteristic of the process is the use of experience accumulation and reverse-order learning (where the typical order is Planner, Coder, Debugger for learning),” said Li. “This approach saves communication costs between groups and improves task accuracy.

“As for the memory, it is inspired by the human brain’s hippocampus, where different regions store information based on different functions, with interconnectedness between them. This design allows for both quick retrieval and observation of the overall process, unlike most previous works that either store information as a whole or summarize before storing.”

The researchers tested their proposed multi-agent system in a series of initial experiments and found that it outperformed existing LLM-based models on code generation tasks, making fewer errors. In the future, the model could be improved further and tested on a wider range of code generation tasks.

“I think the most notable aspect of our study is the reverse learning and growth process we demonstrated,” added Li. “So far, we validated its effectiveness in code generation tasks like HumanEval. In the future, we might incorporate some reinforcement learning elements, but we are not entirely certain yet, as this field is developing really fast.”

More information:
Yanlong Li et al, Cogito, ergo sum: A Neurobiologically-Inspired Cognition-Memory-Growth System for Code Generation, arXiv (2025). DOI: 10.48550/arxiv.2501.18653

Journal information:
arXiv


© 2025 Science X Network

Citation:
Neuro-inspired AI framework uses reverse-order learning to enhance code generation (2025, February 18)
retrieved 18 February 2025
from https://techxplore.com/news/2025-02-neuro-ai-framework-reverse-code.html

This document is subject to copyright. Apart from any fair dealing for the purpose of private study or research, no
part may be reproduced without the written permission. The content is provided for information purposes only.

Leave a Reply

Your email address will not be published. Required fields are marked *