A Comprehensive Study of Jailbreak Attack versus Defense for Large Language Models

Zihao Xu, Yi Liu, Gelei Deng, Yuekang Li, S. Picek

arXiv:2402.13457 · 2026-07-27 공개 · arXiv · PDF

llama llm-security llm-defense jailbreak-attack attack-evaluation white-box-attack vicuna gpt-3-5-turbo

Abstract

Large Language Models (LLMS) have increasingly become central to generating content with potential societal impacts. Notably, these models have demonstrated capabilities for generating content that could be deemed harmful. To mitigate these risks, researchers have adopted safety training techniques to align model outputs with societal values to curb the generation of malicious content. However, the phenomenon of"jailbreaking", where carefully crafted prompts elicit harmful responses from models, persists as a significant challenge. This research conducts a comprehensive analysis of existing studies on jailbreaking LLMs and their defense techniques. We meticulously investigate nine attack techniques and seven defense techniques applied across three distinct language models: Vicuna, LLama, and GPT-3.5 Turbo. We aim to evaluate the effectiveness of these attack and defense techniques. Our findings reveal that existing white-box attacks underperform compared to universal techniques and that including special tokens in the input significantly affects the likelihood of successful attacks. This research highlights the need to concentrate on the security facets of LLMs. Additionally, we contribute to the field by releasing our datasets and testing framework, aiming to foster further research into LLM security. We believe these contributions will facilitate the exploration of security measures within this domain.

한국어 요약

한 줄 요약

LLM 보안을 위한 제이블레이크 공격과 방어 기법의 체계적 평가를 수행하고, 공개 데이터셋과 테스트 프레임워크를 제공한다.

핵심 기여도

핵심 아이디어

기존 연구는 주로 공격 기법을 무방어 모델에 적용하거나, 방어 기법을 독립적으로 평가하는 데 집중했으나, 공격과 방어 간 상호작용을 종합적으로 평가한 연구는 부재했다. 본 연구는 공격 기법과 방어 기법을 동시에 적용한 실험을 통해, 각 기법의 상호 영향을 분석함으로써 LLM 보안의 핵심 이슈를 파악하고자 했다. 특히, 템플릿 기반 공격이 기존의 유니버설 생성 기법보다 높은 성공률을 보인다는 점에서, 공격 기법 설계에 있어 템플릿 활용의 중요성을 강조한다. 또한, 방어 기법 중 Bergeron이 DPR(Defense Passing Rate) 기준에서 가장 우수한 성능을 보였으며, 이는 방어 기법의 개선 방향을 제시한다.

기술적 접근법

주요 결과

의의 및 한계

본 연구는 LLM 보안 분야에서 첫 번째로 공격과 방어 기법을 종합적으로 평가한 연구로, 향후 연구의 기초 자료로 활용될 수 있다. 특히, 공개된 데이터셋과 테스트 프레임워크는 연구 재현성과 확장성을 높이는 데 기여할 것으로 기대된다. 그러나 실험 대상 모델은 GPT-3.5 Turbo와 같은 상용 모델을 포함하고 있어, 최신 모델(예: GPT-4, Llama-3)에 대한 평가는 제한적이다. 또한, 방어 기법의 일반화 가능성과 실제 산업 적용 가능성에 대한 평가도 추가 연구가 필요하다.

실용적 활용

본 연구는 보안 업계에서 LLM의 악성 사용을 방지하기 위한 방어 전략 수립에 기여할 수 있다. 특히, Bergeron과 같은 효과적인 방어 기법은 실제 서비스에 적용되어 모델의 안정성을 높이는 데 활용될 수 있다. 또한, 공개된 테스트 프레임워크는 보안 연구자들이 새로운 공격 및 방어 기법을 개발하고 평가하는 데 유용한 도구로 활용될 수 있다.