Genetic Auto-prompt Learning for Pre-trained Code Intelligence Language Models
Chengzhe Feng, Yanan Sun, Ke Li, Pan Zhou, Jiancheng Lv, Aojun Lu

TL;DR
This paper introduces GenAP, a genetic algorithm-based method for automatically designing prompts for pre-trained code intelligence models, improving performance without manual effort or high computational costs.
Contribution
We propose GenAP, the first automatic prompt design method for code intelligence PLMs, which is gradient-free, cost-effective, and applicable to various tasks.
Findings
GenAP outperforms manual prompts across multiple tasks.
GenAP improves defect prediction accuracy by 2.13%.
GenAP is effective for understanding and generation tasks.
Abstract
As Pre-trained Language Models (PLMs), a popular approach for code intelligence, continue to grow in size, the computational cost of their usage has become prohibitively expensive. Prompt learning, a recent development in the field of natural language processing, emerges as a potential solution to address this challenge. In this paper, we investigate the effectiveness of prompt learning in code intelligence tasks. We unveil its reliance on manually designed prompts, which often require significant human effort and expertise. Moreover, we discover existing automatic prompt design methods are very limited to code intelligence tasks due to factors including gradient dependence, high computational demands, and limited applicability. To effectively address both issues, we propose Genetic Auto Prompt (GenAP), which utilizes an elaborate genetic algorithm to automatically design prompts. With…
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 · Natural Language Processing Techniques · Software Testing and Debugging Techniques
