arXiv AI

Learning from Execution: Self-Evolving Memory for Private-Library Code Generation

arXiv:2604. 24222v2 Announce Type: replace-cross Abstract: Large Language Models (LLMs) have achieved strong performance on general code generation, but their effectiveness drops sharply in enterprise settings where software development relies on internal private libraries absent from public pre-training corpora.

arXiv AI
Oct 27

Evaluating Harmful Memorization in LLM Code Generation

The paper introduces the Harmful Memorization Index (HMI) to measure when large language models (LLMs) fail to adapt to small semantic changes in coding tasks, producing code that is superficially similar to the original solution. It proposes an automated code‑rewriting pipeline that generates semantically different variants of tasks by altering core logic elements, and uses HMI to combine similarity metrics with performance degradation. Experiments on MBPP+ and BigCodeBench show that HMI does not simply grow with model size, is higher for certain logic‑edit types, and that supervised fine‑tuning can increase HMI while PPO offers a better accuracy–HMI trade‑off.

By Lizhe Zhang, Wentao Chen, Li Zhong, Letian Peng, Zilong Wang, Jingbo Shang
arXiv AI
Sep 15

To See is Not to Master: Teaching LLMs to Use Private Libraries for Code Generation

The paper introduces PriCoder, a method for teaching large language models (LLMs) to effectively use private library APIs for code generation. PriCoder synthesizes training data by constructing a graph and applying two operators—Progressive Graph Evolution to increase diversity and Multidimensional Graph Pruning to enhance quality. Experiments on three mainstream LLMs demonstrate that PriCoder boosts private‑library code generation by over 20% in pass@1, while leaving general code generation largely unchanged.

By Yitong Zhang, Chengze Li, Ruize Chen, Guowei Yang, Xiaoran Jia, Yijie Ren, Jia Li
arXiv AI
1d ago

Self-Evolving Beyond Human-Crafted Experience for EDA Scripting

The paper introduces ZhuLong-SE, an execution‑grounded large language model agent designed to automate electronic design automation (EDA) scripting. It builds on the earlier ZhuLong system by adding API retrieval, documentation responses, sandbox execution, and static checking, and introduces a governed cross‑task self‑evolution mechanism that distills execution traces into a three‑tier memory store. On the EDA‑Eval‑PyAether benchmark, ZhuLong‑SE achieves 92.4% pass@1 without self‑evolution and outperforms the original ZhuLong across five LLM backbones; with self‑evolution enabled it surpasses a human‑crafted‑experience baseline by 2.5 percentage points on a harder test set.

By Yang Liu, Shengbo Tong, Xiyuan Chen, Shiwei Hou, Sen Yuan, Hao Wang, Yanfeng Li, Hongwen Li, Yiming Zhu, Zhuolun He, Wenjian Yu
arXiv Computation and Language
Oct 16

Enhancing Knowledge Density via Hierarchical Context Pruning for Retrieval-Augmented Repository-Level Code Completion

The paper introduces SaraCoder, a retrieval‑augmented framework that improves knowledge density for repository‑level code completion by pruning redundant context and selectively injecting cross‑file dependency definitions within a fixed token budget. It employs a Hierarchical Feature Optimization module to reduce an over‑complete candidate pool in four stages, freeing tokens for an External‑Aware Identifier Disambiguator. Experiments on CrossCodeEval and RepoEval‑Updated demonstrate that SaraCoder outperforms strong RAG baselines such as GraphCoder and Repocoder across multiple code LLMs without increasing token usage, and achieves synergistic gains when combined with other cross‑file methods.

By Xiaohan Chen, Xiang Chen, Yu Tian, Piji Li, Sheng-Jun Huang, Songcan Chen