VerifierQ: Enhancing LLM Test Time Compute with Q-Learning-based Verifiers

## Abstract

Abstract Recent advancements in test time compute, particularly through the use of verifier models, have significantly enhanced the reasoning capabilities of Large Language Models (LLMs). This generator-verifier approach closely resembles the actor-critic framework in reinforcement learning (RL). However, current verifier models in LLMs often rely on supervised fine-tuning without temporal difference learning such as Q-learning. This paper introduces VerifierQ, a novel approach that integrates Offline Q-learning into LLM verifier models. We address three key challenges in applying Q-learning to LLMs: (1) handling utterance-level Markov Decision Processes (MDPs), (2) managing large action spaces, and (3) mitigating overestimation bias. VerifierQ introduces a modified Bellman update for bounded Q-values, incorporates Implicit Q-learning (IQL) for efficient action space management, and integrates a novel Conservative Q-learning (CQL) formulation for balanced Q-value estimation. Our method enables parallel Q-value computation and improving training efficiency. While recent work has explored RL techniques like MCTS for generators, VerifierQ is among the first to investigate the verifier (critic) aspect in LLMs through Q-learning. This integration of RL principles into verifier models complements existing advancements in generator techniques, potentially enabling more robust and adaptive reasoning in LLMs. Experimental results on mathematical reasoning tasks demonstrate VerifierQ’s superior performance compared to traditional supervised fine-tuning approaches, with improvements in efficiency, accuracy and robustness. By enhancing the synergy between generation and evaluation capabilities, VerifierQ contributes to the ongoing evolution of AI systems in addressing complex cognitive tasks across various domains.

## 1 Introduction

Large Language Models (LLMs) offer a promising approach to multi-step reasoning tasks through language. However, despite their prowess in generating coherent text, LLMs face significant challenges in sustained, multi-step logical reasoning due to their underlying architecture and propensity for hallucinations (Lightman et al., ). Overcoming these challenges is critical for enabling the next level of agent capabilities.

One of the most important recent developments in addressing these limitations is test time compute (Snell et al., ; Cobbe et al., ). As demonstrated by OpenAI (), test time compute represents a new paradigm in the scaling laws of LLMs. This approach essentially involves using a verifier model to evaluate and select the best solutions generated by an LLM, allowing for more extensive processing and deliberation during inference. By leveraging additional computational resources at test time, LLMs can potentially perform more complex reasoning tasks with improved accuracy and reduced hallucinations.

The concept of a verifier aligns closely with recent research on multi-step reasoning, which typically employs two main components: a generator and a verifier (Lightman et al., ; Uesato et al., ; Cobbe et al., ). The generator produces potential solutions, while the verifier evaluates their correctness. This setup is analogous to the actor-critic framework in Reinforcement Learning (RL) (Konda & Tsitsiklis, ). However, unlike RL critics that use temporal-difference (TD) updates for long-term credit assignment, current verifiers in multi-step reasoning are often trained using supervised fine-tuning (SFT). This limitation might hinder the verifier’s ability to guide the generator towards better long-term outcomes, particularly in complex reasoning tasks.

To address these challenges, we propose leveraging Reinforcement Learning techniques, particularly Offline Q-learning, to enhance verifier performance in long-horizon tasks. This approach draws inspiration from successful RL systems like AlphaGo Silver et al. (), which achieve superhuman performance by combining learning and search techniques. Recent research has focused on improving generators using methods like Monte Carlo Tree Search (MCTS) (Chen et al., ; Wang et al., ; ; Zhang et al., ). However less attention has been given to applying RL techniques to verifiers.

We introduce VerifierQ, an Offline Q-learning approach that integrates classical reinforcement learning techniques with LLMs. The core research question guiding this work is: Can Offline Q-learning improve the verifier’s ability to handle multi-step reasoning tasks, and if so, how can we overcome the obstacles that currently limit its application to LLM value networks?

Our work makes several key contributions:(1) We propose a flexible architecture for applying Q-learning on utterance-level in language models, and we resolve large action space problem on utterance level. (2) We present an innovative formulation of Conservative Q-learning tailored for these large action spaces, mitigating overestimation issues in offline Q-learning. (3) Our approach bridges the gap between classic critic models in reinforcement learning and verifier models in language tasks, opening new avenues for improving test-time compute in large language models.

By combining the strengths of test time compute and RL-based verifiers, we seek combine RL’s success in reasoning and planning into LLM. Our goal is to explore the potential of reinforcement learning methods to increase the verifier’s capacity for efficient long-term reasoning, ultimately leading to better performance in these challenging domains.

## 2 Background

In reinforcement learning (RL), tasks are often modeled as Markov Decision Processes (MDPs). A MDP consists of states $s\in S$, actions $a\in A$, a reward function $r(s,a)$, a transition function $P(s^{\prime}|s,a)$ from state $s$ to state $s^{\prime}$ with action $a$, and a discount factor $\gamma$. The goal is to find an optimal policy $\pi^{*}$ that maximizes the expected cumulative reward:
$\pi^{*}=\arg\max_{\pi}\mathbb{E}\left[\sum_{t=0}^{\infty}\gamma^{t}r_{t}\right]$

Q-learning estimates the optimal states action value $Q$ by iteratively updating expected cumulative rewards, while the $V$ function is similar to $Q$ but just estimates from states without need of actions. Q-learning is a model-free RL algorithm commonly used to solve MDPs by minimizing the temporal difference (TD) error:

$$ $L_{TD}(\theta)=\mathbb{E}\left[\left(r+\gamma\max_{a^{\prime}}Q(s^{\prime},a^{ \prime};\theta)-Q(s,a;\theta)\right)^{2}\right].$ (1) $$

In the context of large language models (LLMs) using a generator-verifier framework, the generator’s output can be treated as a sequence of actions. Given a problem statement $p$, the generator produces a solution as a sequence of action steps $[a_{1},a_{2},\dots,a_{n}]$, where each step $a_{i}$ is an action. The state at step $i$ is the concatenation of the problem statement and all tokens generated up to that point: $s_{i}=[p,a_{1},a_{2},\dots,a_{i}]$.
Rewards are given at each step, with a reward of 1 for a correct step and 0 for an incorrect one. We can see the illustrated example in Figure 1, $+$ is correct and $-$ is incorrect.
In classical RL, critic model is trained to estimate the Q value (Konda & Tsitsiklis, ). In test time compute, the verifier model is trained to estimate the Q value (Snell et al., ).
Given a problem statement, the generator produces a sequence of actions as steps, and the verifier evaluates each step to determine its correctness.

Figure: Figure 1: Illustration of State, Action (green), and Reward (orange) in a Math Problem. $+$ denotes correct (1) and $-$ denotes incorrect (0). A state generator produces an action (next solution step). The verifier assesses the existing state and action and outputs a probability of correctness.
Refer to caption: x1.png

Offline Q-learning, which uses a fixed dataset to estimate Q-values, has the advantage of being more efficient to train compared to online methods. However, it comes with the risk of overfitting to the training data, as it lacks the exploration of new actions typically seen in online Q-learning, and it causes overestimation problem. Recent methods involves Conservative Q Learning and Implicit Q Learning to mitigate the issue of overestimation, and this work tries to combine both approaches to overcome the overestimation problem (Kumar et al., ; Kostrikov et al., )

## 3 Related Work

