HiddenGuard: Fine-Grained Safe Generation with Specialized Representation Router
On the map: LLM safety and security → Safety alignment, refusal and guardrails
Abstract (arXiv)
As Large Language Models (LLMs) grow increasingly powerful, ensuring their safety and alignment with human values remains a critical challenge. Ideally, LLMs should provide informative responses while avoiding the disclosure of harmful or sensitive information. However, current alignment approaches, which rely heavily on refusal strategies, such as training models to completely reject harmful prompts or applying coarse filters are limited by their binary nature. These methods either fully deny access to information or grant it without sufficient nuance, leading to overly cautious responses or failures to detect subtle harmful content. For example, LLMs may refuse to provide basic, public information about medication due to misuse concerns. Moreover, these refusal-based methods struggle to handle mixed-content scenarios and lack the ability to adapt to context-dependent sensitivities, which can result in over-censorship of benign content. To overcome these challenges, we introduce HiddenGuard, a novel framework for fine-grained, safe generation in LLMs. HiddenGuard incorporates Prism (rePresentation Router for In-Stream Moderation), which operates alongside the LLM to enable real-time, token-level detection and redaction of harmful content by leveraging intermediate hidden states. This fine-grained approach allows for more nuanced, context-aware moderation, enabling the model to generate informative responses while selectively redacting or replacing sensitive information, rather than outright refusal. We also contribute a comprehensive dataset with token-level fine-grained annotations of potentially harmful information across diverse contexts. Our experiments demonstrate that HiddenGuard achieves over 90% in F1 score for detecting and redacting harmful content while preserving the overall utility and informativeness of the model's responses.
Key facts. Cited by 16 papers in the map (data through 14 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 72 of its 143 references that are in the map. First posted on arXiv 3 Oct 2024.
Builds on
72 of 143 references.
Closest ancestors · 3
Same direction, newest first
- 2024WildGuard: Open One-Stop Moderation Tools for Safety Risks, Jailbreaks, and Refusals of LLMs26 Jun
- 2024Improving Alignment and Robustness with Circuit Breakers6 Jun
- 2024The WMDP Benchmark: Measuring and Reducing Malicious Use With Unlearning5 Mar
Other references · 69
- 2017Attention Is All You Needcited by 60,361
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
- 2021Emerging Properties in Self-Supervised Vision Transformerscited by 6,968
- 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,415
- 2017On Calibration of Modern Neural Networkscited by 4,960
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
- 2017Deep reinforcement learning from human preferencescited by 3,912
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
38 more
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2024MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmarkcited by 1,848
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,429
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,420
- 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,336
- 2018Obfuscated Gradients Give a False Sense of Security: Circumventing Defenses to Adversarial Examplescited by 1,268
- 2023AgentBench: Evaluating LLMs as Agentscited by 1,267
- 2022Editing Models with Task Arithmeticcited by 1,120
- 2022Red Teaming Language Models with Language Modelscited by 1,026
- 2022Mass-Editing Memory in a Transformercited by 1,001
- 2023Enhancing Chat Language Models by Scaling High-quality Instructional Conversationscited by 839
- 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automaticallycited by 672
- 2021Fast Model Editing at Scalecited by 498
- 2023SmoothLLM: Defending Large Language Models Against Jailbreaking Attackscited by 469
- 2022Memory-Based Model Editing at Scalecited by 447
- 2023Detecting Language Model Attacks with Perplexitycited by 431
- 2023Editing Large Language Models: Problems, Methods, and Opportunitiescited by 372
- 2023Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discoverycited by 336
- 2023Are aligned neural networks adversarially aligned?cited by 315
- 2024MM-LLMs: Recent Advances in MultiModal Large Language Modelscited by 278
- 2024Foundational Challenges in Assuring Alignment and Safety of Large Language Modelscited by 199
- 2023Survey of Vulnerabilities in Large Language Models Revealed by Adversarial Attackscited by 194
- 2024Security and Privacy Challenges of Large Language Models: A Surveycited by 186
- 2020Semantic Photo Manipulation with a Generative Image Priorcited by 178
- 2023Image Hijacks: Adversarial Images can Control Generative Models at Runtimecited by 172
- 2022VLP: A Survey on Vision-Language Pre-trainingcited by 159
- 2021EditGAN: High-Precision Semantic Image Editingcited by 156
- 2024Robust Prompt Optimization for Defending Language Models Against Jailbreaking Attackscited by 156
- 2023On the Adversarial Robustness of Multi-Modal Foundation Modelscited by 145
- 2024Red-Teaming for Generative AI: Silver Bullet or Security Theater?cited by 83
- 2016Deep Feature Interpolation for Image Content Changescited by 80
- 2024Refuse Whenever You Feel Unsafe: Improving Safety in LLMs via Decoupled Refusal Trainingcited by 69
- 2024On the Societal Impact of Open Foundation Modelscited by 65
- 2023Who Audits the Auditors? Recommendations from a field scan of the algorithmic auditing ecosystemcited by 52
- 2024PRP: Propagating Universal Perturbations to Attack Large Language Model Guard-Railscited by 52
- 2024Eraser: Jailbreaking Defense in Large Language Models via Unlearning Harmful Knowledgecited by 51
- 2023Bypassing the Safety Training of Open-Source LLMs with Priming Attackscited by 50
50 most cited of 69 All 69 (JSON)
Built on by
Citing papers per year: 2025: 8; 2026: 8.
16 papers.
Sort:
By area:
- 2025From System 1 to System 2: A Survey of Reasoning Large Language Modelscited by 320
- 2025A Survey of Context Engineering for Large Language Modelscited by 126
- 2025Parameters vs. Context: Fine-Grained Control of Knowledge Reliance in Language Modelscited by 39
- 2025Innate Reasoning is Not Enough: In-Context Learning Enhances Reasoning Large Language Models with Less Overthinkingcited by 20
- 2025a1: Steep Test-time Scaling Law via Environment Augmented Generationcited by 13
- 2025VistaWise: Building Cost-Effective Agent with Cross-Modal Knowledge Graph for Minecraftcited by 13
- 2025Large Language Models as Computable Approximations to Solomonoff Inductioncited by 6
- 2026Gated Differentiable Working Memory for Long-Context Language Modelingcited by 6
- 2026VideoStir: Understanding Long Videos via Spatio-Temporally Structured and Intent-Aware RAGcited by 6
- 2026Self-Manager: Parallel Agent Loop for Long-form Deep Researchcited by 1
- 2025Do Stop Me Now: Detecting Boilerplate Responses with a Single Iterationcited by 0
- 2026CHAIRO: Contextual Hierarchical Analogical Induction and Reasoning Optimization for LLMscited by 0
4 more
- 2026AERIC: Anticipatory Hidden-State Monitoring for Implicit Harmful Dialoguecited by 0
- 2026V-DEAL: Diagnosing Video Safety De-Calibration as an Understanding-Refusal Coupling Failurecited by 0
- 2026Toward a Theory of Value in AI Alignmentcited by 0
- 2026Agent Safety From Within: Detecting Harmful Trajectories from LLM Internal Statescited by 0
- 2026Agent Safety From Within: Detecting Harmful Trajectories from LLM Internal States27 Sep 2026
- 2026Toward a Theory of Value in AI Alignment10 Aug 2026
- 2026V-DEAL: Diagnosing Video Safety De-Calibration as an Understanding-Refusal Coupling Failure23 Jul 2026
- 2026AERIC: Anticipatory Hidden-State Monitoring for Implicit Harmful Dialogue13 May 2026
- 2026CHAIRO: Contextual Hierarchical Analogical Induction and Reasoning Optimization for LLMs12 Apr 2026
- 2026VideoStir: Understanding Long Videos via Spatio-Temporally Structured and Intent-Aware RAG7 Apr 2026
- 2026Self-Manager: Parallel Agent Loop for Long-form Deep Research25 Jan 2026
- 2026Gated Differentiable Working Memory for Long-Context Language Modeling19 Jan 2026
- 2025Do Stop Me Now: Detecting Boilerplate Responses with a Single Iteration26 Oct 2025
- 2025VistaWise: Building Cost-Effective Agent with Cross-Modal Knowledge Graph for Minecraft26 Aug 2025
- 2025A Survey of Context Engineering for Large Language Models17 Jul 2025
- 2025Large Language Models as Computable Approximations to Solomonoff Induction21 May 2025
4 more
- 2025a1: Steep Test-time Scaling Law via Environment Augmented Generation20 Apr 2025
- 2025Innate Reasoning is Not Enough: In-Context Learning Enhances Reasoning Large Language Models with Less Overthinking25 Mar 2025
- 2025Parameters vs. Context: Fine-Grained Control of Knowledge Reliance in Language Models20 Mar 2025
- 2025From System 1 to System 2: A Survey of Reasoning Large Language Models24 Feb 2025
- 2025From System 1 to System 2: A Survey of Reasoning Large Language Modelscited by 320
- 2025Innate Reasoning is Not Enough: In-Context Learning Enhances Reasoning Large Language Models with Less Overthinkingcited by 20
- 2025a1: Steep Test-time Scaling Law via Environment Augmented Generationcited by 13
- 2026CHAIRO: Contextual Hierarchical Analogical Induction and Reasoning Optimization for LLMscited by 0
- 2026CHAIRO: Contextual Hierarchical Analogical Induction and Reasoning Optimization for LLMs12 Apr 2026
- 2025a1: Steep Test-time Scaling Law via Environment Augmented Generation20 Apr 2025
- 2025Innate Reasoning is Not Enough: In-Context Learning Enhances Reasoning Large Language Models with Less Overthinking25 Mar 2025
- 2025From System 1 to System 2: A Survey of Reasoning Large Language Models24 Feb 2025
- 2025A Survey of Context Engineering for Large Language Modelscited by 126
- 2025Large Language Models as Computable Approximations to Solomonoff Inductioncited by 6
- 2026Gated Differentiable Working Memory for Long-Context Language Modelingcited by 6
- 2026Self-Manager: Parallel Agent Loop for Long-form Deep Researchcited by 1
- 2025Do Stop Me Now: Detecting Boilerplate Responses with a Single Iterationcited by 0
- 2026AERIC: Anticipatory Hidden-State Monitoring for Implicit Harmful Dialoguecited by 0
- 2026AERIC: Anticipatory Hidden-State Monitoring for Implicit Harmful Dialogue13 May 2026
- 2026Self-Manager: Parallel Agent Loop for Long-form Deep Research25 Jan 2026
- 2026Gated Differentiable Working Memory for Long-Context Language Modeling19 Jan 2026
- 2025Do Stop Me Now: Detecting Boilerplate Responses with a Single Iteration26 Oct 2025
- 2025A Survey of Context Engineering for Large Language Models17 Jul 2025
- 2025Large Language Models as Computable Approximations to Solomonoff Induction21 May 2025
Similar, not cited
Close in wording, no citation either way
- 2025OpenGuardrails: A Configurable, Unified, and Scalable Guardrails Platform for Large Language Models
- 2025SafeSteer: Interpretable Safety Steering with Refusal-Evasion in LLMs
- 2025X-Guard: Multilingual Guard Agent for Content Moderation
- 2026No One Model Catches Every Harm: Benchmarking Content Moderation Across Safety Scenarios
- 2025A Data-Centric Approach for Safe and Secure Large Language Models against Threatening and Toxic Content
- 2025AprielGuard
- 2025Guardians and Offenders: A Survey on Harmful Content Generation and Safety Mitigation of LLM
- 2024Large Language Models are Vulnerable to Bait-and-Switch Attacks for Generating Harmful Content