chain-of-thought llm-reasoning gsm8k majority-voting inference-strategies reinforced-finetuning ppo-algorithm math-problem-solving
Abstract
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.
한국어 요약
한 줄 요약
ReFT는 수학 문제 해결을 위한 LLM 학습에서 PPO 기반 강화 학습을 활용해 SFT 대비 75.28%의 정확도를 달성한 새로운 미세조정 방법이다.
핵심 기여도
- ReFT는 SFT와 동일한 학습 질문만으로도 75.28%의 정확도를 달성하며, SFT 대비 2.3% 이상 개선됨.
- PPO 기반 강화 학습을 활용해 여러 CoT 경로를 자동 샘플링하고, 정답 기반 보상을 통해 별도 보상 모델 없이 학습함.
- CodeLLAMA와 Galactica 모델에서 GSM8K, MathQA, SVAMP 데이터셋에서 실증적 성능 향상 확인됨.
- 다수결 투표와 재순위 매기기와 같은 추론 전략과 결합 시 추가 성능 향상 가능함.
핵심 아이디어
기존 SFT는 수학 문제 학습 시 각 질문에 대해 단일 CoT 경로만 사용하여 일반화 능력이 제한된다. ReFT는 이 문제를 해결하기 위해 PPO 알고리즘을 기반으로 한 강화 학습을 도입하여, 동일한 질문에 대해 여러 CoT 경로를 자동으로 샘플링하고 학습한다. 이는 모델이 다양한 추론 경로를 경험함으로써 일반화 능력을 향상시키는 데 기여한다. ReFT는 정답 기반 보상을 사용하므로 별도의 보상 모델 학습이 필요하지 않으며, SFT와 비교해 동일한 학습 질문만으로도 더 높은 성능을 달성한다.
기술적 접근법
- **모델**: CodeLLAMA, Galactica
- **알고리즘**: PPO (Proximal Policy Optimization) 기반 강화 학습
- **학습 단계**:
1. **SFT Warm-up**: 최대 1~2 에포크 동안 SFT로 초기 학습 수행.
2. **PPO 학습**: CoT 경로를 자동 샘플링하고, 정답 기반 보상을 사용해 정책 최적화.
- **데이터셋**: GSM8K, MathQA, SVAMP
- **추론 전략**: 다수결 투표, 재순위 매기기 (reward model reranking)
주요 결과
- **CodeLLAMA + ReFT**: GSM8K P-CoT에서 75.28% 정확도 달성 (SFT 대비 +2.3% 이상 개선).
- **부분 보상 제거 시**: 74.40% 정확도로 SFT 대비 여전히 우수한 성능 유지.
- **KL 계수 β=0 설정 시**: 정책 분포가 붕괴되어 0% 정확도 발생.
- **별도 가치 모델 사용 시**: 75.15% 정확도 달성, 하지만 계산 및 메모리 비용이 2배 증가.
의의 및 한계
ReFT는 동일한 학습 질문만으로도 SFT 대비 우수한 일반화 능력을 보여주며, 별도 보상 모델 없이도 학습 가능하다는 점에서 실용적 가치가 높다. 또한, 추론 단계에서 다수결 투표와 재순위 매기기를 결합하면 추가 성능 향상이 가능하다. 그러나 KL 계수 β 설정이 중요하며, 부적절한 설정 시 정책이 붕괴될 수 있다. 또한, 별도 가치 모델 사용 시 계산 및 메모리 비용이 증가하는 한계가 있다.
실용적 활용
ReFT는 수학 문제 해결을 포함한 추론 중심의 LLM 학습에 적용 가능하며, 특히 학습 데이터 확장을 어려울 때 유용하다. 교육, 챗봇, 자동화된 문제 해결 시스템 등에서 활용 가능하며, 추론 전략과 결합하면 실용적 성능을 더욱 향상시킬 수 있다.