Multi-step reasoning, particularly for mathematical tasks, commonly employs a generator-verifier framework to enhance LLM performance. Process Reward Modeling (PRM), which assigns rewards to each step, has been shown to outperform Object Reward Modeling (ORM), where rewards are only given for the final output (Lightman et al., ; Uesato et al., ; Cobbe et al., ). However, PRM requires extensive step-level labeling. Recent works mitigate this with Monte Carlo Tree Search (MCTS) for automatic labeling, improving efficiency over manual methods (Chen et al., ; Wang et al., ; ). Nonetheless, verifiers in these approaches are trained via supervised fine-tuning (SFT), and compared to classic RL, it is similar to imitation learning.

Recent studies emphasize the role of verifiers in improving test-time compute. Cobbe et al. () showed that an effective verifier can yield performance gains equivalent to increasing generator size by 30x. Similarly, Snell et al. () found that optimal verifiers at test time can outperform generators 14x larger. However, these methods still rely on SFT for training verifier, limiting their effectiveness in complex, long-horizon reasoning. A more effective learning method can improve the verifier model to achieve better performance and in turn scale more efficiently.

Q-learning has seen limited use in LLMs, mainly for preference-based tasks. ILQL is the first to show implicit Q-learning can be applied to LLMs for multi-turn dialogue tasks, but the focus is on token-level actions (Snell et al., ). To resolve the challenges in training long-horizon reasoning due to the granularity of token-level actions, ArCHer proposed a utterance level value function, but encoder style of value function makes estimation can compute step by step and is less efficient(Zhou et al., ). Both works are still limited by their step by step computations.

In contrast, our work focuses on utterance-level actions for verifier, and multi reward estimation with one forward pass significantly improves training efficiency. We also integrate Implicit Q-learning (IQL) and Conservative Q-learning (CQL) to better manage large action spaces and enhance performance, offering a more scalable solution for multi-step reasoning tasks.

## 4 Problem Statement

The central question we need to ask is: Can Offline Q-learning improve the verifier’s ability to handle multi-step reasoning tasks? If so, how can we overcome the obstacles that currently limit its application to LLM value networks? This section is divided into two problems, offline Q-learning vs Imitation Learning and challenges in applying Offline Q-learning to LLMs.

Offline Q-learning vs Imitation Learning:

The characteristics of MCTS rollout data in math problems is that it is noisy. There might be many steps that are not optimal and incorrect for solving the problem. However, stitching the optimal steps together might be able lead to a better solution. Those are cases that Offline Q-learning can handle better than Imitation Learning, and one of the main conclusion from Kumar et al. () is that given the same noisy expert data, Offline Q-learning can outperform Imitation Learning on long horizon tasks. Intuitively, offline RL method should learn to stitch the suboptimal paths in the noisy data to obtain a better path, and wrong answers can help offline RL what is wrong for the future. It could lead to the better performance of the verifier model even with the same amount of rollout from generator.

Challenges in applying Offline Q-learning to LLMs:

There are several challenges in applying Offline Q-learning to LLMs.
The first challenge is utterance level RL. Existing works uses token level actions (Snell et al., ). At the token level, the action space has a smaller cardinality and is equivalent to the vocabulary size $V$, making it feasible to compute max Q-values and estimates. However, this level of granularity is too fine for long-horizon tasks (Zhou et al., ). On the other hand, using the utterance level allows better handling of long-term horizons, but since each utterance may contain multiple tokens, the action space grows exponentially large, making it computationally intractable (Wang et al., ). Given the utterance with number of tokens of length $n$, we will have $V^{n}$ actions, and a typlical sentence might contain 20 tokens. This is just for one utterance, but a solution contains many utterances. This creates a tension between choosing a level of granularity that is manageable but also effective for long-term planning. We need to find a practical method to make the verifier model to learn on the utterance level efficiently.

The second challenge with most methods is that they rely on an actor to sample actions, because it is hard to estimate the maximum Q-value when the action space is large. Since datasets typically consist of rollouts with various actions, true offline learning becomes difficult. It is not practical to have each step to have a number of samples while maintaining previous steps to be the same. Given a sentence with $m$ steps, if we sample $l$ actions for each step, then we will have $l^{m}$ different answers for one problem if we want to apply offline learning. Additionally, for Q-value estimation, finding the max Q is problematic due to the large action space, as most of methods require an MCTS actor to sample the maximum value of each step (Chen et al., ; Wang et al., ). This approach doesn’t effectively utilize offline datasets, complicating training. Approximating $\max Q$ needs sampling, and online sampling is not efficient for training. While it is easy to roll out a complete solution, it seems to be difficult to utilize the data for training the verifier model. We need to find a way to make the verifier model to learn efficiently with offline datasets.

The third challenge is overestimation. The overestimation problem in Q-learning is well-known, but it’s particularly severe in language models. As noted in Verma et al. (); Zhou et al. (), this issue is amplified in language tasks because the Q-function is trained only on the responses in a fixed dataset, making it unlikely to predict accurate values for arbitrary strings in an utterance. In our preliminary experiments, we’ve observed that changing just one critical token to incorrect utterances can receive a higher value than the correct ones. This overestimation becomes more pronounced at the utterance level, where the complexity and potential for incorrect value assignments are greater.

## 5 Verifier with Q-Learning (VerifierQ)

We introduce VerifierQ, a novel approach enhancing verifier models using Offline Q-learning for Large Language Models (LLMs). Our method addresses key challenges by modifying the Q-learning algorithm and integrating it into language modeling tasks.

Figure: Figure 2: Illustration of the VerifierQ architecture and modified Bellman update. Left: Bellman update, where $Q_{\theta}$ is updated via the TD target with $V$. Right: Relationships among $Q_{\theta}$, $Q_{\hat{\theta}}$, and $V_{\psi}$. $V_{\psi}$ is updated through CQL, $Q_{\theta}$ through the Bellman equation, and $Q_{\hat{\theta}}$ via soft update.
Refer to caption: x2.png

### 5.1 Architecture of VerifierQ

Addressing Utterance-Level MDP: To apply Offline Q-learning to LLMs at the utterance level, we propose a flexible architecture that integrates with language modeling tasks (Figure 2). Following Wang et al. () and Lightman et al. (), we utilize two tokens $+$ and $-$ to represent correct and incorrect states, with a tag token indicating estimation. The probability of the correct token out of two tokens can be interpreted as Q-values ranging from 0 to 1, aligning with the reward structure in the MCTS-generated dataset from (Wang et al., ). More details are provided in the supplementary material Appendix A.1.

To address the bounded nature of outputs (0 to 1) compared to traditional Q-values, we modify the Q-learning algorithm to operate within these constraints. We propose using the mean of the current Q-value and the traditional Bellman update as the target value instead of $r+\gamma\max_{a^{\prime}}Q(s^{\prime},a^{\prime};\theta)$ from Equation 1:

$$ $Q^{*}(s,a)=\frac{1}{2}(R(s,a)+\gamma\max_{a^{\prime}}Q^{*}(s^{\prime},a^{ \prime}))$ (2) $$

where $Q^{*}(s,a)$ is the optimal Q-value for state $s$ and action $a$, $R(s,a)$ is the immediate reward, $\gamma$ is the discount factor, and $\max_{a^{\prime}}Q^{*}(s^{\prime},a^{\prime})$ is the maximum Q-value for the next state $s^{\prime}$. More details are provided in the supplementary material (Theorem 1 of Appendix A.1).

For each problem and solution sequence $[p,a_{1},a_{2},\dots,a_{n}]$, we insert the tag token at the end of each step $a_{i}$ and predict the output for the subsequent $+$ or $-$ tokens as shown in Figure 1. The mean of the reward and next estimate serves as the target value for the Bellman update.

