Skip to main content
QUICK REVIEW

[논문 리뷰] LLM Lies: Hallucinations are not Bugs, but Features as Adversarial Examples

Jia-Yu Yao, Kun-Peng Ning|arXiv (Cornell University)|2023. 10. 02.
Adversarial Robustness in Machine LearningComputer Science인용 수 60
한 줄 요약

이 논문은 LLM 환각을 adversarial 현상으로 프레이밍하고 간단한 엔트로피 기반 방어를 가진 그래디언트 기반 환각 공격(약한 의미적 프롬프트 및 OoD 프롬프트)을 소개한다.

ABSTRACT

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 extbf{hallucination} extemdash 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 extit{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}.

연구 동기 및 목표

  • 훈련 데이터 너머의 근본적 특징으로서 환각 재고찰을 동기 부여한다.
  • 자동 환각 트리거를 adversarial prompts로 형식화한다.
  • 사전에 정의된 환각을 이끌어내기 위해 두 가지 공격 모드(약한 의미적 및 OoD)를 개발한다.
  • 추론 시 엔트로피 임계값에 기반한 간단한 방어를 제안한다.
  • 오픈소스 LLM에 대한 공격을 평가하고 방어의 실용성을 논의한다.

제안 방법

  • 현실과 일치하지 않는 출력을 환각으로 정의한다.
  • 사전에 정의된 환각의 가능성을 극대화하기 위해 그래디언트 기반 토큰 대체 전략을 제안한다.
  • 두 가지 공격 모드를 구성한다: 인간의 의미를 보존하는 약한 의미 프롬프트와 비상징적인 OoD 프롬프트.
  • 환각 데이터를 생성하고 활용하여 공격을 학습시키거나 유도한다.
  • 사전 정의된 메트릭으로 Vicuna-7B 및 LLaMA2-7B-chat에서 공격 성공률을 평가한다.
  • 추론 시 엔트로피 임계치 방어를 제안한다.

실험 결과

연구 질문

  • RQ1무작위 OoD 프롬프트가 LLM에서 미리 정의된 환각을 신뢰성 있게 트리거할 수 있는가?
  • RQ2의미를 보존하는 약한 의미 왜곡이 환각 트리거를 크게 증가시키는가?
  • RQ3엔트로피 기반 추론 방어가 이러한 환각 공격에 효과적인가?
  • RQ4Vicuna-7B와 LLaMA2-7B-chat은 이러한 공격에 얼마나 취약한가?

주요 결과

  • 약한 의미 공격은 Vicuna-7B에서 92.31%의 성공률, LLaMA2-7B-chat에서 53.85%.
  • OoD 공격은 Vicuna-7B에서 80.77%, LLaMA2-7B-chat에서 30.77%.
  • 더 긴 OoD 프롬프트는 공격 성공을 증가시키며(예: 30 토큰은 LLaMA2-7B-chat에서 65.38%).
  • 환각 공격은 작은 토큰 변화가 출력을 거짓 사실로 바꿀 수 있음을 보여준다.
  • 엔트로피 기반 방어는 특정 임계에서 성공 공격의 재현율을 감소시킬 수 있다.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.