Leveraging Metamemory Mechanisms for Enhanced Data-Free Code Generation in LLMs
Shuai Wang, Liang Ding, Yibing Zhan, Yong Luo, Zheng He, Dapeng Tao

TL;DR
This paper introduces M^2WF, a novel framework inspired by human metamemory, enabling large language models to autonomously generate and evaluate synthetic code examples, significantly improving data-free code generation performance.
Contribution
The paper presents a new metamemory-inspired approach that allows LLMs to self-generate and assess synthetic data, reducing reliance on curated datasets for code generation tasks.
Findings
Significant performance improvements on HumanEval and StudentEval benchmarks.
Effective in data-free environments, enhancing reliability and adaptability.
Scalable approach with publicly available code and framework.
Abstract
Automated code generation using large language models (LLMs) has gained attention due to its efficiency and adaptability. However, real-world coding tasks or benchmarks like HumanEval and StudentEval often lack dedicated training datasets, challenging existing few-shot prompting approaches that rely on reference examples. Inspired by human metamemory-a cognitive process involving recall and evaluation-we present a novel framework (namely M^2WF) for improving LLMs' one-time code generation. This approach enables LLMs to autonomously generate, evaluate, and utilize synthetic examples to enhance reliability and performance. Unlike prior methods, it minimizes dependency on curated data and adapts flexibly to various coding scenarios. Our experiments demonstrate significant improvements in coding benchmarks, offering a scalable and robust solution for data-free environments. The code and…
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
MethodsSoftmax · Attention Is All You Need