As shown in Figure 2, the verifier model estimates multiple Q-values for each step in the solution sequence, enabling efficient parallel computation of Q-values for multiple steps in a single forward pass. This architecture change enables VerifierQ to efficiently learn Q-values at the utterance level while maintaining compatibility with existing language modeling frameworks.

### 5.2 Algorithm of VerifierQ

Addressing Large Action Spaces: Traditional action selection in MDPs typically requires finding the maximum Q-value explicitly over all possible actions. In utterance-level MDPs, this leads to exponentially large action spaces of $V^{n}$, where $V$ is the vocabulary size and $n$ is the length of tokens in one utterance. To address this challenge, we employ Implicit Q-learning (IQL) (Kostrikov et al., ).

IQL approximates Q-values through regression on existing actions, mitigating the need for explicit maximum Q-value sampling and enabling efficient handling of limited per-step data. Instead of iteratively finding the maximum Q for every single action in $V^{n}$, it can regress the action based on the dataset and find the approximation through expectile. IQL can still approximate the maximum Q-value $\max_{a\in\mathcal{A}}Q(s,a)$ without explicitly evaluating all actions by fitting $Q(s,a)$ to the expectiles of the target values given limited data. It improves sample efficiency by eliminating the need for an online algorithm to sample from. This regression-based approach makes IQL particularly well-suited for utterance-level MDPs.

We follow Snell et al. () for the IQL framework to our setting, using the expectile of the Q-value to approximate the value function $V$:

$$ $\mathcal{L}{V}(\psi)=\mathbb{E}_{(s,a)\sim\mathcal{D}}\left[L_{2}^{\tau}\left( Q_{\theta}(s,a)-V_{\psi}(s)\right)\right]$ (3) $$

where $L_{2}^{\tau}(u)=|\tau-\bm{1}\mathrm{(u<0)}|u^{2}$, $\tau\in(0,1)$ is the quantile level, $\mathcal{D}$ is the offline dataset, $Q_{\theta}$ is the learned Q-function, and $V_{\psi}$ is the approximated value function.

This formulation allows for efficient Q-value estimation without explicit maximization over all possible actions. Theoretically, as $\tau$ approaches 1, we have $\lim_{\tau\to 1}V_{\psi}(s)=\max_{a}Q^{*}_{\theta}(s,a)$ Kostrikov et al. (), ensuring that our IQL-based approach can asymptotically recover the optimal value function, even with large action spaces, given sufficient coverage in the offline dataset.

Our approach leverages regression to solve the large action space problem. By regressing the reward for each utterances, we can find the approximation of the maximum Q-value and minimum Q-value without needing to sample the action or iterate through all the combinations of tokens. We focus on this regression aspect, not just the data support aspect. The approximation of minimum through $\tau$ value is shown in Theorem 2 of Appendix A.1 .

Addressing Overestimation: Q-learning often suffers from overestimation bias, particularly severe in language models with large action spaces and limited offline datasets. To mitigate this, we incorporate Conservative Q-learning (CQL) Kumar et al. () into our framework. CQL penalizes Q-values exceeding the target value, making the Q-function more conservative.

We add the following CQL term to the Bellman equation:

$$ $\arg\min_{Q}\alpha(\mathbb{E}_{s\sim D,a\sim\mu}\left[Q(s,a)\right]-\mathbb{E} _{s\sim D,a\sim\hat{\pi}_{\beta}}\left[Q(s,a)\right])$ (4) $$

Where $\mu$ is the target policy distribution and $\hat{\pi}_{\beta}$ is the data distribution. This term minimizes the maximum Q-value under the target policy distribution while maximizing it under the data distribution, providing a tighter bound.

Unlike token-level approaches, we leverage IQL to approximate Q-values in the large action space, mitigating the need to sample a set number of actions for each state and allowing more efficient Q-value estimation for longer sequences.

We propose a novel formulation that directly approximates both the lower bound Q-function and the upper bound of the data distribution using IQL:

$$ $L_{CQL}(\psi)=\alpha(\mathbb{E}_{s\sim D,a\sim\mu}\left[L_{2}^{\tau_{1}}\left( Q_{\hat{\theta}}(s,a)-V_{\psi}(s)\right)\right]-\mathbb{E}_{s\sim D,a\sim\hat{ \pi}_{\beta}}\left[L_{2}^{\tau_{2}}\left(Q_{\theta}(s,a)-V_{\psi}(s)\right) \right])$ (5) $$

Here, $\tau_{1}$ is chosen to be close to 0 and $\tau_{2}$ close to 1, allowing for a more optimistic Q-value estimation within the CQL framework. This approach maintains CQL’s conservatism while allowing for adaptable control through the adjustment of $\tau_{1}$ and $\tau_{2}$. The lower bound of the target policy pushes the Q-value down less aggressively, while the upper bound of the data distribution elevates it more, resulting in a more adjustable conservatism under the CQL term. For more details on the explanations of the CQL term, see Appendix 4.

Figure: Figure 3: Illustration of our approach. Left: Orange line represents the overestimated Q-value $Q_{\hat{\theta}}$. Blue line indicates the data distribution $Q_{\theta}$. Minimizing the overestimation term brings the orange line down to the mean of data distribution. Right: Green line shows the lower expectile of the overestimated Q-value and purple line shows the upper expectile of the data Q-value. Minimizing those two can make orange line approaches the maximum Q-value under the data distribution.
Refer to caption: x3.png

Figure 3 illustrates the intuition. In the original CQL term, an overestimated Q-value would be pushed down to the data distribution. In our formulation, the lower bound of the Q-value is pushed down less aggressively, and the upper bound is elevated more, resulting in a more optimistic Q-value that approaches the maximum Q-value under the data distribution more closely. The advantage of this approach is that $\tau$ value can be adjusted to balance conservatism with optimism.

Overall Objective: The VerifierQ algorithm minimizes the Bellman error augmented with the CQL term. We adapt the approach of Snell et al. (); Kostrikov et al. (), using Implicit Q-learning to approximate the Q-value for each step with a separate value function, while modifying the objective to incorporate the CQL term.

Like previous works, we use a separate value function $V_{\psi}(s^{\prime})$ to approximate the Q-value $\max_{a^{\prime}}Q^{*}(s^{\prime},a^{\prime})$. With our adaptation to the Bellman Update (Equation 1), the TD error is given by:

$$ $L_{Q}(\theta)=\mathbb{E}\left[\left(\frac{1}{2}(R(s,a)+\gamma V_{\psi}(s^{ \prime}))-Q_{\theta}(s,a)\right)^{2}\right]$ (6) $$

We augment this with our CQL term to achieve a more conservative yet optimistic estimation with Equation 5:

$$ $L_{CQL}(\psi)=\alpha(\mathbb{E}_{s\sim D,a\sim\mu}\left[L_{2}^{\tau_{1}}\left( Q_{\hat{\theta}}(s,a)-V_{\psi}(s)\right)\right]-\mathbb{E}_{s\sim D,a\sim\hat{ \pi}_{\beta}}\left[L_{2}^{\tau_{2}}\left(Q_{\theta}(s,a)-V_{\psi}(s)\right) \right])$ $$

The comprehensive objective function of VerifierQ is thus the sum of the Bellman error and the CQL term:

$$ $L(\theta,\psi)=L_{Q}(\theta)+L_{CQL}(\psi)$ (7) $$

To enhance training stability, we employ a Polyak-averaged version of $Q_{\hat{\theta}}$. The hyperparameter $\alpha$ is set to 1 in our experiments, balancing the influence of the CQL term. The overall objective is shown in the Figure 2.

