LLM Safety From Within: Detecting Harmful Content with Internal Representations

πŸ“… 2026-04-20
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF

career value

211K/year
πŸ€– AI Summary
Current safety detection methods for large language models rely solely on terminal-layer representations, overlooking the rich safety signals embedded in internal layers, which limits their generalization and efficiency. This work proposes SIRENβ€”a lightweight framework for harmful content detection that systematically leverages multi-layer internal representations for the first time. SIREN identifies safety-relevant neurons via linear probes and introduces an adaptive layer-weighting strategy to fuse features across layers, enabling the construction of an efficient detector without modifying the original model. Notably, SIREN operates without requiring text generation and supports streaming inference. It substantially outperforms existing open-source safety classifiers across multiple benchmarks, achieving 250Γ— fewer parameters while demonstrating superior generalization to unseen data and higher inference efficiency.

Technology Category

Application Category

πŸ“ Abstract
Guard models are widely used to detect harmful content in user prompts and LLM responses. However, state-of-the-art guard models rely solely on terminal-layer representations and overlook the rich safety-relevant features distributed across internal layers. We present SIREN, a lightweight guard model that harnesses these internal features. By identifying safety neurons via linear probing and combining them through an adaptive layer-weighted strategy, SIREN builds a harmfulness detector from LLM internals without modifying the underlying model. Our comprehensive evaluation shows that SIREN substantially outperforms state-of-the-art open-source guard models across multiple benchmarks while using 250 times fewer trainable parameters. Moreover, SIREN exhibits superior generalization to unseen benchmarks, naturally enables real-time streaming detection, and significantly improves inference efficiency compared to generative guard models. Overall, our results highlight LLM internal states as a promising foundation for practical, high-performance harmfulness detection.
Problem

Research questions and friction points this paper is trying to address.

LLM safety
harmful content detection
internal representations
guard models
safety neurons
Innovation

Methods, ideas, or system contributions that make the work stand out.

internal representations
safety detection
linear probing
adaptive layer weighting
lightweight guard model
πŸ”Ž Similar Papers
No similar papers found.