arXiv:2511.17852cs.LGstat.ML2025-11

对比RL与SFT在学习稀疏布尔函数时的差异,揭示两者推理链生成机制不同。

Transformers with RL or SFT Provably Learn Sparse Boolean Functions, But Differently

  • 通过统一分析框架比较强化学习与监督微调的训练动态。
  • 证明了k-PARITY、k-AND、k-OR等稀疏函数可被两类方法正确学习。
  • 发现RL同步学习整个推理链,而SFT逐步学习每一步推理。

Transformer 可通过微调获得链式思维(CoT)能力以解决推理任务。强化学习(RL)和监督微调(SFT)是两种主要方法。本文研究在可验证过程奖励下的 RL 与 SFT 如何通过单层 Transformer 学习 $k$-稀疏布尔函数,并借助类似 CoT 的中间推理步骤。特别地,我们考虑可递归分解为固定2-稀疏布尔函数的布尔函数。首先,我们以统一方式分析带有可验证过程奖励的 RL 微调与 SFT 的学习动态,识别出变压器可保证学习这些函数的充分条件。随后验证了三个例子(包括 $k$-PARITY、$k$-AND、$k$-OR)满足该条件,从而证明它们可通过两种方法学习。值得注意的是,我们发现:在不同监督下,RL 同步学习完整推理链,而 SFT 在无教师强迫时逐步学习推理步骤。整体上,研究揭示了 RL 与 SFT 触发变压器 CoT 能力的内在机制差异,强调比较二者应考虑中间监督形式。

原文摘要 · Abstract (English)

Transformers can acquire Chain-of-Thought (CoT) capabilities to solve reasoning tasks via fine-tuning. Reinforcement learning (RL) and supervised fine-tuning (SFT) are two primary approaches to this end. In this work, we examine RL with verifiable process rewards and SFT for learning $k$-sparse Boolean functions with a one-layer transformer through intermediate reasoning steps akin to CoT. In particular, we consider Boolean functions that can be recursively decomposed into fixed 2-sparse Boolean functions. We first analyze the learning dynamics of RL fine-tuning with verifiable process rewards and SFT in a unified way, allowing us to identify sufficient conditions under which the transformer provably learns these functions. We then verify that the conditions hold for three examples, including $k$-PARITY, $k$-AND, and $k$-OR, thus demonstrating their learnability via both RL and SFT. Notably, we reveal that RL and SFT exhibit distinct learning behaviors depending on supervision: RL learns the whole CoT chain simultaneously, whereas SFT without teacher forcing learns the CoT step-by-step. Overall, our findings provide insights on the mechanisms underlying RL and SFT and how they differ in triggering the CoT capabilities of transformers, and suggest that the comparison between RL and SFT should consider the intermediate supervision.

Transformer强化学习监督微调链式思维

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。