Learning Reasoning Rewards from Expert Demonstrations with Inverse Reinforcement Learning
R-AIRL uses adversarial IRL to learn reasoning rewards from expert demonstrations, improving training, inference reranking, and error localization.
Key Findings
Methodology
This paper introduces R-AIRL, an adversarial IRL framework that learns process-level reasoning rewards directly from expert Chain-of-Thoughts. It constructs positive and negative trajectory sets based on answer agreement and corrupted demonstrations, training a token-level critic to output probabilities that are converted into rewards. These rewards are used for three main purposes: as a training signal for post-training, for inference-time reranking to enhance accuracy, and for process-level error localization. The approach employs multi-granularity reward design—sparse, interval, and dense—and integrates with Group Relative Policy Optimization (GRPO) for policy updates. Experiments on GSM8K, MMLU-Pro, and MedReason validate its effectiveness, showing significant improvements over supervised fine-tuning (SFT) in multiple metrics.
Key Results
- On GSM8K, R-AIRL's reward model achieved a pass@1 of 85.8%, outperforming SFT by 15.7 percentage points. In inference reranking, pass@1 improved by up to 17.4 points. The model also localized reasoning failures with 86.1% accuracy, demonstrating strong process diagnostics.
- Across MMLU-Pro and MedReason, the learned rewards transferred well, boosting reranking performance and generalizing across tasks and backbones. Dense rewards provided more detailed feedback but were less stable, while sparse rewards offered more stable training.
- The multi-granularity reward design balances stability and detail, with the reward model effectively distinguishing correct and incorrect reasoning traces, supporting robust training and inference workflows.
Significance
This work bridges imitation learning and reward-based optimization, enabling models to learn meaningful reasoning signals without external verifiers. It advances the state-of-the-art in autonomous reasoning by providing a unified reward framework applicable to training, inference, and diagnostics. The approach addresses core challenges in complex reasoning tasks, reducing reliance on handcrafted rewards and external supervision. Its ability to localize errors enhances interpretability, crucial for deploying AI in sensitive domains like healthcare and scientific research. Overall, it opens new avenues for scalable, self-supervised reasoning in large language models.
Technical Contribution
The paper's key technical innovations include adapting adversarial IRL to the language reasoning setting, designing multi-granularity rewards, and demonstrating the reusability of a single learned reward across multiple stages. The method avoids external verifiers, relying solely on expert demonstrations, and employs a critic-based reward mechanism that supports step-level diagnostics. The integration with GRPO enables stable policy updates, making the training process more robust. These contributions collectively push the frontier of reward learning in large-scale NLP models, offering both theoretical insights and practical tools.
Novelty
This is the first application of adversarial IRL for learning reasoning rewards directly from expert demonstrations in large language models. Unlike prior methods that depend on external verifiers or preference labels, R-AIRL infers process-level rewards purely from demonstration data, supporting multiple granularities. Its ability to unify training, reranking, and error localization within a single framework represents a significant departure from existing imitation or preference-based approaches, marking a new paradigm in autonomous reasoning.
Limitations
- The method's performance depends on the quality of expert demonstrations; noisy or biased data can impair reward learning. It also requires substantial computational resources for training critic models and policy updates, limiting scalability in some scenarios.
- While effective for many tasks, the reward signals may still be insufficient to cover all reasoning errors in highly complex or ambiguous tasks, necessitating external validation or hybrid approaches.
- Further research is needed to improve robustness against demonstration errors and to extend the framework to multimodal reasoning tasks, such as visual or sensor-based inputs.
Future Work
Future directions include integrating external verifiers for hybrid reward signals, exploring multi-modal demonstration data, and optimizing the critic architecture for efficiency. Extending the framework to real-world applications like medical diagnosis or scientific discovery, where reasoning is critical, is also promising. Additionally, developing methods to automatically curate high-quality demonstrations and reduce computational costs will be key to broader adoption.
AI Executive Summary
In recent years, large language models (LLMs) have demonstrated remarkable capabilities across natural language understanding and generation. However, their reasoning abilities, especially in multi-step tasks, remain limited by training paradigms that rely heavily on supervised fine-tuning (SFT) or reinforcement learning (RL) with external verifiers. These approaches often face challenges such as high annotation costs, brittleness of handcrafted rewards, and difficulty in capturing nuanced reasoning processes.
This paper introduces R-AIRL, a novel framework that leverages adversarial inverse reinforcement learning (IRL) to automatically learn process-level reasoning rewards directly from expert demonstrations. Unlike traditional methods that imitate tokens or rely on external verifiers, R-AIRL constructs positive and negative trajectory sets based on answer agreement and corrupted demonstrations, training a token-level critic to distinguish high-quality reasoning traces. The learned reward function is then reused across multiple stages: guiding the training of the language model, reranking candidate outputs during inference, and localizing reasoning errors.
The core innovation lies in the multi-granularity reward design—spanning sparse, interval, and dense levels—allowing a flexible balance between training stability and detailed feedback. The framework employs a unified adversarial IRL objective, optimized via Group Relative Policy Optimization (GRPO), which stabilizes training and enhances generalization. Extensive experiments on GSM8K, MMLU-Pro, and MedReason datasets demonstrate that R-AIRL consistently outperforms SFT, with improvements up to 17.4 percentage points in pass@1 during reranking, and achieves high accuracy in fault localization.
This work significantly advances autonomous reasoning in large models, reducing reliance on external verifiers and enabling scalable, self-supervised learning of reasoning signals. Its ability to transfer rewards across tasks and models suggests broad applicability in scientific, medical, and industrial domains. Future work will explore hybrid reward schemes, multimodal demonstrations, and efficiency improvements, aiming to make autonomous reasoning more robust, interpretable, and accessible.
Deep Analysis
Background
The evolution of large language models (LLMs) has revolutionized NLP, yet their reasoning capabilities lag behind. Prior work like Chain-of-Thought prompting and self-consistency methods improved performance but still rely on external verifiers or supervised signals. Reinforcement learning approaches, such as RLHF, depend on handcrafted reward functions or preference labels, which are costly and brittle. IRL offers a promising alternative by learning rewards directly from expert demonstrations, but its application in large models remains limited. This paper addresses these gaps by proposing a demonstration-based reward learning framework that does not require external verifiers, aiming to improve reasoning robustness, interpretability, and transferability.
Core Problem
Current methods face key challenges: designing explicit reward functions is difficult, especially for complex reasoning; off-policy imitation can lead to fragile performance when inference deviates from training trajectories; and existing reward signals lack granularity for diagnosing reasoning failures. These issues hinder the deployment of autonomous reasoning systems in real-world applications like medical diagnosis or scientific research, where robustness and interpretability are critical. The core problem is how to learn a stable, informative reward signal solely from expert demonstrations that can guide training, inference, and debugging without external supervision.
Innovation
The paper introduces several innovations: 1) applying adversarial IRL to learn process-level rewards from demonstrations, avoiding external verifiers; 2) designing multi-granularity rewards—sparse, interval, and dense—to balance stability and feedback richness; 3) reusing a single reward model for training, reranking, and error localization, simplifying the pipeline; 4) integrating with GRPO for stable policy updates. These innovations enable the model to learn meaningful reasoning signals directly from expert traces, supporting multiple downstream tasks and improving robustness, interpretability, and transferability compared to prior imitation or preference-based methods.
Methodology
- �� Construct positive and negative trajectory sets based on answer agreement and corruption, avoiding reliance on step labels.
- �� Train a token-level critic Dϕ to classify tokens as part of positive or negative reasoning traces, outputting probabilities that are converted into rewards.
- �� Implement multi-granularity reward masks (sparse, interval, dense) to control credit assignment and feedback detail.
- �� Formulate an adversarial IRL objective that maximizes the difference between expert and policy trajectory rewards, updating both the critic and policy iteratively.
- �� Use the critic logits to generate token rewards, which guide policy optimization via Group Relative Policy Optimization (GRPO), balancing exploration and stability.
- �� During inference, apply the learned reward for reranking sampled traces, selecting the highest scoring candidate.
- �� For error localization, analyze reward drops along traces to identify potential reasoning failures.
Experiments
Experiments span three datasets: GSM8K for arithmetic reasoning, MMLU-Pro for scientific reasoning, and MedReason for medical reasoning. The models tested include instruction-tuned variants like Qwen2.5, Llama3, and Qwen3-4B. The evaluation metrics include pass@1, reranking improvements, and fault localization accuracy. Ablation studies compare different reward granularities and training settings, analyzing stability and transferability. The experiments demonstrate that R-AIRL-trained rewards outperform SFT in training, significantly boost reranking performance, and effectively localize reasoning errors, validating the framework’s versatility and robustness.
Results
In GSM8K, R-AIRL achieved a maximum pass@1 of 85.8%, surpassing SFT by 15.7%. During inference, reranking with learned rewards improved pass@1 by up to 17.4 points across datasets. The reward models could transfer across tasks and backbones, with off-diagonal gains up to +13.0%. Dense rewards provided finer feedback but were less stable, while sparse rewards offered more consistent training. The reward-based reranking consistently outperformed random selection, confirming the utility of learned rewards for inference enhancement. Fault localization experiments showed over 86% accuracy in identifying reasoning failure points, demonstrating interpretability.
Applications
This approach is immediately applicable to domains requiring reliable reasoning, such as medical diagnosis, scientific research, and legal analysis. It enables models to learn reasoning signals solely from demonstrations, reducing reliance on costly external verifiers. The learned rewards facilitate better training, inference reranking, and debugging, making large models more autonomous and trustworthy. Long-term, integrating this framework with multimodal data and hybrid supervision could further expand its impact, enabling scalable, explainable AI systems capable of complex reasoning in real-world scenarios.
Limitations & Outlook
The method depends heavily on the quality of expert demonstrations; noisy or biased data can impair reward learning. Computational costs for critic training and policy updates are high, limiting scalability. The reward signals may still be insufficient for extremely complex or ambiguous tasks, requiring external validation. Additionally, the approach's effectiveness diminishes if demonstrations do not cover diverse reasoning paths, highlighting the need for better data curation and model robustness improvements.
Plain Language Accessible to non-experts
想象你在厨房里学做菜,老师(专家)教你一道菜的做法。你模仿老师的步骤,但有时候会偏离。传统方法就是反复练习,尽量模仿老师,但如果你偏离了,厨师不知道哪里出错。现在,有个聪明的机器人厨师,它能自己学会判断你的做法是否正确。它观察你和老师的示范,学会了哪些步骤最重要,哪些偏差会导致菜失败。它还能在你做菜时帮你挑出错误,甚至告诉你哪里需要改进。这样,你不用每次都请老师指导,就能自己变得更厉害。这就像论文里的方法,让电脑自己学会判断推理的好坏,不用外部验证器,自己找到问题,变得更聪明。
ELI14 Explained like you're 14
想象你在学校学折纸,老师教你怎么折。你模仿老师,但有时候会折错。以前的方法就是反复练习,尽量模仿老师,但如果偏离了,老师不知道哪里出错。现在,有个超级厉害的机器人老师,它能自己判断你的折纸是不是正确。它看你每一步,给你打分,告诉你哪里折错了,还能帮你改正。它不用每次都看老师的示范,就能自己判断折纸的好坏。它通过观察老师的示范,学会了哪些步骤最重要,哪些错误会让折纸变形。这样,你就能自己改进折纸技巧,不再完全依赖老师。这就像论文里的方法,让电脑自己学会判断推理是否正确,不用外部验证器,自己找到问题,变得更聪明。
Abstract
Teaching large language models (LLMs) to reason during post-training typically relies on reinforcement learning with explicit outcome- or process-based reward functions. However, in many real-world settings, obtaining or defining such reward functions is difficult, especially for complex tasks, making learning from expert demonstrations an attractive alternative. The dominant approach, supervised fine-tuning (SFT), trains models to imitate expert reasoning traces directly, but suffers from the general limitations of off-policy learning: performance can be fragile to inference-time deviations from states explicitly covered by the demonstrations. To address this, we propose Reasoning Adversarial Inverse Reinforcement Learning (R-AIRL). Rather than imitating the expert's reasoning, R-AIRL infers the underlying process-level reward from the expert Chain-of-Thoughts. Through experiments on GSM8K, MMLU-Pro and MedReason we show that the reasoning reward function learned with R-AIRL can be effectively used throughout the training and inference pipeline: (1) to provide a training signal for post-training, outperforming SFT in most of the considered settings, (2) for inference-time reranking, improving pass@1 by up to 17.4 points, and (3) for process-level evaluation, localising reasoning failures with up to 86.1% accuracy. Overall, R-AIRL bridges imitation learning and reward-based optimisation, enabling the extraction of meaningful reasoning signals from expert thinking traces.