Offline Inverse Reinforcement Learning with Unified Diffusion Planning

Hongmin Zhao, Jiyuan Yin, Kexi Yan, Qinglai Wei, Jie ZhangNeurIPS 2026

TL;DR

Learning how to behave—and why—purely from static, recorded demonstrations without ever interacting with the real world is notoriously unstable. The authors introduce OIDP, an algorithm that pairs a single-space mathematical objective with score-based diffusion models to simultaneously learn world physics, estimate its own uncertainty, and plan expert-level actions. By replacing fragile, alternating optimization loops with a unified diffusion planner, it extracts usable reward functions and outperforms state-of-the-art offline imitation methods, especially when training data is messy.

What Problem Does This Paper Address?

Reinforcement Learning (RL) works wonders when you have a clear scoreboard, like points in a video game. In the real world—think autonomous driving or clinical treatment—designing a bug-free reward function is tough, and letting an AI learn by trial-and-error is dangerous. Enter Offline Inverse Reinforcement Learning (IRL): given only a static dataset of demonstrations, figure out the underlying reward function motivating the expert, and learn a policy to match it.

Existing Offline IRL methods often learn a "world model" (approximate environment dynamics) from extra non-expert data so the AI can practice in its imagination without drifting off course. However, they hit three major roadblocks:

  1. Unstable "Minimax" Ping-Pong: Traditional IRL alternates between guessing the reward and updating the policy. In an offline setting, small errors in the learned world model get amplified every time you bounce between these spaces.
  2. Oversimplified Physics & Uncertainty: Standard Gaussian (bell-curve) dynamics models struggle to capture complex, multi-path environments and lack a built-in way to measure epistemic uncertainty (knowing what they don't know) without training expensive ensembles.
  3. Wasted Knowledge: Once training finishes, the learned world model is typically thrown away rather than being used to help the agent plan at test time.
Figure 1: Comparison between minimax optimiza- tion and single-space optimization in Offline IRL. A. Minimax optimization repeatedly alternates across multiple spaces, potentially exacerbating model error accumulation. B. Q-space optimiza- tion avoids this error amplification and enables simultaneous recovery of reward and policy.

Methods

To stop error amplification, the authors build OIDP (Offline Inverse Reinforcement Learning with Unified Diffusion Planner) by extending an existing framework called Inverse Soft Q-Learning (IQ-Learn) into the model-based offline setting:

  • Conservative Q-Space Optimization: Instead of ping-ponging between rewards and policies, OIDP optimizes exclusively in the Q-space (a measure of expected future value for taking an action in a state), from which both the reward and policy can be mathematically recovered. Crucially, it subtracts an uncertainty penalty during simulated rollouts so the agent stays conservative in unfamiliar territory. Each Q-update subproblem is provably concave for a fixed policy.
  • One Score Network for Dynamics & Uncertainty: Instead of Gaussians, OIDP trains a conditional diffusion model (which generates data by iteratively removing noise) to predict next states. Cleverly, the authors use the diffusion model's denoising score-matching residual—essentially how hard the network has to work to denoise a transition—as a natural, ensemble-free uncertainty penalty.
  • Unified Diffusion Planner: Because the agent's policy is also trained as a diffusion score network, both the policy and the dynamics speak the exact same mathematical language. At execution time, instead of discarding the world model, OIDP interleaves single denoising steps of actions and future states along a planning horizon, using future Q-value gradients to guide current action selection.
Figure 2: Overview of the OIDP framework, which comprises three components: A. learning a diffusion model to approximate dynamics and estimate uncertainty; B. optimizing the conservative objective in Q-space via model rollouts; C. at execution, performing trajectory-guided sampling by interleaving the diffusion policy and the diffusion dynamics to obtain high-value actions.

Datasets

The authors evaluate OIDP on the standard D4RL benchmark, using four continuous-control locomotion tasks from MuJoCo (Hopper, HalfCheetah, Walker2d, Ant) and four dexterous manipulation tasks from Adroit (detailed in their appendix). No new benchmarks are introduced; instead, following standard offline IL setups, datasets are constructed by mixing a small set of expert tuples (e.g., 5k) with larger pools (20k) of non-expert transitions (random, medium, or medium-replay).

Key Insights and Ideas

  • Free Epistemic Uncertainty from Diffusion: Using a diffusion model's score-matching residual isolates model-fitting error rather than getting confused by inherent environmental randomness—giving you a principled conservative penalty from a single network without training an ensemble.
  • Shared Math Unlocks Test-Time Planning: Casting both the dynamics model and the energy-based policy into score networks lets future consequences steer present actions mid-denoising, turning passive imitation into active lookahead planning.
  • Local Accuracy Matters Most: Theoretical bounds (Corollary 3.6) reveal that the dynamics model doesn't need to be perfect everywhere—only in the state-action regions actually visited by the learned policy.

Key Results

  • Dominant Control Performance: Across 12 MuJoCo dataset-task combinations, OIDP achieves the highest normalized return on 10 of them. It shines brightest when paired with low-quality random non-expert data—for example, scoring 94.4 on Hopper (vs. 15.4 for model-based IRL baseline CLARE and 61.5 for behavior cloning baseline DWBC) and 70.3 on HalfCheetah (vs. 35.4 for DWBC).
  • Superior World Modeling: Trained on random data and tested on held-out medium-replay transitions, the diffusion dynamics model slashes L2 prediction error compared to a standard Gaussian model: 2.013 vs. 7.023 on HalfCheetah, and 0.820 vs. 7.545 on Ant.
  • True Reward Recovery: Returns computed with OIDP's recovered reward functions achieve a >0.95 Pearson correlation with ground-truth environment returns. Relabeling offline datasets with OIDP's learned rewards allows an independent offline RL algorithm (CQL) to train smoothly to expert levels.
Figure 3: Visualization of a 2D projection on the state space of the real dynamics sampling data and diffusion dynamics sampling data.

Limitations and Future Work

The authors candidly note two main drawbacks:

  1. No Visual Inputs Yet: OIDP currently operates only on compact state vectors, not raw image observations.
  2. Execution Latency: Iterative denoising across a multi-step planning horizon introduces noticeable computational overhead at test time (though trajectory guidance can be toggled off if speed is critical).

For future work, the authors suggest integrating more advanced, vision-capable world models to tackle complex real-world tasks, and diving deeper into the theoretical interplay between the policy and dynamics diffusion models.

Summary updated

Abstract

Offline Inverse Reinforcement Learning (IRL) aims to recover a reward function and imitate expert behavior solely from offline demonstrations. While recent Offline IRL approaches employ approximate dynamics to mitigate distribution shift, their performance is constrained by the unstable minimax framework as well as simplified representation and utilization. To address these issues, we propose Offline Inverse Reinforcement Learning with Unified Diffusion Planner (OIDP), which leverages diffusion models to achieve stable Offline IRL. OIDP formulates a model-based conservative Q-optimization through inverse soft Q-learning, with provably concave Q-update subproblems for a fixed policy and a controllable objective discrepancy. To this end, we introduce a unified diffusion planner that models dynamics, uncertainty estimator, and policy. It captures multimodal distributions and tightens the objective gap bound, and at execution performs trajectory-guided policy sampling using the internalized dynamics knowledge. Experimental results on D4RL benchmarks demonstrate that OIDP outperforms state-of-the-art offline approaches.
BibTeX
@inproceedings{zhao2026offline,
  author = {Hongmin Zhao and Jiyuan Yin and Kexi Yan and Qinglai Wei and Jie ZHANG},
  title = {{Offline Inverse Reinforcement Learning with Unified Diffusion Planning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=JZw9JG0jN0},
}
Figure