arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.04528cs.CLcs.CRcs.LG

PromptRobust:面向对抗性提示的大型语言模型鲁棒性评估

PromptRobust: Towards Evaluating the Robustness of Large Language Models on Adversarial Prompts

Microsoft Research(微软研究院);Institute of Automation, CAS(中国科学院自动化研究所);Carnegie Mellon University(卡内基梅隆大学);Peking University(北京大学);Westlake University(西湖大学);Duke University(杜克大学)

Kaijie Zhu, Jindong Wang, Jiaheng Zhou, Zichen Wang, Hao Chen, Yidong Wang, Linyi Yang, Wei Ye, Yue Zhang, Neil Zhenqiang Gong, Xing Xie

AI总结:

提出PromptRobust基准,通过多层次对抗性文本攻击评估LLMs对提示的鲁棒性,发现其不鲁棒,并提供分析与建议。

摘要:

学术界和工业界对大型语言模型(LLMs)的依赖日益增加,这要求我们全面理解其对提示的鲁棒性。为响应这一关键需求,我们提出了PromptRobust,一个旨在衡量LLMs对对抗性提示的韧性的鲁棒性基准。本研究采用多种针对提示的对抗性文本攻击,覆盖字符、单词、句子和语义等多个层面。这些对抗性提示旨在模拟用户可能出现的错误,如拼写错误或同义词替换,以评估细微偏差如何在保持语义完整性的同时影响LLM的输出。这些提示随后被应用于多种任务,包括情感分析、自然语言推理、阅读理解、机器翻译和数学问题求解。我们的研究生成了4,788个对抗性提示,并在8个任务和13个数据集上进行了细致评估。研究结果表明,当代LLMs对对抗性提示并不鲁棒。此外,我们提供了全面分析以理解提示鲁棒性及其可迁移性背后的奥秘,并提出了富有洞察力的鲁棒性分析和实用的提示构建建议,对研究者和日常用户均有裨益。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