acceptodds
Published as a conference paper at NeurIPS 2026

BSO: Safety Alignment Is Density Ratio Matching

Tien-Phat Nguyen, Truong Nguyen, Thin Nguyen, Duy M. H. Nguyen, Ngoc-Thanh Dinh, Trung Le

Abstract

Aligning language models for both helpfulness and safety typically requires complex pipelines—separate reward and cost models, online reinforcement learning, and primal-dual updates. Recent direct preference optimization approaches simplify training but incorporate safety through ad-hoc modifications such as multi-stage procedures or heuristic margin terms, lacking a principled derivation. We show that the likelihood ratio of the optimal safe policy admits a closed-form decomposition that reduces safety alignment to a density ratio matching problem. Minimizing Bregman divergences between the data and model ratios yields **Bregman Safety Optimization (BSO)**, a family of single-stage loss functions, each induced by a convex generator, that provably recover the optimal safe policy. BSO is both general and simple: it requires no auxiliary models, introduces only one hyperparameter beyond standard preference optimization, and recovers existing safety-aware methods as special cases. Experiments across safety alignment benchmarks show that BSO consistently improves the safety–helpfulness trade-off.

Keywords:
Sydney, Main Track

Reviews

Among:
Shape:
123456this paper, Bottom 3%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 3.50 over 2 reviews, above 3% of the others.
Reviewer_hQuyOpenReview ↗
Rating
3
Clarity
3
Confidence
3
Originality
2
Quality
3
Significance
2
Read review
Summary

This paper proposes BSO, a safety-aware preference optimization framework. It derives a safety-adjusted policy ratio from a KL-regularized objective with binary safety costs, formulates training as Bregman density-ratio matching, and shows that SafeDPO is a special case. Experiments on PKU-SafeRLHF-30K suggest improved helpfulness-safety trade-offs over SFT, SafeRLHF, SACPO, and SafeDPO.

Strengths and weaknesses

Strengths

1). The paper presents a clear theoretical view of safety alignment through density-ratio matching.

2). The analysis further provides useful theoretical support for the safety margin and loss design.

3). The derivation is generally clear, and the proposed framework is easy to follow.

Weaknesses

1). The empirical validation is limited. The experiments mainly use one safety preference dataset and two relatively small backbones, Qwen2.5-0.5B and Llama3.2-3B. It is unclear whether the gains generalize to larger instruction-tuned models or more diverse safety benchmarks.

2). The evaluation relies heavily on reward/cost models and LLM-as-judge metrics. Since safety evaluation is sensitive to evaluator bias, additional human evaluation or multiple independent evaluators would make the claims more convincing.

3). The paper does not sufficiently analyze over-refusal. Higher harmlessness may come from excessive refusal on benign but sensitive prompts rather than better safety alignment.

4). The method assumes binary safety labels. This is a strong simplification, as real safety judgments are often graded, multi-dimensional, and context-dependent.

5). More ablation studies are needed to evaluate the contribution of each component.

Questions
  1. How robust is BSO to noisy or inconsistent safety labels?

  2. Can the framework be extended to graded or multi-class safety annotations instead of binary safe/unsafe labels?

  3. Is there a principled criterion for choosing the Bregman generator beyond empirical performance?

  4. Does BSO increase false refusal rates on benign but sensitive prompts?

Limitations

See the Weaknesses.

Paper formatting concerns

N/A

Final justification

The rebuttal addresses most of my concerns. The additional experiments on Mistral-7B, HarmBench, JBB-Behaviors, multi-judge evaluation, XSTest, label noise, and generator ablations provide stronger evidence for the method’s generalization, evaluation robustness, and technical design.

1 comment

We thank the reviewer for the comment and address the raised weakness below.

W1: Generalization Across Model Scales and Safety Benchmarks

We agree that the original evaluation on PKU-SafeRLHF-30K with Qwen2.5-0.5B and Llama3.2-3B did not fully establish generalization to larger instruction-tuned models or out-of-distribution safety benchmarks. We therefore added experiments covering both dimensions.

Larger backbone. We trained SafeDPO and BSO - SBA on Mistral-7B-Instruct-v0.3 using the same PKU-SafeRLHF training and test splits:

ModelReward ↑Harmless Ratio ↑
Mistral-7B backbone2.6178.8%
SafeDPO−1.7594.7%
BSO (λ=0.2\lambda=0.2, C=25C=25)−0.3096.4%

