arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2310.01469cs.CLcs.AI
收藏

LLM的谎言:幻觉并非缺陷,而是作为对抗样本的特征

LLM Lies: Hallucinations are not Bugs, but Features as Adversarial Examples

Peking University(北京大学)

Jia-Yu Yao, Kun-Peng Ning, Zhen-Hui Liu, Mu-Nan Ning, Yu-Yang Liu, Li Yuan

AI总结:

本文揭示LLM幻觉可由随机无意义提示触发,证明其类似对抗样本,并形式化提出hallucination attack及防御策略。

摘要:

包括GPT-3.5、LLaMA和PaLM在内的大型语言模型(LLM)看似知识渊博,并能够适应许多任务。然而,我们仍然不能完全信任它们的答案,因为LLM会受到幻觉的困扰——捏造不存在的事实,并在用户意识到或未意识到的情况下欺骗用户。不过,幻觉存在且普遍出现的原因仍不清楚。本文证明,由随机token组成的无意义提示也能够诱发LLM产生幻觉回复。此外,我们提供了理论和实验证据,表明通过扰动transformer的输入序列,可以操纵其生成特定的预定义token。这一现象促使我们重新审视“幻觉可能是对抗样本的另一种视角”,并且它与传统对抗样本具有相似特征,是LLM的一种基本属性。因此,我们以对抗方式将一种自动幻觉触发方法形式化为hallucination attack(幻觉攻击)。最后,我们探究了受攻击对抗提示的基本属性,并提出一种简单而有效的防御策略。代码已发布在GitHub:https://github.com/PKU-YuanGroup/Hallucination-Attack。

英文摘要:

Large Language Models (LLMs), including GPT-3.5, LLaMA, and PaLM, seem to be knowledgeable and able to adapt to many tasks. However, we still cannot completely trust their answers, since LLMs suffer from \textbf{hallucination}\textemdash fabricating non-existent facts, deceiving users with or without their awareness. However, the reasons for their existence and pervasiveness remain unclear. In this paper, we demonstrate that nonsensical prompts composed of random tokens can also elicit the LLMs to respond with hallucinations. Moreover, we provide both theoretical and experimental evidence that transformers can be manipulated to produce specific pre-define tokens by perturbing its input sequence. This phenomenon forces us to revisit that \emph{hallucination may be another view of adversarial examples}, and it shares similar characteristics with conventional adversarial examples as a basic property of LLMs. Therefore, we formalize an automatic hallucination triggering method as the \textit{hallucination attack} in an adversarial way. Finally, we explore the basic properties of attacked adversarial prompts and propose a simple yet effective defense strategy. Our code is released on GitHub\footnote{https://github.com/PKU-YuanGroup/Hallucination-Attack}.

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

↑