Kaijing Ma

Paper Notes

Selective Safety Steering via Value-Filtered Decoding

Paper Notes

Explore the method

Synthetic teaching values, not paper results. Nothing plays automatically; all steps remain available in the static explanation.

Static explanation and limits

A threshold screens estimated continuation values. Finite retries use a best-sampled fallback.

  1. Input: the base model proposes A, B, or C. A value estimator predicts how successful a continuation from each candidate would be. Value is not the base token probability.
  2. Compare the estimated values with the threshold. Acceptable tokens are highlighted in the conditional distribution below. The estimator can make mistakes.
  3. Draw candidates from the base model and accept the first one that passes. With unlimited retries and a nonempty accepted set, the result is the base distribution conditioned on passing.
  4. Finite retries require a fallback. For the fixed teaching draw sequence C, B, C, choose B if none passes, because it has the highest value among those draws. A was never drawn.
  5. Threshold calibration and decoding are different stages. The paper calibrates against value-estimation error; a high threshold alone does not certify the final text. Read the note for assumptions and calibration.

Bat-Sheva Einbinder, Hen Davidov, Yee Whye Teh, Yarin Gal, Yaniv Romano

arXiv preprint · arXiv:2605.14746v3 · 2 November 2026

Paper and version history · Author code

The question and the reading boundary

A safety intervention has two costs: it may fail to stop an unsafe continuation, and it may alter a continuation that was already safe.

This paper makes the second cost an explicit statistical target, while using a token filter to improve the first.

The central distinction is between a safety score for a finished answer and a value function that predicts the safety of a future completion under a specified policy.

This original reading note uses arXiv:2605.14746v3, revised on 2 November 2026, and covers the main text and technical appendices of the 38 page PDF.

The paired edition translates this note sentence by sentence; it is not a reproduction or a full translation of the paper.

1 / 10arXiv:2605.14746v3 · 2 November 2026

What the value function measures

Vₜ = Pπ(r(X, Y) = 1 | X, Y₁:ₜ), r ∈ {0, 1}

Here X is the prompt, Y₁:ₜ is the current prefix, and π is the unchanged base policy used for the hypothetical continuation.

A token has high value when the prefix ending in that token is likely to lead to a safe final answer under π, even if the prefix alone looks ambiguous.

The value therefore depends on the base model, its decoding settings, the prefix, and the definition of the binary safety label.

A classifier that detects offensive words in the prefix does not automatically estimate this conditional probability.

Equation 1 supplies the definition; Section 3.5 and Appendix E.2 replace the unknown value with a learned probe at deployment.

2 / 10arXiv:2605.14746v3 · 2 November 2026

Filtering as a local KL projection

A꜀ = {y : V(X, Y₁:ₜ₋₁, y) ≥ c}, Z꜀ = Σᵧ π(y | X, Y₁:ₜ₋₁) 1{y ∈ A꜀}
π꜀(y | X, Y₁:ₜ₋₁) = π(y | X, Y₁:ₜ₋₁) 1{y ∈ A꜀} / Z꜀, Z꜀ > 0

The filter removes probability mass below c and renormalizes the remaining tokens without changing their relative probabilities.

min KL(q || π) subject to q(A꜀) = 1; KL(q || π) = KL(q || π꜀) + log(1/Z꜀)

The identity proves the local optimum because the first term is nonnegative and becomes zero only at q = π꜀.

The direction KL(q || π) matters because q can assign zero mass to excluded tokens without an infinite penalty from those tokens.

This is a minimum change statement at one prefix under a hard support constraint, rather than a claim of globally optimal preservation of complete answers.

For comparison, a Gibbs policy multiplies every token probability by exp(λV), so even two acceptable tokens can have their relative odds changed.

In a worked example created for this note, base probabilities (0.50, 0.30, 0.20), values (0.90, 0.70, 0.10), and c = 0.60 yield filtered probabilities (0.625, 0.375, 0).

The expected next value rises from 0.68 to 0.825, while the odds between the two retained tokens remain 5:3.

3 / 10arXiv:2605.14746v3 · 2 November 2026

What the oracle guarantees

Theorem 3.2 compares continuation values under π꜀ and π, assuming exact values and a nonempty acceptance set at every reachable state.

