ReGA: Model-Based Safeguard for LLMs via Representation-Guided Abstraction
On the map: LLM safety and security → Safety alignment, refusal and guardrails
Abstract (arXiv)
Large Language Models (LLMs) have achieved tremendous success in various tasks, yet concerns about their safety and security have emerged. In particular, they pose risks of generating harmful content and are vulnerable to jailbreaking attacks, creating unaddressed security issues regarding their deployments. In the context of software engineering for artificial intelligence (SE4AI) techniques, model-based analysis has demonstrated notable potential for analyzing and monitoring machine learning models, particularly in stateful deep neural networks. However, it suffers from scalability issues when extended to LLMs due to their vast feature spaces. In this paper, we aim to address the scalability issue of model-based analysis techniques for safeguarding LLM-scale models. Motivated by the recent discovery of low-dimensional safety-critical representations that emerged in LLMs, we propose ReGA, a model-based analysis framework with Representation-Guided Abstraction, to safeguard LLMs against harmful prompts and generations. By leveraging safety-critical representations, which are key directions in hidden states that indicate safety-related concepts, ReGA effectively narrows the scalability gap when developing the abstract model for safety modeling. Our comprehensive evaluation shows that ReGA performs sufficiently well in distinguishing between safe and harmful inputs, achieving an AUROC of 0.975 at the prompt level and 0.985 at the conversation level. Additionally, ReGA exhibits robustness to real-world attacks and generalization across different safety perspectives, outperforming existing safeguard paradigms in terms of interpretability and scalability. Overall, ReGA serves as an efficient and scalable solution to enhance LLM safety by integrating representation engineering with model-based abstraction, paving the way for new paradigms to utilize software insights for AI safety.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 57 of its 87 references that are in the map. First posted on arXiv 2 Jun 2025.
Builds on
57 of 87 references.
Closest ancestors · 5
Same direction, newest first
- 2025Advancing LLM Safe Alignment with Safety Representation Ranking21 May
- 2025The Hidden Dimensions of LLM Alignment: A Multi-Dimensional Analysis of Orthogonal Safety Directions13 Feb
- 2024Safety Alignment Should Be Made More Than Just a Few Tokens Deep10 Jun
- 2024OR-Bench: An Over-Refusal Benchmark for Large Language Models31 May
- 2024Assessing the Brittleness of Safety Alignment via Pruning and Low-Rank Modifications7 Feb
Other references · 52
- 2017Attention Is All You Needcited by 59,932
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
- 2016Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localizationcited by 6,690
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,146
- 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,634
- 2023Qwen Technical Reportcited by 3,273
- 2022Constitutional AI: Harmlessness from AI Feedbackcited by 2,950
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
- 2013Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Mapscited by 2,348
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,565
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,330
38 more
- 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,239
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2023Baichuan 2: Open Large-scale Language Modelscited by 664
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 608
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMscited by 533
- 2023DecodingTrust: A Comprehensive Assessment of Trustworthiness in GPT Modelscited by 505
- 2023Jailbreaking ChatGPT via Prompt Engineering: An Empirical Studycited by 478
- 2023"Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language Modelscited by 457
- 2023Detecting Language Model Attacks with Perplexitycited by 411
- 2023Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrationscited by 401
- 2023A Survey on Large Language Model (LLM) Security and Privacy: The Good, the Bad, and the Uglycited by 380
- 2022A Holistic Approach to Undesired Content Detection in the Real Worldcited by 337
- 2023Pretraining Language Models with Human Preferencescited by 245
- 2023MathPrompter: Mathematical Reasoning using Large Language Modelscited by 236
- 2023LLM Self Defense: By Self Examination, LLMs Know They Are Being Trickedcited by 226
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 225
- 2024SORRY-Bench: Systematically Evaluating Large Language Model Safety Refusalcited by 224
- 2024Programming Refusal with Conditional Activation Steeringcited by 191
- 2024Rainbow Teaming: Open-Ended Generation of Diverse Adversarial Promptscited by 189
- 2017Interpretable Convolutional Neural Networkscited by 161
- 2024Improving Instruction-Following in Language Models through Activation Steeringcited by 149
- 2024Evaluation of OpenAI o1: Opportunities and Challenges of AGIcited by 127
- 2023InferFix: End-to-End Program Repair with LLMscited by 113
- 2023Combating Misinformation in the Age of LLMs: Opportunities and Challengescited by 94
- 2024Improving Steering Vectors by Targeting Sparse Autoencoder Featurescited by 86
- 2021Software Engineering for AI-Based Systems: A Surveycited by 68
- 2023The Art of Defending: A Systematic Evaluation and Analysis of LLM Defense Strategies on Safety and Over-Defensivenesscited by 63
- 2023Self-Guard: Empower the LLM to Safeguard Itselfcited by 52
- 2024MultiTrust: A Comprehensive Benchmark Towards Trustworthy Multimodal Large Language Modelscited by 51
- 2024A Performance Study of LLM-Generated Code on Leetcodecited by 48
- 2024A Theoretical Understanding of Self-Correction through In-context Alignmentcited by 43
- 2024Boosting Jailbreak Attack with Momentumcited by 38
- 2024Jailbreak Antidote: Runtime Safety-Utility Balance via Sparse Representation Adjustment in Large Language Modelscited by 21
- 2024The Fusion of Large Language Models and Formal Methods for Trustworthy AI Agents: A Roadmapcited by 20
- 2025Unveiling the Basin-Like Loss Landscape in Large Language Modelscited by 13
- 2022Extracting Weighted Finite Automata from Recurrent Neural Networks for Natural Languagescited by 10
- 2024LLMs Can Defend Themselves Against Jailbreaking in a Practical Manner: A Vision Papercited by 9
- 2021ArchRepair: Block-Level Architecture-Oriented Repairing for Deep Neural Networkscited by 7
50 most cited of 52 All 52 (JSON)
Built on by
Citing papers per year: 2025: 1.
1 paper.