Paper Detail

LLM Safety From Within: Detecting Harmful Content with Internal Representations

Difan Jiao, Yilun Liu, Ye Yuan, Zhenwei Tang, Linfeng Du, Haolun Wu, Ashton Anderson

huggingface Score 6.5

Published 2026-04-20 · First seen 2026-04-27

General AI

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.

Workflow Status

Review status
pending
Role
unreviewed
Read priority
soon
Vote
Not set.
Saved
no
Collections
Not filed yet.
Next action
Not filled yet.

Reading Brief

No structured notes yet. Add `summary_sections`, `why_relevant`, `claim_impact`, or `next_action` in `papers.jsonl` to enrich this view.

Why It Surfaced

No ranking explanation is available yet.

Tags

No tags.

BibTeX

@misc{jiao2026llm,
  title = {LLM Safety From Within: Detecting Harmful Content with Internal Representations},
  author = {Difan Jiao and Yilun Liu and Ye Yuan and Zhenwei Tang and Linfeng Du and Haolun Wu and Ashton Anderson},
  year = {2026},
  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 },
  url = {https://huggingface.co/papers/2604.18519},
  keywords = {guard models, terminal-layer representations, internal layers, safety neurons, linear probing, adaptive layer-weighted strategy, harmfulness detector, LLM internals, trainable parameters, real-time streaming detection, inference efficiency, generative guard models, code available, huggingface daily},
  eprint = {2604.18519},
  archiveprefix = {arXiv},
}

Metadata

{}