Rationale Generation Bootstrapping (STaR Without Rationalization). 給定預(yù)訓(xùn)練 LLM M M M 和 small prompt set P = { ( x i p , r i p , y i p ) } i = 1 P \mathcal{P}=\{(x_{i}^{p},r_{i}^{p},y_{i}^{p})\}_{i=1}^{P} P={(xip?,rip?,yip?)}i=1P? (e.g. P = 10 P = 10 P=10),其中 x x x 為問題, r r r 為中間推理步驟, y y y 為問題回答,可以利用 few-shot prompting 為一個更大的數(shù)據(jù)集 D = { ( x i , y i ) } i = 1 D \mathcal D=\{(x_i,y_i)\}_{i=1}^D D={(xi?,yi?)}i=1D? 生成中間推理步驟 r ^ i \hat r_i r^i? 和答案 y ^ i \hat y_i y^?i?,這樣就得到了含有中間推理步驟的大規(guī)模數(shù)據(jù)集。此外,作者只保留其中 y ^ i = y i \hat y_i=y_i y^?i?=yi? 的樣本,因為這些樣本對應(yīng)的中間推理步驟質(zhì)量總體來說會更高一些,由此得到 filtered dataset,在此數(shù)據(jù)集上微調(diào) M M M 得到可以直接生成中間推理步驟的 LLM. 上述步驟為 1 個循環(huán),STaR 會重復(fù)上述循環(huán)多次,每次都用上一輪循環(huán)中得到的最新的生成中間推理步驟的 LLM M n ? 1 M_{n-1} Mn?1? 為 D \mathcal D D 生成中間推理步驟得到 filtered dataset,然后在該數(shù)據(jù)集上基于預(yù)訓(xùn)練 LLM M M M 重新訓(xùn)練得到新的生成中間推理步驟的 LLM M n M_n Mn?;上述優(yōu)化過程可以被近似看作 policy gradient,其中 J ( M , X , Y ) J(M,X,Y) J(M,X,Y) 為 total expected reward across the dataset
Rationalization. 上述步驟還有一個缺點,就是如果 D \mathcal D D 中某些難樣本始終無法生成正確答案,那么這些樣本將永遠無法加入 filtered dataset,無法被有效學(xué)習(xí);為此,作者給生成錯誤答案的樣本 prompt 中加入提示正確答案的 hint 來引導(dǎo)模型生成中間推理步驟和最終答案
STaR.
Experiments
Symbolic Reasoning: Results on Arithmetic.
Natural Language Reasoning: Commonsense Question Answering.
Mathematical Reasoning in Language: Grade School Math.
References
Zelikman, Eric, et al. “Star: Bootstrapping reasoning with reasoning.” Advances in Neural Information Processing Systems 35 (2022): 15476-15488.