MENTOR: Learning from Failure with On-Policy Pedagogical Intervention
Abstract
Reinforcement Learning from Verifiable Rewards (RLVR) is a key driver for Large Reasoning Models, but it is vulnerable to "zero-reward collapse", a training failure where a sudden increase in task difficulty causes the learning signal to vanish. We argue that the conventional approach of discarding these failed trajectories is wasteful, as they contain valuable diagnostic information about the model's cognitive gaps, a bright side that can be leveraged for recovery. Existing solutions, however, often regress to static, "off-policy-style" interventions like pre-defined hint libraries or perform post-hoc refinement, failing to provide the adaptive, forward-looking guidance needed to escape the collapse. To address this, we propose a paradigm shift towards on-policy pedagogical intervention and introduce MENTOR, a multi-agent framework that acts as a live mentor. MENTOR diagnoses the root cause of failure in real-time and dynamically generates targeted, instructional prompts to guide the learning agent's next attempt. As a plug-and-play module, MENTOR integrates seamlessly into existing policy optimization pipelines like GRPO without modifying the training infrastructure. Extensive experiments on math and code generation show that MENTOR effectively mitigates zero-reward collapse, outperforming state-of-the-art baselines. Notably, it achieves massive average relative gains of up to 78.3% on Llama-3.2-3B-Instruct over its base model.
Figures & tables
| Methods | AIME24 | AIME25 | MATH-500 | GAOKAO-Bench | Olympiad-Bench | DM | Avg | MMLU |
| Deepseek-R1-Distill-Qwen-1.5B | ||||||||
| Base | 16.67 | 16.67 | 66.20 | 63.55 | 2.50 | 34.32 | 38.57 | 17.14 |
| GRPO | 16.67 | 16.67 | 67.20 | 65.89 | 2.00 | 40.88 | 43.55 | 21.43 |
| DAPO | 13.33 | 16.67 | 71.20 | 72.90 | 3.50 | 43.72 | 46.66 | 22.86 |
| SRPO | 20.00 | 16.67 | 71.40 | 72.90 | 3.50 | 43.84 | 46.83 | 17.14 |
| Critique | 16.67 | 16.67 | 71.60 | 74.70 | 2.50 | 43.88 | 46.92 | 24.29 |
| Methods | LCB | HE | MBPP | BCB | Avg |
| Deepseek-Coder-1.3B | |||||
| Base | 61.93 | 15.85 | 46.40 | 20.09 | 30.13 |
| GRPO | 64.77 | 16.46 | 49.40 | 23.60 | 33.18 |
| DAPO | 65.34 | 17.07 | 50.00 | 23.86 | 33.59 |
| SRPO | 65.34 | 18.29 | 49.60 | 24.04 | 33.69 |
| Critique | 65.34 | 18.90 | 50.00 | 24.56 | 34.14 |
| Method | GPU Hours | Wall Time | Human Labor | Total Time |
| Vanilla GRPO | 120h | 15.3h | 0h | 15.3h |
| Critique-GRPO | 168h | 23.5h | 0h | 23.5h |
| Offline Baselines | 132h | 21.3h | 24h * | 45.3h |
| MENTOR (Ours) | 134.7h | 17.9h | 0h (Auto) | 17.9h |
| * Estimated expert hours for data curation. | ||||
| Method | Avg. Acc. (%) | Acc. (%) |
| w/o Attribution Agent | 83.21 | -4.50 |
| w/o Generation Agent | 83.04 | -4.67 |
| w/o Critique-Repair Agent | 85.43 | -2.28 |
| Ours | 87.71 | - |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| ERROR_KEYPHRASE_PROMPT (Attribution Agent) |
| You are an Attribution Agent. Given a question, its ground-truth answer, and one or more failed student solutions/trajectories, diagnose the persistent cognitive error. |
| Output diagnostic keywords that localize the conceptual gap or logical breakpoint. Do NOT reveal the solution path, final answer, formulas, or implementation steps. |
| Focus on logical and algorithmic mistakes rather than trivial syntax issues. |
| Prefer a short keyword phrase (or a semicolon-separated set of keywords) capturing the root misconception. |
| Examples: |
| - Confused nowhere dense sets with sets |
| GUIDANCE_PROMPT_TEMPLATE (Generation Agent) |
| You are a Generation Agent acting as a pedagogical tutor. Using the diagnostic keywords as a directive and the failed trajectories as context, write ONE candidate instructional hint for the same question. |
| The hint should: |
| 1. Directly address the diagnosed misconception or logical breakpoint |
| 2. Be concise, actionable, and specific to the failure mode |
| 3. Guide thinking without giving the solution path |
| 4. Avoid answer leakage: no final answers, numerical results, formula derivations, or concrete code snippets |
| HINT_VERIFY_PROMPT (Judgment Agent) |
| You are a Judgment Agent (LLM-as-a-Judge). Evaluate whether a generated hint is HIGH or LOW quality. Do NOT revise the student’s solution; judge only the hint. |
| A HIGH quality hint: |
| - Semantically aligned with the diagnosed failure (diagnostic keywords) and the question |
| - Points to the core concept, principle, algorithm, or reasoning pattern that failed |
| - Does not leak the answer: no final answer, formula derivation, calculation, or complete implementation |
| - Clear and targeted, not vague or generic |
| HINT_REFINE_PROMPT (Repair Agent) |
| You are a Repair Agent. Revise the hint (not the student’s solution) according to the Judgment critique so it becomes a safe, pedagogically sound instructional prompt. |
| Question: {question} |
| Diagnostic Keywords: {error_keyphrase} |
| Original Hint: {current_hint} |
| Critique / Issue(s): {fixed_feedback} |
| Guidelines: |
| CRITIQUE_PROMPT (Repair Agent: Critique step) |
| You are a Repair Agent performing self-critique on an instructional hint. Identify EXACTLY ONE critical flaw that prevents this hint from being HIGH quality. |
| Choose from: |
| - Too vague (e.g., no specific concept named) |
| - Reveals the answer or key number (answer leakage) |
| - Gives step-by-step solution instructions |
| - Misaligned with the diagnosed failure / mentions irrelevant concept |
| REWRITE_PROMPT (Repair Agent: Rewrite step) |
| Revise the following hint to fix the flaw: “{flaw}". Do not revise the student’s solution. |
| Question: {question} |
| Diagnostic Keywords: {error_keyphrase} |
| Original Hint: {current_hint} |
| Guidelines: |
| - Fix the stated flaw |
| Input: “Determine whether there exists a nowhere dense set in that is not an set.” |
| Rollout |
| Rollout 1: “A nowhere dense set has empty interior in its closure… Therefore all nowhere dense sets are . Answer: No.” |
| Rollout 2: “ sets are countable unions of closed sets… and nowhere dense sets are meager, the answer is No.” |
| Rollout 3: “The Cantor set is closed and nowhere dense… Therefore all nowhere dense sets are . Answer: No.” |
| Rollout 4: “By the Baire Category Theorem, any meager… set is contained in a countable union of closed sets… Answer: No.” |
| Attribution Agent: “Confused nowhere dense sets with sets; misapplied Baire Category Theorem by equating meager sets with sets.” |
| Input: “Find the number of ordered pairs , where both and are integers between and , inclusive, such that .” |
| Rollout |
| Rollout 1: “Factoring the equation , we get . Case 1: . Letting , , which gives 67 pairs. Case 2: . Letting , , which gives 51 pairs. Total number of pairs is . Answer: 118.” |
| Rollout 2: “We have . Using the quadratic formula for , . So or . For , is a multiple of 4, giving 51 solutions. For , is a multiple of 3, giving 67 solutions. The total is . Answer: 118.” |
| Rollout 3: “The quadratic factors to . There are 67 integer solutions for the first line within the range and 51 integer solutions for the second line. Total pairs = 118. Answer: 118.” |
| Rollout 4: “ . From , there are 67 solutions. From , there are 51 solutions. Adding them gives solutions. I don’t see any other constraints. Answer: 118.” |
| Attribution Agent |
| Input: “An isosceles trapezoid has an inscribed circle tangent to each of its four sides. The radius of the circle is 3, and the area of the trapezoid is 72. Let the parallel sides of the trapezoid have lengths and , with . Find .” |
| Rollout |
| Rollout 1: “The inradius gives the height , and the area gives . Because a circle is inscribed, the two legs satisfy , so each leg is . A leg rises by the height and runs horizontally by the difference of the two bases, so . Therefore . Answer: 342.” |
| Rollout 2: “Place the longer base from to and the shorter one from to , so the slanted leg joins to . With and each leg equal to 12 by the tangency condition, , giving . Answer: 342.” |
| Rollout 3: “Height , . By Pitot’s theorem for tangential quadrilaterals, the slant side satisfies , so . Drawing altitudes forms a right triangle with hypotenuse 12, height 6, and base . By the Pythagorean theorem, . We know . So . Answer: 342.” |
| Rollout 4: “ and . The right triangle from the altitude has legs and , and hypotenuse . So . We want . Since and , we add them: . Answer: 342.” |
| Attribution Agent |
RL for Language Model Reasoning
Reinforcement learning for language model reasoning uses reward-driven training to improve multi-step problem solving, tool use, and reliable answers.
See all 1,103 papers