Seeker: Enhancing Exception Handling in Code with LLM-based Multi-Agent Approach

要約

実際のソフトウェア開発では、例外処理が不適切または欠落していると、コードの堅牢性と信頼性に重​​大な影響を与える可能性があります。
例外処理メカニズムでは、開発者は高水準に従って例外を検出、キャプチャ、管理する必要がありますが、多くの開発者はこれらのタスクに苦労しており、コードが脆弱になる原因となっています。
この問題はオープンソース プロジェクトで特に顕著であり、ソフトウェア エコシステムの全体的な品質に影響を与えます。
この課題に対処するために、コード内の例外処理を改善するための大規模言語モデル (LLM) の使用を検討します。
広範な分析を通じて、脆弱なコードの鈍感な検出、例外タイプの不正確なキャプチャ、および歪んだ処理ソリューションという 3 つの重要な問題を特定しました。
これらの問題は現実世界のリポジトリ全体に広がっており、堅牢な例外処理の実践がしばしば見落とされたり、誤って処理されたりしていることを示唆しています。
これに応えて、私たちは例外処理のための専門開発者の戦略からインスピレーションを得たマルチエージェント フレームワークである Seeker を提案します。
Seeker は、Scanner、Detector、Predator、Ranker、および Handler のエージェントを使用して、LLM による例外のより効果的な検出、キャプチャ、解決を支援します。
私たちの研究は、LLM を活用して例外処理の実践を強化することに関する最初の体系的な研究であり、将来のコードの信頼性向上に役立つ貴重な洞察を提供します。

要約(オリジナル)

In real world software development, improper or missing exception handling can severely impact the robustness and reliability of code. Exception handling mechanisms require developers to detect, capture, and manage exceptions according to high standards, but many developers struggle with these tasks, leading to fragile code. This problem is particularly evident in open source projects and impacts the overall quality of the software ecosystem. To address this challenge, we explore the use of large language models (LLMs) to improve exception handling in code. Through extensive analysis, we identify three key issues: Insensitive Detection of Fragile Code, Inaccurate Capture of Exception Types, and Distorted Handling Solutions. These problems are widespread across real world repositories, suggesting that robust exception handling practices are often overlooked or mishandled. In response, we propose Seeker, a multi agent framework inspired by expert developer strategies for exception handling. Seeker uses agents: Scanner, Detector, Predator, Ranker, and Handler to assist LLMs in detecting, capturing, and resolving exceptions more effectively. Our work is the first systematic study on leveraging LLMs to enhance exception handling practices, providing valuable insights for future improvements in code reliability.

arxiv情報

著者 Xuanming Zhang,Yuxuan Chen,Yuan Yuan,Minlie Huang
発行日 2024-10-09 14:45:45+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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

Understanding Higher-Order Correlations Among Semantic Components in Embeddings

要約

独立コンポーネント分析 (ICA) は、埋め込みの解釈可能なセマンティック コンポーネントを提供します。
ICA 理論では、エンベディングが独立したコンポーネントに線形に分解できると想定していますが、実際のデータはこの前提を満たさないことがよくあります。
その結果、推定されたコンポーネント間には非独立性が残り、ICA ではそれを除去することができません。
私たちは高次の相関を使用してこれらの非独立性を定量化し、2 つのコンポーネント間の高次の相関が大きい場合、それはそれらの間に強い意味的関連性があり、両方のコンポーネントと共通の意味を共有する多くの単語が存在することを示していることを実証しました。
非独立性の構造全体は、セマンティック コンポーネントの最大スパニング ツリーを使用して視覚化されました。
これらの調査結果は、ICA を介した埋め込みに関するより深い洞察を提供します。

要約(オリジナル)

Independent Component Analysis (ICA) offers interpretable semantic components of embeddings. While ICA theory assumes that embeddings can be linearly decomposed into independent components, real-world data often do not satisfy this assumption. Consequently, non-independencies remain between the estimated components, which ICA cannot eliminate. We quantified these non-independencies using higher-order correlations and demonstrated that when the higher-order correlation between two components is large, it indicates a strong semantic association between them, along with many words sharing common meanings with both components. The entire structure of non-independencies was visualized using a maximum spanning tree of semantic components. These findings provide deeper insights into embeddings through ICA.

arxiv情報

著者 Momose Oyama,Hiroaki Yamagiwa,Hidetoshi Shimodaira
発行日 2024-10-09 14:57:48+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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

Linguistic Structure from a Bottleneck on Sequential Information Processing

要約

