mlsanityData to 14 Oct 2026

HiddenGuard: Fine-Grained Safe Generation with Specialized Representation Router

arXiv 2410.02684 ↗First posted 3 Oct 2024cs.CLcited by 16

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

  1. 2024WildGuard: Open One-Stop Moderation Tools for Safety Risks, Jailbreaks, and Refusals of LLMs26 Jun
  2. 2024Improving Alignment and Robustness with Circuit Breakers6 Jun
  3. 2024The WMDP Benchmark: Measuring and Reducing Malicious Use With Unlearning5 Mar

Other references · 69

  1. 2017Attention Is All You Needcited by 60,361
  2. 2022Training language models to follow instructions with human feedbackcited by 15,971
  3. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  4. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  5. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
  6. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
  7. 2021Emerging Properties in Self-Supervised Vision Transformerscited by 6,968
  8. 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,415
  9. 2017On Calibration of Modern Neural Networkscited by 4,960
  10. 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
  11. 2017Deep reinforcement learning from human preferencescited by 3,912
  12. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
38 more
  1. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  2. 2024MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmarkcited by 1,848
  3. 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
  4. 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,429
  5. 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,420
  6. 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,336
  7. 2018Obfuscated Gradients Give a False Sense of Security: Circumventing Defenses to Adversarial Examplescited by 1,268
  8. 2023AgentBench: Evaluating LLMs as Agentscited by 1,267
  9. 2022Editing Models with Task Arithmeticcited by 1,120
  10. 2022Red Teaming Language Models with Language Modelscited by 1,026
  11. 2022Mass-Editing Memory in a Transformercited by 1,001
  12. 2023Enhancing Chat Language Models by Scaling High-quality Instructional Conversationscited by 839
  13. 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automaticallycited by 672
  14. 2021Fast Model Editing at Scalecited by 498
  15. 2023SmoothLLM: Defending Large Language Models Against Jailbreaking Attackscited by 469
  16. 2022Memory-Based Model Editing at Scalecited by 447
  17. 2023Detecting Language Model Attacks with Perplexitycited by 431
  18. 2023Editing Large Language Models: Problems, Methods, and Opportunitiescited by 372
  19. 2023Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discoverycited by 336
  20. 2023Are aligned neural networks adversarially aligned?cited by 315
  21. 2024MM-LLMs: Recent Advances in MultiModal Large Language Modelscited by 278
  22. 2024Foundational Challenges in Assuring Alignment and Safety of Large Language Modelscited by 199
  23. 2023Survey of Vulnerabilities in Large Language Models Revealed by Adversarial Attackscited by 194
  24. 2024Security and Privacy Challenges of Large Language Models: A Surveycited by 186
  25. 2020Semantic Photo Manipulation with a Generative Image Priorcited by 178
  26. 2023Image Hijacks: Adversarial Images can Control Generative Models at Runtimecited by 172
  27. 2022VLP: A Survey on Vision-Language Pre-trainingcited by 159
  28. 2021EditGAN: High-Precision Semantic Image Editingcited by 156
  29. 2024Robust Prompt Optimization for Defending Language Models Against Jailbreaking Attackscited by 156
  30. 2023On the Adversarial Robustness of Multi-Modal Foundation Modelscited by 145
  31. 2024Red-Teaming for Generative AI: Silver Bullet or Security Theater?cited by 83
  32. 2016Deep Feature Interpolation for Image Content Changescited by 80
  33. 2024Refuse Whenever You Feel Unsafe: Improving Safety in LLMs via Decoupled Refusal Trainingcited by 69
  34. 2024On the Societal Impact of Open Foundation Modelscited by 65
  35. 2023Who Audits the Auditors? Recommendations from a field scan of the algorithmic auditing ecosystemcited by 52
  36. 2024PRP: Propagating Universal Perturbations to Attack Large Language Model Guard-Railscited by 52
  37. 2024Eraser: Jailbreaking Defense in Large Language Models via Unlearning Harmful Knowledgecited by 51
  38. 2023Bypassing the Safety Training of Open-Source LLMs with Priming Attackscited by 50

50 most cited of 69 All 69 (JSON)

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 8; 2026: 8.

16 papers.

Sort:

By area:

Similar, not cited

Close in wording, no citation either way

  1. 2025OpenGuardrails: A Configurable, Unified, and Scalable Guardrails Platform for Large Language Models
  2. 2025SafeSteer: Interpretable Safety Steering with Refusal-Evasion in LLMs
  3. 2025X-Guard: Multilingual Guard Agent for Content Moderation
  4. 2026No One Model Catches Every Harm: Benchmarking Content Moderation Across Safety Scenarios
  5. 2025A Data-Centric Approach for Safe and Secure Large Language Models against Threatening and Toxic Content
  6. 2025AprielGuard
  7. 2025Guardians and Offenders: A Survey on Harmful Content Generation and Safety Mitigation of LLM
  8. 2024Large Language Models are Vulnerable to Bait-and-Switch Attacks for Generating Harmful Content