Enhanced Automated Code Vulnerability Repair using Large Language Models

要約

この研究は、テクノロジー主導の世界においてデジタル・セキュリティを強化するために不可欠な、コードの脆弱性を自動修復するという複雑な課題に取り組んでいる。この研究では、Code LlamaやMistralのような先進的な大規模言語モデル(LLM)を用いて、コード修正を表現するための斬新で効率的なフォーマットを導入する。Cコードの脆弱性を含むデータセットで微調整されたこれらのモデルは、自動コード修復技術の精度と適応性を大幅に向上させる。重要な発見は、VulRepairのような以前の手法と比較した場合の、これらのモデルの修復精度の向上であり、これは実用的な有用性と効率性を強調している。この研究はまた、完全予測などの現在の評価指標と、実世界のシナリオにおける自動修復モデルの真の能力を反映する上でのその限界について、批判的な評価も行っている。続いて、学習サンプルのないテストデータセットを使用することの重要性を強調し、コード修復タスクにおけるLLMの有効性を高めるためのデータセットの完全性の必要性を強調している。この研究の意義は、デジタル・セキュリティへの貢献であり、自動化されたコード脆弱性修復の新たな基準を設定し、サイバーセキュリティと人工知能の分野における将来の進歩への道を開くことである。この研究は、コード・セキュリティの強化におけるLLMの可能性を強調するだけでなく、これらの重要な分野におけるさらなる探求と研究を促進するものである。

要約(オリジナル)

This research addresses the complex challenge of automated repair of code vulnerabilities, vital for enhancing digital security in an increasingly technology-driven world. The study introduces a novel and efficient format for the representation of code modification, using advanced Large Language Models (LLMs) such as Code Llama and Mistral. These models, fine-tuned on datasets featuring C code vulnerabilities, significantly improve the accuracy and adaptability of automated code repair techniques. A key finding is the enhanced repair accuracy of these models when compared to previous methods such as VulRepair, which underscores their practical utility and efficiency. The research also offers a critical assessment of current evaluation metrics, such as perfect predictions, and their limitations in reflecting the true capabilities of automated repair models in real-world scenarios. Following this, it underscores the importance of using test datasets devoid of train samples, emphasizing the need for dataset integrity to enhance the effectiveness of LLMs in code repair tasks. The significance of this work is its contribution to digital security, setting new standards for automated code vulnerability repair and paving the way for future advancements in the fields of cybersecurity and artificial intelligence. The study does not only highlight the potential of LLMs in enhancing code security but also fosters further exploration and research in these crucial areas.

arxiv情報

著者 David de-Fitero-Dominguez,Eva Garcia-Lopez,Antonio Garcia-Cabot,Jose-Javier Martinez-Herraiz
発行日 2024-10-03 17:15:24+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.CL, cs.SE | コメントする

On the Proper Treatment of Tokenization in Psycholinguistics

要約

言語モデルは、計算心理言語学において、ある言語モデルにおける注目領域(文字の部分列)の負の対数確率(驚き)と、その領域に対する注視時間などで運用される、読者が経験する認知的コストとを関連付ける理論を検証するために広く使用されている。しかし、現代の言語モデルを心理言語学的研究に応用することは、モデルを学習する中間段階としてトークン化を使用する慣行によって複雑になっている。そうすることで、文字列の言語モデルではなく、トークン文字列の言語モデルになってしまう。興味深いことに、関心領域とトークン文字列は一般的にずれている。本論文では、心理言語学的研究において、トークン・レベルの言語モデルを、関心領域の驚きを計算するために使用する前に、文字レベルの言語モデルに(近似的に)マージナル化すべきであると主張する。トークン・レベルのモデルを文字レベルのモデルにマージナル化するという我々の提案は、トークン化スキームとは無関係にこのズレの問題を解決する。経験的に、我々は様々なフォーカルエリアを発見し、その驚きが、注目領域自体の驚きに比べて、より優れた心理測定予測因子であることを発見した。

要約(オリジナル)

