RoCoIns: Enhancing Robustness of Large Language Models through Code-Style Instructions

要約

大規模言語モデル (LLM) は、人間の指示に従う際に優れた機能を示しています。
しかし、最近の研究では、テキストの敵対的サンプルを組み合わせた命令でプロンプトが表示された場合の LLM の堅牢性についての懸念が生じています。
この論文では、LLM が命令の設計に敏感であるという最近の研究からインスピレーションを得て、より構造的で曖昧さの少ないコード スタイルの命令を利用して、一般的な自然言語命令を置き換えます。
この変換により、LLM により正確な命令が提供され、LLM の堅牢性が強化されます。
さらに、数ショットのシナリオの下で、LLM の堅牢性をさらに高めるために、クリーン サンプルと敵対的サンプルの両方を使用してコンテキスト内のデモンストレーションを構成する新しい方法 (\textit{敵対的コンテキスト メソッド}) を提案します。
8 つの堅牢性データセットでの実験では、私たちの方法が自然言語命令による LLM のプロンプトよりも一貫して優れていることが示されています。
たとえば、gpt-3.5-turbo を使用すると、テスト セットの精度が 5.68\% 向上し、攻撃成功率 (ASR) が 5.66 ポイント減少しました。

要約(オリジナル)

Large Language Models (LLMs) have showcased remarkable capabilities in following human instructions. However, recent studies have raised concerns about the robustness of LLMs when prompted with instructions combining textual adversarial samples. In this paper, drawing inspiration from recent works that LLMs are sensitive to the design of the instructions, we utilize instructions in code style, which are more structural and less ambiguous, to replace typically natural language instructions. Through this conversion, we provide LLMs with more precise instructions and strengthen the robustness of LLMs. Moreover, under few-shot scenarios, we propose a novel method to compose in-context demonstrations using both clean and adversarial samples (\textit{adversarial context method}) to further boost the robustness of the LLMs. Experiments on eight robustness datasets show that our method consistently outperforms prompting LLMs with natural language instructions. For example, with gpt-3.5-turbo, our method achieves an improvement of 5.68\% in test set accuracy and a reduction of 5.66 points in Attack Success Rate (ASR).

arxiv情報

著者 Yuansen Zhang,Xiao Wang,Zhiheng Xi,Han Xia,Tao Gui,Qi Zhang,Xuanjing Huang
発行日 2024-02-26 09:30:55+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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