要約
プログラミング言語は、グラフによって表現され、ソース コードの表面的な形式からは取得できないデータ フローなどの豊富な意味情報を持っています。
最近のコード言語モデルは数十億のパラメーターに拡張されていますが、ソース コードはテキスト トークンとしてのみモデル化され、他の構造情報は無視されます。
逆に、コードの構造情報をエンコードするモデルは、Transformer アーキテクチャに変更を加え、その規模と事前トレーニングされた LLM との互換性を制限します。
この作業では、GALLa (Graph Aligned Large Language Model) の両方の長所を取り入れています。
GALLa は、グラフ ニューラル ネットワークとクロスモーダル アライメント テクノロジを利用して、微調整中の補助タスクとしてコードの構造情報を LLM に注入します。
このフレームワークは、任意のコードの下流タスクの任意のコード LLM に適用できるため、モデルに依存せず、タスクにも依存しません。また、トレーニング時にのみ、微調整データに関係のないコーパスから構造グラフ データを必要とし、コストはかかりません。
推論時にベースライン LLM を超えます。
サイズが 350M から 8B までの 4 つの異なるベースライン LLM を使用した 5 つのコード タスクの実験により、GALLa の有効性が検証され、LLaMA3 などの強力なモデルであっても、ベースラインを上回る一貫した改善が実証されました。
要約(オリジナル)
Programming languages possess rich semantic information such as data flow that is represented by graphs and not available from the surface form of source code. Recent code language models have scaled to billions of parameters, but model source code solely as text tokens while ignoring any other structural information. Conversely, models that do encode structural information of code make modifications to the Transformer architecture, limiting their scale and compatibility with pretrained LLMs. In this work, we take the best of both worlds with GALLa – Graph Aligned Large Language Model. GALLa utilizes graph neural networks and cross-modal alignment technologies to inject the structural information of code into LLMs as an auxiliary task during finetuning. This framework is both model-agnostic and task-agnostic, as it can be applied to any code LLM for any code downstream task, and requires the structural graph data only at training time from a corpus unrelated to the finetuning data, while incurring no cost at inference time over the baseline LLM. Experiments on five code tasks with four different baseline LLMs ranging in size from 350M to 8B validate the effectiveness of GALLa, demonstrating consistent improvement over the baseline, even for powerful models such as LLaMA3.
arxiv情報
| 著者 | Ziyin Zhang,Hang Yu,Shijie Li,Peng Di,Jianguo Li,Rui Wang |
| 発行日 | 2024-09-06 10:57:34+00:00 |
| arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google