BarrierSteer: LLM Safety via Learning Barrier Steering
On the map: LLM safety and security → Safety alignment, refusal and guardrails
Abstract (arXiv)
Despite the strong performance of large language models (LLMs) across diverse tasks, their susceptibility to adversarial attacks and unsafe content generation remains a significant obstacle to deployment, particularly in high-stakes settings. Addressing this challenge requires safety mechanisms that are both practically effective and theoretically grounded. In this paper, we introduce BarrierSteer, a novel inference-time framework that improves response safety by embedding learned nonlinear safety constraints directly into the model's latent representation space. BarrierSteer treats hidden-state safety classifiers as Control Barrier Functions (CBFs), enabling constraint-guided steering of unsafe latent trajectories during generation. By composing multiple safety constraints through efficient constraint merging without modifying the underlying LLM parameters, BarrierSteer preserves model utility. We provide theoretical results showing that applying CBFs in the latent space yields a principled, modular, and computationally efficient approach for steering with respect to learned safety constraints, with guarantees conditional on the learned barriers capturing the intended safety property. Our extensive experimental results across multiple model families and datasets demonstrate that BarrierSteer substantially reduces adversarial attack success rates and unsafe generations, outperforming the existing method. The code is available in our hrefhttps://github.com/thanhquangtran/BarrierSteerGitHub repository.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 84 of its 97 references that are in the map. First posted on arXiv 23 Feb 2026.
Builds on
84 of 97 references.
Closest ancestors · 6
Same direction, newest first
- 2025Preemptive Detection and Steering of LLM Misalignment via Latent Reachability25 Sep
- 2025Guardians and Offenders: A Survey on Harmful Content Generation and Safety Mitigation of LLM7 Aug
- 2025Learning Safety Constraints for Large Language Models30 May
- 2024WildGuard: Open One-Stop Moderation Tools for Safety Risks, Jailbreaks, and Refusals of LLMs26 Jun
- 2024Refusal in Language Models Is Mediated by a Single Direction17 Jun
- 2024Improving Alignment and Robustness with Circuit Breakers6 Jun
Other references · 78
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2023GPT-4 Technical Reportcited by 18,132
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,634
38 more
- 2022Constitutional AI: Harmlessness from AI Feedbackcited by 2,950
- 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,919
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
- 2023A Survey of Large Language Modelscited by 2,537
- 2021Convex optimizationcited by 2,479
- 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
- 2023Inference-Time Intervention: Eliciting Truthful Answers from a Language Modelcited by 1,259
- 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,239
- 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,235
- 2023Instruction-Following Evaluation for Large Language Modelscited by 1,143
- 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,124
- 2023Steering Llama 2 via Contrastive Activation Additioncited by 1,009
- 2017Constrained Policy Optimizationcited by 928
- 2023Steering Language Models With Activation Engineeringcited by 824
- 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 793
- 2023AutoDAN: Generating Stealthy Jailbreak Prompts on Aligned Large Language Modelscited by 738
- 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 709
- 2022Red Teaming Language Models to Reduce Harms: Methods, Scaling Behaviors, and Lessons Learnedcited by 702
- 2023Safe RLHF: Safe Reinforcement Learning from Human Feedbackcited by 630
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 608
- 2017OptNet: Differentiable Optimization as a Layer in Neural Networkscited by 588
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMscited by 533
- 2023XSTest: A Test Suite for Identifying Exaggerated Safety Behaviours in Large Language Modelscited by 477
- 2023"Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language Modelscited by 457
- 2024Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attackscited by 450
- 2023SmoothLLM: Defending Large Language Models Against Jailbreaking Attackscited by 434
- 2023Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrationscited by 401
- 2018Reward Constrained Policy Optimizationcited by 397
- 2023Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discoverycited by 329
- 2024R-Judge: Benchmarking Safety Risk Awareness for LLM Agentscited by 268
- 2016Control Barrier Function Based Quadratic Programs for Safety Critical Systemscited by 261
- 2023Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Modelscited by 237
- 2021Gradient-based Adversarial Attacks against Text Transformerscited by 233
- 2023LLM Self Defense: By Self Examination, LLMs Know They Are Being Trickedcited by 226
- 2025AxBench: Steering LLMs? Even Simple Baselines Outperform Sparse Autoencoderscited by 199
- 2024Foundational Challenges in Assuring Alignment and Safety of Large Language Modelscited by 193
- 2024Programming Refusal with Conditional Activation Steeringcited by 191
50 most cited of 78 All 78 (JSON)
Built on by
Not cited yet.