paper-with-me

Papers

Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrations

2023-10-10 · Zeming Wei, Yifei Wang, Ang Li, Yichuan Mo, Yisen Wang

Large Language Models (LLMs) have shown remarkable success in various tasks, yet their safety and the risk of generating harmful content remain pressing concerns. In this paper, we delve into the potential of In-Context Learning (ICL) to modulate the alignment of LLMs. Specifically, we propose the In-Context Attack (ICA) which employs harmful demonstrations to subvert LLMs, and the In-Context Defense (ICD) which bolsters model resilience through examples that demonstrate refusal to produce harmful responses. We offer theoretical insights to elucidate how a limited set of in-context demonstrations can pivotally influence the safety alignment of LLMs. Through extensive experiments, we demonstrate the efficacy of ICA and ICD in respectively elevating and mitigating the success rates of jailbreaking prompts. Our findings illuminate the profound influence of ICL on LLM behavior, opening new avenues for improving the safety of LLMs.

📄 PDF Abstract BibTeX arXiv:2310.06387

Code (0)

등록된 구현이 없습니다.

Tasks

In-Context LearningLanguage ModellingSafety Alignment

Methods 이 논문이 사용한 방법론

ICA _Independent component analysis (ICA) is a statistical and computational technique for revealing hidden factors that underlie sets of random variables, measurements, or…

Similar Papers 제목 키워드 기반

FreoStream:Enhancing Stream Guardrails via Future-Aware Reasoning and Safety-Aligned Optimization

2026-06-11 · Jianwei Wang, Guoyang Shen, Yanhong Wu, Haoran Li 외 arxiv

Stream guardrails enable token-level safety detection before full responses are generated. However, they often make overly conservative judgements and block those sensitive but safe tokens, which is known as over-refusal…

Jailbreaking Safeguarded Text-to-Image Models via Large Language Models

2025-03-03 · Zhengyuan Jiang, Yuepeng Hu, Yuchen Yang, Yinzhi Cao 외

Text-to-Image models may generate harmful content, such as pornographic images, particularly when unsafe prompts are submitted. To address this issue, safety filters are often added on top of text-to-image models, or the…

Language ModelingLanguage ModellingLarge Language Model

Exploring and Developing a Pre-Model Safeguard with Draft Models

2026-05-19 · Hongyu Cai, Arjun Arunasalam, Yiming Liang, Antonio Bianchi 외 arxiv

Large Language Model (LLM) alignment remains vulnerable to jailbreak attacks that elicit unsafe responses, motivating pre-model and post-model guards. Pre-model guards audit the safety of prompts before invoking target m…

The Jailbreak Tax: How Useful are Your Jailbreak Outputs?

2025-04-14 · Kristina Nikolić, Luze Sun, Jie Zhang, Florian Tramèr

Jailbreak attacks bypass the guardrails of large language models to produce harmful outputs. In this paper, we ask whether the model outputs produced by existing jailbreaks are actually useful. For example, when jailbrea…

Math

Scalable Defense against In-the-wild Jailbreaking Attacks with Safety Context Retrieval

2025-05-21 · Taiye Chen, Zeming Wei, Ang Li, Yisen Wang

Large Language Models (LLMs) are known to be vulnerable to jailbreaking attacks, wherein adversaries exploit carefully engineered prompts to induce harmful or unethical responses. Such threats have raised critical concer…

RAGRetrievalRetrieval-augmented Generation