Local Sparsity Enables Unsupervised LLM Safety Detection
On the map: LLM safety and security → Safety alignment, refusal and guardrails
Abstract (arXiv)
Deployment-time safety methods for large language models (LLMs) are predominantly supervised and assume access to unsafe training data. Nevertheless, new attacks and harm categories regularly arise, not captured by models trained in such a supervised fashion. An alternative approach is to view this problem through the lens of anomaly detection, namely, to rely solely on modeling safe data and flagging out-of-distribution inputs. However, LLM activations lie in a high-dimensional space, raising concerns about whether anomaly detection is statistically feasible. We show that, under the linear representation hypothesis (LRH), there may indeed be hope. In the LRH concept space, which is typically recovered via a sparse autoencoder (SAE), nearby points share a small common active support. Using this local sparsity insight, we propose a framework for locally masked SAE-based anomaly detection, supported by theoretical justifications. We validate it on various architectures and datasets, including both capability-testing datasets and safety-specific datasets. Finally, when we allow algorithms to use 1% out-of-distribution data for calibration, locally sparse methods achieve near-optimal performance, demonstrating their ability to capture meaningful safety information while using only 1-2% of SAE neurons for computation.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 58 of its 68 references that are in the map. First posted on arXiv 17 Sep 2026.
Builds on
58 of 68 references.
Closest ancestors · 2
Same direction, newest first
- 2025Learning Safety Constraints for Large Language Models30 May
- 2024Improving Alignment and Robustness with Circuit Breakers6 Jun
Other references · 56
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2025Qwen3 Technical Reportcited by 8,820
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,720
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023Qwen Technical Reportcited by 3,344
38 more
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2017Billion-scale similarity search with GPUscited by 2,497
- 2013Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computationcited by 2,079
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,429
- 2023Sparse Autoencoders Find Highly Interpretable Features in Language Modelscited by 1,420
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2025gpt-oss-120b & gpt-oss-20b Model Cardcited by 1,386
- 2023Towards Understanding Sycophancy in Language Modelscited by 1,040
- 2022Toy Models of Superpositioncited by 971
- 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Datasetcited by 860
- 2023Semantic Uncertainty: Linguistic Invariances for Uncertainty Estimation in Natural Language Generationcited by 819
- 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 785
- 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 722
- 2023The Linear Representation Hypothesis and the Geometry of Large Language Modelscited by 716
- 2023Safe RLHF: Safe Reinforcement Learning from Human Feedbackcited by 656
- 2024Scaling and evaluating sparse autoencoderscited by 553
- 2024Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attackscited by 486
- 2023SmoothLLM: Defending Large Language Models Against Jailbreaking Attackscited by 469
- 2022ToxiGen: A Large-Scale Machine-Generated Dataset for Adversarial and Implicit Hate Speech Detectioncited by 422
- 2023Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discoverycited by 336
- 2021Gradient-based Adversarial Attacks against Text Transformerscited by 234
- 2022Out-of-Distribution Detection and Selective Generation for Conditional Language Modelscited by 197
- 2026Scaling Monosemanticity: Extracting Interpretable Features from Claude 3 Sonnetcited by 191
- 2025Constitutional Classifiers: Defending against Universal Jailbreaks across Thousands of Hours of Red Teamingcited by 181
- 2024The Geometry of Categorical and Hierarchical Concepts in Large Language Modelscited by 159
- 2024Llama Scope: Extracting Millions of Features from Llama-3.1-8B with Sparse Autoencoderscited by 143
- 2025The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against Llm Jailbreaks and Prompt Injectionscited by 129
- 2020DROCC: Deep Robust One-Class Classificationcited by 121
- 2025Are Sparse Autoencoders Useful? A Case Study in Sparse Probingcited by 115
- 2024Automatically Interpreting Millions of Features in Large Language Modelscited by 113
- 2024HaloScope: Harnessing Unlabeled LLM Generations for Hallucination Detectioncited by 99
- 2025Model Organisms for Emergent Misalignmentcited by 91
- 2025Interpreting CLIP with Hierarchical Sparse Autoencoderscited by 60
- 2025JBShield: Defending Large Language Models from Jailbreak Attacks through Activated Concept Analysis and Manipulationcited by 54
- 2025Steer LLM Latents for Hallucination Detectioncited by 50
- 2024Characterizing Truthfulness in Large Language Model Generations with Local Intrinsic Dimensioncited by 45
- 2021One-Class Classification: A Surveycited by 35
- 2024Stepwise Alignment for Constrained Language Model Policy Optimizationcited by 30
50 most cited of 56 All 56 (JSON)
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025LoX: Low-Rank Extrapolation Robustifies LLM Safety Against Fine-tuning
- 2024Uncovering Safety Risks of Large Language Models through Concept Activation Vector
- 2025AdversariaLLM: A Unified and Modular Toolbox for LLM Robustness Research
- 2024Recent Advances in Attack and Defense Approaches of Large Language Models
- 2026Can LLM Safety Be Ensured by Constraining Parameter Regions?
- 2025ReGA: Model-Based Safeguard for LLMs via Representation-Guided Abstraction
- 2024Detectors for Safe and Reliable LLMs: Implementations, Uses, and Limitations
- 2025LLM-Safety Evaluations Lack Robustness