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.
Thought Purity: A Defense Framework For Chain-of-Thought Attack
Huzhou University(湖州大学);Zhejiang Key Laboratory of Intelligent Education Technology and Application(浙江智能教育技术与应用重点实验室);University of Science and Technology of China(中国科学技术大学);Alibaba Group(阿里巴巴集团);Zhejiang University of Technology(浙江工业大学)
SaFeR-VLM: Toward Safety-aware Fine-grained Reasoning in Multimodal Models
West China Biomedical Big Data Center, West China Hospital, SCU(西昌生物医学大数据中心、西昌医院、SCU);NTU;USTC;TeleAI, China Telecom(TeleAI、中国电信);BUPT;Tsinghua University(清华大学);HKUST(Guangzhou)(HKUST(广州))
Adaptive Defense against Harmful Fine-Tuning for Large Language Models via Bayesian Data Scheduler
Nanyang Technological University(南洋理工大学);Shenzhen Campus of Sun Yat-sen University(中山大学深圳校区);University of Central Florida(佛罗里达大学);Tsinghua University(清华大学)
Scalable Defense against In-the-wild Jailbreaking Attacks with Safety Context Retrieval
School of EECS, Peking University(电子工程系,北京大学);School of Mathematical Sciences, Peking University(数学系,北京大学);State Key Lab of General Artificial Intelligence, School of Intelligence Science and Technology, Peking University(通用人工智能国家重点实验室,智能科学与技术学校,北京大学);Institute for Artificial Intelligence, Peking University(人工智能研究院,北京大学)
Pharmacist: Safety Alignment Data Curation for Large Language Models against Harmful Fine-tuning
School of Computer Science and Engineering, South China University of Technology(华南理工大学计算机科学与工程学院);School of Computer Science at Georgia Institute of Technology(佐治亚理工学院计算机科学系);School of Cyber Science and Technology, Shenzhen Campus of Sun Yat-sen University(中山大学深圳校区网络科学与技术学院);Second Affiliated Hospital of Guangzhou University of Chinese Medicine(广州中医药大学第二附属医院);China and Pengcheng Laboratory(中 Pengcheng 实验室)
SALAD-Bench: A Hierarchical and Comprehensive Safety Benchmark for Large Language Models
Shanghai Artificial Intelligence Laboratory(上海人工智能实验室);Harbin Institute of Technology(哈尔滨工业大学);Chinese University of Hong Kong(香港中文大学);Beijing Institute of Technology(北京理工大学);The Hong Kong Polytechnic University(香港理工大学)
Antibody: Strengthening Defense Against Harmful Fine-Tuning for Large Language Models via Attenuating Harmful Gradient Influence
Department of Electrical and Computer Systems Engineering, Monash University, Australia(莫纳什大学电气与计算机系统工程系);Department of Data Science and AI, Monash University, Australia(莫纳什大学数据科学与人工智能系)
X-Teaming: Multi-Turn Jailbreaks and Defenses with Adaptive Multi-Agents
University of California, Los Angeles(加州大学洛杉矶分校);University of Washington(华盛顿大学);Qatar Computing Research Institute(卡塔尔计算研究所);Google(谷歌);Stanford University(斯坦福大学)