校准奖励,而非发明解码器
LARA 在已有奖励中加入经过校准的代价惩罚,并将结果交给推理时对齐程序。
起点目标是在限制期望代价的同时,最大化期望奖励减去 KL 惩罚。
奖励与代价由固定模型给出,其分数不会自动成为真实有用性和危害。
Paper Notes
原创笔记逐句中英对照Sentence-aligned original note
合成教学数值,不是论文实验结果。默认静止;所有步骤均可在下方静态说明中阅读。Synthetic teaching values, not paper results. Nothing plays automatically; all steps remain available in the static explanation.
LARA 在已有奖励中加入经过校准的代价惩罚,并将结果交给推理时对齐程序。LARA adds a calibrated cost penalty to an existing reward and passes the result to an inference-time alignment procedure.
Yaswanth Chittepu, Ativ Joshi, Sohini Chintala, Scott Niekum
Original reading note; cited methods and evidence, not an experimental reproduction. · 2607.02781v2
LARA 在已有奖励中加入经过校准的代价惩罚,并将结果交给推理时对齐程序。
起点目标是在限制期望代价的同时,最大化期望奖励减去 KL 惩罚。
奖励与代价由固定模型给出,其分数不会自动成为真实有用性和危害。
在分数有界且存在严格可行策略时,拉格朗日函数将约束转化为乘子 λ ≥ 0。
求导得到 g′(λ) = τ − E_{π*_λ}[c],因此期望代价超预算时,最优乘子应向上调整。
二阶导数为条件代价方差的期望除以 β,因此非负。
常数代价不提供曲率,因此强凸性需要额外的方差假设。
搜索区间必须包含有用解;选到区间上边界本身不能证明可行。
对每个校准提示词,程序从参考模型采样若干回答,并估计对数配分函数。
然后跨提示词平均,并最小化所得凸标量目标。
有限样本定理假设奖励与代价有界、最优点位于区间内部,且紧区间内强凸。
误差同时包含提示词数量 N 和每个提示词的回答数 K。
K 固定时,仅增加 N 不能消除内部 Monte Carlo 误差。
精确推导针对完整回答上的 Gibbs 分布。
逐词局部奖励修改通常不会采样其精确下一词条件分布,因为后者需要对未来续写求和。
即便普通的确定性 Best-of-N 选择,一般也不等于有限温度 Gibbs 采样。
因此,应直接检查具体解码器的经验约束满足情况,而不是从理想策略公式自动继承保证。
这一限定也适用于论文对序列级重排序的解释。
主实验以经 Alpaca 微调的 Llama-3.2-3B 和 Qwen-2.5-3B 为参考策略。
奖励与代价模型使用 BeaverTails 偏好标签,对照包含 Safe-RLHF、SafeDPO 和推理时基线。
图 1 扫描 λ 以观察实测有用性与代价的权衡,附录还给出 8B 检查。
校准后的期望代价预算是总体平均,不是逐提示词保证;若代价定义不对应攻击成功,也不能视为攻击成功率上界。
复现应分离校准与评估提示词,并比较实际部署解码器的代价与理想倾斜分布估计。
分布漂移、代价模型误差与尾部估计不准仍是重要局限。
本原创笔记覆盖上文讨论的方法和选定实验证据,不是论文全文翻译;本次未运行模型复现实验。来源许可:https://creativecommons.org/licenses/by/4.0/
原文所列作者或相关代码链接:https://github.com/tatsu-lab/stanford_alpaca; https://github.com/pku-alignment/safe-rlhf; https://github.com/ahmadrash/PARGS
原图与数据来自原论文。解释与比较属于阅读笔记。版本和图表编号随正文标明。
Yaswanth Chittepu, Ativ Joshi, Sohini Chintala, Scott Niekum
Original reading note; cited methods and evidence, not an experimental reproduction. · 2607.02781v2
LARA adds a calibrated cost penalty to an existing reward and passes the result to an inference-time alignment procedure.
Its starting objective maximizes expected reward minus a KL penalty while constraining expected cost.
The reward and cost are fixed models; their scores are not automatically ground-truth helpfulness and harm.
Under bounded scores and a strict feasible policy, the Lagrangian converts the constraint into a multiplier λ ≥ 0.
Differentiating gives g′(λ) = τ − E_{π*_λ}[c], so excess expected cost pushes the optimal multiplier upward.
The second derivative is the expected conditional cost variance divided by β and is nonnegative.
A constant cost supplies no curvature, so strong convexity needs an additional variance assumption.
The search interval must contain a useful solution; choosing its upper boundary does not itself establish feasibility.
For each calibration prompt, the procedure samples several responses from the reference model and estimates the log partition function.
It averages across prompts and minimizes the resulting convex scalar objective.
The finite-sample theorem assumes bounded rewards and costs, an interior optimum, and strong convexity on a compact interval.
Its error contains both the number of prompts N and the number of responses per prompt K.
Increasing N alone does not eliminate the inner Monte Carlo error when K stays fixed.
The exact derivation concerns a Gibbs distribution over complete responses.
A token-local reward modification generally does not sample its exact next-token conditional, which would require summing over future completions.
Even ordinary deterministic Best-of-N selection is not generally identical to finite-temperature Gibbs sampling.
Thus empirical constraint satisfaction by a chosen decoder should be checked directly rather than inherited from the ideal policy formula.
This qualification also applies to the paper's sequence-level reranking interpretation.
The main experiments use Alpaca-finetuned Llama-3.2-3B and Qwen-2.5-3B as reference policies.
Reward and cost models use BeaverTails preference labels, and comparisons include Safe-RLHF, SafeDPO, and inference-time baselines.
Figure 1 sweeps λ to inspect the measured helpfulness-cost tradeoff; an 8B check appears in the appendix.
A calibrated expected-cost budget is a population average, not a guarantee for every prompt or a bound on attack success without a matching cost definition.
A reproduction should separate calibration prompts from evaluation prompts and compare the deployed decoder's cost with the ideal tilted estimate.
Distribution shift, cost-model error, and inaccurate tail estimates remain important limitations.
This original note covers the method and selected experimental evidence discussed above. It is not a full-paper translation. No model experiments were run for this note. Source license: https://creativecommons.org/licenses/by/4.0/
Author-code links in the source: https://github.com/tatsu-lab/stanford_alpaca; https://github.com/pku-alignment/safe-rlhf; https://github.com/ahmadrash/PARGS
Original figures and data come from the cited paper. Explanations and comparisons are reading notes. Source versions and figure labels appear beside the material.