BSO-SBA achieves higher harmlessness than SafeDPO while preserving substantially more helpfulness, showing that the favorable safety–helpfulness trade-off extends to a 7B instruction-tuned model.

External benchmarks. We further evaluated the same Mistral-7B models on direct-request versions of HarmBench and JBB-Behaviors, using identical prompts, decoding settings, and the HarmBench classifier:

BenchmarkBSO-SBASafeDPO
HarmBench Overall ASR ↓17.08%18.33%
HarmBench Standard ASR ↓8.81%10.69%
HarmBench Contextual ASR ↓33.33%33.33%
JBB-Behaviors ASR ↓5.0%12.0%

BSO-SBA obtains a lower ASR on both HarmBench and JBB-Behaviors. The JBB result uses the JBB harmful-goal set with the HarmBench classifier and should not be interpreted as an official JailbreakBench leaderboard evaluation.

These results provide evidence that BSO’s gains extend beyond the original 0.5B–3B backbones and generalize to safety benchmarks outside the PKU-SafeRLHF test distribution. We will add the full protocols and results to the revised manuscript.

W2: Evaluator Robustness

We evaluated the same Mistral-7B responses on the PKU-SafeRLHF test set using two independent judges: MiMo-V2.5 and DeepSeek-V4.

JudgeMetricBackboneSafeDPOBSO
MiMoHarmless ratio88.1%96.9%98.4%
MiMoAverage helpfulness6.894.424.87
DeepSeekHarmless ratio87.5%96.5%98.1%
DeepSeekAverage helpfulness6.734.024.85

BSO consistently outperforms SafeDPO under both judges. It improves harmlessness by 1.5–1.6 percentage points and helpfulness by 0.45–0.83 points, showing that the relative advantage is not evaluator-specific.

We also measured item-level agreement:

ModelHarmlessness agreementCohen's κ\kappaHelpfulness Spearman ρ\rho
Backbone95.0%0.7670.463
SafeDPO97.2%0.5610.558
BSO98.6%0.5910.556

The judges show high harmlessness agreement (95.0–98.6%) and moderate helpfulness rank correlation. The lower κ\kappa values are expected under the highly imbalanced safety labels produced by aligned models.

We agree that human evaluation would provide a complementary signal and will acknowledge its absence as a limitation. Nevertheless, the consistent results across two independent judges directly address evaluator dependence.

W3/Q4: Over-Refusal on Benign Sensitive Prompts

To test whether BSO’s safety gains result from excessive refusal, we evaluated Mistral-7B models on XSTest (250 benign and 200 unsafe prompts) using MiMo-V2.5 and DeepSeek-V4 as independent judges.

JudgeMetricBSOSafeDPOMistral-7B Backbone
MiMo-V2.5Over-refusal ↓16.4%12.8%2.8%
MiMo-V2.5Harmlessness (>7) ↑95.0%87.5%87.0%
MiMo-V2.5Avg. safety ↑8.828.468.00
MiMo-V2.5Avg. helpfulness ↑5.465.016.44
DeepSeek-V4Over-refusal ↓16.0%16.4%3.6%
DeepSeek-V4Harmlessness (>7) ↑97.5%96.0%83.5%
DeepSeek-V4Avg. safety ↑9.809.558.62
DeepSeek-V4Avg. helpfulness ↑4.404.285.32

BSO achieves the highest harmlessness and safety under both judges while maintaining higher helpfulness than SafeDPO. Its over-refusal is comparable to SafeDPO—higher under MiMo-V2.5 but slightly lower under DeepSeek-V4—showing that its safety gains are not explained solely by refusing more benign prompts.

The original backbone refuses less and is more helpful, but is substantially less safe. We will add these results and clarify the remaining safety–helpfulness trade-off relative to the backbone.

W4/Q2: Generalize Beyond Binary Safety Labels

The binary safety assumption is specific to our current implementation and is not fundamental to BSO. Replacing the binary indicator s(x,y)s(x,y) with a graded cost c(x,y)≥0c(x,y)\geq 0 yields

rsafe(x,y)=r(x,y)−Cc(x,y),r_{\mathrm{safe}}(x,y)=r(x,y)-Cc(x,y),

with the corresponding safety correction

exp⁡(−Cβ[c(x,yw)−c(x,yl)]).\exp\left(-\frac{C}{\beta}\left[c(x,y_w)-c(x,y_l)\right]\right).

The formulation also supports multidimensional safety costs c(x,y)∈R≥0K\mathbf{c}(x,y)\in\mathbb{R}_{\geq 0}^{K} through

