Safety Alignment in NLP Tasks: Weakly Aligned Summarization as an In-Context Attack
Abstract
Recent developments in balancing the usefulness and safety of Large Language Models (LLMs) have raised a critical question: Are mainstream NLP tasks adequately aligned with safety consideration? Our study, focusing on safety-sensitive documents obtained through adversarial attacks, reveals significant disparities in the safety alignment of various NLP tasks. For instance, LLMs can effectively summarize malicious long documents but often refuse to translate them. This discrepancy highlights a previously unidentified vulnerability: attacks exploiting tasks with weaker safety alignment, like summarization, can potentially compromise the integrity of tasks traditionally deemed more robust, such as translation and question-answering (QA). Moreover, the concurrent use of multiple NLP tasks with lesser safety alignment increases the risk of LLMs inadvertently processing harmful content. We demonstrate these vulnerabilities in various safety-aligned LLMs, particularly Llama2 models, Gemini and GPT-4, indicating an urgent need for strengthening safety alignments across a broad spectrum of NLP tasks 1 . Content warning: To demonstrate the vulnerability, examples provided include safetysensitive ones with malicious/harmful content.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
2 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructions cites RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
- Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructions cites Training language models to follow instructions with human feedback
- Weak-to-Strong Jailbreaking on Large Language Models cites Training language models to follow instructions with human feedback
- Weak-to-Strong Jailbreaking on Large Language Models cites Safe RLHF: Safe Reinforcement Learning from Human Feedback
- Training language models to follow instructions with human feedback cites Multitask Prompted Training Enables Zero-Shot Task Generalization
- Training language models to follow instructions with human feedback cites RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
- Lemix: Unified Scheduling for Llm Training and Inference on Multi-Gpu Systems cites Safe RLHF: Safe Reinforcement Learning from Human Feedback
- Safe RLHF: Safe Reinforcement Learning from Human Feedback cites Multitask Prompted Training Enables Zero-Shot Task Generalization
- Safe RLHF: Safe Reinforcement Learning from Human Feedback cites RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
- Safe RLHF: Safe Reinforcement Learning from Human Feedback cites Training language models to follow instructions with human feedback
Cited by top-tier papers2
Builds on10
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Multitask Prompted Training Enables Zero-Shot Task GeneralizationVictor Sanh, Albert Webson, Colin Raffel, Stephen H. Bach et al.ICLR 2022 · 1,976 citations
- RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language ModelsSamuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi et al.EMNLP Findings 2020 · 692 citations
- Safe RLHF: Safe Reinforcement Learning from Human FeedbackJosef Dai, Xuehai Pan, Ruiyang Sun, Jiaming Ji et al.ICLR 2024 · 656 citations
- Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow InstructionsFederico Bianchi, Mirac Suzgun, Giuseppe Attanasio, Paul Röttger et al.ICLR 2024 · 373 citations
Related papers
- Safety Alignment Can Be Not Superficial With Explicit Safety SignalsJianwei Li, Jung-Eun KimICML 2025
- Safety Alignment Should be Made More Than Just a Few Tokens DeepXiangyu Qi, Ashwinee Panda, Kaifeng Lyu, Xiao Ma et al.ICLR 2025
- CodeAttack: Revealing Safety Generalization Challenges of Large Language Models via Code CompletionQibing Ren, Chang Gao, Jing Shao, Junchi Yan et al.ACL Findings 2024 · 22 citations
- Emulated Disalignment: Safety Alignment for Large Language Models May Backfire!Zhanhui Zhou, Jie Liu, Zhichen Dong, Jiaheng Liu et al.ACL 2024
- QueryAttack: Jailbreaking Aligned Large Language Models Using Structured Non-natural Query LanguageQingsong Zou, Jingyu Xiao, Qing Li, Zhi Yan et al.ACL Findings 2025 · 4 citations
