Transferable Reward Learning by Dynamics-Agnostic Discriminator Ensemble

Fan-Ming Luo, Xingchen Cao, Yang Yu · OpenReview

Abstract

Inverse reinforcement learning (IRL) recovers the underlying reward function from expert demonstrations. A generalizable reward function is even desired as it captures the fundamental motivation of the expert. However, classical IRL methods can only recover reward functions coupled with the training dynamics, thus are hard to generalize to a changed environment. Previous dynamics-agnostic reward learning methods have strict assumptions, such as that the reward function has to be state-only. This work proposes a general approach to learn transferable reward functions, Dynamics-Agnostic Discriminator-Ensemble Reward Learning (DARL). Following the adversarial imitation learning (AIL) framework, DARL learns a dynamics-agnostic discriminator on a latent space mapped from the original state-action space. The latent space is learned to contain the least information of the dynamics. Moreover, to reduce the reliance of the discriminator on policies, the reward function is represented as an ensemble of the discriminators during training. We assess DARL in four MuJoCo tasks with dynamics transfer. Empirical results compared with the state-of-the-art AIL methods show that DARL can learn a reward that is more consistent with the true reward, thus obtaining higher environment returns.

Introduction

In Reinforcement Learning (RL), recovering a reward function that represents an expert's true intent is a central goal of Inverse Reinforcement Learning (IRL). Ideally, such a reward should be universal, remaining valid even if the agent's environment or physical properties change. However, standard Adversarial Imitation Learning (AIL) methods often fail to generalize due to two primary dependencies:

  1. Dynamics Dependency: Learned rewards often become coupled with specific environment physics (e.g., gravity, friction). If these parameters change, the reward function may lead to suboptimal behavior.
  2. Policy Dependency: AIL discriminators often become "specialists" that distinguish final expert-like policies from near-final learner policies, effectively "forgetting" early-stage behaviors. This makes them poor teachers for new agents starting from scratch.

Methodology

DARL addresses these challenges through a two-pronged strategy: decoupling rewards from dynamics via mutual information minimization and mitigating policy dependency through a discriminator ensemble.

Dynamics-Agnostic Latent Space

To break the link with environment physics, DARL avoids feeding raw states and actions directly into the discriminator. Instead, it employs encoders $E_s$ and $E_a$ to map state-action pairs into a latent space $Z$. The core innovation lies in training these encoders to minimize the Mutual Information (MI) between the latent representation $z$ and the next state $s'$. By "blinding" the discriminator to the next state, the model is prevented from implicitly learning a reward function that depends on transition dynamics.

Architecture of the DARL discriminator and the MI minimization process.

As shown in Figure 1, the MI minimization is implemented using a variational upper bound (vCLUB). A transition function $q$ predicts the next state from the latent $z$, and the encoders are optimized to make these predictions as uninformative as possible relative to the actual transitions, thereby filtering out dynamics-specific information.

Discriminator Ensemble

To address the "forgetting" problem associated with policy dependency, DARL maintains an ensemble of historical discriminators saved throughout the training process. Rather than relying on a single "specialist" discriminator from the final training stages, the agent is rewarded based on the average output of the entire ensemble. This provides a stable, "generalist" reward signal that correctly penalizes poor behaviors seen early in training while rewarding expert-like behaviors achieved later. Stability is further ensured through normalization and clipping techniques.

Experimental Evaluation

The researchers evaluated DARL using MuJoCo physics benchmarks, including Hopper, HalfCheetah, Walker2d, Ant, and Humanoid. Transferability was tested by perturbing dynamics parameters like gravity and joint damping, as well as through morphology changes (e.g., "DisableAnt" where legs are disabled).

Key Results

  • Reward Consistency: DARL achieved a reward consistency (alignment with the true reward) of at least 92% across all tested environments, significantly outperforming baselines like AIRL and VAIL.
  • Superior Transfer: In 15 out of 16 transfer tasks involving varying gravity and damping, DARL-trained policies achieved the highest returns among non-oracle methods.
  • Action-Dependent Success: In "Energy-Limited" tasks where rewards depend heavily on action costs (minimizing effort), DARL successfully learned transferable state-action rewards, whereas state-only methods failed to account for the high cost of movement.

Conclusion and Future Work

DARL demonstrates that state-action rewards can be highly transferable if dynamics information is effectively filtered out. By combining MI minimization for dynamics-agnosticism with a discriminator ensemble to combat policy dependency, DARL provides a robust framework for learning the true underlying motivations of expert behavior across varying environments.

Future work may focus on scaling these techniques to high-dimensional inputs like raw pixels, which may require additional compression layers. Additionally, while the memory overhead of the ensemble was manageable in MuJoCo (~42MB), future research could explore optimization methods to achieve ensemble benefits without storing every historical model.

Summary updated

BibTeX
@misc{luo2022transferable,
  author = {Fan-Ming Luo and Xingchen Cao and Yang Yu},
  title = {{Transferable Reward Learning by Dynamics-Agnostic Discriminator Ensemble}},
  year = {2022},
  eprint = {2206.00238},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.00238},
}
Figure