rsafe(x,y)=r(x,y)−λ⊤c(x,y),r_{\mathrm{safe}}(x,y)=r(x,y)-\boldsymbol{\lambda}^{\top}\mathbf{c}(x,y),

where λ∈R≥0K\boldsymbol{\lambda}\in\mathbb{R}_{\geq 0}^{K} specifies the relative importance of the different safety dimensions. The corresponding safety correction is

-\frac{1}{\beta} \boldsymbol{\lambda}^{\top} \left[ \mathbf{c}(x,y_w)-\mathbf{c}(x,y_l) \right] \right).$$ Under the same capacity and support assumptions, the resulting Bregman objective targets the corresponding safety-adjusted optimal policy. We agree that the current swap/drop transformation is tailored to binary labels. For graded or multidimensional annotations, the continuous safety correction should be retained directly rather than implemented through binary swapping and dropping. We will clarify that BSO is **theoretically extensible** beyond binary safety labels, while leaving empirical validation of these extensions to future work. > **W5/Q3: Ablation and Principled Bregman Generator Selection** The generator is not selected solely by empirical performance. At the population level, every strictly convex BSO generator has the same target optimum; generators differ in finite-sample optimization through the sample-weighting function $$W_h(R)=R^2 h''(R)+\frac{1}{R}h''\left(R^{-1}\right).$$ We use two generator-design criteria: 1. **Stable concordant-pair weighting.** Near $R=1$, weights should remain comparable to standard DPO so that ordinary helpfulness preferences are not distorted. 2. **Controlled safety amplification.** For large $R$, corresponding to safe-winner/unsafe-loser pairs, weights should increase without saturating. These criteria distinguish the generators structurally. LR saturates for large $R$; LSIF strongly amplifies safety pairs but assigns excessive weight near $R=1$; KLIEP provides linear amplification; and BA couples its amplification rate with its baseline scale. SBA decouples these effects: $$W_{\mathrm{SBA},\lambda}(R)=\frac{R^{\lambda+1}+R^{-\lambda}}{s}.$$ Setting $s=4$ gives $$W_{\mathrm{SBA},\lambda}(1)=\frac{1}{2},$$ matching the DPO baseline, while $\lambda$ independently controls large-$R$ amplification. Thus, SBA is selected for its normalized concordant-pair gradients and tunable safety amplification, not simply because it performs best empirically. **Generator Ablation** | Generator | Reward ↑ | Harmless Ratio ↑ | $\Delta$ Reward vs. Base | $\Delta$ Harmlessness vs. Base | Harmlessness Gained per Unit Reward Lost ↑ | |:--|--:|--:|--:|--:|--:| | Base (Llama-3.2-3B-Instruct) | 1.12 | 90.90% | — | — | — | | LR = SafeDPO ($C=10$) | -1.71 | 96.95% | -2.83 | +6.05 | 2.1 | | LSIF | **1.33** | 87.65% | +0.21 | -3.25 | — *(safety below base)* | | KLIEP | 0.89 | 96.65% | -0.23 | +5.75 | **25.3** | | BA ($\lambda=0.3$) | 0.64 | 97.09% | -0.48 | +6.19 | 12.9 | | SBA ($\lambda=0.3$, BSO) | 0.43 | **97.52%** | -0.69 | **+6.62** | 9.6 | The ablation is consistent with these criteria. LR substantially improves harmlessness but incurs a large reward loss, while LSIF reduces safety below the base model. KLIEP achieves the best marginal harmlessness gain per unit reward loss, whereas BA and SBA reach higher absolute harmlessness. SBA achieves the highest harmless ratio, $97.52\%$, and the largest absolute improvement, $6.62$ percentage points. We agree that no generator is universally optimal. KLIEP may be preferable for maximizing marginal safety gain per unit reward loss, while SBA is preferable for reaching a higher absolute safety operating point with normalized baseline gradients and explicit control over amplification. We will revise the paper to clarify that the theory provides principled generator-design criteria but does not uniquely identify one generator as optimal for every point on the safety–helpfulness frontier. > **Q1: Robustness to Noisy Safety Labels** We evaluated BSO with a **Mistral-7B** backbone after randomly flipping safety labels in $5\%$, $10\%$, and $20\%$ of training pairs, while keeping all other settings unchanged. | Method / safety-label noise | Reward ↑ | Harmless ratio ↑ | |---|---:|---:| | BSO, 0% (clean) | -0.30 | **96.42%** | | BSO, 5% | -0.30 | 94.75% | | BSO, 10% | -0.87 | 95.08% | | BSO, 20% | **-0.23** | 93.34% | | SafeDPO, clean labels | -1.75 | 94.71% | BSO degrades gradually rather than catastrophically: harmlessness remains above $93\%$ under all tested corruption levels, while reward remains competitive and does not decline monotonically. Because helpfulness preferences remain unchanged and most safety labels are still correct, moderate random corruption has limited impact. We will add these results and clarify their scope in the revision.
Reviewer_6uD4OpenReview ↗
Rating
4
Clarity
3
Confidence
4
Originality
2
Quality
3
Significance
3
Read review
Summary

