Genetic Auto-prompt Learning for Pre-trained Code Intelligence Language Models

要約

コード インテリジェンスの一般的なアプローチである事前トレーニング済み言語モデル (PLM) のサイズが増大し続けるにつれて、その使用にかかる計算コストが法外に高価になってきています。
自然言語処理分野における最近の開発である即時学習は、この課題に対処する潜在的な解決策として浮上しています。
この論文では、コード インテリジェンス タスクにおける即時学習の有効性を調査します。
多くの場合、多大な人間の労力と専門知識が必要となる、手動で設計されたプロンプトに依存していることを明らかにします。
さらに、既存の自動プロンプト設計手法は、勾配依存性、高い計算要求、適用可能性の制限などの要因により、コード インテリジェンス タスクに非常に限定されていることがわかりました。
両方の問題に効果的に対処するために、精巧な遺伝的アルゴリズムを利用してプロンプトを自動的に設計する Genetic Auto Prompt (GenAP) を提案します。
GenAP を使用すると、専門家でなくても、綿密に手動で設計されたプロンプトと比較して、優れたプロンプトを簡単に生成できます。
GenAP は勾配や追加の計算コストを必要とせずに動作するため、勾配がなく、コスト効率が高くなります。
さらに、GenAP はコード インテリジェンス タスクの理解と生成の両方のタイプをサポートし、優れた適用性を示します。
当社は、欠陥予測、コード要約、コード変換を含む 3 つの標準的なコード インテリジェンス タスクを備えた 3 つの一般的なコード インテリジェンス PLM で GenAP を実行します。
この結果は、GenAP がプロンプトの設計プロセスを効果的に自動化できることを示唆しています。
具体的には、GenAP は 3 つのタスクすべてにわたって他のすべての方法よりも優れています (たとえば、欠陥予測の精度が平均 2.13% 向上)。
私たちの知る限り、GenAP はコード インテリジェンス PLM のプロンプトを自動的に設計する最初の作品です。

要約(オリジナル)

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 GenAP, non-experts can effortlessly generate superior prompts compared to meticulously manual-designed ones. GenAP operates without the need for gradients or additional computational costs, rendering it gradient-free and cost-effective. Moreover, GenAP supports both understanding and generation types of code intelligence tasks, exhibiting great applicability. We conduct GenAP on three popular code intelligence PLMs with three canonical code intelligence tasks including defect prediction, code summarization, and code translation. The results suggest that GenAP can effectively automate the process of designing prompts. Specifically, GenAP outperforms all other methods across all three tasks (e.g., improving accuracy by an average of 2.13% for defect prediction). To the best of our knowledge, GenAP is the first work to automatically design prompts for code intelligence PLMs.

arxiv情報

著者 Chengzhe Feng,Yanan Sun,Ke Li,Pan Zhou,Jiancheng Lv,Aojun Lu
発行日 2024-03-20 13:37:00+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.SE パーマリンク