Language models are widely used in computational psycholinguistics to test theories that relate the negative log probability (the surprisal) of a region of interest (a substring of characters) under a language model to its cognitive cost experienced by readers, as operationalized, for example, by gaze duration on the region. However, the application of modern language models to psycholinguistic studies is complicated by the practice of using tokenization as an intermediate step in training a model. Doing so results in a language model over token strings rather than one over character strings. Vexingly, regions of interest are generally misaligned with these token strings. The paper argues that token-level language models should be (approximately) marginalized into character-level language models before they are used in psycholinguistic studies to compute the surprisal of a region of interest; then, the marginalized character-level language model can be used to compute the surprisal of an arbitrary character substring, which we term a focal area, that the experimenter may wish to use as a predictor. Our proposal of marginalizing a token-level model into a character-level one solves this misalignment issue independently of the tokenization scheme. Empirically, we discover various focal areas whose surprisal is a better psychometric predictor than the surprisal of the region of interest itself.

arxiv情報

著者 Mario Giulianelli,Luca Malagutti,Juan Luis Gastaldi,Brian DuSell,Tim Vieira,Ryan Cotterell
発行日 2024-10-03 17:18:03+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.CL | コメントする

The Mystery of In-Context Learning: A Comprehensive Survey on Interpretation and Analysis

要約

大規模言語モデル(LLM)が実証例を通して習熟することを可能にする文脈内学習(ICL)能力を理解することは、最も重要である。この重要性は、様々なタスクにおいてこの能力をより良く活用するためだけでなく、この能力に付随して生じる可能性のある、真実性、偏り、毒性に関する懸念を含む潜在的なリスクを事前に特定し、軽減するためでもある。本稿では、文脈内学習の解釈と分析に関する徹底的なサーベイを行う。まず、文脈内学習の背景と定義について簡潔に紹介する。次に、2つの観点から進歩の概要を説明する:1)理論的な観点から、メカニズム的な解釈可能性に関する研究を強調し、ICLの背後にある数学的基礎を掘り下げる。最後に、遭遇した課題を強調し、今後の研究の可能性を示唆する。我々の研究は、インコンテクスト学習の解釈をさらに探求するための基礎を確立するものであると確信している。さらに、我々の調査で参照されたリソースを含むリポジトリを作成した。

要約(オリジナル)

Understanding in-context learning (ICL) capability that enables large language models (LLMs) to excel in proficiency through demonstration examples is of utmost importance. This importance stems not only from the better utilization of this capability across various tasks, but also from the proactive identification and mitigation of potential risks, including concerns regarding truthfulness, bias, and toxicity, that may arise alongside the capability. In this paper, we present a thorough survey on the interpretation and analysis of in-context learning. First, we provide a concise introduction to the background and definition of in-context learning. Then, we give an overview of advancements from two perspectives: 1) a theoretical perspective, emphasizing studies on mechanistic interpretability and delving into the mathematical foundations behind ICL; and 2) an empirical perspective, concerning studies that empirically analyze factors associated with ICL. We conclude by highlighting the challenges encountered and suggesting potential avenues for future research. We believe that our work establishes the basis for further exploration into the interpretation of in-context learning. Additionally, we have created a repository containing the resources referenced in our survey.

arxiv情報

著者 Yuxiang Zhou,Jiazheng Li,Yanzheng Xiang,Hanqi Yan,Lin Gui,Yulan He
発行日 2024-10-03 17:25:02+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.CL | コメントする

Turning English-centric LLMs Into Polyglots: How Much Multilinguality Is Needed?

要約

今日の大規模言語モデル(LLM)の大部分は英語中心であり、主に英語のテキストで事前学習されている。しかし、ユーザーの期待に応えるためには、下流のアプリケーションに導入された時点で、モデルが多言語で適切に応答できる必要がある。これには、強力なクロスリンガル転送能力が必要である。本研究では、英語中心のLLMにおいて、言語横断的な汎化を引き出すために、ファインチューニング中に必要な最小限の多言語性を調査する。4つのLLMを用いた実験では、効果的な言語間汎化を引き出すためには、2~3言語程度の多言語指導チューニングが必要かつ十分であることがわかった。さらに、5つの異なるタスクでの評価により、多言語命令チューニングは、チャット設定のような入出力言語の一致を前提とする生成タスクで最も有益である一方、高度に構造化された分類スタイルのタスクではあまり重要ではないことが明らかになった。我々のコードとデータはhttps://github.com/ZurichNLP/multilingual-instruction-tuning。

