Efficient Safety Alignment of Large Language Models via Preference Re-ranking and Representation-based Reward Modeling

Qiyuan Deng, Xuefeng Bai, Kehai Chen, Yaowei Wang, Liqiang Nie +1 more
3/13/2025
cs.CL

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Reinforcement Learning (RL) algorithms for safety alignment of Large Language Models (LLMs), such as Direct Preference Optimization (DPO), encounter the challenge of distribution shift. Current approaches typically address this issue through online sampling from the target policy, which requires significant computational resources. In this paper, we hypothesize that during off-policy training, while the ranking order of output generated by policy changes, their overall distribution remains relatively stable. This stability allows the conversion of the sampling process from the target policy into a computationally efficient re-ranking of preference data. Building on this hypothesis, we propose a new framework that leverages the model's intrinsic safety judgment capability to extract reward signals, which are then used to calculate label confidence for preference reordering. Extensive experiments and theoretical analysis demonstrate that the proposed method effectively addresses the distribution shift issue, remarkably enhancing the safety performance while avoiding about 300x computational overheads.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{deng2025efficient,
  title  = {Efficient Safety Alignment of Large Language Models via Preference Re-ranking and Representation-based Reward Modeling},
  author = {Qiyuan Deng and Xuefeng Bai and Kehai Chen and Yaowei Wang and Liqiang Nie and Min Zhang},
  year   = {2025},
  eprint = {2503.10093},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.10093v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.10093.svg)](https://codeofpaper.com/paper/2503.10093)

Discussion