Cross-lingual Transfer in Programming Languages: An Extensive Empirical Study

要約

大規模な言語モデル(LLMS)は、エラー検出、クローン検出、コード翻訳など、さまざまなソフトウェアエンジニアリングタスクで最先端のパフォーマンスを達成し、主にPythonやJavaなどの高リソースプログラミング言語を活用しています。
ただし、COBOLなどの多くの重要な言語や、RustやSwiftなどの新たな言語は、公然と利用可能なコードが限られているため、リソースが低いままです。
この希少性は、これらの言語のLLMのトレーニングと有効性を妨げ、ソフトウェアのメンテナンスコストを増加させ、革新を抑制します。
このギャップに対処すると、高リソースのカウンターパートからのデータを活用することにより、低リソースプログラミング言語のLLMパフォーマンスを強化するための転送学習の可能性を調査します。
当社の広範な経験的研究では、10〜41のプログラミング言語と5つの重要なタスクの転送可能性を評価します:コード生成、クローン検出、コード修復、ソリューションドメイン分類、エラー検出。
さらに、特定のターゲットとタスクに最適なソース言語を推測するパフォーマンス予測モデルを開発し、転送パフォーマンスに影響を与える機能を分析します。
さらに、より大きなモデルを使用して実験の代表的なサブセットを再現して、現代の大規模なLLMに対する結論の一般化可能性をテストします。
私たちの調査結果は、言語間転送がゼロショット学習を大幅に上回ることを示しており、ソース言語とターゲット言語の両方に基づいて有効性が異なります。
さらに、我々のモデルは、言語およびデータセット固有の機能を考慮することにより、成功した転送ソースを確実に予測し、データ収集とモデルトレーニングのための実用的なガイダンスを提供します。
この作業は、低リソースのプログラミング言語向けのLLM駆動型ツールの開発に貢献し、言語ペア間の転送を促進する特性に関する洞察を提供します。

要約(オリジナル)

Large language models (LLMs) have achieved state-of-the-art performance in various software engineering tasks, including error detection, clone detection, and code translation, primarily leveraging high-resource programming languages like Python and Java. However, many critical languages, such as COBOL, as well as emerging languages, such as Rust and Swift, remain low-resource due to limited openly available code. This scarcity hampers the training and effectiveness of LLMs for these languages, increasing software maintenance costs and stifling innovation. Addressing this gap, we investigate the potential of transfer learning to enhance LLM performance on low-resource programming languages by leveraging data from high-resource counterparts. Our extensive empirical study evaluates transferability across 10 to 41 programming languages and five key tasks: code generation, clone detection, code repair, solution domain classification, and error detection. Additionally, we develop a performance prediction model to guess the best source languages for a given target and task, and analyze the features that influence transfer performance. We further replicate a representative subset of experiments with a larger model to test the generalizability of our conclusions to contemporary large-scale LLMs. Our findings demonstrate that cross-lingual transfer significantly outperforms zero-shot learning, with effectiveness varying based on both source and target languages. Furthermore, our model reliably predicts successful transfer sources by considering linguistic and dataset-specific features, offering practical guidance for data acquisition and model training. This work contributes to the development of LLM-driven tools for low-resource programming languages and provides insights into the characteristics that facilitate transfer across language pairs.

arxiv情報

著者 Razan Baltaji,Saurabh Pujar,Louis Mandel,Martin Hirzel,Luca Buratti,Lav Varshney
発行日 2025-06-10 14:10:33+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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