通过贝叶斯视角统一 ICL、SFT 与 KL 正则化强化学习
文章背景与核心概要
当前,大型语言模型(LLM)的训练与评估横跨了多个碎片化的范式,包括监督微调(SFT)、少样本上下文学习(ICL)、KL 正则化的 RLHF/RLVR、同策略蒸馏(OPD)以及结合搜索与思维链的测试时推理。本文提供了一个统一的理论框架,利用贝叶斯视角将所有这些流程置于同等地位。
该核心框架依赖于一个两步模板:1. 构建后验分布:结合先验/参考模型与效用信号(如对数似然、奖励或优势),在给定上下文的情况下针对输出或动作形成(广义)贝叶斯或吉布斯后验 \(q^*\)。2. 近似后验分布:通过前向 KL 投影将 \(q^*\) 近似映射到参数化族中——既可以通过权重内部(in-weights)(通过 SFT/RL),也可以通过上下文内部(in-context)(通过 ICL)。
核心要点与论文结构
- 第一部分(ICL 与 SFT):将少样本 ICL 和 SFT 形式化为对贝叶斯后验预测分布的摊销化(amortized)权重内投影。
- 第二至四部分(强化学习与奖励加权):证明了 KL 正则化的 RLHF/RLVR、奖励加权 SFT、奖励加权 ICL(RW-ICL)以及优势加权 SFT(AWSFT)全都是前向 KL 投影的直接实例,这些后验由奖励或优势诱导产生。论文仔细区分了这些等价性成立的地方(目标函数和一阶更新)与它们产生差异的地方(学习信号的来源与粒度)。
- 第五部分(现代推理管线):将该框架应用于当代架构,并分析了:
- 以“后验设计 + 投影”构成的 RLHF/RLVR 配方。
- 为什么对于重要性加权 KL 投影而言,冷启动或监督预热在实践中是不可避免的。
- DeepSeek-R1 和 OpenAI o1 风格的推理模型如何巧妙地将测试时贝叶斯搜索与训练时 KL 摊销结合起来。
Key Takeaways & Paper Structure
- Part I (ICL & SFT): Formalizes few-shot ICL and SFT as amortized in-weights projections onto the Bayes posterior predictive distribution.
- Parts II–IV (Reinforcement Learning & Reward Weighting): Demonstrates that KL-regularized RLHF/RLVR, reward-weighted SFT, reward-weighted ICL (RW-ICL), and advantage-weighted SFT (AWSFT) are all direct instances of forward-KL projection onto posteriors induced by rewards or advantages. The paper carefully distinguishes where these equivalences hold (objectives and first-order updates) versus where they differ (source and granularity of the learning signal).
- Part V (Modern Reasoning Pipelines): Applies the framework to contemporary architectures, analyzing:
- RLHF/RLVR recipes framed as "posterior design + projection".
- Why cold-start or supervised warm-ups are practically unavoidable for importance-weighted KL projections.
- How DeepSeek-R1 and OpenAI o1-style reasoning models cleverly combine test-time Bayesian search with training-time KL amortization.