Experiential Co-Learning of Software-Developing Agents

Chen Qian, Yufan Dang, Jiahao Li, Wei Liu, Weize Chen, Cheng Yang, Zhiyuan Liu, Maosong Sun · DOI

TL;DR

This paper introduces "Experiential Co-Learning," a novel framework for LLM-powered software development agents that allows them to learn from past task experiences. By extracting and utilizing "shortcuts" from historical trajectories, these agents significantly improve their efficiency and effectiveness in tackling new, unseen software development tasks.

What Problem Does This Paper Address?

While LLM-driven autonomous agents have shown great promise in collaborative tasks like software development, they often operate in isolation, failing to learn from their previous successes and failures. This leads to repetitive mistakes, inefficient multi-step task execution, and a continued reliance on human intervention. The paper addresses this gap by proposing a method for agents to build and leverage a shared memory of "experiential shortcuts" to enhance their future performance.

Methods

The core of the proposed solution is the "Experiential Co-Learning" framework, which involves two types of agents: an instructor and an assistant. The framework comprises three key modules:

  • Co-Tracking: This module facilitates a rehearsal-like collaboration between the instructor and assistant. They work together on training tasks, creating "procedural trajectories" that capture their step-by-step interactions and solutions.
  • Co-Memorizing: This module is where the learning happens. It analyzes the procedural trajectories to identify "shortcuts" – efficient pathways between non-adjacent steps. These shortcuts are extracted under external supervision and stored in a collective experience pool. The paper specifically focuses on identifying shortcuts that represent significant improvements or efficient transitions, rather than just adjacent steps.
  • Co-Reasoning: When faced with a new, unseen task, the agents use their shared experience pool. The instructor uses its stored solution-to-instruction experiences to generate better instructions, and the assistant uses its instruction-to-solution experiences to produce more optimal code. This allows them to leverage past learnings for accelerated and more effective reasoning.

Datasets

The paper leverages the SRDD dataset for training and evaluation. This dataset contains 1,200 software requirement descriptions, categorized into 5 main areas (Education, Work, Life, Game, Creation) and further segmented into 40 subcategories, each with 30 unique tasks.

Key Insights and Ideas

  • Learning from "Shortcuts" is Crucial: The paper highlights that not all steps in a task execution are equally valuable. Identifying and learning from efficient "shortcuts" between non-adjacent steps is more impactful than simply memorizing entire trajectories or only adjacent step transitions.
  • Shared Experience Pool Enhances Collaboration: By creating a collective experience pool accessible to both instructor and assistant agents, the framework fosters a more synergistic and efficient collaborative process.
  • Assistant's Experience is Key: The study found that while both instructor and assistant experiences are important, the assistant's role in leveraging past experiences for solution generation appears to be more critical for overall performance.
  • Efficiency Gains Through Strategic Learning: The framework demonstrates that by strategically utilizing shortcuts, agents can reduce the number of communication rounds and iterations needed to complete tasks, leading to significant efficiency improvements.

Key Results

The Experiential Co-Learning framework demonstrated superior performance compared to baseline methods like GPT-Engineer, MetaGPT, and ChatDev across several metrics.

  • Quality: Co-Learning achieved a significantly higher overall quality score (0.7304) compared to ChatDev (0.4267), its closest multi-agent competitor. This indicates a substantial improvement in the generated software's completeness, executability, and consistency.
  • Efficiency: The framework showed a trend towards fewer edges and nodes in task execution graphs, suggesting a simplification of the development process and fewer iterations.
  • Human and GPT-4 Evaluation: In pairwise comparisons, Co-Learning consistently outperformed other methods, with higher win rates when evaluated by both GPT-4 and human participants.

Limitations and Future Work

The authors acknowledge several limitations:

  • Overestimation of Agent Capabilities: Autonomous agents may still default to simpler logic when requirements are unclear, making them more suitable for prototyping than complex, real-world applications.
  • Evaluation Challenges: Automating the evaluation of general-purpose software remains exceptionally challenging, even with recent advancements.
  • Consistency Nuances: While Co-Learning improved completeness and executability, consistency saw only a slight enhancement. This might be due to the broad-grained semantic representations of current embedding models, which may not capture subtle inconsistencies.

Future work could focus on developing more advanced evaluation methodologies, exploring robustness, and refining embedding models to better capture semantic nuances for improved consistency. The paper also suggests that optimizing hyperparameters, particularly those related to code retrieval, can further enhance performance.

Summary updated

BibTeX
@inproceedings{qian2024experiential,
  author = {Chen Qian and Yufan Dang and Jiahao Li and Wei Liu and Weize Chen and Cheng Yang and Zhiyuan Liu and Maosong Sun},
  title = {{Experiential Co-Learning of Software-Developing Agents}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=1sqA7NHGp7},
}
Figure