Bayesian Inverse Transition Learning: Learning Dynamics from Near-Optimal Trajectories

Leo Benac, Abhishek Sharma, Sonali Parbhoo, Finale Doshi-Velez

TL;DR

This paper introduces Inverse Transition Learning (ITL), a novel method for learning environment dynamics from near-optimal expert trajectories in offline reinforcement learning. By leveraging the fact that experts are near-optimal (not necessarily perfectly optimal), ITL enforces hard constraints on learned dynamics, leading to more robust and reliable models, especially in data-scarce scenarios like healthcare.

What Problem Does This Paper Address?

In many real-world applications, especially in fields like healthcare, we have access to data from expert agents (e.g., doctors) who follow near-optimal policies, but we don't have the ability to directly interact with the environment to learn its dynamics. Traditional methods for learning dynamics, like Maximum Likelihood Estimation (MLE), struggle with limited data coverage and can produce unreliable models. Existing methods that try to incorporate expert behavior, like Maximum Causal Entropy (MCE), often rely on soft constraints and can be computationally intensive. This paper tackles the challenge of learning accurate environment dynamics from limited, near-optimal expert demonstrations, aiming for a more robust and efficient approach.

Methods

The core of this work is Inverse Transition Learning (ITL). Instead of just learning from observed transitions, ITL uses the near-optimality of the expert to inform the learning process. The key idea is that if an expert chose action 'a' in state 's', it implies that 'a' is likely better than other unchosen actions. This leads to two main types of constraints:

  1. Separation between Valid and Invalid Actions: Actions that the expert did take (or could have taken) should have higher values than actions it didn't take.
  2. e-Closeness among Valid Actions: Actions that the expert did take should have similar values.

These constraints are enforced as hard constraints, meaning the learned dynamics must satisfy them. This is a departure from MCE's soft constraints. ITL then uses a convex optimization problem to find a point estimate of the dynamics that satisfies these constraints.

To handle uncertainty, the authors also propose Bayesian Inverse Transition Learning (BITL). This approach infers a posterior distribution over the transition dynamics, allowing for quantification of uncertainty. They use Hamiltonian Monte Carlo (HMC) with reflection to efficiently sample from this constrained posterior distribution.

Datasets

The authors evaluate their methods on:

  • Synthetic Environments:
    • A 25-state Gridworld.
  • 10 different 15-state Randomworlds.
  • Real-world Healthcare Scenario:
    • The MIMIC-IV dataset, specifically focusing on ICU patients with hypotension. This dataset was preprocessed to extract five key clinical variables (oxygen saturation, blood pressure, Glasgow Coma Scale, creatinine) and two treatment actions (vasopressor therapy, IV fluid bolus).

Key Insights and Ideas

  • Near-optimality is a feature, not a bug: The limited coverage of expert trajectories, combined with the knowledge that the expert is near-optimal, provides valuable information for learning dynamics. This is a crucial insight that differentiates ITL from methods that assume full optimality or ignore the expert's behavior beyond observed transitions.
  • Hard constraints lead to robustness: Enforcing hard constraints derived from expert behavior ensures that the learned dynamics can distinguish between good and bad actions, leading to more reliable policies, especially in safety-critical domains like healthcare.
  • Bayesian approach for uncertainty: BITL's ability to provide a posterior distribution over dynamics is vital for understanding model confidence and predicting when learned policies might fail or when transfer to new tasks is likely to be successful.
  • Transferability insights: The posterior distribution can inform about the conditions under which a learned policy might transfer well to new reward functions, a critical aspect for practical applications.

Key Results

  • Superior Performance: ITL and BITL consistently outperform baseline methods (MLE, MCE, PS) across various metrics, including "e-matching" and "best matching" (measures of how well the learned dynamics predict expert actions), in both synthetic and real-world healthcare settings.
  • Efficiency: ITL trains significantly faster than MCE, which struggles with gradient-based optimization in non-convex settings.
  • Constraint Satisfaction: ITL and BITL achieve near-zero constraint violations, unlike MCE which can violate constraints, highlighting the benefit of hard constraints.
  • Healthcare Relevance: In the ICU hypotension management task, ITL and BITL demonstrate robust applicability, achieving higher values without constraint violations, even in data-limited scenarios.
  • Transferability Prediction: The paper shows that the posterior distribution from BITL can be used to predict when transfer to new reward functions will be successful.

Limitations and Future Work

  • Discrete, Fully Observable States: The current ITL framework is designed for discrete and fully observable state spaces.
  • Future Work: The authors suggest extending ITL to handle high-dimensional, continuous, or partially observable settings. They also propose further theoretical analysis of the method.
  • Reward Function Assumption: While the paper assumes access to the reward function, they also present an extension (ITL-No-R) that jointly learns dynamics and rewards, showing comparable performance. This suggests that the core ITL framework is adaptable to scenarios where rewards are also unknown.

Summary updated

BibTeX
@inproceedings{benac2026bayesian,
  author = {Leo Benac and Abhishek Sharma and Sonali Parbhoo and Finale Doshi-Velez},
  title = {{Bayesian Inverse Transition Learning: Learning Dynamics from Near-Optimal Trajectories}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2026},
  url = {https://openreview.net/forum?id=sPU8IlOfb5},
}
Figure