CCT-Code: Cross-Consistency Training for Multilingual Clone Detection and Code Search

要約

私たちは、あらゆるプログラミング言語にとって重要なよく知られたタスクである、ソース コードのクローン検出と情報検索の問題を検討します。
同じように動作するが、異なるプログラミング言語で書かれたコード スニペットを見つけることも重要で興味深い問題ですが、私たちの知る限り、多言語クローン検出については文献で研究されていません。
この研究では、多言語クローン検出問題を定式化し、CodeForces 提出データセットから生成された新しいベンチマーク データセットである XCD を提示します。
さらに、異なるプログラミング言語のソース コードで言語モデルをトレーニングするために適用する、相互整合性トレーニング (CCT) と呼ばれる新しいトレーニング手順を紹介します。
GraphCodeBERT で初期化され、CCT で微調整された結果の CCT-LM モデルは、POJ-104 クローン検出ベンチマークで 95.67\% の MAP と AdvTest コード検索ベンチマークで 47.18\% MRR で既存のアプローチを上回り、新たな最先端技術を実現しました。
;
また、新しく作成された多言語クローン検出ベンチマーク XCD において、すべてのプログラミング言語にわたって最良の結果が得られたことも示しています。

要約(オリジナル)

We consider the clone detection and information retrieval problems for source code, well-known tasks important for any programming language. Although it is also an important and interesting problem to find code snippets that operate identically but are written in different programming languages, to the best of our knowledge multilingual clone detection has not been studied in literature. In this work, we formulate the multilingual clone detection problem and present XCD, a new benchmark dataset produced from the CodeForces submissions dataset. Moreover, we present a novel training procedure, called cross-consistency training (CCT), that we apply to train language models on source code in different programming languages. The resulting CCT-LM model, initialized with GraphCodeBERT and fine-tuned with CCT, achieves new state of the art, outperforming existing approaches on the POJ-104 clone detection benchmark with 95.67\% MAP and AdvTest code search benchmark with 47.18\% MRR; it also shows the best results on the newly created multilingual clone detection benchmark XCD across all programming languages.

arxiv情報

著者 Nikita Sorokin,Dmitry Abulkhanov,Sergey Nikolenko,Valentin Malykh
発行日 2023-05-19 12:09:49+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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