Offline Reinforcement Learning with Wasserstein Regularization via Optimal Transport Maps

Motoki Omura, Yusuke Mukuta, Kazuki Ota, Takayuki Osa, Tatsuya Harada

TL;DR

Training offline reinforcement learning (RL) agents often destabilizes when the policy chooses out-of-distribution actions. While the Wasserstein distance provides a geometrically grounded penalty to keep policies close to the training data, existing implementations rely on notoriously unstable adversarial discriminators. This paper introduces Q-DOT, an offline RL framework that models optimal transport maps directly using Input-Convex Neural Networks (ICNNs), achieving stable, discriminator-free Wasserstein regularization.

What Problem Does This Paper Address?

In offline RL, agents learn purely from static datasets without environment interaction. A central failure mode is distributional shift: when evaluating candidate policies, value functions tend to wildly overestimate the returns of unseen, out-of-distribution (OOD) actions.

To counter this, algorithms regularize the learned policy against the dataset’s behavior policy:

  • $f$-divergences (e.g., KL divergence): Rely on density ratios and can explode when the action distributions do not share overlapping support. Furthermore, they ignore the underlying geometry and distance metrics of continuous action spaces.
  • Wasserstein Distance: Naturally measures geometric distances in action space and remains well-behaved with non-overlapping supports. However, prior attempts to use the Wasserstein distance in RL relied on Kantorovich dual formulations with adversarial discriminators (similar to WGANs). Discriminator training requires strict Lipschitz constraints, is unstable, and frequently collapses in practice.

Methods

The authors propose Q-DOT (Q-learning regularized by Direct Optimal Transport modeling), eliminating adversarial training via Brenier’s Theorem:

  1. Optimal Transport via ICNNs: Brenier’s theorem states that for the 2-Wasserstein distance ($W_2^2$), the unique optimal transport map pushing forward one continuous distribution to another is the gradient of a convex potential function, $T(a) = \nabla_a \psi(s, a)$. By parameterizing $\psi_\omega$ as an Input-Convex Neural Network (ICNN) convex in the action $a$, the transport mapping is guaranteed to be an optimal transport map.
  2. Closed-Form Regularization: Because $\nabla_a \psi_\omega$ acts as an optimal transport map, the 2-Wasserstein distance simplifies directly to an expected $L_2$ squared difference: $$\mathbb{E}_{a \sim \mathcal{D}}\left[ \|a - \nabla_a \psi_\omega(s, a)\|_2^2 \right]$$ There is no discriminator, no gradient penalties, and no min-max game. The transport network simply maximizes: $$J_\psi(\omega) = \mathbb{E}_{(s, a) \sim \mathcal{D}}\left[ Q(s, \nabla_a \psi_\omega(s, a)) - \alpha \|a - \nabla_a \psi_\omega(s, a)\|_2^2 \right]$$
  3. In-Sample Critic & Policy Extraction:
  4. Value Learning: Uses Implicit Q-Learning (IQL) with expectile regression to learn state and action values purely on dataset transitions, avoiding out-of-distribution queries.
  5. Action Sampling Policy: Since $\nabla_a \psi_\omega(s, a)$ requires a dataset action as input, the authors train an explicit parametric actor $\pi_\rho(a|s)$ using Advantage-Weighted Regression (AWR) fitted directly to the transported actions.
Offline Dataset (s, a)
         │
         ├──> In-Sample Critic (IQL) ──> Evaluates Q(s, ·) & V(s)
         │
         └──> ICNN Potential ψ(s, a) ──> Transport Map: a' = ∇_a ψ(s, a)
                                                  │
                                                  ▼
                                       Advantage-Weighted Regression
                                                  │
                                                  ▼
                                      Executable Policy π(a|s)

Datasets

The authors evaluate their method on the standard D4RL (Datasets for Deep Data-Driven Reinforcement Learning) benchmark across continuous control domains:

  • Gym Locomotion: HalfCheetah, Hopper, and Walker2d (medium, medium-replay, and medium-expert splits).
  • AntMaze: umaze, medium, and large mazes with play and diverse trajectories.
  • Kitchen: complete, partial, and mixed manipulation datasets.

No new datasets were introduced.

Key Insights and Ideas

  • Discriminator-Free $W_2$ Metric: Replacing adversarial min-max optimization with direct convex potential optimization transforms an unstable minimax problem into a stable regression-style objective.
  • Adaptive Trajectory Correction: Visualizing the transport distance $\|a - \nabla_a \psi_\omega(s, a)\|_2$ across dataset trajectories reveals that low-return trajectories undergo substantially larger action modifications, whereas high-return (expert) trajectories remain nearly untouched. The ICNN preserves good behavior while selectively steering poor actions toward higher-value regions.
  • Overcoming Adversarial Failure: The authors reproduced an adversarial Wasserstein baseline (AdvW, based on BRAC / WGAN principles). AdvW struggled significantly on expert datasets (scoring 17.6 on hopper-medium-expert-v2 vs. Q-DOT's 93.1), demonstrating that adversarial objectives undermine behavior cloning even when strong regularization is intended.

Key Results

Q-DOT delivers performance that meets or exceeds standard offline RL algorithms (including IQL, CQL, and TD3+BC):

  • Gym Locomotion Total: Q-DOT achieved a cumulative score of 712.4, outperforming CQL (698.5), IQL (692.4), TD3+BC (677.4), and AdvW (480.1).
  • Targeted Breakthroughs: On hopper-medium-v2, Q-DOT attained 76.7 (compared to IQL’s 66.3 and TD3+BC’s 59.3). On kitchen-partial-v0, Q-DOT achieved 71.3 (compared to IQL's 46.3 and CQL's 49.8).
  • AntMaze: Q-DOT achieved a total score of 382.0, performing comparably to IQL (378.0).

Limitations and Future Work

  • Trajectory Stitching: While effective at pulling bad actions toward good ones within similar state regimes, Q-DOT does not inherently solve long-horizon trajectory stitching. Performance on AntMaze remained tied to base IQL capabilities.
  • Environment Disparities: While Hopper and Walker2d showed clear inverse correlations between trajectory return and transport magnitude, HalfCheetah did not exhibit this trend as strongly, indicating that the critic did not consistently identify advantageous transforms in that domain.
  • Broader RL Settings: The method is currently restricted to offline RL. Extending ICNN-based Wasserstein regularization to online policy optimization or representation learning remains open for investigation.

Summary updated

BibTeX
@inproceedings{omura2025offline,
  author = {Motoki Omura and Yusuke Mukuta and Kazuki Ota and Takayuki Osa and Tatsuya Harada},
  title = {{Offline Reinforcement Learning with Wasserstein Regularization via Optimal Transport Maps}},
  booktitle = {RLC},
  year = {2025},
  url = {https://openreview.net/forum?id=RxdQBYKjtE},
}
Figure