Is Optimal Transport Necessary for Inverse Reinforcement Learning?

Zixuan Dong, Yumi Omori, Keith W. Ross · Submission to ICLR 2026 · Rejected

TL;DR

Recent Inverse Reinforcement Learning (IRL) methods rely heavily on Optimal Transport (OT) to align trajectories and infer reward signals. This paper demonstrates that solving complex, computationally expensive OT optimization problems is unnecessary: two simple, optimization-free distance heuristics—Minimum-Distance and Segment-Matching—match or outperform OT-based methods across 32 online and offline benchmarks while scaling with linear computational complexity.

What Problem Does This Paper Address?

In trajectory-based IRL and offline imitation learning, an agent must learn tasks from expert demonstrations without access to ground-truth reward functions. Recent state-of-the-art methods formulate reward recovery as an Optimal Transport (OT) problem: they compute a minimal-cost probabilistic coupling between agent and expert trajectories via the Wasserstein distance (solved with iterative algorithms like Sinkhorn).

However, standard OT is computationally expensive ($O(T^2 d)$ where $T$ is trajectory length and $d$ is state dimension), assigns rewards non-stationarily based on the entire trajectory, and ignores temporal sequence order. While recent extensions add hand-crafted temporal masks and context windows to fix this, they still retain the machinery of OT. The authors ask: Is solving an optimal transport coupling actually necessary, or does the empirical success simply stem from basic geometric proximity and temporal alignment?

Methods

The authors propose two minimalist, optimization-free reward labeling heuristics:

  1. Minimum-Distance Reward (Min-Dist): Assigns each non-expert state $s_t$ a reward based solely on its negative point-to-set distance to the closest state anywhere in the expert trajectory $\tau^e$: $$r_{\text{min}}(s_t) = -\min_{s^e \in \tau^e} \text{Dist}(s_t, s^e)$$ It completely ignores temporal order and can be evaluated in $O(T \log T + dT)$ time with a kd-tree.

  2. Segment-Matching Reward (Seg-Match): Partitions the expert demonstration into $T$ contiguous segments $\{\Gamma_1, \dots, \Gamma_T\}$ proportional to trajectory lengths. Each agent state $s_t$ receives a reward based on its distance to its corresponding expert segment: $$r_{\text{seg}}(s_t) = -\min_{s^e \in \Gamma_t} \text{Dist}(s_t, s^e)$$ This incorporates lightweight temporal alignment in $O(dT)$ time—strictly linear complexity—with zero optimization steps.

Both methods generalize into a unified framework of temporally indexed sliding windows. For offline downstream policy learning, rewards are squashed exponentially and normalized before training with offline RL algorithms (IQL, ReBRAC, or TD3+BC). In online RL, policies are trained from scratch with DrQ-v2 using dynamic scaling and Gaussian smoothing.

Datasets

The authors evaluated methods on standard public benchmarks (no new datasets were introduced):

  • D4RL (Offline RL): 23 datasets spanning three domains:
  • MuJoCo-v2 (9 datasets across Hopper, HalfCheetah, Walker2d)
  • Adroit-v1 (8 datasets across Pen, Door, Hammer, Relocate)
  • Antmaze-v2 (6 navigation datasets: umaze, medium, large)
  • MetaWorld (Online Visual RL): 9 vision-based manipulation tasks (e.g., window-open-v2, door-open-v2, basketball-v3, stick-push-v2).

Key Insights and Ideas

  • Temporal alignment beats complex coupling: Trajectory alignment benefits far more from simple chronological ordering than from solving an optimal transport matrix. Seg-Match consistently outperforms standard OT and matches or beats TemporalOT.
  • OT becomes a computational bottleneck: When scaling to multiple expert demonstrations ($K=20$), OT reward labeling took up to 58 minutes on Antmaze—more than double the time required to train the downstream IQL agent (20 minutes). In contrast, Seg-Match and Min-Dist add negligible overhead.
  • Min-Dist is theoretically sufficient: The authors provide a theoretical bound (Theorem 1) showing that when datasets are low-quality, high-quality, or paired with strong offline RL regularizers, the performance gap between OT and simple Min-Dist is provably small.

Key Results

  • Offline RL with IQL:
  • On MuJoCo, Seg-Match achieved an aggregate normalized score of 708.73, nearly matching the ground-truth reward Oracle (709.10) and outperforming standard OT (661.62) and TemporalOT (695.34).
  • On Antmaze, the temporal-free Min-Dist achieved the highest overall score (403.85), beating standard OT (385.15) and the IQL Oracle (390.30).
  • Robustness to Downstream Learners: Evaluated with ReBRAC on MuJoCo, Seg-Match (758.85) and Min-Dist (758.11) both surpassed standard OT (752.46) and matched TemporalOT (759.11).
  • Online Visual RL (MetaWorld): Seg-Match achieved an aggregate score of 439.50, substantially beating standard OT (391.90) and performing competitively with TemporalOT (449.61).
  • Multi-Expert Scaling: As expert demonstrations increased from $K=1$ to $20$, standard OT and Min-Dist performance degraded, while Seg-Match sustained high performance and improved with additional experts.

Limitations and Future Work

  • Min-Dist fails in online exploration: While Min-Dist excels on several offline datasets, it fails entirely in online visual RL tasks where temporal progress is critical to guide exploration from scratch.
  • Slight edge for TemporalOT on complex tasks: TemporalOT slightly outperformed Seg-Match on select Adroit and MetaWorld tasks, indicating that rigid segment boundaries could be refined with smoother temporal windows.
  • Metric sensitivity: Performance depends noticeably on the base similarity metric; cosine distance consistently outperformed Euclidean distance across environments.
  • Future directions: Investigating simple windowed heuristics directly within learned latent representation spaces (e.g., intent-conditioned value functions) rather than raw state spaces.

Summary updated

Abstract

Inverse Reinforcement Learning (IRL) aims to recover a reward function from expert demonstrations. Recently, Optimal Transport (OT) methods have been successfully deployed to align trajectories and infer rewards. While OT-based methods have shown strong empirical results, they are conceptually complicated, requiring the solution of the OT optimization problem. In this work, we challenge the necessity of OT in IRL by proposing two simple, heuristic alternatives: (1) Minimum-Distance Reward, which assigns rewards based on the nearest expert state regardless of temporal order; and (2) Segment-Matching Reward, which incorporates lightweight temporal alignment by matching agent states to corresponding segments in the expert trajectory. These methods circumvent optimization, exhibit linear-time complexity, and are easy to implement. Through extensive evaluations across 32 online and offline benchmarks with three reinforcement learning algorithms, we show that our simple rewards match or outperform recent OT-based approaches. Our findings suggest that the core benefits of OT may arise from basic proximity alignment rather than its optimal coupling formulation, advocating for reevaluation of optimal transport in future IRL design.
BibTeX
@misc{dong2025is,
  author = {Zixuan Dong and Yumi Omori and Keith W. Ross},
  title = {{Is Optimal Transport Necessary for Inverse Reinforcement Learning?}},
  year = {2025},
  eprint = {2506.06793},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.06793},
}
Figure