This formulation allows VerifierQ to benefit from the conservative nature of CQL while maintaining an optimistic outlook, crucial for effective Q-value estimation in large action spaces characteristic of language models. The expectile regression provides flexibility to adjust $\tau$ values as preferred. By integrating these components, VerifierQ addresses the challenges of overestimation and large action spaces in utterance-level MDPs, providing a robust framework for multi-step reasoning tasks.

## 6 Experiments and Results

We evaluate VerifierQ on mathematical reasoning tasks from GSM8K and MATH datasets (Cobbe et al., ; Hendrycks et al., ). We compare VerifierQ with the state-of-the-art Process Reward Model (PRM) Lightman et al. (), using the same dataset as Wang et al. (); Snell et al. () for a fair comparison. We do not include Object Reward Model (ORM) since Wang et al. (); Snell et al. (); Lightman et al. () already validated PRM’s effectiveness over ORM. Due to computational constraints, we use the TinyLlama-1.1B model (Zhang et al., ).

### 6.1 Experimental Setup

Dataset: We generate a test time compute set using a generator trained on MetaMath (Yu et al., ). The generator is finetuned on MetaMath for 2 epochs with a learning rate of 2e-5, followed by LoRA finetuning for 1 epoch to fit the answer style (Hu et al., ). For each question in the full GSM8K test set and a 500-question subset of MATH (following Lightman et al. ()), we generate 256 answers. The verifier is trained on the MathShepherd dataset Wang et al. (), which uses MCTS-generated data with binary rewards (1 for correct, 0 for incorrect).

Model Architecture: Our model consists of a Q-network and a separate value network to prevent single sample overestimation. We employ soft updates to stabilize training with rate 0.01.

Training: We initialize our model with MetaMath pretraining, then train with PRM on MathShepherd for 1 epoch, followed by VerifierQ training. Here are key hyperparameters. Learning rate: 2e-5 for all training phases. Batch size: 64 (crucial for Q-learning stability). Q-learning parameters: $\gamma=0.99$, $\alpha=1$ for the CQL term.
For PRM, we continued training from 1 epoch to 2 epochs. Majority Voting uses the raw output from the generator.

Evaluation Metrics: We evaluate the verifier against PRM and Majority Voting using accuracy as the main metric. Following Snell et al. (); Lightman et al. (), we use minimum evaluation metrics to evaluate the verifier.

### 6.2 Results

We evaluate VerifierQ against PRM (for epoch and two epoches) and Majority Voting on both GSM8K and MATH datasets using minimum evaluation. For VerifierQ, we use $\tau_{1}=0.3$ for GSM8K and $\tau_{1}=0.5$ for MATH.

Figure: Figure 4: Comparison of different methods on GSM8K (left) and MATH (right) using minimum evaluation. Rolling average over 20 steps. For VerifierQ we use $\tau_{1}=0.3$ (left) and $\tau=0.5$ (right).
Refer to caption: extracted/5917024/graph/min-eval.png

As shown in Figure 4, VerifierQ outperforms PRM (with 1 epoch), PRM 2nd Epoch and Majority Voting on both datasets. On GSM8K, VerifierQ’s performance improves with increase of the number of solutions per problem, aligning with trends observed in previous studies (Snell et al., ; Lightman et al., ; Wang et al., ). We would like to note that for MATH, all methods underperform compared to Majority Vote, possibly due to the small model size (1.1B).

In Figure 4, VerifierQ achieves the highest accuracy both on GSM8K and on MATH with different $\tau_{1}$ values compared to PRM (see Figure 5(a) in Section 7), and it also outperforms other Q learning methods (see Figure 5(b) in Section 7). We observe that PRM’s performance decreases after the first epoch, likely due to overfitting. Therefore we will use first epoch of PRM hereafter for evaluation and ablation. Different $\tau_{1}$ values have different performance on two datasets (see Figure 5(a) in Section 7).

These results demonstrate the potential of applying classic reinforcement learning to verifier models for multi-step reasoning language tasks. They also highlight VerifierQ’s effectiveness, particularly on GSM8K, and identify areas for future investigation, such as the impact of model size and the optimization of the values of $\tau$ for different datasets.

## 7 Ablation Study

Our ablation study addresses the challenges of large action spaces, computational efficiency, and the impact of key components in VerifierQ. To be more specific, we investigate the efficiency of IQL compared to sampling approaches, the effect of the CQL term, the impact of different expectile choices, and the stability of Q-learning.

Figure: (a) Impact of different $\tau_{1}$ values on VerifierQ performance. Left: GSM8K dataset. Right: MATH dataset.
Refer to caption: extracted/5917024/graph/tau.png

### 7.1 Computational Efficiency

VerifierQ’s sentence-level approach offers significant computational advantages over existing utterance BERT-type and online approaches. We use a SARSA-style approximation of the maximum Q-value, reducing computation time. For online approaches, sampling approaches require $n*m$ action samples for a sentence with $m$ steps to calculate $\max Q$, where $n$ is the number of samples per step. In contrast, VerifierQ performs one forward pass for the entire sentence to estimate all $m$ steps and eliminating the need for $n$ sampling at each step. This approach significantly reduces the computational complexity, especially for longer sequences. From our preliminary experiments, compared to step by step Q value estimation we can save roughly 10x training time.

### 7.2 Impact of Adjustable CQL Term

Figure 5(a) illustrates the impact of different $\tau$ values on VerifierQ’s performance. We examine different levels of optimism by varying $\tau_{1}$ (0.1, 0.3, 0.5, 0.7, 0.9) while fixing $\tau_{2}$ at 0.9 to tighten the lower bound to the maximum of the data distribution. As shown in Figure 5(a), $\tau_{1}=0.3$ generally yields better results, suggesting it approximates the maximum Q-value more effectively than other $\tau_{1}$ values.
MATH dataset shows higher sensitivity to $\tau_{1}$ values, with $\tau_{1}=0.5$ performing the best. The difference in optimal $\tau$ values between datasets suggests that dataset-specific tuning may be necessary.

### 7.3 Comparison of Q-Learning Methods

We conduct a comprehensive comparison of VerifierQ against other Q-learning variants to empirically validate the effectiveness of our approach, particularly the impact of the CQL term. We compare VerifierQ with SARSA-style standard Q-learning without CQL and Implicit Q-learning (IQL) with $\tau=0.9$, also without CQL (Snell et al., ).

Figure 5(b) shows VerifierQ outperforming both standard Q-learning and IQL on the GSM8K dataset. VerifierQ’s superior performance demonstrates the CQL component’s significant contribution and its effectiveness in reducing overestimation. The adjustable $\tau$ terms in VerifierQ allow finer control over the conservatism-optimism balance in Q-value estimation, enabling more optimistic $\max Q$ selection when appropriate. Standard Q-learning performs similarly to PRM, highlighting the substantial improvements achieved by VerifierQ. VerifierQ’s adjustable $\tau$ terms ($\tau_{1}$ and $\tau_{2}$) allow for finer control over the balance between conservatism and optimism in Q-value estimation. These results empirically validate that VerifierQ’s CQL term leads to tangible performance gains, effectively addressing the challenges of applying Q-learning to large language models.

Figure: Figure 6: Overestimation case study: PRM (left) vs VerifierQ (right). Orange indicates correct value, blue indicates incorrect value.
Refer to caption: x4.png

### 7.4 Overestimation Analysis

We conduct a qualitative study on overestimation between PRM and VerifierQ by replacing important tokens in the solution sequence with incorrect ones. Figure 6 reveals that PRM generally assigns higher Q-values to incorrect tokens, while VerifierQ assigns lower values. This suggests that VerifierQ’s conservative approach helps mitigate the overestimation issue by assigning lower values to out-of-distribution tokens.

## 8 Discussion, Ethics, and Limitations

VerifierQ demonstrates the potential of integrating classic reinforcement learning techniques with language models to enhance multi-step reasoning capabilities. This approach opens up several avenues for future research and applications: The flexibility of our language-based RL framework allows for potential extensions beyond mathematical reasoning. For example, VerifierQ could be applied to guide and verify complex programming tasks in code generation and enhance decision-making in diverse domains requiring multi-step planning.

In addition, the actor-critic model in language models could lead to more sophisticated planning and decision-making capabilities. Existing success in AI explored the actor-critic model, and actor and critic model in language models could enhance planning and decision-making capabilities.

The development and deployment of VerifierQ also raise important ethical considerations. The alignment of the reward function with human values is crucial. As the model’s decision-making process becomes more complex, ensuring transparency and maintaining human understanding for its outputs becomes increasingly challenging but vastly important.

While VerifierQ demonstrates promising results, several limitations should be acknowledged: First, due to computational constraints, our experiments were limited to the TinyLlama model. Testing on larger models could potentially yield different but more likely more robust results. Second, the model’s performance is highly sensitive to hyperparameter choices. Resource constraints limited our ability to conduct extensive hyperparameter tuning, which could potentially improve results, but this needs future research. Finally, the fully implemented VerifierQ model is more memory-intensive and computationally expensive than the PRM method. Future research should focus on reducing these requirements to enhance the model’s efficiency and scalability.

## 9 Conclusion

This work introduces VerifierQ, a novel approach integrating classical reinforcement learning techniques with language models to enhance multi-step reasoning capabilities. Our key contributions include:

(1). A flexible architecture for applying Q-learning to utterance-level MDPs in language models. It can estimate multiple utterances level Q values with large action spaces, and easy to extend Q learning, IQL, and CQL.
(2). An innovative formulation of Conservative Q-learning tailored for large action spaces in language tasks. It helps to reduce the overestimation in offline Q learning.
(3). Empirical evidence demonstrating VerifierQ’s effectiveness in mathematical reasoning tasks. These results highlight the potential for extending this approach to larger language models and improving test-time compute.

VerifierQ validates the integration of RL into verifier models and demonstrates its potential to enhance test-time compute results. Moreover, it bridges the gap between classic critic models in RL and verifier models in language tasks. It serves as an addition for applying RL in verifier LLMs and paves the way for actor-critic models to achieve more sophisticated artificial intelligence. As we continue to refine and expand upon this approach, VerifierQ opens up new avenues for developing more capable and robust AI systems across a wide range of complex reasoning tasks.

#### Acknowledgments

The work is supported by the National Science Foundation (NSF) through Awards #2131186 (CISE-MSI), #1827505 (PFI), and #1737533 (S&CC), and the US Air Force Office of Scientific Research (AFOSR) via Award #FA9550-21-1-0082. The work is also supported by a College-wide Research Vision (CRV) Fund from the CCNY Provost’s Office, and the ODNI Intelligence Community Center for Academic Excellence (IC CAE) at Rutgers University (#HHM402-19-1-0003 and #HHM402-18-1-0007).

## Reproducibility Statement

To ensure reproducibility of our results, we provide the following details:

Implementation Details: The complete implementation details are available in Appendix B.1. The code implementation will be made publicly available at a future date.

Hardware Requirements:

- •
VerifierQ experiments: Conducted on a single NVIDIA A100 GPU with 40GB memory.
- •
Other models (Q Learning and PRM): Can be trained on an NVIDIA RTX 4090 GPU.

Training Time:

- •
VerifierQ: Approximately 10 hours for 1 epoch.
- •
PRM: Approximately 4 hours for 1 epoch.

Datasets: We use the following publicly available datasets:

- •
MetaMath: [https://huggingface.co/datasets/meta-math/MetaMathQA](https://huggingface.co/datasets/meta-math/MetaMathQA)
- •
GSM8K: [https://huggingface.co/datasets/openai/gsm8k](https://huggingface.co/datasets/openai/gsm8k)
- •
MathShepherd: [https://huggingface.co/datasets/peiyi9979/Math-Shepherd](https://huggingface.co/datasets/peiyi9979/Math-Shepherd)
- •
MATH (test subset): We use the same dataset as Lightman et al. (), available at [https://github.com/openai/prm800k](https://github.com/openai/prm800k)

Model: All experiments were conducted using the TinyLlama-1.1B model.

Hyperparameters: Key hyperparameters include:

- •
Learning rate: 2e-5 (constant for all training phases)
- •
Batch size: 64
- •
Discount factor ($\gamma$): 0.99
- •
CQL coefficient ($\alpha$): 1
- •
Soft update coefficient ($\alpha_{\text{soft}}$): 0.01
- •
IQL coefficients:
–
For GSM8K: $\tau_{1}=0.3$, $\tau_{2}=0.9$
–
For MATH: $\tau_{1}=0.5$, $\tau_{2}=0.9$

Training Process: The model is initialized with MetaMath pretraining, followed by 1 epoch of PRM training before VerifierQ training begins.

For any additional details or clarifications needed to reproduce our results, please refer to the code and documentation that will be made available upon acceptance.

## Appendix A Appendix

### A.1 Architecture Details

To apply Offline Q-learning to LLMs at the utterance level, we propose a flexible architecture that integrates with language modeling tasks. Following Wang et al. () and Lightman et al. (), we utilize two tokens $+$ and $-$ to represent correct and incorrect states, with a tag token indicating estimation. The probability of the correct token can be interpreted as Q-values ranging from 0 to 1, aligning with the reward structure in the MCTS-generated dataset from Wang et al. (). We compute the Q-value for each step as:

$$ $Q(s,a)=p(+)=\mathrm{softmax}(\text{logit}_{+})=\sigma(\text{logit}_{+}-\text{ logit}_{-})$ (8) $$

It is flexible to choose either softmax or sigmoid function to compute the Q-value. We use the sigmoid function in our experiments for more effficiency. The Q-value is computed for each step in the solution sequence, estimating a numerical value in the range of (0, 1).

This formulation offers several advantages:

- 1.
It allows flexible integration for Q-value estimation of utterances of arbitrary length since we can insert the step tag anywhere in the sequence.
- 2.
It enables parallel estimation of multiple Q-values for multiple steps in a single forward pass, significantly reducing computation time.
- 3.
This approach seamlessly integrates with existing language modeling tasks.

### A.2 Convergence of Modified Bellman Update

We first prove that our modified Bellman update converges to a fixed point.

###### Theorem 1 (Convergence of Modified Bellman Update) .

Let $Q^{*}$ be the optimal Q-function. The modified Bellman update

$$ $Q^{*}(s,a)=\frac{1}{2}(R(s,a)+\gamma\max_{a^{\prime}}Q^{*}(s^{\prime},a^{ \prime}))$ (9) $$

converges to a unique fixed point.

###### Proof.

Let $\mathcal{T}$ be the operator defined by our modified Bellman equation:

$$ $\mathcal{T}Q(s,a)=\frac{1}{2}(R(s,a)+\gamma\max_{a^{\prime}}Q(s^{\prime},a^{ \prime}))$ (10) $$

We need to show that $\mathcal{T}$ is a contraction mapping in the sup-norm $\|\cdot\|_{\infty}$. For any two Q-functions $Q_{1}$ and $Q_{2}$:

$$ $\displaystyle\|\mathcal{T}Q_{1}-\mathcal{T}Q_{2}\|_{\infty}$ $\displaystyle=\sup_{s,a}\left|\mathcal{T}Q_{1}(s,a)-\mathcal{T}Q_{2}(s,a)\right|$ (11) $\displaystyle=\sup_{s,a}\left|\frac{1}{2}\gamma\left(\max_{a^{\prime}}Q_{1}(s^ {\prime},a^{\prime})-\max_{a^{\prime}}Q_{2}(s^{\prime},a^{\prime})\right)\right|$ (12) $\displaystyle\leq\frac{1}{2}\gamma\sup_{s,a}\left|\max_{a^{\prime}}Q_{1}(s^{ \prime},a^{\prime})-\max_{a^{\prime}}Q_{2}(s^{\prime},a^{\prime})\right|$ (13) $\displaystyle\leq\frac{1}{2}\gamma\sup_{s^{\prime},a^{\prime}}\left|Q_{1}(s^{ \prime},a^{\prime})-Q_{2}(s^{\prime},a^{\prime})\right|$ (14) $\displaystyle=\frac{1}{2}\gamma\|Q_{1}-Q_{2}\|_{\infty}$ (15) $$

Since $0<\gamma<1$, it follows that $0<\frac{1}{2}\gamma<1$. Therefore, $\mathcal{T}$ is a contraction mapping with contraction factor $L=\frac{1}{2}\gamma$. By the Banach fixed-point theorem, $\mathcal{T}$ has a unique fixed point, and the Q-learning algorithm will converge to this fixed point.
∎

###### Theorem 1 (Convergence of Modified Bellman Update) .

###### Proof.

### A.3 Optimality of IQL in Large Action Spaces

Next, we prove that IQL can effectively approximate the maximum and minimum Q-value in large action spaces.

###### Theorem 2 (IQL Optimality) .

We can directly get the following result from the proof in (Kostrikov et al., ). As the quantile level $\tau$ approaches 1, the IQL value function $V_{\psi}$ converges to the maximum Q-value:

$$ $\lim_{\tau\to 1}V_{\psi}(s)=\max_{a\in\mathcal{A},\pi_{\beta}(a|s)>0}Q^{*}(s,a)$ (16) $$

Additionally, as $\tau\to 0$, the IQL value function $V_{\psi}$ converges to the minimum Q-value:

$$ $\lim_{\tau\rightarrow 0}V_{\tau}(s)=\min_{a\in\mathcal{A}}Q^{*}(s,a)$ (17) $$

###### Proof Sketch.

Following Lemma 1 of Kostrikov et al. (), we can show a modified Lemma.
Let X be a real-valued random variable with bounded support and infimum $x^{*}$. Since X is bounded below and $m_{\tau}$ approaches the lower bound as $\tau\rightarrow 0$, we have:

$$ $\lim_{\tau\rightarrow 0}m_{\tau}=\inf\{x:F_{X}(x)>0\}=x^{*}$ (18) $$

For all $\tau_{1}$ and $\tau_{2}$ such that $0<\tau_{1}<\tau_{2}<1$, we can get $m_{\tau_{1}}\leq m_{\tau_{2}}$. Therefore, as $\tau\to 0$, the limit of $m_{\tau}$ converges to the infimum of the random variable X.

In addition, using Lemma 2 of Kostrikov et al. (), we can show that the IQL value function $V_{\psi}$ converges to the minimum Q-value as $\tau\to 0$:

###### Lemma 3 .

For all s, $\tau_{1}$ and $\tau_{2}$ such that $0<\tau_{1}<\tau_{2}<1$, we have $V_{\tau_{1}}(s)\leq V_{\tau_{2}}(s)$.

Since $Q^{*}(s,a)$ is bounded below, the minimum Q-value exists and is finite. Therefore, as $\tau\to 0$, the IQL value function $V_{\psi}$ converges to the minimum Q-value:

$$ $\lim_{\tau\rightarrow 0}V_{\tau}(s)=\inf_{a\in\text{supp}(\pi_{\beta})}Q^{*}(s ,a)$ (19) $$

So we have:

$$ $\lim_{\tau\rightarrow 0}V_{\tau}(s)=\min_{a\in\mathcal{A},\pi_{\beta}(a|s)>0}Q ^{*}(s,a)$ (20) $$

∎

###### Theorem 2 (IQL Optimality) .

###### Proof Sketch.

###### Lemma 3 .

### A.4 Conservative Yet Optimistic Q-values with Modified CQL

Finally, we present a proposition about our modified CQL approach and its potential to lead to conservative yet optimistic Q-values.

###### Proposition 4 (Modified CQL Bounds) .

The modified CQL objective with expectile levels $\tau_{1}$ (close to 0) and $\tau_{2}$ (close to 1) aims to provide both lower and upper bounds on the true Q-function $Q^{*}(s,a)$:

$$ $\max_{a\sim\hat{\pi}_{\beta}}Q_{\theta}(s,a)\lesssim Q^{*}(s,a)\lesssim\min_{a \sim\mu}Q_{\hat{\theta}}(s,a)$ (21) $$

where $\lesssim$ denotes ”approximately less than or equal to”.

###### Remark 5 (Supporting Arguments and Intuitions) .

The original CQL objective is:

$$ $\arg\min_{Q}\alpha(\mathbb{E}_{s\sim D,a\sim\mu}\left[Q(s,a)\right]-\mathbb{E} _{s\sim D,a\sim\hat{\pi}_{\beta}}\left[Q(s,a)\right])$ (22) $$

Where $\mu$ is the target policy distribution and $\hat{\pi}_{\beta}$ is the data distribution. Intuitively, this term finds the maximum Q-value under the target policy distribution $\mathbb{E}_{s\sim D,a\sim\mu}\left[Q(s,a)\right]$ and minimizes it since it is usually overestimated. To get a tighter bound, it pushes the Q-value up under the data distribution $\mathbb{E}_{s\sim D,a\sim\hat{\pi}_{\beta}}\left[Q(s,a)\right]$.

For large action spaces, CQL typically uses importance sampling to estimate $\mathbb{E}_{s\sim D,a\sim\mu}[Q(s,a)]$ with $\log\sum{a}\exp(Q(s,a))$ at every state (Kumar et al., ). However, unlike token-level approaches, we leverage IQL to approximate Q-values in the large action space. This mitigates the requirement to sample a set number of actions for each state and allows for more efficient Q-value estimation for longer sequences.

We propose a novel formulation that directly approximates both the lower bound Q-function and the upper bound of the data distribution using IQL with different $\tau$ values for each term in CQL objective. The goal remains the same: finding the overestimated Q-value under the target policy to minimize it and tighten the bound with the data distribution. However we want to give control on the level of the tightening of the bound.

Our modified CQL objective is:

$$ $\begin{split}L_{CQL}(\psi)=\alpha(&\mathbb{E}_{s\sim D,a\sim\mu}[L_{2}^{\tau_{ 1}}(Q_{\hat{\theta}}(s,a)-V_{\psi}(s))]\\ &-\mathbb{E}_{s\sim D,a\sim\hat{\pi}_{\beta}}[L_{2}^{\tau_{2}}(Q_{\theta}(s,a) -V_{\psi}(s))])\end{split}$ (23) $$

The first term, with $\tau_{1}$ close to 0, approximates the lower bound of $Q_{\hat{\theta}}$. It acts as an upper bound on the target policy which is typically overestimated. This suggests:

$$ $V_{\psi}(s)\lesssim\min_{a\sim\mu}Q_{\hat{\theta}}(s,a)$ (24) $$

The second term, with $\tau_{2}$ close to 1, approximates an upper bound on $Q_{\theta}$. It acts as a lower bound on the data distribution, indicating:

$$ $V_{\psi}(s)\gtrsim\max_{a\sim\hat{\pi}_{\beta}}Q_{\theta}(s,a)$ (25) $$

This approach allows for a more optimistic Q-value estimation within the CQL framework. The lower bound of the target policy $\mu$ pushes the Q-value down less aggressively, while the upper bound of the data distribution $\hat{\pi}_{\beta}$ elevates the Q-value more, resulting in a more optimistic Q-value under the CQL term. This approach maintains the benefits of CQL’s conservatism while allowing for adaptable optimism through the adjustment of $\tau_{1}$ and $\tau_{2}$.

The modified CQL objective aims to minimize the difference between the lower bound of the overestimated Q-values ($Q_{\hat{\theta}}$) and the upper bound of the true Q-values ($Q_{\theta}$). Minimizing this difference may lead to a more accurate estimation of $Q^{*}(s,a)$. We can express this as:

$$ $L_{CQL}(\psi)\approx\min_{a\sim\mu}Q_{\hat{\theta}}(s,a)-\max_{a\sim\hat{\pi}_ {\beta}}Q_{\theta}(s,a)$ (26) $$

As this difference approaches zero, it suggests that the the lower bound of the overestimation of Q-values is being reduced to the extent supported by the data, and we should have $\max_{a\sim\hat{\pi}_{\beta}}Q_{\theta}(s,a)\lesssim\min_{a\sim\mu}Q_{\hat{
\theta}}(s,a)$. Adjusting $\tau_{1}$ we could have $Q_{\hat{\theta}}(s,a)$ approximately close to the optimal maximum.

This formulation allows us to balance conservatism with optimism in Q-value estimation. The lower bound of the Q-value is pushed down less aggressively, while the upper bound is elevated more, resulting in Q-values that approach the maximum Q-value under the data distribution more closely. We can adjust $\tau_{1}$ and $\tau_{2}$ to fine-tune this balance, allowing for more adaptable Q-values under the CQL term.

It’s important to note that this difference can potentially become negative. A negative value would imply that the estimated lower bound of $Q_{\hat{\theta}}$ is smaller than the estimated upper bound of $Q_{\theta}$ for some state-action pairs. While this might seem counterintuitive given the general overestimation tendency of $Q_{\hat{\theta}}$, it can occur due to the approximations introduced by the $L_{2}^{\tau}$ loss functions or other factors in the learning process. This suggests that the value function might be correctly valuing the in-distribution actions more highly, which is desirable, although it might introduce some pessimism in the value estimates.

This intuition provides insight into why our modified CQL approach might lead to a bit more optimistic Q-values. However, a rigorous mathematical proof would require further development and analysis.

###### Proposition 4 (Modified CQL Bounds) .

###### Remark 5 (Supporting Arguments and Intuitions) .

## Appendix B Appendix

### B.1 Algorithm and Implementation Details

Figure: Algorithm 1 VerifierQ

As described in Section 2, the state at step $i$ is the concatenation of the problem statement and all tokens generated up to that point: $s_{i}=[p,a_{1},a_{2},\dots,a_{i}]$. As illustrated in Figure 1, $s_{1}$ consists of $p$ and $a_{1}$, $s_{2}$ consists of $p$, $a_{1}$, and $a_{2}$, and so on. The reward $r_{i}$ is 1 if the token $a_{i}$ is correct and 0 otherwise. This approach leverages the decoder architecture’s ability to generate the next token based on the previous tokens.

For the hyperparameters, we use the following settings:

- •
Discount factor: $\gamma=0.99$
- •
CQL coefficient: $\alpha=1$
- •
Soft update coefficient: $\alpha_{\text{soft}}=0.01$
- •
Batch size: 64
- •
Optimizer: AdamW with a constant learning rate of $2e-5$ for all training phases
- •
IQL coefficients:
–
For GSM8K: $\tau_{1}=0.3$, $\tau_{2}=0.9$
–
For MATH: $\tau_{1}=0.5$, $\tau_{2}=0.9$

We initialize the model with MetaMath pretraining and train it with PRM for 1 epoch before starting VerifierQ training. All experiments are conducted using the TinyLlama-1.1B model.

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 5
presentation: 2
questions: - See the comments in the weaknesses.
- How to get the "two tokens + and -" to represent correct and incorrect states, and the other "tag token indicating estimation"?
- In Equation 2, what's the difference between R(s,a) and r? How does equation 2 bound the Q-values within the range of (0,1)?
- What's the data for plotting Figure 3?
- What's the size of the action space for each dataset? Does the solutions per problem represent the action space for RL?
- "test accuracy %" should not include "%", for example, the numbers reported in Figure 4 should be the accuracy number in decimal instead of in percentage, right?
soundness: 2
strengths: - This is a timely important topic that the paper aims to leverage verifier models with reinforcement learning to enhance the reasoning capabilities of large language models. It's interesting to pay attention to the verifier component instead of the generator component.
- Novelty: although this work is built from the previous work on multi-step reasoning with generator-verifier, it's novel to formulate the problem into a utterance level MDP, from the perspective of verifier models, and solve it with reinforcement learning techniques.
summary: This paper focused on integrating reinforcement learning techniques with language models to enhance multi-step reasoning capabilities. To do that, the approach of VerifierQ was proposed by formulating the problem into a utterance-level MDP and solving it with IQL and CQL. Finally, experiments were conducted on two datasets of GSM8K and MATH, comparing VerifierQ with PRM and Majority Voting.
weaknesses: - The presentation of the paper should be improved. For example, it can be more helpful if Figure 1 could include IQL and CQL and show how different modules/components interacct with each other and what's the forward pass and backward pass. The paper mentioned that the utterance level RL allows better handling of long-term horizons, so, what's the MDP definition in the utterance level? what's the difference between their utterance level and token level in this paper?
- The current results are insufficient to support the paper's claim. For example, I didn't find the results used for showing the computational efficiency of VerifierQ and others. In Figure 4, particularly on GSM8K dataset, VerifierQ performed worse than PRM when the number solutions per problem was lass then 2^5, and it became the best when the number was larger than 2^5. However, the improvement looks very marginal. On MATH dataset, VerifierQ performed worse than Majority. Eventhough, the improvement of VerifierQ over PRM looks still very marginal. The paper mentioned that this might be because of the small model size of Majority Vote. So, what is the model size for the other methods? Why the model size matters on this MATH dataset? It's not clear to me. For overestimation analysis, the paper said "Figure 6 reveals that PRM generally assigns higher Q-values to incorrect tokens, while VerifierQ assigns lower values", however, it feels to me that CQL in VerifierQ assigned low Q-values to all tokens where incorrect tokens got more penalization (lower Q-values) than the correct one. The ablation study should include the comparison of VerifierQ w/ CQL and VerifierQ wo/ CQL, in order to further show the mitigation in addressing overestimation. Overall, the conclusion is vauge.

---

confidence: 3
contribution: 3
initial_rating: 8
presentation: 2
questions: Please see the questions above.
soundness: 3
strengths: 1- The paper is well-structured and easy to follow.

2-  The paper cleverly handles multiple challenges (utterance level RL - large action space and overestimatrion ) and proposes a novel loss function formulation that integrates both IQL and CQL, allowing for a more optimistic Q-values estimation within the CQL framework. 

3- Comprehensive evaluation and ablation study.
summary: The paper introduces VerifierQ, a novel method that integrates Offline Q-learning into verifier models for LLMs, significantly enhancing their multi-step reasoning capabilities. It addresses key challenges such as handling utterance-level MDPs, managing large action spaces, and mitigating overestimation bias through a modified Bellman update and a tailored formulation of Conservative Q-learning. Experimental results demonstrate that VerifierQ outperforms traditional supervised fine-tuning approaches in mathematical reasoning tasks, suggesting a promising direction for improving test-time compute in LLMs.
weaknesses: Overall, I think this is a good paper but I do have the below comments:

1- Clarification on Q-learning Update Bounds: 
- In page 4, Section 5.1, it is not clear to me how multiplying the q-learning update by 1/2 bounds the Q-value between (0,1) as the authors claim. Can you please explain more about the intuition behind this? A brief mathematical derivation or graphical representation could enhance understanding.

2- Clarity of the figures: 
- The figures throughout the paper are difficult to read due to the small font size.  Please increase the font size. Additionally, Figure 2 A) could benefit from more context or annotations to aid in comprehension. 

- Lastly, in Figures 4 and 5,  the y-axis is labeled 'Test Accuracy %', but the values (e.g., 0.53, 0.54) are presented as decimal fractions rather than percentages. The authors should clarify whether this is a typo or if the values are indeed less than 1.

---

confidence: 3
contribution: 3
initial_rating: 5
presentation: 1
questions: Q1) Distributional shift is a typical issue for offline RL, I guess this is an issue for this apprach as well, please clarify.

Q2) Ablation: i) Did you explore changes to /tau_2? ii) How challenging is it to fine-tune /tau? iii) One dataset showed substantial differences with incorrect /tau_1 values. Have you tested other datasets in order to prove how sensitive is your model to /tau selection?

Q3) Possible limitations of the approach 
    - How much is the model sensible to parameters changes?
    - How does the method compares to other approaches in terms of memory rquirements ?

Q4) Would it be possible to test the code for reproducibility ?
soundness: 2
strengths: The combined use of Implicit Q-learning (IQL) and Conservative Q-learning (CQL) is innovative and could offer promising results for balancing efficiency and accuracy in Q-value estimation for language models.
summary: VerifierQ introduces a new approach for enhancing verifier models in Large Language Models (LLMs) through Offline Q-learning, focusing on utterance-level tasks, featuring three key contributions:
- Adaptation of Q-learning to work on utterance-level for Language Modeling
- Handling Large Action Space with Implicit Q-Learning (IQL): To handle large action spaces in LLMs VerifierQ integrates Implicit Q-Learning (IQL), which approximates Q-values without explicit maximization, making Q-value estimation feasible even with extensive token vocabularies.
- Conservative Q-learning for Overestimation Control: VerifierQ incorporates a Conservative Q-learning (CQL) term to counter overestimation bias, making Q-value updates more conservative. In contrast to classic CQL, VerifierQ add a term to enabling balance between conservatism and optimism
weaknesses: The paper is difficult to follow and some concepts and sections lack clear explanations

There are missing citations, often important concepts are introduced without a proper citation, for examples: 
-- line 094: generator-verifier framework
-- line 342: Polyak-average

