paper-with-me

홈 › Papers

Reasoning as an Adaptive Defense for Safety

2025-07-01 · Taeyoun Kim, Fahim Tajwar, Aditi Raghunathan, Aviral Kumar arxiv

Reasoning methods that adaptively allocate test-time compute have advanced LLM performance on easy to verify domains such as math and code. In this work, we study how to utilize this approach to train models that exhibit a degree of robustness to safety vulnerabilities, and show that doing so can provide benefits. We build a recipe called $\textit{TARS}$ (Training Adaptive Reasoners for Safety), a reinforcement learning (RL) approach that trains models to reason about safety using chain-of-thought traces and a reward signal that balances safety with task completion. To build TARS, we identify three critical design choices: (1) a ``lightweight'' warmstart SFT stage, (2) a mix of harmful, harmless, and ambiguous prompts to prevent shortcut behaviors such as too many refusals, and (3) a reward function to prevent degeneration of reasoning capabilities during training. Models trained with TARS exhibit adaptive behaviors by spending more compute on ambiguous queries, leading to better safety-refusal trade-offs. They also internally learn to better distinguish between safe and unsafe prompts and attain greater robustness to both white-box (e.g., GCG) and black-box attacks (e.g., PAIR). Overall, our work provides an effective, open recipe for training LLMs against jailbreaks and harmful requests by reasoning per prompt.

📄 PDF Abstract BibTeX arXiv:2507.00971

Code (0)

등록된 구현이 없습니다.

Tasks

Reinforcement Learning

Similar Papers 제목 키워드 기반

Self-Guided Defense: Adaptive Safety Alignment for Reasoning Models via Synthesized Guidelines

2025-11-26 · Yuhang Wang, Yanxu Zhu, Dongyuan Lu, Jitao Sang arxiv

Reasoning models have demonstrated remarkable capabilities in complex reasoning tasks. However, ensuring their safety against adversarial jailbreak prompts remains a critical challenge. Due to the covert and deceptive na…

SafeBehavior: Simulating Human-Like Multistage Reasoning to Mitigate Jailbreak Attacks in Large Language Models

2025-09-30 · Qinjian Zhao, Jiaqi Wang, Zhiqiang Gao, Zhihao Dou 외 arxiv

Large Language Models (LLMs) have achieved impressive performance across diverse natural language processing tasks, but their growing power also amplifies potential risks such as jailbreak attacks that circumvent built-i…

Decision Making

Defending against Adaptive Prompt Injection Attacks via Reasoning-enabled Task Alignment

2026-06-13 · Lipeng He, Yihan Wang, Jiawen Zhang, N. Asokan arxiv

Indirect prompt injection attacks hijack LLM-based agents by embedding malicious instructions in third-party data that the agent retrieves during task execution. Existing defenses report near-zero attack success rate on …

Reinforcement Learning

Thought Purity: Defense Paradigm For Chain-of-Thought Attack

2025-07-16 · Zihao Xue, Zhen Bi, Long Ma, Zhenlin Hu 외

While reinforcement learning-trained Large Reasoning Models (LRMs, e.g., Deepseek-R1) demonstrate advanced reasoning capabilities in the evolving Large Language Models (LLMs) domain, their susceptibility to security thre…

reinforcement-learningReinforcement Learning

GuardAlign: Test-time Safety Alignment in Multimodal Large Language Models

2026-02-27 · Xingyu Zhu, Beier Zhu, Junfeng Fang, Shuo Wang 외 arxiv

Large vision-language models (LVLMs) have achieved remarkable progress in vision-language reasoning tasks, yet ensuring their safety remains a critical challenge. Recent input-side defenses detect unsafe images with CLIP…