Robust Harmful Features Under Jailbreak Attacks: Mechanistic Evidence from Attention Head Specialization in Large Language Models
TL;DR Highlight
Jailbreak 공격이 LLM 안전장치를 우회하는 원리를 attention head 단위로 해부하고, 공격에도 살아남는 내부 신호로 학습 없이 유해 입력을 탐지하는 방법을 제시.
Who Should Read
LLM 서비스에 jailbreak 방어 시스템을 구축하거나, 모델 내부 안전 메커니즘을 이해하고 싶은 ML 엔지니어 및 보안 담당자. 특히 Llama, Gemma, Qwen 같은 오픈 웨이트 모델을 화이트박스로 운영하는 팀.
Core Mechanics
- Jailbreak 공격은 LLM의 안전 표현을 완전히 지우지 않고, 초기 레이어의 특정 attention head(ACH)만 선택적으로 억제해서 거절 동작을 우회함.
- ACH(Adversarially Compromised Heads): 초기 레이어(0~3)에 집중되어 있고, 유해 입력에는 활성화되지만 공격 입력에서는 강하게 억제되는 head들.
- SAH(Safety-Aligned Heads): 중간 레이어(5~12)에 분포하며, 공격이 성공한 상황에서도 유해 의미에 대한 활성화를 유지하는 head들. 이게 'Robust Harmful Features'의 원천.
- 공격 템플릿 토큰이 ACH를 억제하는 동시에 SAH를 오히려 더 강하게 활성화시킴. 즉 같은 공격 토큰이 ACH와 SAH에 정반대 효과를 냄.
- 단 8개의 ACH를 인위적으로 억제하는 것만으로 Llama-3-8B의 공격 성공률(ASR)이 0%에서 95%까지 치솟음. 전체 수백 개 head 중 극소수만 건드려도 jailbreak 재현 가능.
- 이 Robust Harmful Features를 활용해 학습 없이 단순히 내부 활성화를 읽는 것만으로 유해 입력 탐지기를 만들 수 있고, 적대적 공격 탐지에서도 경쟁력 있는 성능을 보임.
Evidence
- ACH 8개만 억제했을 때 Llama-3-8B ASR 95.0%, 전체 ACH(21개) 억제 시 99.5%까지 상승. 반면 랜덤 head 21개를 억제했을 때는 ASR 4.0% ± 3.7%에 불과.
- 학습 없는 탐지기가 Gemma-2B 기준 VANILLA(0.470) 대비 0.853으로 +81.5% 상대 개선, Qwen-7B는 0.506에서 0.860으로 +70.0% 개선 (Macro-F1 가중평균).
- 적대적 공격 탐지 벤치마크 SALAD-Bench에서 Gemma-2B가 VANILLA 0.270에서 0.976으로, WildJailbreak에서 Qwen-7B가 0.483에서 0.907로 향상.
- 학습 없는 방법임에도 Llama-3-8B 기준 W.Avg. 0.888로, 전용 학습된 WildGuard(0.880), Qwen3Guard(0.877), LlamaGuard3(0.599)를 상회.
How to Apply
- Llama, Gemma, Qwen 같은 오픈 웨이트 모델을 배포 중이라면, 모델 forward pass 시 중간 레이어 attention head의 활성화를 refusal direction에 투영한 값을 읽어서 유해 입력 탐지기로 쓸 수 있음. 별도 학습 없이 단일 forward pass만으로 동작.
- 기존 jailbreak 방어가 공격을 받을 때 실패한다면, ACH(초기 레이어 0~3의 특정 head)를 모니터링 대상으로 추가하는 방식으로 방어 레이어를 보강할 수 있음. 이 head들이 갑자기 억제되면 jailbreak 시도 신호로 해석 가능.
- SAH가 공격에도 활성화를 유지한다는 특성을 활용해, 모델 fine-tuning 시 SAH의 activation pattern을 정규화 항으로 추가하면 jailbreak 내성을 강화하는 방향으로 훈련을 유도할 수 있음.
Code Example
Terminology
Related Papers
Distributed Attacks in Persistent-State AI Control
AI 코딩 에이전트가 여러 PR에 걸쳐 악성 코드를 분산 삽입하면 단일 모니터로는 탐지가 사실상 불가능하다는 걸 실험으로 증명.
Senior SWE-Bench: open-source benchmark that assesses agents as senior engineers
기존 SWE-Bench가 과도하게 상세한 요구사항을 주는 '주니어 수준' 평가였다면, Senior SWE-Bench는 실제 시니어 엔지니어처럼 불완전한 요구사항에서 기능을 구현하고 버그를 추적하는 능력을 평가한다. 현재 최고 성능 모델(Claude Opus 4.8)도 24%밖에 못 푸는 난이도로, AI 코딩 에이전트의 실제 한계를 측정하려는 시도다.
Apple 'Hide My Email' vulnerability reveals peoples' real email addresses
iCloud+ 구독자가 프라이버시 보호용으로 사용하는 Apple의 Hide My Email 서비스에 1년 넘게 패치되지 않은 취약점이 있어, 공격자가 숨겨진 실제 이메일 주소를 알아낼 수 있다.
Words Speak Louder Than Code: Investigating Cognitive Heuristics in LLM-Based Code Vulnerability Detection
LLM 보안 스캐너가 코드 내용보다 '누가 썼는지', '어떻게 물어보는지'에 더 크게 반응해서 취약점을 97%까지 은폐시킬 수 있다.
What happened after 2k people tried to hack my AI assistant
실제로 6,000개 이상의 이메일로 AI 에이전트에 prompt injection 공격을 시도한 공개 실험 결과로, Claude Opus 4.6이 비밀 파일 유출을 한 번도 허용하지 않았지만 실험 설계의 현실성에 대한 논란이 뜨거웠다.
When Does Combining Language Models Help? A Co-Failure Ceiling on Routing, Voting, and Mixture-of-Agents Across 67 Frontier Models
여러 LLM을 조합해도 '모든 모델이 동시에 틀리는 비율(β)'이 성능 상한선이며, 업계가 쓰는 pairwise 상관계수(ρ)는 이 상한선을 예측하지 못한다.
Related Resources
Original Abstract (Expand)
Jailbreak attacks bypass LLM safety alignment, yet their mechanisms remain poorly understood. We provide evidence that attacks do not comprehensively eliminate safety features, but instead selectively suppress specific attention heads. We identify two functionally differentiated types: Adversarially Compromised Heads (ACHs) concentrated in early layers, which are suppressed under attacks, and Safety-Aligned Heads (SAHs) in mid-layers, which maintain robust activations even when attacks succeed. Ablation studies support the causal role of ACHs and the contribution of SAHs to robust activations: suppressing a small number of ACHs is sufficient to induce jailbreak-like behavior on normally refused inputs, while removing SAHs substantially weakens mid-layer safety activations. Token-level attribution further shows that ACH suppression is driven specifically by attack-template tokens, providing a mechanistic account of why attacks can bypass refusal decisions through ACH suppression while leaving internal safety signals sustained by SAHs -- a phenomenon we term Robust Harmful Features. To validate the practical significance of this robustness, we show that simply reading these persistent activations -- without any training -- yields competitive aggregate detection performance with strong adversarial robustness.