arXiv:2505.16186

SafeKey: Amplifying Aha-Moment Insights for Safety Reasoning

Kaiwen Zhou, Xuandong Zhao, Gaowen Liu, Jayanth Srinivasa, Aosong Feng, Dawn Song, Xin Eric Wang

제출 2025-05-22

원문 초록

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.

함께 살펴볼 논문

공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.

arXiv:2505.23277v4cs.CL공통 태그 Sentence공식 코드 · Papers with Code

Sentinel: 효율적인 LLM 컨텍스트 압축을 위한 어텐션 프로빙 기반 컨텍스트 활용 해독

Sentinel: Decoding Context Utilization via Attention Probing for Efficient LLM Context Compression

검색된 컨텍스트는 길고 잡음이 많으며 중복되는 경우가 많아, 답변 생성에 앞서 질의 인식 압축이 필요하다. 네이티브 어텐션은 컨텍스트 선택을 위한 신호를 제공하지만, 헤드마다 동작이 이질적이어서 이를 문장 유용도 점수로 직접 집계하기가 복잡하다. 본 논문은 층과 헤드에 걸친 부호 있는 선형 리드아웃을 통해 이러한 신호를 결합하도록 학습하는 문장 수준 압축기 Sentinel을 제안한다. 기존 QA 근거 주석을 사용하여 리드아웃만 학습하며, 백본은 고정된 상태로 유지되고 문장 점수 산정에는 자기회귀 생성이 필요하지 않다. 12개의 LongBench 과제 전반에서, 0.5B 백본을 사용하는 Sentinel은 2,000 토큰 예산 조건에서 Qwen2.5-7B-Instruct, Llama-3.1-8B-Instruct, DeepSeek V4.1 Flash의 세 리더 각각에 대해 여러 과제에서 전체 컨텍스트(Full Context)보다 우수한 성능을 보인다. 영어 전용 QA 지도만 사용했음에도 동일한 리드아웃이 과제별 재학습 없이 중국어 과제로 전이된다. 길이별 계층화 프로파일링에서도 LLMLingua-2 및 CPC보다 압축 지연 시간과 GPU 메모리 사용량이 더 낮음을 확인했다.

토론

이 논문과 연결된 포럼 글이 아직 없습니다.