paper-with-me

홈 › Papers

Mitigating Many-shot Jailbreak Attacks with One Single Demonstration

2026-05-08 · Kejia Chen, Jiawen Zhang, Boheng Li, Pengcheng Li, Jian Lou, Zunlei Feng, Mingli Song, Ruoxi Jia, Tianwei Zhang arxiv

Many-shot jailbreaking (MSJ) causes safety-aligned language models to answer harmful queries by preceding them with many harmful question-answer demonstrations. We study why this attack becomes stronger as the number of demonstrations increases. Empirically, we find that MSJ induces a progressive activation drift: the representation of a fixed harmful query moves step by step away from the safety-aligned region as more harmful demonstrations are added. Theoretically, we show that this drift can be interpreted as implicit malicious fine-tuning: conditioning on N harmful demonstrations induces SGD-style updates equivalent to optimizing on the corresponding N harmful samples. This view turns the attack mechanism into a defense principle. We append a fixed one-shot safety demonstration at inference time, which induces a counteracting safety-oriented update and restores refusal behavior. The resulting method improves the model's robustness to MSJ without modifying its parameters or requiring white-box access at deployment. Code is available at https://github.com/Thecommonirin/SafeEnd.

📄 PDF Abstract BibTeX arXiv:2605.08277

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Mitigating Many-Shot Jailbreaking

2025-04-13 · Christopher M. Ackerman, Nina Panickssery

Many-shot jailbreaking (MSJ) is an adversarial technique that exploits the long context windows of modern LLMs to circumvent model safety training by including in the prompt many examples of a "fake" assistant responding…

In-Context Learning

Single-Configuration Attack Success Rate Is Not Enough: Jailbreak Evaluations Should Report Distributional Attack Success

2026-05-09 · Carsten Maple, Abhishek Kumar, Riya Tapwal arxiv

Many jailbreak attack research papers report attack success rates for a limited number of parameter settings, even though there are many combinations of parameter settings that could be used. Further, when new jailbreak …

QGuard:Question-based Zero-shot Guard for Multi-modal LLM Safety

2025-06-14 · Taegyeong Lee, Jeonghwa Yoo, Hyoungseo Cho, Soo Yong Kim 외

The recent advancements in Large Language Models(LLMs) have had a significant impact on a wide range of fields, from general domains to specialized areas. However, these advancements have also significantly increased the…

JailbreakOPT: Tool-Assisted Iterative Jailbreak Prompt Optimization

2026-06-09 · Ge Shi, Jun Yin, Donglin Xie, Fangyi Liu 외 arxiv

Jailbreak attacks expose persistent safety weaknesses in large language models (LLMs), but existing stateless single-turn methods face a trade-off: hand-crafted prompts are expressive but static, while iterative prompt o…

EasyJailbreak: A Unified Framework for Jailbreaking Large Language Models

2024-03-18 · Weikang Zhou, Xiao Wang, Limao Xiong, Han Xia 외

Jailbreak attacks are crucial for identifying and mitigating the security vulnerabilities of Large Language Models (LLMs). They are designed to bypass safeguards and elicit prohibited outputs. However, due to significant…