Vₜ^(π꜀) ≥ Vₜ; Eπ꜀[r | X] ≥ Eπ[r | X]

Backward induction connects the final binary reward to earlier prefixes: conditioning the next value on its upper region cannot reduce its mean.

Theorem 3.5 then measures a different event: whether a trajectory drawn from π and ultimately labeled safe ever falls below c.

Pπ(∃t > 0 : Vₜ < c | r = 1) ≤ [c/(1−c)] E[(1−p(X))/p(X) | r = 1], p(X) = Pπ(r = 1 | X)

The right side is averaged over the prompt distribution conditioned on safe completions, so it is not a universal threshold guarantee independent of the base model.

The proof uses a likelihood ratio process and Ville’s inequality, which bound a crossing anywhere along the trajectory instead of charging a separate error budget at each token.

The appendix states interior probability assumptions for the martingale argument; terminal values are binary, so endpoint cases require the usual support or limiting care.

Neither this false intervention bound nor a lower bound on continuation value should be presented as a numerical bound on deployed unsafe answers from a learned probe.

4 / 10arXiv:2605.14746v3 · 2 November 2026

Calibration controls a trajectory event

mᵢ = minₜ V̂(Xᵢ, Yᵢ,₁:ₜ), Lᵢ(c) = 1{mᵢ < c}, R̂(c) = (1/n) Σᵢ Lᵢ(c)

Appendix D uses safe completions sampled from the base policy, with the probe fixed independently of the calibration examples.

Taking the minimum over the whole trajectory makes the calibration loss match the event of at least one false intervention.

ĉ = sup{c ∈ [0,1] : R̂(c) ≤ (⌊(n+1)α⌋−1)/n}; E[L(ĉ)] ≤ α

Theorem D.2 requires exchangeability between safe calibration trajectories and the safe test trajectory, and its expectation includes both calibration and test randomness.

It is a marginal guarantee, not a separate guarantee for every prompt or every realized calibration set.

For an original arithmetic example with n = 99 and α = 0.05, the displayed rule permits at most 4 calibration trajectories to cross the threshold.

If α < 1/(n+1), the displayed feasible set is empty; an implementation needs an explicit conservative convention such as c = 0 for scores in [0,1].

That boundary convention is an implementation observation in this note, rather than an extra step specified in Algorithm 2.

A poor probe can still support the stated false intervention control, but calibration alone cannot restore the oracle safety improvement theorem.

5 / 10arXiv:2605.14746v3 · 2 November 2026

Robustness depends on the threshold margin

If the value error is bounded by η, only tokens within η of c can change their accept or reject status.

This gives a useful diagnostic: the base probability mass near the threshold matters more than a single average prediction error.

Propositions 3.6 and 3.7 compare policy sensitivity in total variation, while Proposition 3.8 compares expected true value under a specific adversarial error model.

V̂ = V − η sgn(V−c); Eπ̂꜀[V] − Eπ̂g[V] ≥ 2η(1−M−P)

Here M is the filtered policy’s probability of choosing a truly below threshold token, and P is the Gibbs policy’s probability of choosing a truly above threshold token.

The sufficient condition M + P < 1 depends on this geometry, an active Gibbs constraint, and the stated noise construction.

It does not establish that hard filtering always beats Gibbs decoding for arbitrary learned errors or every fixed λ.

6 / 10arXiv:2605.14746v3 · 2 November 2026

The implementation changes the guarantee boundary

Algorithm 1 samples candidate tokens from π, accepts the first candidate with estimated value at least c, and falls back to the highest scoring candidate when all K fail.

With unlimited trials and positive acceptance mass, rejection sampling is exact; with finite K, the fallback branch can emit a token below the threshold.

P(fallback at a fixed prefix) = (1−Ẑ꜀)ᴷ

This equation follows from independent candidate draws and shows why increasing K helps locally, without implying monotonic empirical fallback rates across different generated trajectories.

Appendix E.3 uses K = 40 and evaluates a single candidate first, drawing the remaining K−1 only after rejection.

Appendix E.2 specifies a three layer value head, focal loss with temporal smoothness, 5,000 training prompts, and 24 or 16 sampled responses per prompt depending on the dataset.

The concrete focal loss recipe is more specific than the discussion’s brief description in terms of binary cross entropy.

