ReFT: Ragionamento con Fine-Tuning Rinforzato
ReFT: Reasoning with Reinforced Fine-Tuning
January 17, 2024
Autori: Trung Quoc Luong, Xinbo Zhang, Zhanming Jie, Peng Sun, Xiaoran Jin, Hang Li
cs.AI
Abstract
Un modo per potenziare la capacità di ragionamento dei Large Language Models (LLM) è condurre un Fine-Tuning Supervisionato (SFT) utilizzando annotazioni di tipo Chain-of-Thought (CoT). Tuttavia, questo approccio non mostra una capacità di generalizzazione sufficientemente forte, poiché l'addestramento si basa esclusivamente sui dati CoT forniti. Nella risoluzione di problemi matematici, ad esempio, di solito esiste un solo percorso di ragionamento annotato per ogni domanda nei dati di addestramento. Intuitivamente, sarebbe meglio per l'algoritmo apprendere da più percorsi di ragionamento annotati per una data domanda. Per affrontare questo problema, proponiamo un approccio semplice ma efficace chiamato Reinforced Fine-Tuning (ReFT) per migliorare la generalizzabilità dell'apprendimento dei LLM per il ragionamento, utilizzando come esempio la risoluzione di problemi matematici. ReFT inizialmente riscalda il modello con SFT, e poi utilizza l'apprendimento per rinforzo online, nello specifico l'algoritmo PPO in questo articolo, per affinare ulteriormente il modello, dove una moltitudine di percorsi di ragionamento viene campionata automaticamente per ogni domanda e le ricompense sono derivate naturalmente dalle risposte corrette. Esperimenti estensivi sui dataset GSM8K, MathQA e SVAMP dimostrano che ReFT supera significativamente SFT, e le prestazioni possono essere potenzialmente ulteriormente migliorate combinando strategie di inferenza come il voto a maggioranza e il riordinamento. Si noti che ReFT ottiene il miglioramento apprendendo dalle stesse domande di addestramento di SFT, senza fare affidamento su domande di addestramento aggiuntive o aumentate. Ciò indica una superiore capacità di generalizzazione per ReFT.
English
One way to enhance the reasoning capability of Large Language Models (LLMs)
is to conduct Supervised Fine-Tuning (SFT) using Chain-of-Thought (CoT)
annotations. This approach does not show sufficiently strong generalization
ability, however, because the training only relies on the given CoT data. In
math problem-solving, for example, there is usually only one annotated
reasoning path for each question in the training data. Intuitively, it would be
better for the algorithm to learn from multiple annotated reasoning paths given
a question. To address this issue, we propose a simple yet effective approach
called Reinforced Fine-Tuning (ReFT) to enhance the generalizability of
learning LLMs for reasoning, with math problem-solving as an example. ReFT
first warmups the model with SFT, and then employs on-line reinforcement
learning, specifically the PPO algorithm in this paper, to further fine-tune
the model, where an abundance of reasoning paths are automatically sampled
given the question and the rewards are naturally derived from the ground-truth
answers. Extensive experiments on GSM8K, MathQA, and SVAMP datasets show that
ReFT significantly outperforms SFT, and the performance can be potentially
further boosted by combining inference-time strategies such as majority voting
and re-ranking. Note that ReFT obtains the improvement by learning from the
same training questions as SFT, without relying on extra or augmented training
questions. This indicates a superior generalization ability for ReFT.