Recursive Deep Inverse Reinforcement Learning

Paul Ghanem, Owen Howell, Michael Potter, Pau Closas, Alireza Ramezani, Deniz Erdogmus, Tales Imbiriba

TL;DR

Recursive Deep Inverse Reinforcement Learning (RDIRL) introduces a fully online, sample-by-sample method for learning complex neural network-based reward functions from expert demonstrations. By proving that a simple moment-matching loss acts as a mathematically rigorous upper bound to the traditional maximum entropy objective, the authors leverage second-order Newton updates (akin to an Extended Kalman Filter) to achieve rapid convergence without storing past trajectory data.

What Problem Does This Paper Address?

Inverse Reinforcement Learning (IRL) aims to figure out the underlying reward or cost function of an agent (such as an adversary) simply by watching them behave. This is crucial for real-time counterplanning in fields like cybersecurity, military strategy, and robotics.

However, standard deep MaxEnt IRL methods (like Guided Cost Learning) are computationally heavy and strictly offline. They rely on a slow, nested-loop architecture: an inner loop solves for an optimal policy under a guessed reward function, and an outer loop uses first-order gradient descent over large batches of full trajectories to refine that guess. This batch-heavy approach fails in real-time, streaming, or resource-constrained environments where an algorithm must adapt to an adversary on the fly without massive memory overhead.

Methods

To bridge the gap between offline deep IRL and online recursive estimation, the authors introduce two key innovations:

  1. The Moment-Matching Upper Bound: The primary mathematical roadblock to online estimation in MaxEnt IRL is the log-sum-exp partition function, which cannot be optimized sequentially. The authors use a reversed Jensen's inequality to prove that a simpler moment-matching loss function serves as a formal upper bound to the traditional negative log-likelihood objective.
  2. Recursive Second-Order Optimization: Because this new upper bound has a clean summation structure, it can be optimized recursively. The authors develop RDIRL, an algorithm that uses sequential second-order Newton updates—heavily inspired by the Extended Kalman Filter (EKF)—to update the neural network's parameters ($\theta$) and an adaptive step-size matrix (the inverse Hessian $P_\theta$) incrementally as each expert observation arrives.

RDIRL pairs this optimization with Model Predictive Path Integral (MPPI) control as its inner policy, allowing the entire pipeline to adapt dynamically at every time step.

Datasets

The authors evaluated RDIRL across two distinct sets of environments:

  • OpenAI Gym & MuJoCo Benchmarks: Standard continuous control tasks including CartPole-v1, MountainCarContinuous-v0, HalfCheetah-v4, Hopper, and Walker2d.
  • Adversarial Cognitive Radar Scenario: A simulated 3D tracking task where a radar agent chases a moving target, optimizing a complex reward based on the log-determinant of the Fisher Information Matrix (FIM).

Key Insights and Ideas

  • Validating Heuristics: The biggest "aha" moment is demonstrating that moment-matching isn't just an intuitive heuristic—it is a mathematically rigorous upper bound of the maximum entropy objective. This insight effectively bypasses the intractable partition function that traditionally prevents recursive filtering in IRL.
  • Uncertainty-Aware Updates: By tracking and updating the inverse Hessian matrix ($P_\theta$), RDIRL eliminates the need for a manually tuned, fixed learning rate. Instead, it automatically scales its updates based on the local curvature of the loss landscape, acting as an adaptive, uncertainty-aware step size.
  • True Streaming Stability: While "naive" online adaptations of popular algorithms like GAIL or AIRL become highly unstable or degrade when forced to update sample-by-sample, RDIRL's second-order framework maintains structural stability and sample efficiency in streaming modes.

Key Results

  • Rapid Convergence: In standard Gym tasks, RDIRL converged significantly faster than leading baselines (SQIL, GAIL, GCL, AIRL, ML-IRL), completely recovering the expert reward in CartPole within a single training episode.
  • Higher Quality Rewards: RDIRL achieved the highest normalized rewards across almost all benchmark environments (e.g., $0.993 \pm 0.013$ in CartPole, $0.68 \pm 0.32$ in MountainCar).
  • Cognitive Radar Performance: In the adversarial radar tracking task, RDIRL achieved a mean cumulative FIM reward of 924.78, vastly outperforming GAIL (153.05), AIRL (196.53), and GCL (423.49).

Limitations and Future Work

The primary limitation of RDIRL is the Hessian Bottleneck. The algorithm requires computing and inverting the full Hessian matrix of the cost function at each step. Because this scales quadratically ($O(d_\theta^2)$) with the number of network parameters, the current formulation is only tractable for small neural networks (e.g., two layers of 16 units).

To scale RDIRL up to high-dimensional deep networks, the authors note that future work must explore drop-in Hessian approximations, such as Gauss-Newton methods, block-diagonal approximations, or Kronecker-factored preconditioners (like the Shampoo optimizer).

Summary updated

BibTeX
@article{ghanem2026recursive,
  author = {Paul Ghanem and Owen Howell and Michael Potter and Pau Closas and Alireza Ramezani and Deniz Erdogmus and Tales Imbiriba},
  title = {{Recursive Deep Inverse Reinforcement Learning}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2026},
}
Figure