Trust Region Inverse Reinforcement Learning: Explicit Dual Ascent using Local Policy Updates

Anish Diwan, Davide Tateo, Christopher E. Mower, Haitham Bou-Ammar, Jan Peters, Oleg Arenz

TL;DR

Trust Region Inverse Reinforcement Learning (TRIRL) bridges the gap between stable but computationally expensive classical inverse reinforcement learning (IRL) and fast but unstable adversarial imitation learning. By restricting policy updates to a local trust region and mathematically correcting the reward function post-hoc, TRIRL guarantees monotonic performance improvement while recovering true global reward functions that generalize to shifted environment dynamics.

What Problem Does This Paper Address?

In imitation learning, we want an agent to learn a behavior from expert demonstrations. There are two main ways to do this:

  1. Inverse Reinforcement Learning (IRL): Infers the underlying reward function of the expert and optimizes a policy against it. Classical methods (like Maximum Causal Entropy IRL) guarantee steady, monotonic improvement but are incredibly slow because they require fully solving a reinforcement learning problem at every single iteration.
  2. Adversarial Imitation Learning (AIL): Methods like GAIL bypass the expensive full-RL loop by setting up a two-player min-max game where a discriminator provides local rewards and the policy takes a few quick gradient steps. While fast, AIL is notoriously unstable, highly sensitive to hyperparameters, and fails to recover a true, globally optimizable reward function.

The authors address this fundamental trade-off: How can we reliably learn an informative, global reward function and an effective policy without the prohibitive cost of fully solving an RL problem at each step?

Methods

The core innovation of TRIRL is a clever mathematical inversion of the policy-reward update cycle, illustrated in Figure 1:

Figure 1. A comparison of TRIRL (ours) and a MaxCausalEnt-IRL style update. The Lagrangian dual to be optimized is indicated by the curve L(πr, r). MCE-IRL performs a full RL optimiza- tion after updating the reward function. In contrast, TRIRL only optimizes the policy within a trust region of the previous MCE policy and accounts for this by correcting the updated reward func- tion. Trust region policy updates are much cheaper to compute and reward correction ensures that the new policy-reward pair gets closer to the saddle point of L(π, r). Our algorithm hence has the same monotonic improvement guarantees as MCE-IRL, while being able to converge in complex, high-dimensional settings.

Instead of updating the reward function and then forcing the policy to globally optimize it (which is expensive), TRIRL does the following:

  • Trust-Region Policy Update: It updates the policy locally, constraining it within a reverse Kullback-Leibler (KL) divergence trust region around the previous policy. This local search is computationally cheap.
  • Reward Correction: The key theoretical insight is that a policy which is locally optimal for a large reward update is actually globally optimal for a smaller reward update in the exact same direction. TRIRL uses the Lagrangian multiplier ($\eta$) from the trust-region constraint to calculate exactly how much to scale down ("correct") the reward update.
  • Density Ratio Estimation via Logits: To update rewards in function space, TRIRL trains a binary classifier to distinguish between expert and agent states. Unlike GAIL, which uses the classifier's raw probabilities (and fails if the discriminator becomes too accurate), TRIRL uses the classifier's logits, meaning a more accurate classifier always yields better reward updates.
  • Circular Buffer of Discriminators: To prevent the reward function from depending on an infinite history of past classifiers, TRIRL maintains a fixed-size buffer of recent discriminators combined with a parametric reward model, balancing accuracy and memory footprint.

Datasets

The authors evaluated TRIRL across several standard and complex continuous control benchmarks:

  • MuJoCo Benchmarks: Half-Cheetah, Ant, Walker, Hopper, and Humanoid.
  • Complex Robotics Environments: Unitree Go2 quadruped locomotion and Unitree G1 humanoid walking/running. The G1 tasks utilized the LocoMuJoCo motion capture dataset, testing the algorithm in a challenging state-only, learning-from-observations setting.
  • Transfer Learning Benchmarks: Point Maze Flipped, Ant Disabled, Half Cheetah Windy, and Half Cheetah Mars Gravity (where environmental dynamics like gravity, wind, or morphology were altered to test reward generalization).

Key Insights and Ideas

  • The Post-Hoc Correction Trick: Instead of modifying the policy to fit a target reward, TRIRL modifies the reward post-hoc to fit the trust-region policy. This preserves the mathematical guarantees of explicit dual ascent without the computational overhead.
  • Immunity to the "Perfect Discriminator" Failure Mode: In adversarial imitation learning, if the discriminator becomes perfect, gradients vanish and policy training dies. In TRIRL, because the dual gradient relies on log-density ratios (logits), a perfect discriminator actually provides a cleaner, more accurate signal for the reward update.
  • True Intent Recovery: TRIRL doesn't just mimic trajectories; it recovers a robust reward function representing the expert's intrinsic motivation.

Key Results

  • State-of-the-Art Performance: TRIRL significantly outperformed prominent baselines (including GAIL, AIRL, AMP, LSIQ, NEAR, and SFM) across the board, improving the aggregate inter-quartile mean (IQM) by a factor of 2.4x.
  • Robust Transferability: When the learned reward functions were frozen and used to train a new agent from scratch in environments with altered dynamics (e.g., a disabled leg or changed gravity), TRIRL vastly outperformed AIRL and NEAR, demonstrating that it successfully decoupled the reward from the training environment's specific physics (Table 1).

Limitations and Future Work

  • Function Approximation Gap: The strict monotonic convergence guarantees hold in theory, but neural network function approximations introduce minor approximation errors in practice.
  • Memory Overhead: Maintaining a circular buffer of discriminators increases VRAM usage, though the authors demonstrate this overhead remains manageable for reasonable buffer sizes.
  • Trust Region Sensitivity: If the trust region bounds are set too loosely, the algorithm can suffer from convergence instabilities similar to adversarial methods.

The authors suggest that future work could extend this trust-region framework from KL divergence to more general $f$-divergences.

Summary updated

Abstract

Inverse reinforcement learning (IRL) is typically formulated as maximizing entropy subject to matching the distribution of expert trajectories. Classical (dual-ascent) IRL guarantees monotonic performance improvement but requires fully solving an RL problem each iteration to compute dual gradients. More recent adversarial methods avoid this cost at the expense of stability and monotonic dual improvement, by directly optimizing the primal problem and using a discriminator to provide rewards. In this work, we bridge the gap between these approaches by enabling monotonic improvement of the reward function and policy without having to fully solve an RL problem at every iteration. Our key theoretical insight is that a trust-region-optimal policy for a reward function update can be globally optimal for a smaller update in the same direction. This smaller update allows us to explicitly optimize the dual objective while only relying on a local search around the current policy. In doing so, our approach avoids the training instabilities of adversarial methods, offers monotonic performance improvement, and learns a reward function in the traditional sense of IRL--one that can be globally optimized to match expert demonstrations. Our proposed algorithm, Trust Region Inverse Reinforcement Learning (TRIRL), outperforms state-of-the-art imitation learning methods across multiple challenging tasks by a factor of 2.4x in terms of aggregate inter-quartile mean, while recovering reward functions that generalize to system dynamics shifts.
BibTeX
@inproceedings{diwan2026trust,
  author = {Anish Diwan and Davide Tateo and Christopher E. Mower and Haitham Bou-Ammar and Jan Peters and Oleg Arenz},
  title = {{Trust Region Inverse Reinforcement Learning: Explicit Dual Ascent using Local Policy Updates}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=XSYX75R6RC},
}

Loading related content...

Figure