Lune

EMNLP2024Top-tier venue

InferAligner: Inference-Time Alignment for Harmlessness through Cross-Model Guidance

Pengyu Wang, Dong Zhang, Linyang Li, Chenkun Tan, Xinghao Wang, Mozhi Zhang, Ke Ren, Botian Jiang, Xipeng Qiu

Abstract

As large language models (LLMs) rapidly evolve, they are increasingly being customized through fine-tuning to suit the specific needs of various applications. A critical aspect of this advancement is the alignment process, which ensures that these models perform tasks in ways that align with human values and expectations. Current alignment methods, such as direct preference optimization (DPO) and reinforcement learning from human feedback (RLHF), focus primarily on alignment during training phase. However, these methods often involve complex and resource-intensive training processes, posing significant challenge for their implementation. Therefore, we propose InferAligner, a simple yet effective method for harmlessness alignment during inference phase. InferAligner decouples harmlessness from helpfulness. During the training phase, it focuses solely on enhancing the target model's capabilities on downstream tasks. In the inference phase, it utilizes safety steering vectors extracted from the aligned model to guide the target model towards harmlessness alignment. Experimental results show that our method can be very effectively applied to domain-specific models in finance, medicine, and mathematics, as well as to multimodal large language models (MLLMs) such as LLaVA. It significantly diminishes the attack success rate (ASR) of both harmful instructions and jailbreak instructions, while maintaining almost unchanged performance in downstream tasks. 1

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

26 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Tree of Thoughts: Deliberate Problem Solving with Large Language Models cites Language Models are Few-Shot Learners
  • Fast Best-of-N Decoding via Speculative Rejection cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • Fast Best-of-N Decoding via Speculative Rejection cites Language Models are Few-Shot Learners
  • Fast Best-of-N Decoding via Speculative Rejection cites Training language models to follow instructions with human feedback
  • Direct Preference Optimization: Your Language Model is Secretly a Reward Model cites Language Models are Few-Shot Learners
  • Direct Preference Optimization: Your Language Model is Secretly a Reward Model cites Training language models to follow instructions with human feedback
  • Visual Instruction Tuning cites Language Models are Few-Shot Learners
  • Visual Instruction Tuning cites Training language models to follow instructions with human feedback
  • SpeechAlign: Aligning Speech Generation to Human Preferences cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • SpeechAlign: Aligning Speech Generation to Human Preferences cites Visual Instruction Tuning
  • The VLLM Safety Paradox: Dual Ease in Jailbreak Attack and Defense cites Training language models to follow instructions with human feedback
  • The VLLM Safety Paradox: Dual Ease in Jailbreak Attack and Defense cites Understanding and Rectifying Safety Perception Distortion in VLMs
  • Understanding and Rectifying Safety Perception Distortion in VLMs cites The VLLM Safety Paradox: Dual Ease in Jailbreak Attack and Defense
  • Training language models to follow instructions with human feedback cites Language Models are Few-Shot Learners
  • Understanding and Rectifying Safety Perception Distortion in VLMs cites Visual Instruction Tuning
  • GuardReasoner-VL: Safeguarding VLMs via Reinforced Reasoning cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • GuardReasoner-VL: Safeguarding VLMs via Reinforced Reasoning cites Visual Instruction Tuning
  • GuardReasoner-VL: Safeguarding VLMs via Reinforced Reasoning cites Training language models to follow instructions with human feedback
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers26

  1. Fast Best-of-N Decoding via Speculative RejectionHanshi Sun, Momin Haider, Ruiqi Zhang, Huitao Yang et al.NeurIPS 2024 · 144 citations
  2. SpeechAlign: Aligning Speech Generation to Human PreferencesDong Zhang, Zhaowei Li, Shimin Li, Xin Zhang et al.NeurIPS 2024 · 74 citations
  3. GuardReasoner-VL: Safeguarding VLMs via Reinforced ReasoningYue Liu, Shengfang Zhai, Mingzhe Du, Yulin Chen et al.NeurIPS 2025 · 40 citations
  4. The VLLM Safety Paradox: Dual Ease in Jailbreak Attack and DefenseYangyang Guo, Fangkai Jiao, Liqiang Nie, Mohan KankanhalliNeurIPS 2025 · 24 citations
  5. Understanding and Rectifying Safety Perception Distortion in VLMsXiaohan Zou, Jian Kang, George Kesidis, Lu LinNeurIPS 2025 · 20 citations

Builds on15

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  3. Visual Instruction TuningHaotian Liu, Chunyuan Li, Qingyang Wu, Yong Jae LeeNeurIPS 2023 · 11,349 citations
  4. Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
  5. Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsShunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran et al.NeurIPS 2023 · 5,068 citations

Related papers

  1. PURE: Aligning LLM via Pluggable Query Reformulation for Enhanced HelpfulnessWenjin Yao, Yidong Wang, Zhuohao Yu, Rui Xie et al.EMNLP Findings 2024 · 2 citations
  2. AlphaAlign: Incentivizing Safety Alignment with Extremely Simplified Reinforcement LearningYi Zhang, An Zhang, XiuYu Zhang, Leheng Sheng et al.ICLR 2026 · 15 citations
  3. Separate the Wheat from the Chaff: A Post-Hoc Approach to Safety Re-Alignment for Fine-Tuned Language ModelsDi Wu, Xin Lu, Yanyan Zhao, Bing QinACL Findings 2025
  4. On the Vulnerability of Safety Alignment in Open-Access LLMsJingwei Yi, Rui Ye, Qisi Chen, Bin Zhu et al.ACL Findings 2024 · 15 citations
  5. Bleeding Pathways: Vanishing Discriminability in LLM Hidden States Fuels Jailbreak AttacksYingjie Zhang, Tong Liu, Zhe Zhao, Guozhu Meng et al.NDSS 2026 · 5 citations
Dusk over the sea between two cliffs drawn in fine vertical lines