要約(オリジナル)

The vast majority of today’s large language models (LLMs) are English-centric, having been pretrained predominantly on English text. Yet, in order to meet user expectations, models need to be able to respond appropriately in multiple languages once deployed in downstream applications. This requires strong cross-lingual transfer abilities. In this work, we investigate the minimal amount of multilinguality required during finetuning to elicit cross-lingual generalisation in English-centric LLMs. In experiments across four LLMs, we find that multilingual instruction tuning with as few as two to three languages is both necessary and sufficient to elicit effective cross-lingual generalisation, with the limiting factor being the degree to which a target language is seen during pretraining. Evaluations on five different tasks further reveal that multilingual instruction tuning is most beneficial for generative tasks that assume input/output language agreement, such as in chat settings, while being of less importance for highly structured classification-style tasks. Our code and data is available at https://github.com/ZurichNLP/multilingual-instruction-tuning.

arxiv情報

著者 Tannon Kew,Florian Schottmann,Rico Sennrich
発行日 2024-10-03 17:27:28+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.CL | コメントする

UncertaintyRAG: Span-Level Uncertainty Enhanced Long-Context Modeling for Retrieval-Augmented Generation

要約

我々は、テキストチャンク間の類似性を推定するために、信号対雑音比(SNR)に基づくスパンの不確実性を利用する、ロングコンテキストのRAG(Retrieval-Augmented Generation)のための新しいアプローチであるUncertaintyRAGを発表する。このスパンの不確実性はモデルの較正を強化し、頑健性を向上させ、ランダムチャンキングによってもたらされる意味的矛盾を緩和する。この洞察を活用し、効果的なデータサンプリングとスケーリング戦略とともに、検索モデルを学習するための効率的な教師なし学習技術を提案する。UncertaintyRAGは、LLaMA-2-7Bにおいてベースラインを2.03%上回り、分布シフト設定下で他の先進的なオープンソース検索モデルと比較して、わずか4%の学習データを使用しながら最先端の結果を達成した。本手法は、スパンの不確かさを通して強力な適合性を示し、ロングコンテキストのRAGタスクにおける汎化と頑健性の向上につながる。さらに、UncertaintyRAGは、微調整の必要なく、様々なコンテキストウィンドウ長を持つ大規模言語モデルに統合可能な軽量検索モデルを提供し、我々のアプローチの柔軟性を示す。

要約(オリジナル)

We present UncertaintyRAG, a novel approach for long-context Retrieval-Augmented Generation (RAG) that utilizes Signal-to-Noise Ratio (SNR)-based span uncertainty to estimate similarity between text chunks. This span uncertainty enhances model calibration, improving robustness and mitigating semantic inconsistencies introduced by random chunking. Leveraging this insight, we propose an efficient unsupervised learning technique to train the retrieval model, alongside an effective data sampling and scaling strategy. UncertaintyRAG outperforms baselines by 2.03% on LLaMA-2-7B, achieving state-of-the-art results while using only 4% of the training data compared to other advanced open-source retrieval models under distribution shift settings. Our method demonstrates strong calibration through span uncertainty, leading to improved generalization and robustness in long-context RAG tasks. Additionally, UncertaintyRAG provides a lightweight retrieval model that can be integrated into any large language model with varying context window lengths, without the need for fine-tuning, showcasing the flexibility of our approach.

arxiv情報

著者 Zixuan Li,Jing Xiong,Fanghua Ye,Chuanyang Zheng,Xun Wu,Jianqiao Lu,Zhongwei Wan,Xiaodan Liang,Chengming Li,Zhenan Sun,Lingpeng Kong,Ngai Wong
発行日 2024-10-03 17:39:38+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.CL | コメントする

