SafeInfer: Context Adaptive Decoding Time Safety Alignment for Large Language Models
On the map: LLM alignment / RLHF / preference optimisation → Safety alignment and jailbreak attacks
also in 1 more
Abstract (arXiv)
Safety-aligned language models often exhibit fragile and imbalanced safety mechanisms, increasing the likelihood of generating unsafe content. In addition, incorporating new knowledge through editing techniques to language models can further compromise safety. To address these issues, we propose SafeInfer, a context-adaptive, decoding-time safety alignment strategy for generating safe responses to user queries. SafeInfer comprises two phases: the safety amplification phase, which employs safe demonstration examples to adjust the model's hidden states and increase the likelihood of safer outputs, and the safety-guided decoding phase, which influences token selection based on safety-optimized distributions, ensuring the generated content complies with ethical guidelines. Further, we present HarmEval, a novel benchmark for extensive safety evaluations, designed to address potential misuse scenarios in accordance with the policies of leading AI tech giants.
Key facts. Cited by 23 papers in the map (data through 14 Oct 2026). Placed in Safety alignment and jailbreak attacks, one of 10 directions in LLM alignment / RLHF / preference optimisation. Builds on 29 of its 38 references that are in the map. First posted on arXiv 18 Jun 2024.
Builds on
29 of 38 references.
Closest ancestors · 2
Same direction, newest first
- 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!5 Oct
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Models1 Sep
Other references · 27
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2022Constitutional AI: Harmlessness from AI Feedbackcited by 3,050
- 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,975
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,336
- 2020RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Modelscited by 1,255
- 2023Accelerating Large Language Model Decoding with Speculative Samplingcited by 1,006
- 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 799
- 2021DExperts: Decoding-Time Controlled Text Generation with Experts and Anti-Expertscited by 441
15 more
- 2021FUDGE: Controlled Text Generation With Future Discriminatorscited by 376
- 2023Towards Best Practices of Activation Patching in Language Models: Metrics and Methodscited by 359
- 2024SafeDecoding: Defending against Jailbreak Attacks via Safety-Aware Decodingcited by 247
- 2022On Second Thought, Let's Not Think Step by Step! Bias and Toxicity in Zero-Shot Reasoningcited by 194
- 2023MasterKey: Automated Jailbreak Across Multiple Large Language Model Chatbotscited by 183
- 2022COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamicscited by 161
- 2021NeuroLogic A*esque Decoding: Constrained Text Generation with Lookahead Heuristicscited by 154
- 2023Inspecting and Editing Knowledge Representations in Language Modelscited by 141
- 2023Stay on topic with Classifier-Free Guidancecited by 91
- 2023Controlled Text Generation via Language Model Arithmeticcited by 51
- 2022Critic-Guided Decoding for Controlled Text Generationcited by 45
- 2022Detoxifying Text with MaRCo: Controllable Revision with Experts and Anti-Expertscited by 36
- 2023PREADD: Prefix-Adaptive Decoding for Controlled Text Generationcited by 29
- 2024How (un)ethical are instruction-centric responses of LLMs? Unveiling the vulnerabilities of safety guardrails to harmful queriescited by 27
- 2024Sowing the Wind, Reaping the Whirlwind: The Impact of Editing Language Modelscited by 20
Built on by
Citing papers per year: 2024: 1; 2025: 11; 2026: 11.
23 papers.
Sort:
By area:
- 2025Safe RLHF-V: Safe Reinforcement Learning from Multi-modal Human Feedbackcited by 30
- 2025Advancing LLM Safe Alignment with Safety Representation Rankingcited by 16
- 2025On Almost Surely Safe Alignment of Large Language Models at Inference-Timecited by 14
- 2025SafeVid: Toward Safety Aligned Video Large Multimodal Modelscited by 9
- 2025Privacy-Aware Decoding: Mitigating Privacy Leakage of Large Language Models in Retrieval-Augmented Generationcited by 8
- 2025Scalable Defense against In-the-wild Jailbreaking Attacks with Safety Context Retrievalcited by 7
- 2025Speculative Safety-Aware Decodingcited by 7
- 2024Navigating the Cultural Kaleidoscope: A Hitchhiker's Guide to Sensitivity in Large Language Modelscited by 4
- 2025Efficiency vs. Alignment: Investigating Safety and Fairness Risks in Parameter-Efficient Fine-Tuning of LLMscited by 4
- 2025MemeSense: An Adaptive In-Context Framework for Social Commonsense Driven Meme Moderationcited by 3
- 2026CASA: Classification Augmented with Safety Attention for Robust Multimodal Alignmentcited by 2
- 2025ProSocialAlign: Preference Conditioned Test Time Alignment in Language Modelscited by 1
11 more
- 2026Position: AI Safety Requires Effective Controllabilitycited by 1
- 2025Evaluation of AI Ethics Tools in Language Models: A Developers' Perspective Case Studycited by 0
- 2026Tutoring Large Language Models to be Domain-adaptive, Precise, and Safecited by 0
- 2026DDOR: Delta Debugging for Explainable Overrefusal Testing and Repaircited by 0
- 2026Refusal-Gated Decoding: Preserving Refusal Behavior Under High-Temperature Samplingcited by 0
- 2026Moving the Safety Barrier: Dynamic Routing Adaptive Alignment Against White-Box Attackscited by 0
- 2026Beyond Tokens: A Survey on Decoding Methods for Large Language and Vision-Language Modelscited by 0
- 2026RISA: Response Inspection and Selective Actions for Refusal Calibration in Large Language Modelscited by 0
- 2026Refuse without Refusal: A Structural Analysis of Safety-Tuning Responses for Reducing False Refusals in Language Modelscited by 0
- 2026ForeSight: Enhancing Risk Monitoring via Early Safety Signal Distillationcited by 0
- 2026Tutoring Large Language Models to be Domain-adaptive, Precise and Safecited by 0
- 2026Tutoring Large Language Models to be Domain-adaptive, Precise and Safe19 Sep 2026
- 2026ForeSight: Enhancing Risk Monitoring via Early Safety Signal Distillation12 Sep 2026
- 2026Refuse without Refusal: A Structural Analysis of Safety-Tuning Responses for Reducing False Refusals in Language Models4 Sep 2026
- 2026RISA: Response Inspection and Selective Actions for Refusal Calibration in Large Language Models1 Sep 2026
- 2026Beyond Tokens: A Survey on Decoding Methods for Large Language and Vision-Language Models14 Aug 2026
- 2026Moving the Safety Barrier: Dynamic Routing Adaptive Alignment Against White-Box Attacks2 Aug 2026
- 2026Refusal-Gated Decoding: Preserving Refusal Behavior Under High-Temperature Sampling22 Jul 2026
- 2026DDOR: Delta Debugging for Explainable Overrefusal Testing and Repair2 Jun 2026
- 2026Position: AI Safety Requires Effective Controllability26 May 2026
- 2026CASA: Classification Augmented with Safety Attention for Robust Multimodal Alignment31 Mar 2026
- 2026Tutoring Large Language Models to be Domain-adaptive, Precise, and Safe14 Feb 2026
- 2025Evaluation of AI Ethics Tools in Language Models: A Developers' Perspective Case Study16 Dec 2025
11 more
- 2025ProSocialAlign: Preference Conditioned Test Time Alignment in Language Models6 Dec 2025
- 2025Efficiency vs. Alignment: Investigating Safety and Fairness Risks in Parameter-Efficient Fine-Tuning of LLMs1 Nov 2025
- 2025Speculative Safety-Aware Decoding25 Aug 2025
- 2025Privacy-Aware Decoding: Mitigating Privacy Leakage of Large Language Models in Retrieval-Augmented Generation5 Aug 2025
- 2025Scalable Defense against In-the-wild Jailbreaking Attacks with Safety Context Retrieval21 May 2025
- 2025Advancing LLM Safe Alignment with Safety Representation Ranking21 May 2025
- 2025SafeVid: Toward Safety Aligned Video Large Multimodal Models17 May 2025
- 2025Safe RLHF-V: Safe Reinforcement Learning from Multi-modal Human Feedback22 Mar 2025
- 2025MemeSense: An Adaptive In-Context Framework for Social Commonsense Driven Meme Moderation16 Feb 2025
- 2025On Almost Surely Safe Alignment of Large Language Models at Inference-Time3 Feb 2025
- 2024Navigating the Cultural Kaleidoscope: A Hitchhiker's Guide to Sensitivity in Large Language Models15 Oct 2024
- 2025On Almost Surely Safe Alignment of Large Language Models at Inference-Timecited by 14
- 2026CASA: Classification Augmented with Safety Attention for Robust Multimodal Alignmentcited by 2
- 2025ProSocialAlign: Preference Conditioned Test Time Alignment in Language Modelscited by 1
- 2026DDOR: Delta Debugging for Explainable Overrefusal Testing and Repaircited by 0
- 2026Moving the Safety Barrier: Dynamic Routing Adaptive Alignment Against White-Box Attackscited by 0
- 2026Refuse without Refusal: A Structural Analysis of Safety-Tuning Responses for Reducing False Refusals in Language Modelscited by 0
- 2026Refuse without Refusal: A Structural Analysis of Safety-Tuning Responses for Reducing False Refusals in Language Models4 Sep 2026
- 2026Moving the Safety Barrier: Dynamic Routing Adaptive Alignment Against White-Box Attacks2 Aug 2026
- 2026DDOR: Delta Debugging for Explainable Overrefusal Testing and Repair2 Jun 2026
- 2026CASA: Classification Augmented with Safety Attention for Robust Multimodal Alignment31 Mar 2026
- 2025ProSocialAlign: Preference Conditioned Test Time Alignment in Language Models6 Dec 2025
- 2025On Almost Surely Safe Alignment of Large Language Models at Inference-Time3 Feb 2025
- 2025Advancing LLM Safe Alignment with Safety Representation Rankingcited by 16
- 2025Scalable Defense against In-the-wild Jailbreaking Attacks with Safety Context Retrievalcited by 7
- 2026RISA: Response Inspection and Selective Actions for Refusal Calibration in Large Language Modelscited by 0
- 2026ForeSight: Enhancing Risk Monitoring via Early Safety Signal Distillationcited by 0
- 2026ForeSight: Enhancing Risk Monitoring via Early Safety Signal Distillation12 Sep 2026
- 2026RISA: Response Inspection and Selective Actions for Refusal Calibration in Large Language Models1 Sep 2026
- 2025Scalable Defense against In-the-wild Jailbreaking Attacks with Safety Context Retrieval21 May 2025
- 2025Advancing LLM Safe Alignment with Safety Representation Ranking21 May 2025
- 2025Speculative Safety-Aware Decodingcited by 7
- 2025Speculative Safety-Aware Decoding25 Aug 2025
- 2024Navigating the Cultural Kaleidoscope: A Hitchhiker's Guide to Sensitivity in Large Language Modelscited by 4
- 2025Efficiency vs. Alignment: Investigating Safety and Fairness Risks in Parameter-Efficient Fine-Tuning of LLMscited by 4
- 2025MemeSense: An Adaptive In-Context Framework for Social Commonsense Driven Meme Moderationcited by 3
- 2026Position: AI Safety Requires Effective Controllabilitycited by 1
- 2025Evaluation of AI Ethics Tools in Language Models: A Developers' Perspective Case Studycited by 0
- 2026Tutoring Large Language Models to be Domain-adaptive, Precise, and Safecited by 0
- 2026Refusal-Gated Decoding: Preserving Refusal Behavior Under High-Temperature Samplingcited by 0
- 2026Tutoring Large Language Models to be Domain-adaptive, Precise and Safecited by 0
- 2026Tutoring Large Language Models to be Domain-adaptive, Precise and Safe19 Sep 2026
- 2026Refusal-Gated Decoding: Preserving Refusal Behavior Under High-Temperature Sampling22 Jul 2026
- 2026Position: AI Safety Requires Effective Controllability26 May 2026
- 2026Tutoring Large Language Models to be Domain-adaptive, Precise, and Safe14 Feb 2026
- 2025Evaluation of AI Ethics Tools in Language Models: A Developers' Perspective Case Study16 Dec 2025
- 2025Efficiency vs. Alignment: Investigating Safety and Fairness Risks in Parameter-Efficient Fine-Tuning of LLMs1 Nov 2025
- 2025MemeSense: An Adaptive In-Context Framework for Social Commonsense Driven Meme Moderation16 Feb 2025
- 2024Navigating the Cultural Kaleidoscope: A Hitchhiker's Guide to Sensitivity in Large Language Models15 Oct 2024
Similar, not cited
Close in wording, no citation either way
- 2024Safety Arithmetic: A Framework for Test-time Safety Alignment of Language Models by Steering Parameters and Activations
- 2025Vulnerability Mitigation for Safety-Aligned Language Models via Debiasing
- 2024Towards Comprehensive Post Safety Alignment of Large Language Models via Safety Patching
- 2025Safety Alignment Can Be Not Superficial With Explicit Safety Signals
- 2024Controllable Safety Alignment: Inference-Time Adaptation to Diverse Safety Requirements
- 2025SABER: Uncovering Vulnerabilities in Safety Alignment via Cross-Layer Residual Connection
- 2026Safety at One Shot: Patching Fine-Tuned LLMs with A Single Instance
- 2025SafeMERGE: Preserving Safety Alignment in Fine-Tuned Large Language Models via Selective Layer-Wise Model Merging