paper-with-me

Papers

Reasoning-to-Defend: Safety-Aware Reasoning Can Defend Large Language Models from Jailbreaking

2025-02-18 · Junda Zhu, Lingyong Yan, Shuaiqiang Wang, Dawei Yin, Lei Sha

The reasoning abilities of Large Language Models (LLMs) have demonstrated remarkable advancement and exceptional performance across diverse domains. However, leveraging these reasoning capabilities to enhance LLM safety against adversarial attacks and jailbreak queries remains largely unexplored. To bridge this gap, we propose Reasoning-to-Defend (R2D), a novel training paradigm that integrates safety reflections of queries and responses into LLMs' generation process, unlocking a safety-aware reasoning mechanism. This approach enables self-evaluation at each reasoning step to create safety pivot tokens as indicators of the response's safety status. Furthermore, in order to improve the learning efficiency of pivot token prediction, we propose Contrastive Pivot Optimization(CPO), which enhances the model's ability to perceive the safety status of dialogues. Through this mechanism, LLMs dynamically adjust their response strategies during reasoning, significantly enhancing their defense capabilities against jailbreak attacks. Extensive experimental results demonstrate that R2D effectively mitigates various attacks and improves overall safety, highlighting the substantial potential of safety-aware reasoning in strengthening LLMs' robustness against jailbreaks.

📄 PDF Abstract BibTeX arXiv:2502.12970

Code (1)

chuhac/Reasoning-to-Defend 공식 구현 pytorch

Similar Papers 제목 키워드 기반

STAR-S: Improving Safety Alignment through Self-Taught Reasoning on Safety Rules

2026-01-07 · Di Wu, Yanyan Zhao, Xin Lu, Mingzhe Li 외 arxiv

Defending against jailbreak attacks is crucial for the safe deployment of Large Language Models (LLMs). Recent research has attempted to improve safety by training models to reason over safety rules before responding. Ho…

Multi-Defendant Legal Judgment Prediction via Hierarchical Reasoning

2023-12-10 · Yougang Lyu, Jitai Hao, Zihan Wang, Kai Zhao 외

Multiple defendants in a criminal fact description generally exhibit complex interactions, and cannot be well handled by existing Legal Judgment Prediction (LJP) methods which focus on predicting judgment results (e.g., …

ArticlesPrediction

RAPO: Risk-Aware Preference Optimization for Generalizable Safe Reasoning

2026-02-04 · Zeming Wei, Qiaosheng Zhang, Xia Hu, Xingcheng Xu arxiv

Large Reasoning Models (LRMs) have achieved tremendous success with their chain-of-thought (CoT) reasoning, yet also face safety issues similar to those of basic language models. In particular, while algorithms are desig…

The Attacker in the Mirror: Breaking Self-Consistency in Safety via Anchored Bipolicy Self-Play

2026-05-08 · Gabriele La Malfa, Emanuele La Malfa, Saar Cohen, Jie M. Zhang 외 arxiv

Self-play red team is an established approach to improving AI safety in which different instances of the same model play attacker and defender roles in a zero-sum game, i.e., where the attacker tries to jailbreak the def…

Self-Guard: Defending Large Reasoning Models via enhanced self-reflection

2026-01-31 · Jingnan Zheng, Jingjun Xu, Yanzhen Luo, Chenhang Cui 외 arxiv

The emergence of Large Reasoning Models (LRMs) introduces a new paradigm of explicit reasoning, enabling remarkable advances yet posing unique risks such as reasoning manipulation and information leakage. To mitigate the…