人間の言語は自然界における独特のコミュニケーション形式であり、その構造的な性質によって特徴付けられます。
最も基本的に、それは体系的であり、信号を個別に意味のある構成要素 (大まかに単語) に分解でき、それらが規則的な方法で結合されて文を形成できることを意味します。
さらに、これらの部分を組み合わせる方法には、一種の局所性が維持されます。通常、単語は互いに連結され、連続したフレーズを形成し、文の関連する部分が互いに近くに保たれます。
私たちは、言語のこれらの基本的な特性が、情報処理の制約の下での効率的なコミュニケーションのより広範な原則からどのように生じるかを理解するという課題に取り組みます。
今回我々は、自然言語のような系統性が、予測情報、つまり未来を予測するためにシーケンスの過去から抽出しなければならない情報量の尺度によって制約されるコードで生じることを示す。
シミュレーションでは、このようなコードがソース分布を近似的に因数分解し、結果の因子を体系的かつ局所的に表現できることを示します。
次に、一連の言語間コーパス研究で、人間の言語は音韻論、形態論、構文論、意味論のレベルで予測情報が少ない構造になっていることが示されました。
私たちの結果は、人間の言語が、表現する必要のある意味の統計的分布に関して、逐次的かつ離散的な形式の独立成分分析を実行していることを示唆しています。
それは人間の言語の統計的構造と代数的構造の間のつながりを確立し、人間の言語の構造は認知的制約の下でのコミュニケーションによって形成されるという考えを強化します。

要約(オリジナル)

Human language is a unique form of communication in the natural world, distinguished by its structured nature. Most fundamentally, it is systematic, meaning that signals can be broken down into component parts that are individually meaningful — roughly, words — which are combined in a regular way to form sentences. Furthermore, the way in which these parts are combined maintains a kind of locality: words are usually concatenated together, and they form contiguous phrases, keeping related parts of sentences close to each other. We address the challenge of understanding how these basic properties of language arise from broader principles of efficient communication under information processing constraints. Here we show that natural-language-like systematicity arises in codes that are constrained by predictive information, a measure of the amount of information that must be extracted from the past of a sequence in order to predict its future. In simulations, we show that such codes approximately factorize their source distributions, and then express the resulting factors systematically and locally. Next, in a series of cross-linguistic corpus studies, we show that human languages are structured to have low predictive information at the levels of phonology, morphology, syntax, and semantics. Our result suggests that human language performs a sequential, discrete form of Independent Components Analysis on the statistical distribution over meanings that need to be expressed. It establishes a link between the statistical and algebraic structure of human language, and reinforces the idea that the structure of human language is shaped by communication under cognitive constraints.

arxiv情報

著者 Richard Futrell,Michael Hahn
発行日 2024-10-09 15:25:25+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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

Diversify, Rationalize, and Combine: Ensembling Multiple QA Strategies for Zero-shot Knowledge-based VQA

要約

知識ベースの視覚的質問応答 (K-VQA) では、多くの場合、画像を超えた背景知識の使用が必要です。
しかし、単一の知識生成戦略では、K-VQA のすべての質問に対して不十分な場合が多いことがわかりました。
この目的を達成するために、私たちは、補完的な質問応答戦術のバンドルを利用し、テキストの根拠を使用して回答を集約する、多様化、証拠の切り捨て、知識ベースの解明のための組み合わせ (DietCoke) を提案します。
DietCoke は、多様化、合理化、アンサンブルの 3 つの段階で構成されます。
多様化ステージでは 3 つの独特な意思決定コンテキストが生成され、それぞれが独自の回答候補につながります。
合理化ステージでは、無相関化手法を使用して、回答候補ごとに 2 つの理論的根拠、自動的理論的根拠と機械的理論的根拠を生成します。
最後に、アンサンブル段階では、論理的根拠を知らされた LLM が 3 つの候補から 1 つの回答を選択します。
実験の結果、DietCoke は最先端の LLM ベースのベースラインを OK-VOA で 2.8%、A-OKVOA で 4.7% 大幅に上回っており、アンサンブルの戦略は高度に補完的であることが示されています。
コードはhttps://github.com/limiaoyu/DietCokeから入手できます。

要約(オリジナル)

Knowledge-based Visual Question-answering (K-VQA) often requires the use of background knowledge beyond the image. However, we discover that a single knowledge generation strategy is often insufficient for all K-VQA questions. To this end, we propose Diversification, Evidence Truncation, and Combination for Knowledge-based Elucidation (DietCoke), which utilizes a bundle of complementary question-answering tactics and aggregates their answers using textual rationales. DietCoke comprises of three stages: diversification, rationalization, and ensemble. The diversification stage generates three distinctive decision contexts, each leading to its own answer candidate. The rationalization stage generates two rationales, the automatic rationale and the mechanistic rationale, for each answer candidate using decorrelated techniques. Finally, in the ensemble stage, an LLM informed by the rationales selects one answer from the three candidates. Experiments show that DietCoke significantly outperforms state-of-the-art LLM-based baselines by 2.8% on OK-VOA and 4.7% on A-OKVOA and that the strategies in the ensembles are highly complementary. Code is available at: https://github.com/limiaoyu/DietCoke

