[Paper Review] AISA: Awakening Intrinsic Safety Awareness in Large Language Models against Jailbreak Attacks
AISA extracts an intrinsic safety signal from a small set of attention heads in LLMs and uses logits steering in a single forward pass to defend against jailbreak prompts without modifying model parameters or adding external components.
Large language models (LLMs) remain vulnerable to jailbreak prompts that elicit harmful or policy-violating outputs, while many existing defenses rely on expensive fine-tuning, intrusive prompt rewriting, or external guardrails that add latency and can degrade helpfulness. We present AISA, a lightweight, single-pass defense that activates safety behaviors already latent inside the model rather than treating safety as an add-on. AISA first localizes intrinsic safety awareness via spatiotemporal analysis and shows that intent-discriminative signals are broadly encoded, with especially strong separability appearing in the scaled dot-product outputs of specific attention heads near the final structural tokens before generation. Using a compact set of automatically selected heads, AISA extracts an interpretable prompt-risk score with minimal overhead, achieving detector-level performance competitive with strong proprietary baselines on small (7B) models. AISA then performs logits-level steering: it modulates the decoding distribution in proportion to the inferred risk, ranging from normal generation for benign prompts to calibrated refusal for high-risk requests -- without changing model parameters, adding auxiliary modules, or requiring multi-pass inference. Extensive experiments spanning 13 datasets, 12 LLMs, and 14 baselines demonstrate that AISA improves robustness and transfer while preserving utility and reducing false refusals, enabling safer deployment even for weakly aligned or intentionally risky model variants.
Motivation & Objective
- Investigate whether intrinsic safety awareness is encoded inside pre-trained LLMs and can be leveraged for defense without fine-tuning.
- Localize where this safety awareness is encoded within transformer architectures.
- Develop a lightweight, single-pass defense that detects and attenuates harmful prompts by steering decoding based on an intrinsic safety signal.
Proposed method
- Analyze internal activations to identify safety-related signals during prompt processing.
- Use spatiotemporal probing to locate the most informative attention heads near the final structural tokens.
- Train compact linear probes per head to produce a safety score for prompts.
- Select top-K heads to form a robust safety signal and average their outputs.
- Steer generation by adjusting logits in real time according to a safety score, with thresholds controlling passive, modulated, and active safety behavior.
- Maintain zero parameter updates to the base model and negligible runtime overhead.
Experimental results
Research questions
- RQ1Can intrinsic safety awareness be localized inside LLMs without external safety modules?
- RQ2Which internal components encode the strongest safety signals for prompt intent detection?
- RQ3Can a lightweight, single-pass decoding intervention achieve robust jailbreak defense while preserving benign task performance?
Key findings
- The safety signal can be extracted from attention head outputs, especially near the final structural tokens before generation.
- A compact set of top-K heads (K chosen by data-driven ranking) yields strong detection performance, rivaling strong proprietary detectors.
- Logits steering based on the inferred safety score improves safety without degrading performance on benign prompts.
- AISA achieves detector-level performance on 7B models and generalizes across models, alignment states, and attack types.
- The approach requires only ~0.004M parameters for the probes and negligible runtime overhead, operating in a single forward pass.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.