[论文解读] PromptRobust: Towards Evaluating the Robustness of Large Language Models on Adversarial Prompts
本文提出 PromptBench,一个鲁棒性基准,用于评估大型语言模型在字符、单词、句子和语义层级设计的对抗性提示下的韧性,涵盖8个任务和13个数据集,总计4,788个对抗性提示;它分析跨模型迁移性、提示类型,并提供鲁棒提示设计指导。
The increasing reliance on Large Language Models (LLMs) across academia and industry necessitates a comprehensive understanding of their robustness to prompts. In response to this vital need, we introduce PromptRobust, a robustness benchmark designed to measure LLMs' resilience to adversarial prompts. This study uses a plethora of adversarial textual attacks targeting prompts across multiple levels: character, word, sentence, and semantic. The adversarial prompts, crafted to mimic plausible user errors like typos or synonyms, aim to evaluate how slight deviations can affect LLM outcomes while maintaining semantic integrity. These prompts are then employed in diverse tasks including sentiment analysis, natural language inference, reading comprehension, machine translation, and math problem-solving. Our study generates 4,788 adversarial prompts, meticulously evaluated over 8 tasks and 13 datasets. Our findings demonstrate that contemporary LLMs are not robust to adversarial prompts. Furthermore, we present a comprehensive analysis to understand the mystery behind prompt robustness and its transferability. We then offer insightful robustness analysis and pragmatic recommendations for prompt composition, beneficial to both researchers and everyday users.
研究动机与目标
- 激励理解在现实使用中对提示扰动的LLM鲁棒性需求。
- 开发一个系统性基准(PromptBench),覆盖提示、攻击、模型、任务和数据集。
- 使用统一指标量化鲁棒性,并分析影响鲁棒性和迁移性的因素。
- 为研究人员和从业者提供实用洞见和建议,以打造更鲁棒的提示。
提出的方法
- 定义四种提示类型:零-shot、少量示例(few-shot)、角色导向、任务导向提示。
- 开发七种在字符、单词、句子和语义层级的提示攻击,在保持语义不变的前提下干扰提示。
- 在13个数据集中对8个任务评估9个LLM,使用4,788个对抗性提示。
- 引入性能下降率(PDR)作为统一指标,在攻击下归一化性能损失。
- 分析注意力、对抗性提示在模型之间的迁移性,以及词频模式,以指导鲁棒性改进。

实验结果
研究问题
- RQ1当前的LLM对跨多任务、跨数据集的提示扰动有多鲁棒?
- RQ2提示扰动的哪个层级(字符、单词、句子、语义)最显著地降低LLM性能?
- RQ3对抗性提示是否会在不同LLM之间迁移,哪些因素影响迁移性?
- RQ4可以从中得出哪些实用准则,以为各种应用场景设计更鲁棒的提示?
主要发现
- 词级攻击最为有效,在所有数据集上平均造成33%的性能下降。
- 字符级攻击导致平均20%的性能下降,语义级攻击与字符级攻击同样具有强大效力。
- 句子级攻击通常威胁较小,尽管效果因数据集而异,偶尔甚至会提高性能。
- GPT-4和UL2整体鲁棒性最强,其次是T5-large、ChatGPT和Llama2,Vicuna鲁棒性最弱。
- 为一个模型生成的对抗性提示可以迁移到其他模型,表明跨模型脆弱性。
- 语义保持的评估显示对抗性提示对人类仍然具有现实性(可接受性约85%)。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。