Multi-Programming Language Ensemble for Code Generation in Large Language Model

要約

大規模言語モデル (LLM) により、コード生成、特にワンパス コード生成が大幅に改善されました。
しかし、既存のアプローチのほとんどは、単一のプログラミング言語でコードを生成することだけに焦点を当てており、LLM の多言語機能を活用する可能性を見落としています。
LLM には言語ごとにさまざまなエラー パターンがあり、これらの多言語出力を活用することで、より堅牢なアプローチを開発できる可能性があることを示唆しています。
この研究では、複数のプログラミング言語にわたるコード生成を利用して全体的なパフォーマンスを向上させる、新しいアンサンブルベースの手法であるマルチプログラミング言語アンサンブル (MPLE) を提案します。
各言語固有のコード生成プロセスを個別の「弱い専門家」として扱い、その出力を効果的に統合することにより、私たちの方法は言語固有のエラーとバイアスを軽減します。
この多言語アンサンブル戦略は、さまざまなプログラミング言語の補完的な強みを活用し、モデルがより正確で堅牢なコードを生成できるようにします。
私たちのアプローチは、リフレクション アルゴリズムやモンテカルロ ツリー検索などの一般的に使用される手法とシームレスに統合して、コード生成の品質をさらに向上させることができます。
実験結果は、当社のフレームワークが既存のベンチマーク (HumanEval および HumanEval-plus) でベースライン パフォーマンスを一貫して最大 17.92% 向上させ、HumanEval ベンチマークで 96.25% の精度という傑出した結果をもたらし、すべての分野で新しい最先端の結果を達成していることを示しています。
さまざまなLLMモデル。
コードは https://github.com/NinjaTech-AI/MPLE で公開されます。

要約(オリジナル)

Large language models (LLMs) have significantly improved code generation, particularly in one-pass code generation. However, most existing approaches focus solely on generating code in a single programming language, overlooking the potential of leveraging the multi-language capabilities of LLMs. LLMs have varying patterns of errors across different languages, suggesting that a more robust approach could be developed by leveraging these multi-language outputs. In this study, we propose Multi-Programming Language Ensemble (MPLE), a novel ensemble-based method that utilizes code generation across multiple programming languages to enhance overall performance. By treating each language-specific code generation process as an individual ‘weak expert’ and effectively integrating their outputs, our method mitigates language-specific errors and biases. This multi-language ensemble strategy leverages the complementary strengths of different programming languages, enabling the model to produce more accurate and robust code. Our approach can be seamlessly integrated with commonly used techniques such as the reflection algorithm and Monte Carlo tree search to improve code generation quality further. Experimental results show that our framework consistently enhances baseline performance by up to 17.92% on existing benchmarks (HumanEval and HumanEval-plus), with a standout result of 96.25% accuracy on the HumanEval benchmark, achieving new state-of-the-art results across various LLM models. The code will be released at https://github.com/NinjaTech-AI/MPLE

arxiv情報

著者 Tengfei Xue,Xuefeng Li,Tahir Azim,Roman Smirnov,Jianhui Yu,Arash Sadrieh,Babak Pahlavan
発行日 2024-09-06 08:31:18+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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