TL;DR
Standard offline imitation learning implicitly assumes that an agent's training and deployment dynamics are identical, causing policies to fail when physical parameters like friction or mass change. BE-DROIL (Balance Equation-based Distributionally Robust Offline Imitation Learning) solves this problem by training robust policies strictly from nominal expert demonstrations without any environment interaction. By incorporating a Bellman flow balance equation over state-action-next-state $(s, a, s')$ triplets, BE-DROIL transforms an intractable worst-case transition optimization into a closed-form importance-weighting scheme over nominal data.
What Problem Does This Paper Address?
Offline Imitation Learning (OIL) trains policies directly from expert demonstrations without reward engineering or online environment interactions. However, traditional OIL methods (such as Behavioral Cloning) assume that test-time dynamics perfectly match the training environment.
In the real world, this assumption rarely holds. Wear and tear, varying payloads, actuator delays, and surface friction cause dynamics mismatch, leading to compounding errors and catastrophic policy collapse. While domain randomization or online adaptation can help, they require simulators, target-domain data, or potentially unsafe online rollouts.
Prior robust offline approaches, like Distributionally Robust Behavioral Cloning (DRBC), optimize against worst-case distribution shifts but allow the adversary to pick arbitrary probability distributions. Many of these adversarial distributions violate physical transition rules and cannot exist under any valid Markov Decision Process (MDP), resulting in overly pessimistic policies.
Methods
BE-DROIL formulates robust policy learning as a minimax game: the policy minimizes imitation loss under the worst-case transition kernel within an $f$-divergence ambiguity set. The authors make this tractable entirely offline through three core mathematical techniques:
- Triplet Occupancy Measure $(s, a, s')$: Instead of using standard state-action occupancies $d(s, a)$, the authors define the occupancy measure over $(s, a, s')$. This eliminates the need to explicitly know or estimate the unknown transition kernel $T(s'|s, a)$ when expressing flow constraints.
- The Balance Equation: To prevent the adversary from choosing impossible distributions, BE-DROIL imposes a Bellman flow conservation constraint. This guarantees that the adversarial distribution remains a valid, stationary occupancy measure generated by the expert policy under an admissible transition model.
- Duality and Closed-Form Reweighting: Because the inner maximization is convex and satisfies Slater’s condition, strong duality holds. Applying convex duality yields an analytic, closed-form solution for the adversarial importance ratio $w^*(s, a, s')$. The intractable adversarial minimax problem reduces to an alternating two-stage offline optimization:
- Estimate dual variables $Q(s, a)$ and scale factor $\tau \ge 0$ over nominal expert transitions.
- Update the policy $\pi$ by minimizing a weighted imitation loss, where nominal transitions that are vulnerable to dynamics shifts receive higher weights.
To ensure differentiability for gradient descent, the authors approximate non-smooth Total Variation (TV) bounds with a smooth surrogate called SoftTV ($f(x) = \frac{1}{2}\log(\cosh(x-1))$).
Datasets
The authors evaluated their method on four standard continuous-control locomotion benchmarks from the MuJoCo suite:
- Hopper-v3 (2,000 expert transitions)
- HalfCheetah-v3 (3,000 expert transitions)
- Walker2d-v3 (6,000 expert transitions)
- Ant-v3 (8,000 expert transitions)
Expert demonstration datasets were generated using pre-trained TD3 policies from the RL Baselines3 Zoo. Dynamics shifts were introduced at test time by perturbing:
- Gravity, joint damping, and joint stiffness (Hopper, Walker2d, HalfCheetah)
- Actuator range limits and joint compliance (Ant, Walker2d)
- Friction loss (HalfCheetah)
Key Insights and Ideas
- Physics-consistent adversaries yield better policies: Forcing the adversary to satisfy Bellman flow conservation keeps it from placing probability mass on physically impossible state transitions. This prevents extreme pessimism while maintaining safety.
- Triplet formulations bypass unknown dynamics: Formulating the Bellman balance relation over $(s, a, s')$ enables flow conservation without needing access to the shifted transition probabilities $T(s'|s, a)$.
- Zero target-domain interactions required: The robust objective simplifies to an importance-weighted loss evaluated strictly on nominal expert demonstrations, meaning policies gain resilience without a single online rollout or target demonstration.
Key Results
- Superior Robustness: Across Hopper, Ant, and Walker2d, BE-DROIL consistently outperformed both standard Behavioral Cloning (BC) and DRBC across wide perturbation ranges.
- Under severe gravity, damping, and actuator restrictions, standard BC collapsed entirely.
- DRBC exhibited steady performance degradation, whereas BE-DROIL maintained high, stable returns.
- Cross-Domain Generalization: Unlike DRBC, which required manual hyperparameter tuning (learning rates and uncertainty radii $\rho_r$) tailored separately to each environment, BE-DROIL used a single fixed set of hyperparameters (tuned on Ant) across all tasks.
- Trade-offs on HalfCheetah: Under fixed hyperparameters, BE-DROIL was slightly more sensitive to high damping and friction shifts in HalfCheetah than DRBC; however, the authors note that light re-tuning of the learning rate and uncertainty radius closed this gap.
Limitations and Future Work
- Hyperparameter Sensitivity across Domains: A fixed uncertainty radius does not perform uniformly well when domains have drastically different dynamics scales (as observed in HalfCheetah).
- Stationary Assumption: The current theoretical formulation assumes stationary transition kernels and does not explicitly account for time-varying or non-stationary dynamics shifts.
- Divergence Bounds: Lemma 1 relies on Total Variation bounds; future extensions aim to derive occupancy bounds for alternative divergences directly.
- Scalability: Future work includes applying BE-DROIL to large-scale imitation foundation models and vision-based control.
Summary updated