Grounding Large Language Models In Embodied Environment With Imperfect World Models

要約

様々なアプリケーションで広く成功を収めているにもかかわらず、大規模言語モデル(LLM)は、現実世界の物理的なニュアンスに対する直接的な経験が不足しているため、基本的な物理推論やロボティクスタスクの実行に取り組む際につまずくことが多い。このような問題に対処するため、我々は、シミュレータのような代理世界モデルを利用し、トライングデータを収集・合成するGLIMO(Grounding Large language model with Imperfect world MOdel)を提案する。GLIMOはLLMエージェントベースのデータジェネレータを組み込み、高品質で多様な命令データセットを自動的に作成する。この生成器には、時間的に一貫性のある経験サンプリングのための反復的な自己精錬モジュール、多様な質問応答インストラクションのシードセット、および過去の経験を反映するための検索補強型生成モジュールが含まれる。包括的な実験により、我々のアプローチが、LLaMA-3のような強力なオープンソースLLMの性能を向上させ、3つの異なるベンチマークでそれぞれ2.04 $times$、1.54 $times$、1.82 $times$の性能向上を示した。この性能は、GPT-4のような大規模なLLMに匹敵するか、凌駕する。

要約(オリジナル)

Despite a widespread success in various applications, large language models (LLMs) often stumble when tackling basic physical reasoning or executing robotics tasks, due to a lack of direct experience with the physical nuances of the real world. To address these issues, we propose a Grounding Large language model with Imperfect world MOdel (GLIMO), which utilizes proxy world models such as simulators to collect and synthesize trining data. GLIMO incorporates an LLM agent-based data generator to automatically create high-quality and diverse instruction datasets. The generator includes an iterative self-refining module for temporally consistent experience sampling, a diverse set of question-answering instruction seeds, and a retrieval-augmented generation module for reflecting on prior experiences. Comprehensive experiments show that our approach improve the performance of strong open-source LLMs like LLaMA-3 with a performance boost of 2.04 $\times$, 1.54 $\times$, and 1.82 $\times$ across three different benchmarks, respectively. The performance is able to compete with or surpass their larger counterparts such as GPT-4.

arxiv情報

著者 Haolan Liu,Jishen Zhao
発行日 2024-10-03 17:55:09+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.CL, cs.LG, cs.RO | コメントする

MA-RLHF: Reinforcement Learning from Human Feedback with Macro Actions

要約

人間のフィードバックからの強化学習(RLHF)は、大規模言語モデル(LLM)を人間の嗜好に合わせる上で有効であることが実証されている。しかし、トークンレベルのRLHFは、長いシーケンスにおける単位割り当ての問題に悩まされている。この問題では、報酬の遅延により、モデルがどの行動が成功した結果に貢献したかを識別することが困難になる。これは学習効率を妨げ、収束を遅らせる。本論文では、シンプルで効果的なRLHFフレームワークであるMA-RLHFを提案する。MA-RLHFは、学習プロセスにマクロアクション(トークンのシーケンスやより高レベルの言語構成要素)を組み込む。この高い抽象化レベルで動作することで、我々のアプローチは行動と報酬の間の時間的距離を縮め、より高速で正確な与信割り当てを容易にする。この結果、より安定した政策勾配の推定が可能となり、各エピソード内での学習効率が向上する。我々は、テキスト要約、対話生成、質問応答、プログラム合成を含む、様々なモデルサイズとタスクにわたる広範な実験を通して、我々のアプローチを検証する。我々の手法は標準的なRLHFと比較して大幅な性能向上を達成し、テキスト要約とコード生成で最大30%、対話で18%、質問応答タスクで8%の性能向上を達成した。特筆すべきは、我々の手法は、学習時間において、標準的なRLHFの1.7倍から2倍の速さで同等に達し、さらに学習を進めることでそれを上回り続けることである。我々のコードとデータは https://github.com/ernie-research/MA-RLHF で公開される予定である。

