ChatPaper.aiChatPaper

SafeKey: 안전 추론을 위한 통찰력 증폭

SafeKey: Amplifying Aha-Moment Insights for Safety Reasoning

May 22, 2025
저자: Kaiwen Zhou, Xuandong Zhao, Gaowen Liu, Jayanth Srinivasa, Aosong Feng, Dawn Song, Xin Eric Wang
cs.AI

초록

대형 추론 모델(Large Reasoning Models, LRMs)은 답변 전에 명시적으로 추론하는 새로운 세대의 패러다임을 도입하여 복잡한 작업에서 뛰어난 성능 향상을 이끌어냈습니다. 그러나 이러한 모델은 유해한 질의와 적대적 공격에 대해 큰 안전성 위험을 안고 있습니다. 최근 LRM의 안전성을 개선하기 위한 주류 접근 방식인 지도 미세 조정(Supervised Fine-Tuning, SFT)은 안전성 성능을 향상시키지만, SFT로 정렬된 모델은 보이지 않는 탈옥 프롬프트(jailbreak prompt)에 일반화하는 데 어려움을 겪는 것으로 나타났습니다. LRM의 생성 과정을 철저히 조사한 결과, 안전 추론을 활성화하고 안전한 응답으로 이어질 수 있는 '안전성 통찰 순간(safety aha moment)'을 발견했습니다. 이 통찰 순간은 일반적으로 모델의 질의 이해 과정을 따르는 '핵심 문장(key sentence)'에서 나타나며, 모델이 안전하게 진행할지 여부를 나타낼 수 있습니다. 이러한 통찰을 바탕으로, 우리는 핵심 문장에서 안전성 통찰 순간을 더 잘 활성화하기 위해 두 가지 상호 보완적인 목표를 포함한 SafeKey를 제안합니다: (1) 핵심 문장 이전에 모델의 내부 표현에서 안전 신호를 강화하는 이중 경로 안전 헤드(Dual-Path Safety Head), (2) 질의 이해에 대한 모델의 주의를 개선하여 중요한 안전성 힌트를 제공하는 질의 마스크 모델링(Query-Mask Modeling) 목표입니다. 여러 안전성 벤치마크에서의 실험 결과, 우리의 방법은 다양한 탈옥 공격과 분포 외 유해 프롬프트(out-of-distribution harmful prompt)에 대한 안전성 일반화를 크게 개선하여 평균 유해성 비율을 9.6% 낮추면서도 일반적인 능력을 유지하는 것으로 나타났습니다. 우리의 분석은 SafeKey가 내부 주의를 재구성하고 숨겨진 표현의 품질을 개선함으로써 안전성을 어떻게 강화하는지를 보여줍니다.
English
Large Reasoning Models (LRMs) introduce a new generation paradigm of explicitly reasoning before answering, leading to remarkable improvements in complex tasks. However, they pose great safety risks against harmful queries and adversarial attacks. While recent mainstream safety efforts on LRMs, supervised fine-tuning (SFT), improve safety performance, we find that SFT-aligned models struggle to generalize to unseen jailbreak prompts. After thorough investigation of LRMs' generation, we identify a safety aha moment that can activate safety reasoning and lead to a safe response. This aha moment typically appears in the `key sentence', which follows models' query understanding process and can indicate whether the model will proceed safely. Based on these insights, we propose SafeKey, including two complementary objectives to better activate the safety aha moment in the key sentence: (1) a Dual-Path Safety Head to enhance the safety signal in the model's internal representations before the key sentence, and (2) a Query-Mask Modeling objective to improve the models' attention on its query understanding, which has important safety hints. Experiments across multiple safety benchmarks demonstrate that our methods significantly improve safety generalization to a wide range of jailbreak attacks and out-of-distribution harmful prompts, lowering the average harmfulness rate by 9.6\%, while maintaining general abilities. Our analysis reveals how SafeKey enhances safety by reshaping internal attention and improving the quality of hidden representations.

Summary

AI-Generated Summary

PDF52May 23, 2025