Skip to content

Local sparsity enables unsupervised LLM safety detectionLocal Sparsity Enables Unsupervised LLM Safety Detection

arXiv: Interpretability· arXiv:2609.20129· NeurIPS 2026· Xin Chen, Gil Kur, Alexander Shevchenko, Andreas Krause·Indexed by this site · 2026-10-01· Originally publishedDefenses

Translation in progress — untranslated text is omitted.

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

AI summaryThe paper proposes an unsupervised anomaly detection framework based on local-mask SAE for deployment-time safety detection in large language models. The authors note that existing deployment-time safety methods are mostly supervised and rely on unsafe training data, making it hard to cover emerging attacks and harm categories, so they turn to anomaly detection that models only safe data and flags out-of-distribution inputs. Under the linear representation hypothesis, nearby points in the concept space recovered by SAE share a small common set of active features; this local sparsity provides a theoretical basis for anomaly detection in high-dimensional activation spaces. The authors validate the method across multiple architectures and datasets, covering capability test datasets and safety-specific datasets. When the algorithm is allowed to use 1% of out-of-distribution data for calibration, local sparsity methods achieve near-optimal performance, using only 1-2% of SAE neurons in computation.

Questions
Supervised safety classifiers rely on unsafe labels, and new jailbreaks and unseen harm categories can render them ineffective. Making safety detection an anomaly detection that models only safe data is limited by the statistical difficulty of high-dimensional LLM activations.
Methods
Under the linear representation hypothesis, SAE lifts activations into a concept space, applies per-cluster local sparse masking, and then scores. Instances are training-free FREQMASK-KM and per-cluster LoRA LEARNEDMASK-LORA; theory claims sample complexity is only logarithmic in the concept dimension.
Experiments and results
Across six instruction-tuned models, local sparsity methods are the best or second-best unsupervised method on four ≥8B models (Table 1). After per-cluster calibration with 1% unsafe and 1% benign OOD, FREQMASK-KM's AUROC rises to 0.962–0.990 (Table 4).
Limitations and future work
The authors note that the detector is sensitive to the safe training distribution, and underrepresented benign regions may be scored high; calibration relies on both unsafe and benign OOD being concentrated in a few clusters. Experiments cover six models and three types of unsafe data, with the main table being the three-class average; on Qwen 1.5B, unsupervised AUROC is below 0.80.

Related papers

Show 3 more papers
Read originalNeurIPS 2026