arxiv情報

著者 Miaoyu Li,Haoxin Li,Zilin Du,Boyang Li
発行日 2024-10-09 16:04:39+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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

Vocabulary Transfer for Medical Texts

要約

特定の NLP サブドメイン内での作業には、主に永続的なデータ不足が原因で、重大な課題が生じます。
プライバシーへの厳しい懸念とデータへのアクセスの制限が、この不足を引き起こすことがよくあります。
さらに、医療分野では高い精度が要求されるため、モデルのパフォーマンスがわずかに改善されただけでも大きな影響を与える可能性があります。
この研究では、生物医学 NLP タスクにおけるモデルのパフォーマンスを向上させる語彙伝達の可能性を調査します。
具体的には、対象語彙を拡張して領域固有の生物医学用語を組み込む手法である語彙拡張に焦点を当てています。
私たちの調査結果は、語彙の拡張が下流モデルのパフォーマンスと推論時間の両方に目に見える改善をもたらすことを示しています。

要約(オリジナル)

Working within specific NLP subdomains presents significant challenges, primarily due to a persistent deficit of data. Stringent privacy concerns and limited data accessibility often drive this shortage. Additionally, the medical domain demands high accuracy, where even marginal improvements in model performance can have profound impacts. In this study, we investigate the potential of vocabulary transfer to enhance model performance in biomedical NLP tasks. Specifically, we focus on vocabulary extension, a technique that involves expanding the target vocabulary to incorporate domain-specific biomedical terms. Our findings demonstrate that vocabulary extension, leads to measurable improvements in both downstream model performance and inference time.

arxiv情報

著者 Priyanka Singh,Vladislav D. Mosin,Ivan P. Yamshchikov
発行日 2024-10-09 16:07:04+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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

Robots in the Middle: Evaluating LLMs in Dispute Resolution

要約

調停は、個人間の紛争の解決を支援するために中立的な第三者(調停者)が介入する紛争解決方法です。
この論文では、大規模言語モデル (LLM) がどの程度仲介者として機能できるかを調査します。
私たちは、LLM が紛争の会話を分析し、適切な介入タイプを選択し、適切な介入メッセージを生成できるかどうかを調査します。
50 の紛争シナリオからなる手動で作成された新しいデータセットを使用して、いくつかの主要な指標にわたって LLM とヒューマン アノテーターを比較するブラインド評価を実施します。
全体として、LLM は優れたパフォーマンスを示し、あらゆる次元でヒューマン アノテーターをも上回りました。
具体的には、ケースの 62% で、LLM は人間が選択した介入タイプよりも優れているか同等であると評価された介入タイプを選択しました。
さらに、84% のケースで、LLM によって生成された介入メッセージは、人間が作成した介入メッセージと同等かそれ以上であると評価されました。
LLM も同様に、公平性、理解、文脈化などの指標において良好なパフォーマンスを示しました。
私たちの結果は、オンライン紛争解決 (ODR) プラットフォームに AI を統合する可能性を示しています。

要約(オリジナル)

Mediation is a dispute resolution method featuring a neutral third-party (mediator) who intervenes to help the individuals resolve their dispute. In this paper, we investigate to which extent large language models (LLMs) are able to act as mediators. We investigate whether LLMs are able to analyze dispute conversations, select suitable intervention types, and generate appropriate intervention messages. Using a novel, manually created dataset of 50 dispute scenarios, we conduct a blind evaluation comparing LLMs with human annotators across several key metrics. Overall, the LLMs showed strong performance, even outperforming our human annotators across dimensions. Specifically, in 62% of the cases, the LLMs chose intervention types that were rated as better than or equivalent to those chosen by humans. Moreover, in 84% of the cases, the intervention messages generated by the LLMs were rated as better than or equal to the intervention messages written by humans. LLMs likewise performed favourably on metrics such as impartiality, understanding and contextualization. Our results demonstrate the potential of integrating AI in online dispute resolution (ODR) platforms.

arxiv情報

著者 Jinzhe Tan,Hannes Westermann,Nikhil Reddy Pottanigari,Jaromír Šavelka,Sébastien Meeùs,Mia Godet,Karim Benyekhlef
発行日 2024-10-09 16:51:10+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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

Mitigating the Language Mismatch and Repetition Issues in LLM-based Machine Translation via Model Editing

要約

大規模言語モデル (LLM) は最近 NLP 分野に革命をもたらしましたが、一部の特定の下流タスクではまだ不十分です。
この研究では、LLM を利用して機械翻訳を実行することに焦点を当てています。その結果、言語の不一致と反復という 2 つのパターンのエラーが頻繁に発生し、翻訳品質に大きな影響を与えることが観察されました。
この研究は、モデル編集手法を活用することによって、たとえば、エラーの原因となるフィードフォワード ネットワーク (FFN) ニューロンなどを特定し、推論時間中にそれらを非アクティブ化することによって、これら 2 つの問題を軽減する可能性を探ることを目的としています。
このような方法を直接適用すると、対象となるエラーに対する効果が限定的になるか、一般的な翻訳品質に重大な悪影響が生じることがわかりました。これは、レール上の LLM による機械翻訳を確実にするためには、位置特定されたコンポーネントも重要である可能性があることを示しています。
この目的を達成するために、さまざまな言語設定で位置特定結果の共通部分を取得し、対象となるエラーに無関係な前述の情報をフィルタリングして、特定されたコンポーネントを絞り込むことを提案します。
実験結果は、私たちの方法が言語の不一致と反復率を効果的に削減し、同時にほとんどの場合、一般的な翻訳品質を向上または維持できることを経験的に示しています。

要約(オリジナル)

Large Language Models (LLMs) have recently revolutionized the NLP field, while they still fall short in some specific down-stream tasks. In the work, we focus on utilizing LLMs to perform machine translation, where we observe that two patterns of errors frequently occur and drastically affect the translation quality: language mismatch and repetition. The work sets out to explore the potential for mitigating these two issues by leveraging model editing methods, e.g., by locating Feed-Forward Network (FFN) neurons or something that are responsible for the errors and deactivating them in the inference time. We find that directly applying such methods either limited effect on the targeted errors or has significant negative side-effect on the general translation quality, indicating that the located components may also be crucial for ensuring machine translation with LLMs on the rails. To this end, we propose to refine the located components by fetching the intersection of the locating results under different language settings, filtering out the aforementioned information that is irrelevant to targeted errors. The experiment results empirically demonstrate that our methods can effectively reduce the language mismatch and repetition ratios and meanwhile enhance or keep the general translation quality in most cases.

arxiv情報

著者 Weichuan Wang,Zhaoyi Li,Defu Lian,Chen Ma,Linqi Song,Ying Wei
発行日 2024-10-09 16:51:21+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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

Predictability maximization and the origins of word order harmony

要約

私たちは、情報理論の観点から、頭部とその従属部分の順序配置に関する言語問題に取り組みます。
特に、シーケンスの予測可能性を最大化するヘッドの最適な配置を考慮します。
自由選択の原則と依存関係文法の中核となる仮定に従って、依存関係はヘッドが与えられた場合に統計的に独立していると仮定します。
我々は、高調波次数の最適性を実証します。つまり、ヘッドを最後に配置すると、ヘッドの予測可能性が最大化され、一方、ヘッドを最初に配置すると、依存関係の予測可能性が最大化されます。
また、ヘッドを延期することがその予測可能性を最大化するための最適な戦略であり、ヘッドを前倒しすることが依存関係の予測可能性を最大化するための最適な戦略であることも示します。
依存関係の予測可能性を最大化するよりも、ヘッドの予測可能性を最大化する戦略の利点を解明します。
私たちの発見は、実際の言語で採用されている、またはさまざまな種類の実験で現れている頭の配置に光を当てます。

要約(オリジナル)

We address the linguistic problem of the sequential arrangement of a head and its dependents from an information theoretic perspective. In particular, we consider the optimal placement of a head that maximizes the predictability of the sequence. We assume that dependents are statistically independent given a head, in line with the open-choice principle and the core assumptions of dependency grammar. We demonstrate the optimality of harmonic order, i.e., placing the head last maximizes the predictability of the head whereas placing the head first maximizes the predictability of dependents. We also show that postponing the head is the optimal strategy to maximize its predictability while bringing it forward is the optimal strategy to maximize the predictability of dependents. We unravel the advantages of the strategy of maximizing the predictability of the head over maximizing the predictability of dependents. Our findings shed light on the placements of the head adopted by real languages or emerging in different kinds of experiments.

arxiv情報

著者 Ramon Ferrer-i-Cancho
発行日 2024-10-09 16:52:19+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, physics.soc-ph, q-bio.NC | コメントする

