atlas

Research map / Large language models / Language, safety and interpretability

LLMScan: Causal Scan for LLM Misbehavior Detection

ICML 2025 · Large language models › Language, safety and interpretability · approach: Safety alignment of LLMs · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes LLMScan, which builds causal maps from token-level attention perturbations and layer-skip interventions and trains lightweight MLP detectors to flag lies, jailbreaks, toxicity, and backdoor-triggered responses in LLMs.

Problem

Detecting diverse LLM misbehaviors (untruthful, jailbreak-harmful, toxic, and backdoor-triggered responses) in a unified way, without relying on analyzing generated outputs.

Approach

Treat the LLM as a structured causal model and use causal mediation analysis to compute per-token (attention-score distance under token masking) and per-layer (logit change when a layer is skipped) causal effects; train an MLP on these causal maps to classify normal vs. misbehavior, detectable at the first generated token.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use LLMScan instead of the lie-detection baselineLie detection on Questions1000 with Llama-2-7b · Questions1000accuracy: 0.97 vs 0.97No clear effect
Use LLMScan instead of the lie-detection baselineLie detection on SciQ with Llama-2-7b · SciQaccuracy: 0.92 vs 0.97Hurt
Use LLMScan instead of RepEJailbreak detection on AutoDAN with Llama-2-7b · AutoDANaccuracy: 0.98 vs 1.00Hurt
Use LLMScan instead of RepEToxicity detection on SocialChem with Llama-2-7b · SocialChemaccuracy: 0.95 vs 0.95No clear effect
Use LLMScan instead of ONIONBackdoor detection on Badnet with Llama-2-7b · Badnetaccuracy: 0.48 -> 0.96Helped
Add layer-level causal effects to token-level causal effects (ablation)LLMScan, Lie detection on Questions1000 with Llama-2-7b · Questions1000accuracy: 0.94 vs 0.94No clear effect
Add layer-level causal effects to token-level causal effects (ablation)LLMScan, toxicity detection on SocialChem with Llama-2-7b · SocialChemaccuracy: 0.61 -> 0.95Helped
Add layer-level causal effects to token-level causal effects (ablation)LLMScan, backdoor detection on Badnet with Llama-2-7b · Badnetaccuracy: 0.69 -> 0.95Helped
Add token-level causal effects to layer-level causal effects (ablation)LLMScan, jailbreak detection on GCG with Llama-2-7b · GCGaccuracy: 0.95 -> 0.99Helped
Use LLMScan instead of Lie DetectorDetection time on Llama-2-7b · LLMScan detection timeseconds per input: 6.79 -> 3.82Helped

Surprising findings

Limitations

Experimental setup

Datasets: Questions1000 WikiData SciQ CommonSenseQA 2.0 MathQA AutoDAN GCG PAP SocialChem Badnet CTBA MTBA

Benchmarks: Questions1000 WikiData SciQ CommonSenseQA 2.0 MathQA AutoDAN GCG PAP SocialChem Badnet CTBA MTBA

Metrics: AUC accuracy

Baselines: Pacchiardi et al. lie detector TTPD RepE ONION

Builds on: Causal Mediation Analysis Pacchiardi lie detector TTPD RepE

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy