Offline Reinforcement Learning for LLM Multi-Step Reasoning

Huaijie Wang, Shibo Hao, Hanze Dong, Shenao Zhang, Yilin Bao +2 more
12/20/2024
cs.LGcs.AIcs.CL

No official code found. Best implementation: jwhj/OREO (116 stars, Apache-2.0, last commit 2025-01-21). 1 more below.

Abstract

Improving the multi-step reasoning ability of large language models (LLMs) with offline reinforcement learning (RL) is essential for quickly adapting them to complex tasks. While Direct Preference Optimization (DPO) has shown promise in aligning LLMs with human preferences, it is less suitable for multi-step reasoning tasks because (1) DPO relies on paired preference data, which is not readily available for multi-step reasoning tasks, and (2) it treats all tokens uniformly, making it ineffective for credit assignment in multi-step reasoning tasks, which often come with sparse reward. In this work, we propose OREO (Offline Reasoning Optimization), an offline RL method for enhancing LLM multi-step reasoning. Building on insights from previous works of maximum entropy reinforcement learning, it jointly learns a policy model and value function by optimizing the soft Bellman Equation. We show in principle that it reduces the need to collect pairwise data and enables better credit assignment. Empirically, OREO surpasses existing offline learning methods on multi-step reasoning benchmarks, including mathematical reasoning tasks (GSM8K, MATH) and embodied agent control (ALFWorld). The approach can be extended to a multi-iteration framework when additional resources are available. Furthermore, the learned value function can be leveraged to guide the tree search for free, which can further boost performance during test time.

View on arXivView PDF

Code Implementations(2)

jwhj/OREOCommunity100%
Apache-2.0
1165Shell, PythonDec 20, 20241 years agoApache-2.0
MIT

Reinforcement learning on LLMs in multi-step text-based environments.

21Shell, PythonFeb 23, 20251 years agoMIT
babyaibabyai-textllama3llmllm-agents+1 more

Similar Papers

Cite this paper

@article{wang2024offline,
  title  = {Offline Reinforcement Learning for LLM Multi-Step Reasoning},
  author = {Huaijie Wang and Shibo Hao and Hanze Dong and Shenao Zhang and Yilin Bao and Ziran Yang and Yi Wu},
  year   = {2024},
  eprint = {2412.16145},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.16145v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.16145.svg)](https://codeofpaper.com/paper/2412.16145)

Discussion