cd /news/large-language-models/what-intermediate-layers-know-detect… · home topics large-language-models article
[ARTICLE · art-38772] src=arxiv.org ↗ pub= topic=large-language-models verified=true sentiment=· neutral

What Intermediate Layers Know: Detecting Jailbreaks from Entropy Dynamics

Researchers at arXiv found that jailbreak attacks on large language models can be detected by analyzing entropy dynamics in intermediate layers, rather than final outputs. The study shows that monotonic rank-based trend scores of token-level predictive entropy across layers reveal harmful intent, with the strongest signal in mid-network representations across models like Llama, Qwen, and Gemma.

read1 min views1 publishedJun 25, 2026

arXiv:2606.25182v1 Announce Type: new Abstract: Jailbreak attacks reveal a persistent weakness in aligned Large Language Models: carefully crafted prompts can elicit policy-violating responses despite safety training. While most defenses operate at the prompt or output level, it remains unclear how harmful intent is encoded within the model's internal representations. We investigate this question by analyzing token-level predictive entropy trajectories across layers of a frozen LLM using the logit lens. We find that static aggregate statistics of prompt-level entropy (e.g., mean, variance) carry little discriminative signal, whereas features capturing how entropy evolves across token positions, such as monotonic rank-based trend scores, are substantially more informative. Importantly, this signal is not uniform across model depth: it is concentrated in intermediate layers and degrades at the final layer, indicating that jailbreak-relevant structure is most pronounced in mid-network representations rather than at the output head. Across multiple models (Llama, Qwen, Gemma) and adversarial benchmarks, these entropy dynamics provide architecture-consistent separation without additional training. Together, our findings show that jailbreak behavior is reflected in structured intermediate uncertainty dynamics, clarifying both which entropy-derived features encode harmful intent and where in the network that signal is most pronounced.

── more in #large-language-models 4 stories · sorted by recency
── more on @arxiv 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/what-intermediate-la…] indexed:0 read:1min 2026-06-25 ·