atlas

Research map / Large language models / Alignment and preferences

LEGEND: Leveraging Representation Engineering to Annotate Safety Margin for Preference Datasets

AAAI 2025 · Large language models › Alignment and preferences · approach: Reward model design and preference models · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes LEGEND, a training-free method that uses a safety direction (Standard Margin Vector) in LLM embedding space, derived from harmful/harmless responses, to automatically annotate binned safety margins for preference datasets.

Problem

Preference datasets for safety reward modeling use binary harmless/harmful labels that do not capture how much safer one response is; human margin annotation is costly and existing automatic margin methods (RewardEnsemble) require training multiple reward models.

Approach

Construct a safety direction (SMV) as the normalized mean difference between last-token embeddings of harmless and harmful responses from an annotator LLM, then project each pair's embedding difference onto this direction and bin the resulting values into discrete margins, requiring only inference.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add LEGEND margin annotations to the Harmless preference datasetReward models across Pythia-410M, Pythia-1.4B, Pythia-2.8B, and Llama2-7B-chat · Harmlessaccuracy: +3.65, +1.99, +1.53, +1.04Helped
Add LEGEND margin annotations to the Safe-RLHF preference datasetReward models across Pythia-410M, Pythia-1.4B, Pythia-2.8B, and Llama2-7B-chat · Safe-RLHFaccuracy: +0.17, +1.75, +5.39, +2.04Helped
Use LEGEND instead of RewardEnsemble@3 for margin annotationReward models across the Harmless and Safe-RLHF benchmarks · Harmless and Safe-RLHFaccuracyMixed
Remove safety-direction SMV projection from LEGEND (ablation)LEGEND with Llama2-7B Base annotator · Safe-RLHFaccuracy gain over Origin: -1.04_{\pm 2.42}Hurt
Add binning to LEGEND rather than using continuous margins (ablation)LEGEND with Llama2-7B Base annotator · Safe-RLHFaccuracy: at least a 1.42% increaseHelped
Vary the number of bins from 10 to 3, 5, or 7 (ablation)LEGEND reward-model training · Safe-RLHFaccuracy gain over Origin: 1.69_{\pm 1.46}; 1.99_{\pm 0.99}; -0.01_{\pm 0.68}; 2.34_{\pm 2.19}Mixed
Replace Llama2-7B Base with Llama2-13B Base as Annotator LLM (ablation)LEGEND · Safe-RLHFaccuracy gain over Origin: -0.39_{\pm 0.57}Mixed
Use Llama2-13B Base instead of Llama2-7B Base as Annotator LLM (ablation)LEGEND · Safe-RLHFaccuracy: 52.32; 56.39; 58.75; 70.49 vs 53.73; 59.63; 63.48; 70.88Mixed
Use a larger Annotator LLM, Llama2-13B Base (ablation)LEGEND · Harmlessaccuracy: 66.61; 73.30; 72.67; 72.63 vs 72.22; 74.39; 71.05; 73.44Mixed
Use fewer bins for smaller reward models and more bins for larger reward models (ablation)LEGEND · Safe-RLHFaccuracyMixed
Use LEGEND instead of Origin for downstream best-of-n selectionPythia-6B-static-sft policy models · Safe-RLHF test questionswin rate: 7% to 14%Helped
Increase best-of-n sample size from 32 or 64 to 128 or 256 with LEGEND-based reward modelsPythia-2.8B and Qwen-4B-chat reward models · Safe-RLHF test questionswin rate: 7% to 14%Helped

Surprising findings

Limitations

Experimental setup

Datasets: AdvBench Harmless Safe-RLHF Alpaca

Benchmarks: Harmless Safe-RLHF

Metrics: reward model accuracy win rate annotation time cost Spearman rank correlation annotation consistency with humans

Baselines: Origin RewardEnsemble@1 RewardEnsemble@2 RewardEnsemble@3

Builds on: RewardEnsemble InferAligner margin-based reward model loss Alpaca fine-tuning

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy