Introduction
While Large Language Models (LLMs) are increasingly capable, they often stumble on complex, multi-step reasoning tasks. A popular fix is "test-time scaling"—giving the model more "thinking time" to refine its answers. However, current "verify-and-improve" methods face two major hurdles: restricted feedback spaces (like rigid compiler errors) and a lack of coordination between the solver and the reviewer.
Researchers have introduced DPSDP (Direct Policy Search by Dynamic Programming), a reinforcement learning framework that transforms LLM reasoning into a collaborative "actor-critic" game. By modeling multi-turn answer refinement as a Markov Decision Process (MDP) and training both the solver and the reviewer jointly, DPSDP achieves significant accuracy boosts on challenging math benchmarks, even outperforming models that rely on ground-truth oracle feedback.
The DPSDP Framework
The core innovation of DPSDP is treating the conversation between a solver (Actor) and a reviewer (Critic) as an episodic Markov Decision Process.
- The Actor-Critic Loop: The Actor generates an initial answer, the Critic provides feedback, and the Actor uses that feedback to refine the answer. This repeats for multiple turns.
- Backward Induction Training: Inspired by classic Dynamic Programming, DPSDP optimizes the policy turn-by-turn in reverse order. It starts by training the Actor to produce the best final answer given previous feedback, then moves backward to train the Critic to provide the most helpful feedback.
- DPO Integration: To make this computationally efficient, the authors reduced the complex RL objective into a Direct Preference Optimization (DPO) loss. They sample multiple candidate responses and feedbacks at each step, using the correctness of the final result to create "preferred" vs. "rejected" pairs for training.
- Markovian Simplification: Unlike previous work that feeds the entire conversation history back into the model, DPSDP uses a "Markovian" state—only the most recent answer and feedback. This prevents the model from getting bogged down in long contexts and helps it generalize to more refinement turns than it saw during training.
Key Results and Insights
The models were trained on a subset of OpenMathInstruct-2 and evaluated across In-Distribution (MATH 500, GSM8K) and Out-of-Distribution (MMLU-Pro Math, Olympiad Bench) datasets.
The results demonstrate that DPSDP effectively extracts more reasoning capability from smaller models:
- Significant Accuracy Boosts: On the MATH 500 benchmark, applying majority voting over five refinement turns with the Ministral-8B model boosted accuracy from 58.2% to 63.2%.
- Out-of-Distribution Generalization: On the grueling Olympiad Bench, the Ministral-based DPSDP model improved from 22.8% to 27.0%.
- Joint Training is Essential: Ablation studies show that training the Actor and Critic together significantly outperforms "Single-Agent" setups where one model tries to both solve and critique. Specialized roles allow for better exploration of the solution space.
- Less Context is More: Surprisingly, giving the agents access to the full history (Non-Markovian) led to worse performance due to distribution shift. Focusing only on the latest error and fix makes the system more robust.
- Beating the Oracle: In some cases, the DPSDP-trained critic provided more helpful feedback than a "perfect" Oracle that only gave binary (Correct/Incorrect) labels, because the generative critic could explain why something was wrong.
Limitations and Future Work
While powerful, test-time scaling is computationally expensive. Running five turns of refinement plus majority voting requires significantly more FLOPs than a single pass. Additionally, a preliminary Supervised Fine-Tuning (SFT) phase is necessary; if the base model is too weak to understand feedback initially, DPSDP struggles to improve it. Future directions point toward online or iterative RL, allowing the model to continuously learn from its own successes and failures during deployment rather than relying on a static training dataset.
Summary updated