MEMCoder: Multi-dimensional Evolving Memory for Private-Library-Oriented Code Generation
- URL: http://arxiv.org/abs/2604.24222v1
- Date: Mon, 27 Apr 2026 09:27:59 GMT
- Title: MEMCoder: Multi-dimensional Evolving Memory for Private-Library-Oriented Code Generation
- Abstract summary: MEMCoder is a novel framework that enables Large Language Models to autonomously accumulate and evolve Usage Guidelines.<n>During inference, MEMCoder employs a dual-source retrieval mechanism to inject both static documentation and relevant historical guidelines into the context.<n>It exhibits vastly superior domain-specific adaptation compared to existing memory-based continual learning methods.
- Score: 7.313211974278645
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Large Language Models (LLMs) excel at general code generation, but their performance drops sharply in enterprise settings that rely on internal private libraries absent from public pre-training corpora. While Retrieval-Augmented Generation (RAG) offers a training-free alternative by providing static API documentation, we find that such documentation typically provides only isolated definitions, leaving a fundamental knowledge gap. Specifically, LLMs struggle with a task-level lack of coordination patterns between APIs and an API-level misunderstanding of parameter constraints and boundary conditions. To address this, we propose MEMCoder, a novel framework that enables LLMs to autonomously accumulate and evolve Usage Guidelines across these two dimensions. MEMCoder introduces a Multi-dimensional Evolving Memory that captures distilled lessons from the model's own problem-solving trajectories. During inference, MEMCoder employs a dual-source retrieval mechanism to inject both static documentation and relevant historical guidelines into the context. The framework operates in an automated closed loop by using objective execution feedback to reflect on successes and failures, resolve knowledge conflicts, and dynamically update memory. Extensive evaluations on the NdonnxEval and NumbaEval benchmarks demonstrate that MEMCoder substantially enhances existing RAG systems, yielding an average absolute pass@1 gain of 16.31%. Furthermore, MEMCoder exhibits vastly superior domain-specific adaptation compared to existing memory-based continual learning methods.
Related papers
- Dual-Grained Agent Memory and Shapley Context Attribution for Multimodal Agentic Learner [55.80248281761638]
multimodal large language models (MLLMs) deliver impressive perception yet still falter on scientific and mathematical reasoning.<n>We propose DG-Mem, a dual-grained agentic memory framework that augments a frozen MLLM with a non- externally stored memory built once from training-time rollouts and consulted read-only at test time.
arXiv Detail & Related papers (2026-08-24T13:56:01Z) - MeMo: Memory as a Model [96.54179792557863]
Large language models (LLMs) achieve strong performance across a wide range of tasks, but remain frozen after pretraining until subsequent updates.<n>MeMo is a modular framework that encodes new knowledge into a dedicated memory model while keeping the LLM parameters unchanged.<n>MeMo achieves strong performance compared to existing methods across diverse settings.
arXiv Detail & Related papers (2026-05-14T17:51:34Z) - Memory-Augmented LLM-based Multi-Agent System for Automated Feature Generation on Tabular Data [52.80567461420316]
We propose a Memory-Augmented LLM-based Multi-Agent System (textbfMALMAS) for automated feature generation.<n>MALMAS decomposes the generation process into agents with distinct responsibilities, and a Router Agent activates an appropriate subset of agents per iteration.<n>We further integrate a memory module comprising procedural memory, feedback memory, and conceptual memory, enabling iterative refinement that adaptively guides subsequent feature generation.
arXiv Detail & Related papers (2026-04-22T07:09:30Z) - MemFactory: Unified Inference & Training Framework for Agent Memory [30.793092194488263]
We present MemFactory, the first unified, highly modular training and inference framework specifically designed for memory-augmented agents.<n>Inspired by the success of unified fine-tuning frameworks like LLaMA-Factory, MemFactory abstracts the memory lifecycle into atomic, plug-and-play components.<n>We empirically validate MemFactory on the open-source MemAgent architecture using its publicly available training and evaluation data.
arXiv Detail & Related papers (2026-03-31T09:38:21Z) - AMemGym: Interactive Memory Benchmarking for Assistants in Long-Horizon Conversations [61.6579785305668]
AMemGym is an interactive environment enabling on-policy evaluation and optimization for memory-driven personalization.<n>Our framework provides a scalable, diagnostically rich environment for advancing memory capabilities in conversational agents.
arXiv Detail & Related papers (2026-03-02T15:15:11Z) - UMEM: Unified Memory Extraction and Management Framework for Generalizable Memory [46.87954895079213]
Self-evolving memory serves as the trainable parameters for Large Language Models (LLMs)<n>Existing methods predominately optimize memory management while treating memory extraction as a static process.<n>We propose Unified Memory Extraction and Management (UMEM) to jointly optimize a Large Language Model to simultaneous extract and manage memories.
arXiv Detail & Related papers (2026-02-11T08:58:41Z) - MemOS: A Memory OS for AI System [116.87568350346537]
Large Language Models (LLMs) have become an essential infrastructure for Artificial General Intelligence (AGI)<n>Existing models mainly rely on static parameters and short-lived contextual states, limiting their ability to track user preferences or update knowledge over extended periods.<n>MemOS is a memory operating system that treats memory as a manageable system resource.
arXiv Detail & Related papers (2025-07-04T17:21:46Z) - Leveraging Metamemory Mechanisms for Enhanced Data-Free Code Generation in LLMs [44.80420740455364]
M2WF is a framework for improving large language models' one-time code generation.<n>Unlike prior methods, it minimizes dependency on curated data and adapts to various coding scenarios.<n>The code and framework will be publicly available on GitHub and HuggingFace.
arXiv Detail & Related papers (2025-01-14T07:16:43Z) - Online Adaptation of Language Models with a Memory of Amortized Contexts [82.02369596879817]
Memory of Amortized Contexts (MAC) is an efficient and effective online adaptation framework for large language models.
We show how MAC can be combined with and improve the performance of popular alternatives such as retrieval augmented generations.
arXiv Detail & Related papers (2024-03-07T08:34:57Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.