This work proposes Bregman Safety Optimization (BSO) a method for LLM post-training that improves its safety alignment. The core observation is that one can express the safety objective as maximizing a downstream reward while penalizing generations that yield unsafe answers, subject to the constraint that the resulting LLM policy is close, in a KL-sense, to the reference policy. In doing so, one can use the insights from DPO to express the optimal policy as a specific tilted distribution, and then introduce probability ratios under the optimal policy between positive and negative samples according to preferences. The authors then propose to use Bregman divergences to learn such probability ratios, showing how prior safety extensions of DPO (i.e. safeDPO) can be recovered as special cases and propose a practical algorithm. Finally, BSO is evaluated on a single dataset against several baselines on two LLM architectures and some additional ablations are also performed.

Strengths and weaknesses

Strengths

  • Straightforward generalization of SafeDPO, yielding empirical improvements
  • Implementation seems straightforward and doesn’t introduce extra components
  • Method is well presented and the writing is easy to follow

Weaknesses

  • A bit incremental given SafeDPO; the machinery is the same, except the Bregman generalization, section 2.2. has the same problem introduction and, furthermore, the considerations for a practical algorithm, i.e., the data transformations, had already been proposed in SafeDPO. In addition Proposition 1 is just a direct application of DPO.
  • Single dataset evaluation, so unclear whether the observed performance improvements are a general pattern or manifest only on this dataset
  • Missing ablation on the choice of generators
Questions

Overall, I am leaning on the positive side for this work, but its relatively incremental novelty and single dataset evaluation prevent me from fully recommending acceptance. As for specific questions to the authors

  • Can the authors ablate and discuss the different choices of generators (e.g., BA, KLIEP, LSIF) for BSO? It will be interesting to see advantages / disadvantages and whether there is a design that is the best across all scenarios.
  • By observing Figure 2, 3, it does seem that increasing safety does correlate with reducing usefulness (albeit not to the extent that the baselines are affected), e.g., safety penalty C=30 in Figure 2. Could the authors investigate this a bit further? Is it due to the model over-refusing?
  • Can the authors perform additional experiments to see if the insights generalize? E.g., testing the finetuned LLMs on datasets such as BeaverTails (and ideally off-distribution to see if the fine-tuning leads to general purpose safety improvements and not just dataset specific safety improvements).

Some misc things:

  • In eq. 12, shouldn’t the probability ratio be between p_safe (as opposed to p_help)?
  • It would be good to introduce the acronyms discussed at Line 201; currently one has to keep on reading or go to the appendix to see what the other generator options are.
Limitations

Yes, but in the appendix.

Paper formatting concerns

None.

Final justification

The new experiments have made the method more convincing and thus I am more willing to recommend it. Having said that, the similarity of formulation to safeDPO remains and thus I will be maintaining my positive score as is.

Comments on the paper

1 comment
Meta-review

The paper proposes Bregman Safety Optimization, which recasts safety alignment as a density ratio matching problem. It derives a safety-adjusted policy ratio from a KL-regularized objective with binary safety costs, and shows SafeDPO is a special case.

The paper gives a clear theoretical view of safety alignment, and turns the heuristic safety margin in prior work into a derived term. The method is simple in practice. The writing and derivation are easy to follow.

The main shared concern is limited empirical validation: a single dataset and two relatively small backbones, so it is not clear whether the gains generalize to larger models or other safety benchmarks. The novelty may be somewhat incremental over SafeDPO, and the ablation on the choice of the Bregman generator is missing.

It would help if the authors could add results on additional safety benchmarks and, if feasible, a pilot run on a larger model. An ablation comparing the different generators would also address recurring questions. A clearer statement of what is new relative to SafeDPO beyond the Bregman generalization would be useful as well.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.