xASTNN: Improved Code Representations for Industrial Practice

要約

ディープラーニング技術のソフトウェアエンジニアリングへの応用がますます盛んになっている。重要な問題の1つは、コード関連タスクのための高品質で使いやすいソースコード表現の開発である。研究コミュニティは近年、素晴らしい成果を得ている。しかし、デプロイの難しさやパフォーマンスのボトルネックのために、これらのアプローチが産業界に適用されることはほとんどない。本稿では、ソースコード表現のためのAST(eXtreme Abstract Syntax Tree)ベースのニューラルネットワークであるxASTNNを提案する。提案するxASTNNには3つの利点がある。第一に、xASTNNは広く使われているASTに完全に基づいており、複雑なデータ前処理を必要としないため、様々なプログラミング言語や実用的なシナリオに適用可能である。第二に、xASTNNの有効性を保証するために、コードの自然性を保証するステートメントサブツリー列、構文情報を保証するゲーテッド再帰ユニット、シーケンシャル情報を保証するゲーテッド再帰ユニットの3つの密接に関連した設計が提案されている。第三に、xASTNNの時間複雑性を大幅に削減するために、動的バッチアルゴリズムを導入する。2つのコード理解下流タスク、コード分類とコードクローン検出を評価に採用した。その結果、我々のxASTNNはベースラインよりも高速でありながら、最先端技術を改善できることが実証された。

要約(オリジナル)

The application of deep learning techniques in software engineering becomes increasingly popular. One key problem is developing high-quality and easy-to-use source code representations for code-related tasks. The research community has acquired impressive results in recent years. However, due to the deployment difficulties and performance bottlenecks, seldom these approaches are applied to the industry. In this paper, we present xASTNN, an eXtreme Abstract Syntax Tree (AST)-based Neural Network for source code representation, aiming to push this technique to industrial practice. The proposed xASTNN has three advantages. First, xASTNN is completely based on widely-used ASTs and does not require complicated data pre-processing, making it applicable to various programming languages and practical scenarios. Second, three closely-related designs are proposed to guarantee the effectiveness of xASTNN, including statement subtree sequence for code naturalness, gated recursive unit for syntactical information, and gated recurrent unit for sequential information. Third, a dynamic batching algorithm is introduced to significantly reduce the time complexity of xASTNN. Two code comprehension downstream tasks, code classification and code clone detection, are adopted for evaluation. The results demonstrate that our xASTNN can improve the state-of-the-art while being faster than the baselines.

arxiv情報

著者 Zhiwei Xu,Min Zhou,Xibin Zhao,Yang Chen,Xi Cheng,Hongyu Zhang
発行日 2023-11-03 11:12:27+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

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