Skip to main content
QUICK REVIEW

[논문 리뷰] BadChain: Backdoor Chain-of-Thought Prompting for Large Language Models

Zhen Xiang, Fengqing Jiang|arXiv (Cornell University)|2024. 01. 20.
Topic ModelingComputer Science인용 수 8
한 줄 요약

BadChain은 chain-of-thought prompting을 겨냥한 첫 번째 백도어 공격으로, 조작된 Demonstrations를 통해 백도어 추론 단계를 삽입하고 트리거가 존재할 때 적대적 출력을 유발하도록 설계되었으며, 다양한 모델과 추론 작업에서 테스트되었습니다.

ABSTRACT

Large language models (LLMs) are shown to benefit from chain-of-thought (COT) prompting, particularly when tackling tasks that require systematic reasoning processes. On the other hand, COT prompting also poses new vulnerabilities in the form of backdoor attacks, wherein the model will output unintended malicious content under specific backdoor-triggered conditions during inference. Traditional methods for launching backdoor attacks involve either contaminating the training dataset with backdoored instances or directly manipulating the model parameters during deployment. However, these approaches are not practical for commercial LLMs that typically operate via API access. In this paper, we propose BadChain, the first backdoor attack against LLMs employing COT prompting, which does not require access to the training dataset or model parameters and imposes low computational overhead. BadChain leverages the inherent reasoning capabilities of LLMs by inserting a backdoor reasoning step into the sequence of reasoning steps of the model output, thereby altering the final response when a backdoor trigger exists in the query prompt. Empirically, we show the effectiveness of BadChain for two COT strategies across four LLMs (Llama2, GPT-3.5, PaLM2, and GPT-4) and six complex benchmark tasks encompassing arithmetic, commonsense, and symbolic reasoning. Moreover, we show that LLMs endowed with stronger reasoning capabilities exhibit higher susceptibility to BadChain, exemplified by a high average attack success rate of 97.0% across the six benchmark tasks on GPT-4. Finally, we propose two defenses based on shuffling and demonstrate their overall ineffectiveness against BadChain. Therefore, BadChain remains a severe threat to LLMs, underscoring the urgency for the development of robust and effective future defenses.

연구 동기 및 목표

  • API-driven LLM에서 체인-오브-생각 프롬프팅의 백도어 조작에 대한 취약점을 강조하여 연구를 촉발한다.
  • 학습 데이터나 모델 매개변수에 대한 접근 없이도 최소한의 계산으로 작동하는 백도어 공격(BadChain)을 제안한다.
  • 여러 LLM과 추론 벤치마크에서 BadChain의 효과를 입증하고 백도어 추론 단계 메커니즘을 분석한다.
  • 잠재적 방어책을 평가하고 BadChain에 대한 효과가 제한적임을 보여준다.

제안 방법

  • 오염된 프롬프트를 통해 COT 시연의 하위 집합에 백도어 트리거를 삽입한다.
  • COT 시퀀스에 백도어 추론 단계를 포함시켜 트리거가 존재할 때 적대적 대상 정답을 생성하게 한다.
  • 비언어적/구문 기반 트리거 설계와 위치, 오염 비율, 작업 민감성 등을 탐구한다.
  • GPT-3.5, GPT-4, PaLM2, Llama2를 대상으로 표준 COT-S 및 self-consistency(SC) 전략하에서 산술, 상식, 기호 추론에 걸친 여섯 개 벤치마크를 평가한다.
  • DT-COT 및 DT-base 베이스라인과 비교하고 공격 성공률(ASR, ASRt) 및 정상 정확도(ACC)를 분석한다.

실험 결과

연구 질문

  • RQ1BadChain이 학습 데이터나 매개변수 접근 없이도 COT 프롬 prompting 하에서 표적화된 적대적 출력을 안정적으로 유발할 수 있는가?
  • RQ2트리거 유형, 위치, 시연 오염 비율이 작업과 모델 전반에서 공격 성공률과 모델 유용성에 어떻게 영향을 미치는가?
  • RQ3입력 셔플링과 같은 기존 방어책이 악성 코드에 대해 효과적으로 완화하면서도 정상 프롬 prompts의 성능 저하를 일으키지 않는가?
  • RQ4백도어 추론 단계가 BadChain의 성공에 필수적인가, 그리고 모델은 이를 어떻게 해석하는가?

주요 결과

  • BadChain은 모델 간 평균 공격 성공률에서 높은 수치를 보인다: 85.1%(GPT-3.5), 76.6%(Llama2), 87.1%(PaLM2), 97.0%(GPT-4).
  • 강한 추론 능력을 가진 LLMS일수록 BadChain에 더 취약하며, 고급 추론 능력을 가진 모델에서 ASR이 더 높게 관찰된다.
  • 백도어 추론 단계는 트리거를 적대적 대상 정답과 연결하는 핵심 메커니즘이며, 트리거에 대한 모델 해석을 통해 확인된다.
  • 셔플링 기반의 방어책 두 가지는 ASR을 감소시키지만 정상 정확도도 저하시키며, BadChain에 대한 방어 효과가 제한적임을 시사한다.
  • 실무적인 공격자는 20회의 평가 인스턴스만으로도 최적의 오염 비율과 트리거 배치를 확인할 수 있다.

이 논문 읽기

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

누빈트에서 이 논문 읽기

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