要約(オリジナル)

Reinforcement learning from human feedback (RLHF) has demonstrated effectiveness in aligning large language models (LLMs) with human preferences. However, token-level RLHF suffers from the credit assignment problem over long sequences, where delayed rewards make it challenging for the model to discern which actions contributed to successful outcomes. This hinders learning efficiency and slows convergence. In this paper, we propose MA-RLHF, a simple yet effective RLHF framework that incorporates macro actions — sequences of tokens or higher-level language constructs — into the learning process. By operating at this higher level of abstraction, our approach reduces the temporal distance between actions and rewards, facilitating faster and more accurate credit assignment. This results in more stable policy gradient estimates and enhances learning efficiency within each episode, all without increasing computational complexity during training or inference. We validate our approach through extensive experiments across various model sizes and tasks, including text summarization, dialogue generation, question answering, and program synthesis. Our method achieves substantial performance improvements over standard RLHF, with performance gains of up to 30% in text summarization and code generation, 18% in dialogue, and 8% in question answering tasks. Notably, our approach reaches parity with vanilla RLHF 1.7x to 2x faster in terms of training time and continues to outperform it with further training. We will make our code and data publicly available at https://github.com/ernie-research/MA-RLHF .

arxiv情報

著者 Yekun Chai,Haoran Sun,Huang Fang,Shuohuan Wang,Yu Sun,Hua Wu
発行日 2024-10-03 17:55:13+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.CL | コメントする

PharmacyGPT: The AI Pharmacist

要約

本研究では、臨床薬剤師の役割をエミュレートするためのChatGPTやGPT-4などの大規模言語モデル(LLM)の能力を評価するための新しいフレームワークであるPharmacyGPTを紹介する。我々の方法論は、理解可能な患者クラスタを生成し、投薬計画を策定し、患者の転帰を予測するためのLLMの利用を包含する。我々は、ノースカロライナ大学チャペルヒル(UNC)病院の集中治療室(ICU)から取得した実際のデータを用いて調査を行った。我々の分析は、臨床薬学の分野におけるLLMの潜在的な応用と限界について貴重な洞察を提供し、患者ケアと将来のAI駆動型ヘルスケアソリューションの開発の両方に示唆を与える。PharmacyGPTのパフォーマンスを評価することで、医療現場における人工知能の統合を取り巻く進行中の議論に貢献し、最終的にはそのような技術の責任ある効率的な使用を促進することを目指しています。

要約(オリジナル)

In this study, we introduce PharmacyGPT, a novel framework to assess the capabilities of large language models (LLMs) such as ChatGPT and GPT-4 in emulating the role of clinical pharmacists. Our methodology encompasses the utilization of LLMs to generate comprehensible patient clusters, formulate medication plans, and forecast patient outcomes. We conduct our investigation using real data acquired from the intensive care unit (ICU) at the University of North Carolina Chapel Hill (UNC) Hospital. Our analysis offers valuable insights into the potential applications and limitations of LLMs in the field of clinical pharmacy, with implications for both patient care and the development of future AI-driven healthcare solutions. By evaluating the performance of PharmacyGPT, we aim to contribute to the ongoing discourse surrounding the integration of artificial intelligence in healthcare settings, ultimately promoting the responsible and efficacious use of such technologies.

arxiv情報

著者 Zhengliang Liu,Zihao Wu,Mengxuan Hu,Bokai Zhao,Lin Zhao,Tianyi Zhang,Haixing Dai,Xianyan Chen,Ye Shen,Sheng Li,Quanzheng Li,Xiang Li,Brian Murray,Tianming Liu,Andrea Sikora
発行日 2024-10-03 17:55:29+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.CL | コメントする

On Training Data Influence of GPT Models

要約