Data Selection via Optimal Control for Language Models

要約

この研究では、下流で使用するための LM の機能を強化するために、大量のコーパスから高品質の事前トレーニング データを選択する方法を調査します。
データ選択を一般化された最適制御問題として定式化します。これはポントリャギンの最大原理 (PMP) によって理論的に解決でき、最適なデータ選択と LM トレーニング ダイナミクスの間の関係を特徴付ける一連の必要な条件が得られます。
これらの理論的結果に基づいて、PMP 条件を解決することで最適なデータ選択を近似するフレームワークである PMP ベースのデータ選択 (PDS) を紹介します。
私たちの実験では、PDS を採用して CommonCrawl からデータを選択し、PDS で選択されたコーパスが LM の学習を加速し、さまざまなモデル サイズにわたる幅広い下流タスクでパフォーマンスを常に向上させることを示しました。
さらに、PDS の利点は、スケーリング則に従ったテスト損失曲線の外挿によって証明されているように、約 10T トークンでトレーニングされた約 400B モデルまで拡張されます。
また、PDS は、事前トレーニング データが制限されている場合でも、データ需要を 1.8 分の 1 に削減することでデータ利用率を向上させ、Web クロールされた利用可能なコーパスの急速な枯渇を軽減します。
コード、データ、モデルのチェックポイントは、https://github.com/microsoft/LMOps/tree/main/data_selection にあります。

要約(オリジナル)

This work investigates the selection of high-quality pre-training data from massive corpora to enhance LMs’ capabilities for downstream usage. We formulate data selection as a generalized Optimal Control problem, which can be solved theoretically by Pontryagin’s Maximum Principle (PMP), yielding a set of necessary conditions that characterize the relationship between optimal data selection and LM training dynamics. Based on these theoretical results, we introduce PMP-based Data Selection (PDS), a framework that approximates optimal data selection by solving the PMP conditions. In our experiments, we adopt PDS to select data from CommmonCrawl and show that the PDS-selected corpus accelerates the learning of LMs and constantly boosts their performance on a wide range of downstream tasks across various model sizes. Moreover, the benefits of PDS extend to ~400B models trained on ~10T tokens, as evidenced by the extrapolation of the test loss curves according to the Scaling Laws. PDS also improves data utilization when the pre-training data is limited, by reducing the data demand by 1.8 times, which mitigates the quick exhaustion of available web-crawled corpora. Our code, data, and model checkpoints can be found in https://github.com/microsoft/LMOps/tree/main/data_selection.

arxiv情報

著者 Yuxian Gu,Li Dong,Hongning Wang,Yaru Hao,Qingxiu Dong,Furu Wei,Minlie Huang
発行日 2024-10-09 17:06:57+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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

Counterfactuals As a Means for Evaluating Faithfulness of Attribution Methods in Autoregressive Language Models

要約

自己回帰言語モデルが広く採用されているにもかかわらず、説明可能性評価の研究は主にスパン埋め込みとマスクされた言語モデルに焦点を当ててきました。
説明方法の忠実性、つまりモデルの内部動作と意思決定をどの程度正確に説明しているかを評価することは、モデルをその説明から分離することが難しいため、困難です。
ほとんどの忠実度評価手法は、特定の属性 (特徴の重要度) メソッドによって重要とみなされる入力トークンを破損または削除し、その結果として生じるモデルの出力の変化を観察します。
ただし、自己回帰言語モデルの場合、このアプローチでは次のトークンの予測トレーニング目的により分布外の入力が作成されます。
この研究では、反事実生成を利用して自己回帰言語モデルの帰属方法の忠実性を評価する手法を提案します。
私たちの技術は、流暢な分布内の反事実を生成し、評価プロトコルの信頼性を高めます。

要約(オリジナル)

Despite the widespread adoption of autoregressive language models, explainability evaluation research has predominantly focused on span infilling and masked language models. Evaluating the faithfulness of an explanation method — how accurately it explains the inner workings and decision-making of the model — is challenging because it is difficult to separate the model from its explanation. Most faithfulness evaluation techniques corrupt or remove input tokens deemed important by a particular attribution (feature importance) method and observe the resulting change in the model’s output. However, for autoregressive language models, this approach creates out-of-distribution inputs due to their next-token prediction training objective. In this study, we propose a technique that leverages counterfactual generation to evaluate the faithfulness of attribution methods for autoregressive language models. Our technique generates fluent, in-distribution counterfactuals, making the evaluation protocol more reliable.

arxiv情報

著者 Sepehr Kamahi,Yadollah Yaghoobzadeh
発行日 2024-10-09 17:12:50+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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