CodeMEM: AST-Guided Adaptive Memory for Repository-Level Iterative Code Generation
Peiding Wang, Li Zhang, Fang Liu, Chongyang Tao, Yinghao Zhu

TL;DR
CodeMEM introduces an AST-guided dynamic memory system for repository-level iterative code generation, effectively managing context and reducing forgetting to improve performance and efficiency in large language model interactions.
Contribution
It presents a novel AST-guided memory management approach that dynamically maintains repository context and interaction history, addressing limitations of language-centric representations.
Findings
Achieves state-of-the-art performance on CodeIF-Bench and CoderEval benchmarks.
Improves instruction following accuracy by over 12%.
Reduces interaction rounds by 2-3.
Abstract
Large language models (LLMs) substantially enhance developer productivity in repository-level code generation through interactive collaboration. However, as interactions progress, repository context must be continuously preserved and updated to integrate newly validated information. Meanwhile, the expanding session history increases cognitive burden, often leading to forgetting and the reintroduction of previously resolved errors. Existing memory management approaches show promise but remain limited by natural language-centric representations. To overcome these limitations, we propose CodeMEM, an AST-guided dynamic memory management system tailored for repository-level iterative code generation. Specifically, CodeMEM introduces the Code Context Memory component that dynamically maintains and updates repository context through AST-guided LLM operations, along with the Code Session Memory…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Topic Modeling · Software Testing and Debugging Techniques