生成言語モデルの急速な進歩の中で、学習データがGPTモデルの性能をどのように形成するかについての研究はまだ新しい。本論文では、GPTモデルの学習ダイナミクスに対する学習例の影響を評価するために、特徴化シミュレーションを活用した新しいアプローチであるGPTfluenceを紹介する。本アプローチは、個々の訓練例が、目標とするテストポイントにおける損失やその他の主要なメトリクスなどのパフォーマンス軌道に与える影響を追跡するだけでなく、1400万から28億のパラメータに及ぶGPTモデルの様々な訓練シナリオにおいて、下流タスクの範囲にわたって、既存の手法との包括的な比較を可能にする。GPTfluenceは、新しいデータへの汎化に苦戦する以前の手法とは対照的に、トレーニングダイナミクスのパラメータ化されたシミュレーションを導入し、未知のトレーニングデータへの頑健な汎化能力を実証しています。この適応性は、ファインチューニングとインストラクションチューニングの両方のシナリオにおいて、自然言語理解と生成のタスクにまたがって明らかである。我々のコードとデータは、https://github.com/ernie-research/gptfluence で公開されている。

要約(オリジナル)

Amidst the rapid advancements in generative language models, the investigation of how training data shapes the performance of GPT models is still emerging. This paper presents GPTfluence, a novel approach that leverages a featurized simulation to assess the impact of training examples on the training dynamics of GPT models. Our approach not only traces the influence of individual training instances on performance trajectories, such as loss and other key metrics, on targeted test points but also enables a comprehensive comparison with existing methods across various training scenarios in GPT models, ranging from 14 million to 2.8 billion parameters, across a range of downstream tasks. Contrary to earlier methods that struggle with generalization to new data, GPTfluence introduces a parameterized simulation of training dynamics, demonstrating robust generalization capabilities to unseen training data. This adaptability is evident across both fine-tuning and instruction-tuning scenarios, spanning tasks in natural language understanding and generation. We make our code and data publicly available at https://github.com/ernie-research/gptfluence.

arxiv情報

著者 Yekun Chai,Qingyi Liu,Shuohuan Wang,Yu Sun,Qiwei Peng,Hua Wu
発行日 2024-10-03 17:56:12+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.CL, cs.LG | コメントする

Tokenization Falling Short: The Curse of Tokenization

要約

言語モデルは通常、生テキストを事前に定義された語彙からサブワード識別子のシーケンスにトークン化するが、このプロセスは本質的に誤字脱字や長さのばらつきに敏感であり、トークンの内部構造にはほとんど気づかない。本研究では、これらの欠点を掘り下げ、大規模言語モデル(LLM)が依然としてこれらの問題の影響を受けやすいことを実証する。本研究では、(1)複雑な問題解決、(2)トークン構造のプロービング、(3)タイポグラフィの変化への耐性という3つの重要な研究課題を通して、これらの課題とLLMへの影響を系統的に調査する。その結果、モデルパラメータをスケーリングすることで、トークン化の問題を軽減できることが明らかになった。しかし、LLMは依然として、誤字やその他のテキスト形式のバリエーションによって引き起こされるバイアスに悩まされている。我々の実験は、BPE-dropoutのようなサブワード正則化がこの問題を軽減できることを示している。評価コードとデータはhttps://github.com/FloatAI/TKEval。

要約(オリジナル)

Language models typically tokenize raw text into sequences of subword identifiers from a predefined vocabulary, a process inherently sensitive to typographical errors, length variations, and largely oblivious to the internal structure of tokens–issues we term the curse of tokenization. In this study, we delve into these drawbacks and demonstrate that large language models (LLMs) remain susceptible to these problems. This study systematically investigates these challenges and their impact on LLMs through three critical research questions: (1) complex problem solving, (2) token structure probing, and (3) resilience to typographical variation. Our findings reveal that scaling model parameters can mitigate the issue of tokenization; however, LLMs still suffer from biases induced by typos and other text format variations. Our experiments show that subword regularization such as BPE-dropout can mitigate this issue. We release our evaluation code and data at https://github.com/FloatAI/TKEval.

arxiv情報

著者 Yekun Chai,Yewei Fang,Qiwei Peng,Xuhong Li
発行日 2024-10-03 17:56:34+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.CL | コメントする