Incomplete References: Published versions of cited works are not referenced.
Line 107: the two articles you are citing have been published respectively to NIPS 2020 and NIPS 2021, but you do not report this in the references.

Figures are hard to read, with text and images being too small (especially Figures 3 and 5).

The ablation section is inadequately detailed and lacks clarity.
Experiments described in figure 5 investigate parameter tuning rather than a true ablation, as they do not remove components to measure their impact, but rather modify \tau_1, without exploring the effect of \tau_2
The second part is unclear; it does not specify which components were from the original architecture, nor does it provide sufficient comments on results
Authors should enrich the ablation section by clearly detailing removed components, explaining the experimental setup, and discussing the results.

Detailed comments on the text (numbers refer to lines in the pdf):

044: I could not understand to which work "This approach" refers, please clarify.
068: Should this be "offline Q-learning" instead of "Q-learning"?
097: Please provide a clear definition for the input and output of the verifier
103: When you talk about offline Q-Learning, are you referring to a particular work or generally about offline techniques built upon Q-learning? Please clarify.
104: "More efficient" in what terms? Please specify.
Figure 1: 
    What is the source of action a_2 ?
    Why does a state generator generate an action?
    Why is the generator output described as a single action a_1, when for example at line 094 you say that "the generator's output can be treated as a SEQUENCE of actions" ?
164: Could you clarify or highlight where "utterance-level RL" is defined?
175-178: This concept is unclear; can you explain it further?
199: You mention modifying the offline Q-learning algorithm without defining offline Q-learning itself.
236: "taking action a'" is missing after ".. the next state s'"
325: When you talk about step, please refresh to what you are referring
363: What’s the rationale for splitting the fine-tuning process (first full, then LoRA)?
435: This is the first mention of “BERT-type” approaches. Please add context and references, and include utterance-level online approaches in related work if you plan to compare against them here.
440: Can you substantiate the claim of saving "10x training time"? What is the comparison baseline?

---

confidence: 4
contribution: 3
initial_rating: 3
presentation: 2
questions: see the above.
soundness: 2
strengths: 1. Combining RL and LLM is an important topic,  and VerifierQ validates the integration of RL into verifier models and demonstrates its potential to enhance test-time compute results.  

2. The authors address three practical challenges for the combinition of RL and LLM. Some of the design seems to be reasonable (Some Theorem shown that the methods can converge under mild conditions)
summary: This paper proposes the VerifierQ, which use offline Q-learning to train the Verifiers of LLMs. The authors address three key challenges in applying Q-learning to LLMs: (1) handling utterance-level Markov Decision Processes (MDPs), (2) managing large action spaces, and (3) mitigating overestimation bias. The experiments on GSM8K and MATH show that the methods are better than baselines.
weaknesses: 1. The paper writing needs to be improved. For example, line-068: key contributions:(1) We propose  ==> key contributions: (1) We propose; line-183: doesn't ==> does not; line-188: it's ==> it is; line-191: we've ==> we have; line-398: tau = 0.5 ==> tau_1 = 0.5; etc...

2. Some important details for the methods are missing. For example, Section 5.1 is hard to understand: (1) the authors say "We propose using the mean of the current Q-value and the traditional Bellman update as the target value" in line-212, and "The mean of the reward and next estimate serves as the target value for the Bellman update." in line-240. (2) The Figure 2 demonstrates the architecure, but it is not clear and not consistent with the text writing. 

3. Why directly applying IQL and CQL can address the Large Action Spaces and overestimation? It is know that large action space is very hard for RL. IQL and CQL are generally applied to traditional RL setting, with a few actions in the action space. 

4. The experiments are weak. Only testing the methods on two datasets with small LLMs.

Meta-review: The paper proposes to use Offline RL methods to learn verifiers for language generation. The approach is timely and addresses an important topic, and it would merit publication if concerns were better addressed. However, reviewers did raise major concerns regarding clarity, related work, evaluation, and ablation. The scores were widely spread (3, 5, 5, 8), but I find the highest score to be insufficiently justified by the corresponding brief review. Moreover, while I agree with the content of Reviewer M9KV's positive comment regarding novelty, I draw the opposite conclusion: utterance-level formulations have been studied before, and even if not in the context of verifier models, this significantly limits novelty.

Decision: Reject