Variational Best-of-N Alignment

要約

Best-of-N (BoN) は、言語モデルを人間の好みに合わせるための一般的で効果的なアルゴリズムです。
このアルゴリズムは次のように機能します。推論時に、言語モデルから N 個のサンプルが抽出され、報酬モデルによって判断された最高の報酬を持つサンプルが出力として返されます。
BoN はその有効性にもかかわらず、計算コストが高くつきます。
サンプリング スループットが N 倍減少します。推論時の BoN の効率を高めるための 1 つの戦略は、推論中に BoN が行う動作を模倣するように言語モデルを微調整することです。
これを達成するために、BoN アルゴリズムによって引き起こされる分布を導出します。
次に、BoN 分布への後方 KL 発散を最小限に抑えるために言語モデルを微調整することを提案します。
私たちのアプローチは平均場変分推論に似ているため、これを変分 BoN (vBoN) と呼びます。
この微調整が成功し、最終的に良好な近似が得られる限り、推論コストは N 分の 1 に削減されました。制御された生成タスクに関する実験では、変分 BoN は調整において BoN ほど効果的ではないことがわかりました。
言語モデルでは、KL 制約のある RL 目標でトレーニングされたモデルと比較して、vBoN が報酬と KL 発散のパレートフロンティアに頻繁に現れるため、BoN のパフォーマンスに近くなります。

要約(オリジナル)

Best-of-N (BoN) is a popular and effective algorithm for aligning language models to human preferences. The algorithm works as follows: at inference time, N samples are drawn from the language model, and the sample with the highest reward, as judged by a reward model, is returned as the output. Despite its effectiveness, BoN is computationally expensive; it reduces sampling throughput by a factor of N. To make BoN more efficient at inference time, one strategy is to fine-tune the language model to mimic what BoN does during inference. To achieve this, we derive the distribution induced by the BoN algorithm. We then propose to fine-tune the language model to minimize backward KL divergence to the BoN distribution. Our approach is analogous to mean-field variational inference and, thus, we term it variational BoN (vBoN). To the extent this fine-tuning is successful and we end up with a good approximation, we have reduced the inference cost by a factor of N. Our experiments on a controlled generation task suggest that while variational BoN is not as effective as BoN in aligning language models, it is close to BoN performance as vBoN appears more often on the Pareto frontier of reward and KL divergence compared to models trained with KL-constrained RL objective.

arxiv情報

著者 Afra Amini,Tim Vieira,Ryan Cotterell
発行日 2024-07-08 15:59:44+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL, cs.LG パーマリンク