A separate holdout pool of 1,000 examples supplies the safe calibration subset; its size n is not automatically 1,000.

7 / 10arXiv:2605.14746v3 · 2 November 2026

Evidence and measurement choices

The experiments use Mistral-7B-Instruct-v0.3, Llama-3.1-8B-Instruct, and Gemma-4-E4B on HH-RLHF, BeaverTails, and PKU-SafeRLHF.

Regular decoding, ARGS, Controlled decoding, and CARDS are the baselines, and the steering methods share the learned value estimator.

Figure 3 averages each operating point over 500 prompts and reports one standard error across prompts, rather than variation across independent training runs.

The strongest reported pattern is preservation of the base response at useful safety levels; Appendix F.3 explicitly reports no safety versus helpfulness advantage on PKU-SafeRLHF.

Helpfulness here measures compliance with the requested intent, including harmful intent, while safety is evaluated separately by the judge.

The safety prompt also labels quoted offensive language as unsafe, so the measured objective includes a specific labeling policy rather than a universal definition of harm.

The authors report agreement on 256 of 280 manually checked cases, but this does not eliminate shared judge bias between probe training and evaluation.

Selected measurements from v3; mean ± standard error. These are distinct experiments, not one joint operating point.
Source / settingValue-filteredComparison / context
Table 1 · HH-RLHF · f = 00.935 ± 0.017Controlled: 0.905 ± 0.021
Table 1 · HH-RLHF · f = 20.945 ± 0.016Controlled: 0.890 ± 0.022
Table 1 · BeaverTails · f = 10.890 ± 0.022Controlled: 0.900 ± 0.021
Table 9 · HH-RLHF · α = 0.05 · K = 400.005 ± 0.005Fallback
Table 9 · HH-RLHF · α = 0.85 · K = 400.680 ± 0.033Fallback
Table 13 · HH-RLHF · α = 0.050.832 ± 0.017Unchanged responses
Table 13 · HH-RLHF · α = 0.850.128 ± 0.015Unchanged responses

In Table 1, f scales injected Gaussian noise relative to the trajectory’s value estimate standard deviation, and the compared settings use dataset specific α values.

Winning in 14 of 15 reported cells is a descriptive result, not evidence that all differences are statistically significant.

The large fallback value at α = 0.85 and the small unchanged fraction make the weak preservation at this aggressive operating point visible.

Cosine similarity uses sentence embeddings and cannot by itself certify equal factual content, style, or reasoning quality.

8 / 10arXiv:2605.14746v3 · 2 November 2026

Interpretation and useful follow-up tests

The most reusable contribution is a measurable intervention budget tied to a trajectory event, together with a decoder that preserves relative probabilities inside the accepted set.

A distribution shift test could calibrate on one prompt population and evaluate another, separating false intervention risk from safety, helpfulness, and fallback frequency.

A stronger measurement study could use an independent judge and human review of unchanged, improved, and degraded responses.

A threshold diagnostic could report acceptance mass and near threshold mass alongside probe accuracy, because these quantities explain both computational cost and sensitivity.

These are proposed evaluations from this note; no model training or reproduction experiments were run for this reading.

9 / 10arXiv:2605.14746v3 · 2 November 2026

Source map and terminology

The method and oracle claims are in Sections 3.1 to 3.4 and Appendix B; calibration is in Appendix D; implementation is in Algorithm 1 and Appendix E.

The main comparison is in Figures 3 and 4 on pages 8 and 9; the PKU comparison is Figure 8 on page 35; noise results are Table 1 on page 10.

Fallback, speed, and unchanged response measurements appear in Tables 9, 12, and 13 on pages 36 and 37.

The note links to the original figures instead of reproducing them, and presents selected numerical facts as a new table with source labels.

Terminology
English中文
value function价值函数
base policy基础策略
false intervention误干预
safe trajectory安全轨迹
exchangeability可交换性
marginal guarantee边际保证
rejection sampling拒绝采样
fallback回退
acceptance mass接受概率质量
total variation总变差
10 / 10arXiv:2605.14746v3 · 2 November 2026

Original figures and data come from the cited paper. Explanations and comparisons are reading notes. Source versions and figure labels appear beside the material.