Non-Adversarial Inverse Reinforcement Learning via Successor Feature Matching

## Abstract

Abstract In inverse reinforcement learning (IRL), an agent seeks to replicate expert demonstrations through interactions with the environment.
Traditionally, IRL is treated as an adversarial game, where an adversary searches over reward models, and a learner optimizes the reward through repeated RL procedures.
This game-solving approach is both computationally expensive and difficult to stabilize.
In this work, we propose a novel approach to IRL by direct policy optimization : exploiting a linear factorization of the return as the inner product of successor features and a reward vector, we design an IRL algorithm by policy gradient descent on the gap between the learner and expert features.
Our non-adversarial method does not require learning a reward function and can be solved seamlessly with existing actor-critic RL algorithms.
Remarkably, our approach works in state-only settings without expert action labels, a setting which behavior cloning (BC) cannot solve.
Empirical results demonstrate that our method learns from as few as a single expert demonstration and achieves improved performance on various control tasks. 2 2 2 Our codebase is available at https://github.com/arnavkj1995/SFM

## 1 Introduction

Figure: Figure 1: Comparing Mean Normalized Return on 10 tasks from DMC (Tassa et al., ) suite of our method SFM against the offline method BC (Pomerleau, ), the non-adversarial IRL method IQ-Learn (Garg et al., ), and the state-only adversarial methods MM (Swamy et al., ) and GAIfO (Torabi et al., ), where the agents are provided a single expert demonstration. Our state-only non-adversarial method SFM achieves higher performance as measured by the Mean Normalized Return. Error bars show the 95% bootstrap CIs.
Refer to caption: x1.png

In imitation learning (Abbeel & Ng, ; Ziebart et al., ; Silver et al., ; Ho & Ermon, ; Swamy et al., ), the goal is to learn a decision-making policy that reproduces *behavior* from demonstrations.
Rather than simply mimicking the state-conditioned action distribution as in behavior cloning (Pomerleau, ), interactive approaches like Inverse Reinforcement Learning (IRL; Abbeel & Ng, ; Ziebart et al., ) have the more ambitious goal of synthesizing a policy whose long-term occupancy measure approximates that of the expert demonstrator by some metric.
As a result, IRL methods have proven to be more robust, particularly in a regime with few expert demonstrations, and has lead to successful deployments in real-world domains such as autonomous driving (Bronstein et al., ; Vinitsky et al., ; ).
However, this robustness comes at a cost: approaches to IRL tend to involve a costly bi-level optimization.

Specifically, modern formulation of many IRL methods (e.g., Garg et al., ; Swamy et al., ) involve a min-max game between an adversary that learns a reward function to maximally differentiate between the agent and expert in the outer loop and a Reinforcement learning (RL) subroutine over this adversarial reward in the inner loop.
However, all such methods encounter a set of well-documented challenges: (1) optimizing an adversarial game between the agent and the expert can be unstable, often requiring multiple tricks to stabilize training (Swamy et al., ), (2) the inner loop of this bi-level optimization
involves repeatedly solving a computationally expensive RL problem (Swamy et al., ), and (3) the reward function class must be specified in advance.
Moreover, many approaches to imitation learning require knowledge of the actions taken by the demonstrator. This renders many forms of demonstrations unusable, such as videos, motion-capture data, and generally any demonstrations leveraging an alternative control interface than the learned policy (e.g., a human puppeteering a robot with external forces). As such, it is desirable to build IRL algorithms where the imitation policies learn from only expert states.

These challenges lead us to the following research question:
*Can a non-adversarial approach to occupancy matching recover the expert’s behavior without action labels?*
To address this question, we revisit the earlier approaches to *feature matching* (Abbeel & Ng, ; Ziebart et al., ; Syed & Schapire, ; Syed et al., ), that is, matching the accumulation of discounted state or state-action base features along the expert’s trajectory.
For this task, we propose to estimate expected cumulative sum of features using Successor Features (SF; Barreto et al., ) – a low-variance, fully online algorithm that employs temporal-difference based methods for learning.
Leveraging the benefits of SF, we demonstrate that *feature matching can be achieved by direct policy search* via policy gradients.
In doing so, we present a new approach to IRL, called Successor Feature Matching (SFM), which provides a
remarkably simple algorithm for imitation learning.

Interestingly, when the learned base features are action-independent, we show that SFM can imitate an expert without knowledge of the actions it took in its demonstrations. This accommodates a variety of expert demonstration formats, such as video and motion-capture, where action labels are naturally absent.
Additionally, rather than manually pre-specifying a class of expert reward functions (Swamy et al., ), SFM *adaptively* learns this class from data using unsupervised RL techniques.
Our experiments validate that SFM successfully learns to imitate from as little as a single expert demonstration.
As a result, SFM outperforms its competitors by 16% on mean normalized returns across a wide range of tasks from the DMControl suite (Tassa et al., ) —as highlighted in Figure 1.
To summarize, the contributions of this work are as follows:

1. Occupancy matching via reduction to reinforcement learning. In this work, we propose an algorithm for *feature matching that can be achieved by direct policy search* via policy gradients for inverse RL.
In doing so, our method Successor Feature Matching (SFM)achieves strong imitation performance using any off-the-shelf RL algorithms.

2. Imitation from a single state-only demonstration. Our method learns with demonstrations without expert action labels by using state-only base features to estimate the SF.
To our knowledge, SFM is the *only* online method capable of learning from a single unlabeled demonstration without requiring an expensive and difficult-to-stabilize bilevel optimization (Swamy et al., ).

## 2 Related Work

Inverse Reinforcement Learning (IRL)
methods typically learn via adversarial game dynamics, where prior methods assumed the base features are known upfront (Abbeel & Ng, ; Ziebart et al., ; Syed & Schapire, ; Syed et al., ).
The advent of modern deep learning architectures led to methods (e.g. Ho & Ermon, ; Swamy et al., ; Fu et al., ) that do not estimate expected features, but instead learn a more expressive reward function that captures the differences between the expert and the the agent.
The class of Moment Matching (MM; Swamy et al., ) methods offers a general framework that unifies existing algorithms through the concept of moment matching, or equivalently Integral Probability Metrics (IPM; Sun et al., ).
In contrast to these methods, our approach is non-adversarial and focuses on directly addressing the problem of matching expected features.
Furthermore, unlike prior methods in Apprenticeship Learning (AL; Abbeel & Ng, ) and Maximum Entropy IRL (Ziebart et al., ), our work *does not* assume the knowledge of base features.
Instead, SFM leverages representation learning technique to extract relevant features from the raw observations.
The method most similar to ours is IQ-Learn (Garg et al., ), a non-adversarial approach that utilizes an inverse Bellman operator to directly estimate the value function of the expert.
Our method is also non-adversarial, but offers a significant advantage over IQ-Learn: it does not require knowledge of expert actions during training—it is a state-only imitation learning algorithm (Torabi et al., ).
However, many existing state-only methods also rely on adversarial approaches (Torabi et al., ; Zhu et al., ).
For instance, GAIfO (Torabi et al., ) modifies the discriminator to account for state-only inputs.
In contrast, SFM is a non-adversarial approach from learning from state-only demonstrations.

Successor Features (SF; Barreto et al., )
generalize the idea of the successor representation (SR; Dayan, ) by modeling the expected cumulative state features discounted according to the time of state visitation.
Instead of employing successor features for tasks such as transfer learning (Barreto et al., ; Lehnert et al., ; Barreto et al., ; Abdolshah et al., ; Wiltzer et al., ), representation learning (Le Lan et al., ; Farebrother et al., ; Ghosh et al., ; Le Lan et al., ), exploration (Zhang et al., ; Machado et al., ; Jain et al., ), or zero-shot RL (Borsa et al., ; Touati & Ollivier, ; Touati et al., ; Park et al., ), our approach harnesses SFs for IRL, aiming to match expected features of the expert.
Within the body of work on imitation learning, SFs have been leveraged to pre-train behavior foundation models capable of rapid imitation (Pirotta et al., ) and within adversarial IRL typically serves as the basis for estimating the value-function that best explains the expert (Lee et al., ; Filos et al., ; Abdulhai et al., ).
In contrast, our work seeks to directly match SFs through a policy-gradient update without requiring large diverse datasets or costly bilevel optimization procedures.

## 3 Preliminaries

Reinforcement Learning (RL; Sutton & Barto, )
typically considers a Markov Decision Process (MDP) defined by $\mathcal{M}=(\mathcal{S},\mathcal{A},\mathcal{T},r,\gamma,P_{0})$, where $\mathcal{S}$ and $\mathcal{A}$ denote the state and action spaces, $\mathcal{T}:\mathcal{S}\times\mathcal{A}\rightarrow\Delta(\mathcal{S})$ denotes the transition kernel, $r:\mathcal{S}\times\mathcal{A}\rightarrow[-1,1]$ is the reward function, $\gamma$ is the discount factor, and $P_{0}$ is the initial state distribution.
Starting from the initial state $s_{0}\sim P_{0}$ an agent takes actions according to its policy $\pi:\mathcal{S}\rightarrow\Delta(\mathcal{A})$ producing trajectories
$\tau=\{s_{0},a_{1},s_{1},\dots\}$.
The value function and action-value are respectively defined as $V^{\pi}(s)=\mathbb{E}_{\pi}[\sum_{t=0}^{\infty}\gamma^{t}r(S_{t},A_{t})|S_{0}=s]$ and $Q^{\pi}(s,a)=\mathbb{E}_{\pi}[\sum_{t=0}^{\infty}\gamma^{t}r(S_{t},A_{t})|S_{0
}=s,A_{0}=a]$ where $\gamma\in[0,1)$ represents the discount factor.
The performance is the expected return obtained by following policy $\pi$ from the initial state, given by $J(\pi)=\mathbb{E}_{s_{0}\sim P_{0}}[\mathbb{E}_{\pi}[\sum_{t=0}^{\infty}\gamma
^{t}r(S_{t},A_{t})\,|\,S_{0}=s]]$, and can be rewritten as $J(\pi)=\mathbb{E}_{s_{0}\sim P_{0}}[V^{\pi}(s_{0})]$.

the expected occupancy of future states for a given policy. For tabular state spaces, temporal-difference learning can be employed to estimate the SR.
Successor Features (SF; Barreto et al., ) generalize the idea of the successor representation by instead counting the discounted sum of state features $\boldsymbol{\psi}^{\pi}(s,a)=\mathbb{E}_{\pi}[\sum_{t=0}^{\infty}\gamma^{t}
\phi(S_{t},A_{t})|S_{0}=s,A_{0}=a]$ after applying the feature mapping $\phi:\mathcal{S}\times\mathcal{A}\to\mathbb{R}^{d}$. The SR is recovered when $\phi$ is the identity function, with $\phi$ typically serving as a form of dimensionality reduction to learn SFs in continuous or large state spaces. In practice, SFs can be estimated via temporal difference learning (Sutton, ) through the minimization of the following objective,

$$ $\mathcal{L}_{SF}(\theta;\bar{\theta})=\mathbb{E}_{(s,a,s^{\prime})\sim\mathcal {D}}\left[\|\phi(s,a)+\gamma\boldsymbol{\psi}^{\pi}_{\bar{\theta}}(s^{\prime}, \pi(s^{\prime}))-\boldsymbol{\psi}^{\pi}_{\theta}(s,a)\|_{2}^{2}\right],$ (1) $$

where the tuple $(s,a,s^{\prime})$ is sampled from dataset $\mathcal{D}$ and $\boldsymbol{\psi}_{\theta}$ denotes a parametric SF model. The parameters $\bar{\theta}$ denote the “target parameters” that are periodically updated from $\theta$ by taking a direct copy or through a moving average.
For tasks where the reward function can be expressed as a combination of base features $\phi$ and a weight vector $w\in\mathbb{R}^{d}$ such that $r(s,a)=\phi(s,a)^{T}w$, the performance of a policy $\pi$ can be rewritten as $Q^{\pi}(s,a)=\boldsymbol{\psi}^{\pi}(s,a)^{T}w$ and $J(\pi)=\mathbb{E}_{s_{0}\sim P_{0},a\sim\pi(s_{0})}[\boldsymbol{\psi}^{\pi}(s_
{0},a)]^{T}w$ (Barreto et al., ).

Inverse Reinforcement Learning (IRL; Ng et al., ; Abbeel & Ng, ; Ziebart et al., ) is the task of deriving behaviors using demonstrations through interacting with the environment.
In contrast to RL where the agent improves its performance using the earned reward, Inverse Reinforcement Learning (IRL) involves learning without access to the reward function; good performance is signalled by expert demonstrations.
As highlighted in Swamy et al. (), this corresponds to
minimizing an Integral Probability Metric (IPM) (Sun et al., ) between the agent’s state-visitation occupancy and
the expert’s which can be framed as a task to minimize the
imitation gap given by:

$$ $J(\pi_{E})-J(\pi)\leq\sup_{f\in\mathcal{F}_{\phi}}\left[\mathop{\mathbb{E}}_{ \tau\sim\pi}\sum_{t=0}^{\infty}\gamma^{t}f(s_{t},a_{t})-\mathop{\mathbb{E}}_{ \tau\sim\pi_{E}}\sum_{t=0}^{\infty}\gamma^{t}f(s_{t},a_{t})\right]$ (2) $$

where $\mathcal{F}_{\phi}:\mathcal{S}\times\mathcal{A}\rightarrow[-1,1]$ denotes the class of reward basis functions.
Under this taxonomy, the agent being the minimization player selects a policy $\pi\in\Pi$ to compete with a discriminator that picks a reward moment function $f\in\mathcal{F}_{\phi}$ to maximize the imitation gap, and this min-max game is framed as $\min_{\pi}\max_{f\in\mathcal{F_{\phi}}}J(\pi_{E})-J(\pi)$.

By restricting the class of reward basis functions to be within span of some base-features $\phi$ of state-action pairs such that $\mathcal{F}_{\phi}\in\{f(s,a)=\phi(s,a)^{T}w:\|w\|_{2}\leq B\}$, the imitation gap becomes:

$$ $\displaystyle J(\pi_{E})-J(\pi)$ $\displaystyle\leq\sup_{\|w\|_{2}\leq B}\mathop{\mathbb{E}}_{\tau\sim\pi}\sum_{ t=0}^{\infty}\gamma^{t}\phi(s_{t},a_{t})^{\top}w-\mathop{\mathbb{E}}_{\tau\sim \pi_{E}}\sum_{t=0}^{\infty}\gamma^{t}\phi(s_{t},a_{t})^{\top}w$ (3) $\displaystyle=\sup_{\|w\|_{2}\leq B}\left(\mathop{\mathbb{E}}_{s\sim P_{0},a \sim\pi}[\boldsymbol{\psi}^{\pi}(s,a)]-\mathop{\mathbb{E}}_{s\sim P_{0},a\sim \pi_{E}}[\boldsymbol{\psi}^{E}(s,a)]\right)^{\top}w,$ $$

where $\boldsymbol{\psi}^{E}(s,a)$ denotes the successor features (SF) of the expert policy $\pi_{E}$ for a given state $s$ and action $a$.
Under this assumption, the agent that matches the SF with the expert will minimize the performance gap across the class of restricted basis reward functions.
Solving this objective of matching expected features between the agent and the expert has been studied in prior methods where prior methods have often resorted to an adversarial game (Ziebart et al., ; Abbeel & Ng, ; Syed & Schapire, ; Syed et al., ). In the sequel, we introduce a non-adversarial approach that updates the policy greedily to align the SFs between the expert and the agent, rather than learning a reward function to capture their behavioral divergence.

Naturally, the aforementioned assumption requires that $\phi$ induces a class $\mathcal{F}_{\phi}$ that is rich enough to contain the expert’s underlying reward function. It is not generally possible to ensure this without expert knowledge—as part of our approach, we jointly *learn* features $\phi$ using existing techniques in unsupervised skill discovery Park et al. (). We posit that such features, which are meant to distinguish between a diverse set of behaviors, will be rich enough to include the expert’s reward in their span. Our experimental results validate that indeed this can be achieved.

## 4 Successor Feature Matching ( SFM )

In this section, we will describe SFM– a state-only non-adversarial algorithm for
matching expected features between the agent and the expert.
SFM distinguishes itself in two crucial manners; namely, it derives a feature-matching imitation policy by *direct policy optimization* via policy gradient ascent, and it *learns* base features simultaneously during training.

Figure: Algorithm 1 Successor Feature Matching (SFM)

The key intuition behind SFM is that successor feature matching in the $\ell_{2}$-norm can be accomplished directly via policy gradient ascent—this allows us to leverage powerful actor-critic algorithms for IRL, as intuited by equation 3.
Towards this end, we define a potential function defined as the Mean Squared Error (MSE) between the expected features of the expert and the agent, given by

$$ $U(\mu)=\frac{1}{2}\|\boldsymbol{\widehat{\psi}}^{\pi_{\mu}}-\boldsymbol{ \widehat{\psi}}^{E}\|_{2}^{2},$ (4) $$

where $\pi_{\mu}$ is a policy parameterized by $\mu$, $\boldsymbol{\widehat{\psi}}^{\pi_{\mu}}=\mathbb{E}_{s\sim P_{0},a\sim\pi(s)}[
\boldsymbol{\psi}^{\pi_{\mu}}(s,a)]$ and $\boldsymbol{\hat{\psi}}^{E}=\mathbb{E}_{s\sim P_{0},a\sim\pi_{E}(s)}[
\boldsymbol{\psi}^{E}(s,a)]$ represents the expected SF of agent and expert conditioned on the initial state distribution $P_{0}$.
Note that $\nabla U(\mu)=(\boldsymbol{\widehat{\psi}}^{\pi_{\mu}}-\boldsymbol{\widehat{
\psi}}^{E})^{\top}\nabla_{\mu}\boldsymbol{\widehat{\psi}}^{\pi_{\mu}}$. Interpreting $\boldsymbol{\widehat{\psi}}^{\pi}$ as a value function for a *vector-valued* reward (the base features), it becomes clear that the latter term is simply a vector of standard policy gradients. This suggests a method for matching the expert successor features with a simple actor-critic algorithm.
With the state-only base feature function $\phi:\mathcal{S}\to\mathbb{R}^{d}$, the expected features of the expert can be estimated using the demonstrations.
Here, the SF for the expert using $M$ demonstrations $\{\tau^{i}=\{s^{i}_{1},a^{i}_{2},...,s^{i}_{T},a^{i}_{T}\}\}_{i=1}^{M}$ of length $T$ is obtained by

$$ $\boldsymbol{\widehat{\psi}}^{E}=\frac{1}{M}\sum_{i=1}^{M}\sum_{t=1}^{T}\gamma^ {t}\phi(s^{i}_{t}).$ (5) $$

To optimize the objective defined in (4), our method SFM is jointly trained with two components– policy optimizer and base feature function.
In subsection 4.1, we describe the policy optimization component which comprises of an actor to predict actions and a network to predict the SF.
Interestingly, the training loop of SFM closely resembles that of any familiar actor-critic methods, avoiding challenges such as bi-level optimization.
In subsection 4.2, we describes the base feature function component and discuss how they are adaptively updated using unsupervised RL methods.
Since the base feature function is also updated during training, this would change $\boldsymbol{\widehat{\psi}}^{E}$ at each step and thereby the objective in (4).
Here, $\boldsymbol{\widehat{\psi}}^{E}$ is updated with Exponential Moving Average (EMA) to stabilize learning.
We provide an overview of the training procedure of SFM in Algorithm 1.

### 4.1 Policy Optimization

Taking inspiration from off-policy actor-critic methods for standard RL tasks (Fujimoto et al., ; ; Haarnoja et al., ), SFM maintains a deterministic actor and a network to estimate the SF for agent’s policy.
Here, instead of having a critic to estimate the expected returns, the agent has a network to predict the expected features.
The network to predict SF of the agent is a parameterized and differentiable function with parameters $\theta$ and is denoted by $\boldsymbol{\psi}_{\theta}$.
To obtain actions for a given state, SFM maintains a deterministic actor $\pi_{\mu}$ with parameters $\mu$.
To learn policies without an adversarial game for this task, we propose to optimize this non-linear objective where our method leverages the prowess of the Deterministic Policy Gradient (DPG) (Silver et al., ) algorithm.

The network to estimate the SF $\boldsymbol{\psi}_{\theta}$ is updated using 1-step TD error as described in (1) where we use a state-only base-feature function.
To update the actor network $\pi_{\mu}$, we first show how SFM estimates the SF $\boldsymbol{\widehat{\psi}}^{\pi}_{\theta}$ of the current policy under the initial state distribution.
{restatable}[]propositionpropsf
Let $\mathcal{B}$ denote a buffer of trajectories sampled from arbitrary stationary Markovian policies in the given MDP with initial state distribution $P_{0}$. For any deterministic policy $\pi$,

$$ $\boldsymbol{\widehat{\psi}}^{\pi}:=\mathbb{E}_{s\sim P_{0}}[\boldsymbol{\psi}^ {\pi}(s,\pi(s))]=(1-\gamma)^{-1}\mathbb{E}_{(s_{t},s_{t+1})\sim\mathcal{B}} \left[\boldsymbol{\psi}^{\pi}(s_{t},\pi(s_{t}))-\gamma\boldsymbol{\psi}^{\pi}( s_{t+1},\pi(s_{t+1}))\right].$ (6) $$

The proof of proposition 4.1 is deferred to Appendix A.
Proposition 4.1 presents a method for estimating the SF for the agent conditioned on the initial state distribution.
The proposed derivation can utilize samples coming from a different state-visitation distribution and uses an off-policy replay buffer in this work.
Similar to standard off-policy RL algorithms (Fujimoto et al., ; ; Haarnoja et al., ), SFM maintains a replay buffer $\mathcal{B}$ to store the transitions and use it for sampling. This buffer allows us to make good use of all state transitions for the purpose of estimating the initial-state successor features with temporal difference learning.

Note that the potential function defined in (4) depends only on the initial state distribution and does not specify a way of updating the actor for any other state.
By substituting (6) into (4), we express the potential function representing the gap between the expected features of the agent and those of the expert in terms of features at states visited by the agent (and not just initial states).
Thus, we define the loss $\mathcal{L}_{G}$ for the actor, which we call the SF-Gap loss, according to

$$ $\mathcal{L}_{G}(\mu):=\frac{1}{2}\left\|\frac{1}{1-\gamma}\mathop{\mathbb{E}}_ {s,s^{\prime}\sim\mathcal{B}}\left[\boldsymbol{\psi}_{\theta}(s,\pi_{\mu}(s))- \gamma\boldsymbol{\psi}_{\bar{\theta}}(s^{\prime},\pi_{\mu}(s^{\prime}))\right ]-\boldsymbol{\widehat{\psi}}^{E}\right\|_{2}^{2},$ (7) $$

where we use the target network $\boldsymbol{\psi}_{\bar{\theta}}$ to get SF at the next state.
We can see that (7) approximates the potential function on states sampled from the replay buffer $\mathcal{B}$.
To obtain the gradients with respect to the actor parameters $\mu$, we propose using the Deterministic Policy Gradient (DPG) algorithm (Silver et al., ) that estimates the gradients by applying the chain-rule over equation 7.

[]propositionpropactor
The gradients of the actor for a batch of sampled transitions from the replay buffer obtained by applying the DPG (Silver et al., ) algorithm to Equation 7 is

$$ $\nabla_{\mu}\mathcal{L}_{G}(\mu)=\sum\limits_{i=1}^{d}z_{i}(1-\gamma)^{-1} \mathbb{E}_{s,s^{\prime}\sim\mathcal{B}}\left[\nabla_{\mu}\pi_{\mu}(s)\,\nabla _{a}\boldsymbol{\psi}_{\theta,i}(s,a)\big{\lvert}_{a=\pi_{\mu}(s)}\right],$ (8) $$

where $z_{i}=(1-\gamma)^{-1}\mathbb{E}_{s,s^{\prime}\sim\mathcal{B}}\left[\boldsymbol
{\psi}_{\theta,i}(s,\pi_{\mu}(s))-\gamma\boldsymbol{\psi}_{\bar{\theta},i}(s^{
\prime},\pi_{\mu}(s^{\prime}))\right]-\boldsymbol{\widehat{\psi}}^{E}_{i}$, $\boldsymbol{\psi}_{\theta,i}$ denotes the SF at the $i$th dimension for the current policy, and $\boldsymbol{\widehat{\psi}}^{E}_{i}$ is the $i$th dimension of SF of expert policy.

We provide the details of this derivation in Appendix A.
Proposition 4.1 provides a way to estimate the gradients for the actor and optimize the objective defined in (4).
So far, we have illustrated a procedure for iteratively reducing the mean squared error between the expected SFs of a policy and those of the expert; we now justify in which sense our method accomplishes the goals of IRL.

Firstly, much like existing actor-critic methods, our procedure can ensure convergence to a local minimum of the MSE SF-matching objective; this is a direct consequence of Agarwal et al. ().
Thus, as in the case of general actor-critic, we expect that local optima achieve low MSE.

The next simple proposition demonstrates that policies achieving low MSE must achieve a low imitation gap, validating their competency in the IRL setting.

propositionimitationgapltwo
Let $\epsilon>0$ and let $\mu$ be a policy parameter such that $\|\boldsymbol{\widehat{\psi}}^{\pi_{\mu}}-\boldsymbol{\widehat{\psi}}^{E}\|_{2
}\leq\epsilon$. Suppose the expert policy is optimal for the reward function $r(s)=w^{\top}\phi(s)$ for base features $\phi(s)\in\mathbb{R}^{d}$ and $\|w\|_{2}\leq B$ for $B<\infty$. Then it holds that $J(\pi_{E})-J(\pi_{\mu})\leq B\epsilon$.

Proposition 4.1 establishes that, for any tolerance $\epsilon>0$, the imitation gap can be reduced to $\epsilon$ by approximately minimizing equation 4 to within a similar margin of $O(\epsilon)$.

Notably, $\boldsymbol{\widehat{\psi}}^{E}$ can be computed without knowledge of the expert’s actions, under the assumption that the base features are action-independent. We note that SFM is not fundamentally incapable of handling problems in which there is no state-only base feature map describing the expert’s reward: in this case, we may simply learn base features defined on the state-action space. As a consequence, we would require knowledge of the expert’s actions to compute (5).
In many interesting applications, however, it is sufficient to model state-only base features, as we show in section 5, enabling SFM to learn strong imitation policies without access to expert actions.

Ultimately, proposition 4.1 and equation 1 provide drop-in replacements to actor and critic losses for standard actor-critic methods.
Training an actor-critic with the corresponding gradients enables state-only non-adversarial method for IRL.

### 4.2 Base Feature Function

We described in section 3 that SF depends on a base feature function $\phi:\mathcal{S}\rightarrow\mathbb{R}^{d}$.
In this work, SFM learns the base features jointly while learning the policy. Base feature methods are parameterized by pairs $\theta_{\mathsf{feat}}=(\phi,\mathsf{f})$ together with losses $\mathcal{L}_{\mathsf{feat}}$, where $\phi:\mathcal{S}\to\mathbb{R}^{d}$ is a state feature map, $\mathsf{f}$ is an auxiliary object that may be used to learn $\phi$, and $\mathcal{L}_{\mathsf{feat}}$ is a loss function defined for $\phi$ and $\mathsf{f}$.
Below, we briefly outline the base feature methods considered in our experiments.

Random Features (Random):
Here, $\phi$ is a randomly-initialized neural network, and $\mathsf{f}$ is discarded. The network $\phi$ remains fixed during training ($\mathcal{L}_{\mathsf{feat}}\equiv 0$).

Inverse Dynamics Model (Pathak et al., , IDM):
Here, $\mathsf{f}:\mathbb{R}^{d}\times\mathbb{R}^{d}\to\mathcal{A}$ is a function that tries to predict the action that lead to the transition between embeddings of consecutive states. The loss $\mathcal{L}_{\mathsf{feat}}$ is given by the IDM loss $\mathcal{L}_{\mathsf{IDM}}$,

$$ $\mathcal{L}_{\mathsf{IDM}}(\theta_{\mathsf{feat}})=\mathbb{E}_{(s,a,s^{\prime} )\sim\mathcal{D}}\left[\|\mathsf{f}(\phi(s),\phi(s^{\prime}))-a\|_{2}^{2} \right],\quad\theta_{\mathsf{feat}}=(\phi,\mathsf{f}).$ (9) $$

Forward Dynamics Model (FDM):
Here, $\mathsf{f}:\mathbb{R}^{d}\times\mathcal{A}\to\mathcal{S}$ is a function that tries to predict the next state in the MDP given the embedding of the current state and the chosen action. The loss $\mathcal{L}_{\mathsf{feat}}$ is given by the FDM loss $\mathcal{L}_{\mathsf{FDM}}$,

$$ $\mathcal{L}_{\mathsf{FDM}}(\theta_{\mathsf{feat}})=\mathbb{E}_{(s,a,s^{\prime} )\sim\mathcal{D}}\left[\|\mathsf{f}(\phi(s),a)-s^{\prime}\|_{2}^{2}\right], \quad\theta_{\mathsf{feat}}=(\phi,\mathsf{f}).$ (10) $$

Hilbert Representations (Park et al., , HR):
The feature map $\phi$ of HR is meant to estimate a *temporal distance*: the idea is that the difference between state embeddings $f^{*}_{\phi}(s,g)=\|\phi(s)-\phi(g)\|$ approximates the amount of timesteps required to traverse between the states $s,g$. Here, $\mathsf{f}$ is discarded, and $\mathcal{L}_{\mathsf{feat}}$ is the HR loss $\mathcal{L}_{\mathsf{HR}}$,

$$ $\mathcal{L}_{\mathsf{HR}}(\theta_{\mathsf{feat}})=\mathop{\mathbb{E}}_{(s,s^{ \prime})\sim\mathcal{D}}\mathop{\mathbb{E}}_{g\sim\mathcal{D}}\left[\ell^{2}_{ \tau}\left(-\mathds{1}(s\neq g)-\gamma\mathsf{sg}\{f^{*}_{\phi}(s^{\prime},g) \}+f_{\phi}^{*}(s,g)\right)\right],\ \theta_{\mathsf{feat}}=(\phi,\emptyset),$ (11) $$

where $\mathsf{sg}$ denotes the stop-gradient operator, $\gamma$ is the discount factor, and $\ell^{2}_{\tau}$ is the $\tau$-expectile loss (Newey & Powell, ), as a proxy for the $\max$ operator in the Bellman backup (Kostrikov et al., ). In practice, $\mathsf{sg}\{f^{*}_{\phi}(s^{\prime},g)\}$ is replaced by $f^{*}_{\overline{\phi}}(s^{\prime},g)$, where $\overline{\phi}$ is a delayed *target network* tracking $\phi$, much like a target network in DQN (Mnih et al., ).

In our experiments, we evaluated SFM with each of the base feature methods discussed above. A comparison of their performance is given in Figure 6.
Our SFM method adapts familiar deterministic policy gradient algorithms, particularly TD3 (Fujimoto et al., ) and TD7 (Fujimoto et al., ), to policy optimization through the actor loss of equation 6, and with the value function estimating the successor features corresponding to base features learned online. We provide implementation details in Appendix B, and demonstrate the performance of SFM in the following section.

## 5 Experiments

Through our experiments, we aim to analyze (1) how well SFM performs relative to competing non-adversarial and state-only adversarial methods at imitation from a single expert demonstration, (2) the robustness of SFM and its competitors to their underlying policy optimizer, and (3) which features lead to strong performance in SFM. Our results are summarized in Figures 2, 4, and 6, respectively, and are discussed in the remainder of this section.

Ultimately, our results confirm that SFM indeed outperforms its competitors, achieving state-of-the-art performance on a variety of single-demonstration tasks, and even surpassing the performance of agents that have access to expert actions.

Figure: Figure 2: Rliable (Agarwal et al., ) plots of the proposed method SFM with an offline method BC (Pomerleau, ), a non-adversarial method IQ-Learn (Garg et al., ) that uses expert action labels and adversarial state-only methods: MM (Swamy et al., ) and GAIfO (Torabi et al., ) across 10 tasks from DMControl suite (Tassa et al., ).
Refer to caption: x2.png

Figure: Figure 3: Per-task learning curves of IRL methods with a strong TD7 policy optimizer on single-demonstration imitation in DMC. Notably, IQ-Learn and BC require access to expert actions, while (state-only) MM, GAIfO, and SFM learn from expert states alone.
Refer to caption: x3.png

### 5.1 Experimental Setup

We evaluate our method on the 10 environments from the DeepMind Control (DMC) (Tassa et al., ) suite.
Following the investigation in (Jena et al., ) which showed that the IRL algorithms are prone to biases in the learned reward function, we consider infinite horizon tasks where all episodes are truncated after 1000 steps in the environment.
For each task, we collected expert demonstrations by training a TD3 (Fujimoto et al., ) agent for 1M environment steps.
In our experiments, the agent is provided with a single expert demonstration which is sampled at the start and kept fixed during the training phase.
The agents are trained for 1M environment steps and we report the mean performance across 10 seeds with 95% confidence interval shading and Rliable metrics (Agarwal et al., ).
For the Rliable plots, we use the returns obtained by a random policy and the expert policy to compute the normalized returns.
Our implementation of SFM is in Jax (Bradbury et al., ) and it takes about $\sim$2.5 hours for one run on a single NVIDIA A100 GPU.
We provide details about the implementation in Appendix B and hyperparameters in Appendix C.

Baselines.
Our baselines include a state-only version of MM (moment matching) (Swamy et al., ), which is an adversarial IRL approach with the version where the integral probability metric (IPM) is replaced with the Jenson-Shannon divergence (which was shown to achieve better or comparable performance with GAIL (Swamy et al., )).
We implemented the state-only MM by changing the discriminator network to depend only on the state and not on the actions.
Furthermore, we replace the RL optimizer in MM to TD7 (Fujimoto et al., ) to keep parity with the proposed method SFM.
We compare SFM to another state-only baseline GAIfO (Torabi et al., ) where the discriminator learns to distinguish between the state transitions of the expert and the agent.
Since, to our knowledge no official implementation of GAIfO is available, we implemented our version of GAIfO with a similar architecture to the MM framework.
Here, we change the RL optimizer from TRPO (Schulman, ) in the paper to a recent RL optimizer like TD3 or TD7.
Additionally, the adversarial approaches required Gradient Penalty (Gulrajani et al., ) on the discriminator, learning rate decay and the OAdam (Daskalakis et al., ) optimizer to stabilize learning.
Apart from state-only adversarial approaches, our baselines include behavior cloning (Pomerleau, , BC) which is a supervised learning based imitation learning method trained to match actions taken by the expert.
Lastly, we compare SFM with IQ-Learn (Garg et al., ) – a non-adversarial IRL algorithm which learns the Q-function using inverse Bellman operator (Piot et al., ).
Notably, BC and IQ-Learn require the expert action labels in the demonstrations for learning.

Figure: Figure 4: Performance of state-only IRL algorithms under the weaker TD3 policy optimizer.
Refer to caption: x4.png

Figure: Figure 5: Comparison of state-only IRL methods using the weaker TD3 policy optimizer. Notably, only SFM consistently maintains strong performance with the weaker policy optimizer.
Refer to caption: x5.png

### 5.2 Results

Quantitative Results Figure 2 presents the Rliable plots (Agarwal et al., ) obtained across DMC environments.
We observe that the proposed method SFM learns to solve the task with a single demonstration and significantly outperforms the offline method BC (Pomerleau, ) and non-adversarial baseline IQ-Learn (Garg et al., ).
Notably, SFM achieves this without using the action labels in the demonstrations.
We believe behavior cloning (BC) fails in this regime of few expert demonstrations as the agent is unpredictable upon encountering states not in the expert dataset (Ross & Bagnell, ).
We further observe that SFM outperforms our implementation of state-only adversarial baselines– MM (Swamy et al., ) and GAIfO (Torabi et al., ) across all metrics.
Furthermore, SFM has a significantly lower optimality gap, indicating that the baselines are more likely to perform much worse than the expert.
Among the state-only adversarial approaches, GAIfO leverages a more powerful discriminator based on the state transition as compared to only states used in MM and thereby performs better.
To further analyze the gains, we report the average returns across each task in Figure 3.
We observe that SFM converges faster when compared to leading methods, suggesting improved sample efficiency relative to its competitors.
To highlight, SFM does not use techniques like gradient penalties (e.g., Gulrajani et al., ; Kodali et al., ) which are often required when training adversarial methods.
Lastly, SFM outperforms MM and GAIfO on most tasks across the quadruped and walker domains.

Robustness with weaker policy optimizers In this work, the network architecture for SFM and state-only baselines is inspired from the TD7 (Fujimoto et al., ) framework.
TD7 is a very recent algorithm presenting several tricks to attain improved performance relative to its celebrated predecessor TD3. As such, we also studied the performance of SFM as well as the state-only baselines built on TD3, in order to assess the robustness of these methods to the strength of their RL optimizer.
Since the expert demonstrations were obtained using the TD3 algorithm, we believe the agents should recover expert behavior as the policy architecture is similar.
The Rliable plots in
Figure 4 present the efficacy of SFM to learn with simpler RL frameworks.
Remarkably, the performance of SFM (TD3) is similar to the SFM (Figure 2) demonstrating the efficacy of our non-adversarial method to learn with other off-the-shelf RL algorithms.
However, the adversarial baselines did not perform as well on top of TD3.
To further understand the performance difference, in Figure 5 we see that SFM attains significant performance gains across the tasks in the quadruped domain.
In contrast, the adversarial state-only baselines perform similarly on tasks in the cheetah and walker domains for both RL optimizers in the inner loop.

Figure: Figure 6: Effect of different base feature functions on the performance of the agent. Here, we compare with Random, Inverse Dynamics Model (IDM) (Pathak et al., ), Hilbert Representations (Hilp) (Park et al., ) and Forward Dynamics Models (FDM). FDM was found to work best across DMC tasks. Note that all base feature functions were jointly learned during training.
Refer to caption: x6.png

Ablation of base feature function In Figure 6, we study the performance of SFM under various base feature functions $\phi$.
We experiment with Random Features, Inverse Dynamics Models (IDM; Pathak et al., ), Hilbert Representations (Hilp; Park et al., ), and Forward Dynamics Model (FDM), as discussed in subsection 4.2.
Through our experiments, we observe that FDM achieves superior results when compared with other base feature functions.
Notably, IDM features performed similarly to FDM on walker and cheetah domains, but did not perform well on quadruped tasks.
We believe it is challenging to learn IDM features on quadruped domain and has been observed in prior works (Park et al., ; Touati & Ollivier, ).
Similar trends were observed for Hilp features where Hilp based features did not do well on quadruped domain, where we suspect that learning the notion of temporal distance during online learning is challenging as the data distribution changes while training.
Random features performed well on quadruped domain but the performance was low on cheetah and walker tasks when compared with FDM.
We believe our approach SFM can leverage any representation learning technique to obtain base features and a potential avenue for future work is to leverage pretrained features for more complex tasks to speed-up learning.

## 6 Limitations

One limitation of SFM is that the algorithm is currently tied with a particular choice of RL solvers, i.e. deterministic policy gradients. We believe our approach can be extended to a broader set of solvers that optimize both deterministic and stochastic policies.
Secondly, our method only works with state-only base feature functions.
We believe future work can lift this assumption by doing on-policy over a learned world model.
Finally, while SFM is simpler than IRL methods, it still doesn’t theoretically alleviate the exploration problem that IRL methods encounter. A promising direction of future work would be to combine SFM with mechanisms like reset distribution (Swamy et al., ) or hybrid IRL (Ren et al., ) to improve computational efficiency.

## 7 Discussion

We introduced SFM—a novel non-adversarial method for IRL that requires no expert action labels—via a reduction to a deterministic policy gradient algorithm.
Our method learns to match the expert’s successor features, derived from adaptively learned base features, using direct policy optimization as opposed to solving a minimax game. Through experiments on several standard imitation learning benchmarks, we have shown that state-of-the-art imitation is achievable with a non-adversarial approach, thereby providing an affirmative answer to our central research question.

Consequently, SFM is no less stable to train than its online RL subroutine. This is not the case with adversarial methods, which involve complex game dynamics during training. Much like the rich literature on GANs (Goodfellow et al., ; Gulrajani et al., ; Kodali et al., ), adversarial IRL methods often require several tricks to stabilize the optimization, such as gradient penalties, specific optimizers, and careful hyperparameter tuning.

Beyond achieving state-of-the-art performance, SFM demonstrated an unexpected feat: it is exceptionally robust to the policy optimization subroutine. Notably, when using the weaker TD3 policy optimizer, SFM performs almost as well as it does with a strong state-of-the-art TD7 optimizer. This is in stark contrast to the baseline methods, which performed considerably worse under the weaker policy optimizer.
As such, we expect that SFM can be broadly useful and easier to deploy on resource-limited systems, which is often a constraint in robotics applications.

Interestingly, SFM follows a recent trend in model alignment that foregoes explicit reward modeling for direct policy optimization. This was famously exemplified by DPO (Rafailov et al., ) and its generalizations (Azar et al., ), which eliminate reward modeling from RLHF. It is worth noting that SFM, unlike DPO, *does* require modeling state features. However, the state features modeled by SFM are *task-agnostic*, and we found in particular that state embeddings for latent dynamics models suffice. We emphasize that this is a reflection of the more complicated dynamics inherent to general RL problems, unlike natural language problems which have trivial dynamics.

SFM is not the first non-adversarial IRL method; we note that IQ-Learn (Garg et al., ) similarly reduces IRL to RL. However, we showed that SFM substantially outperforms IQ-Learn in practice, and more importantly, it does so *without access to expert action labels*. Indeed, to our knowledge, SFM is *the first* non-adversarial state-only interactive IRL method. This opens the door to exciting possibilities, such as imitation learning from video and motion-capture data, which would not be possible for methods that require knowledge of the expert’s actions. We believe that the simpler, non-adversarial nature of SFM training will be highly useful for scaling to such problems.

## Acknowledgements

The authors would like to thank Lucas Lehnert, Adriana Hugessen, Gokul Swamy and Juntao Ren for their valuable feedback and discussions.
The writing of the paper benefited from discussions with Darshan Patil, Mandana Samiei, Matthew Fortier, Zichao Li and anonymous reviewers.
This work was supported by Fonds de Recherche du Québec, National Sciences and Engineering Research Council of Canada (NSERC), Calcul Québec, Canada CIFAR AI Chair program, and Canada Excellence Research Chairs (CERC) program.
The authors are also grateful to Mila (mila.quebec) IDT and Digital Research Alliance of Canada for computing resources.
Sanjiban Choudhury is supported in part by Google Google Faculty Research Award, OpenAI SuperAlignment Grant, ONR Young Investigator Award, NSF RI #2312956, and NSF FRR#2327973.

## Appendix A Proofs

Before proving Proposition 4.1, we begin by proving some helpful lemmas. First, we present a simple generalization of a result from Garg et al. ().

###### Lemma 1 .

Let $\mu$ denote any discounted state-action occupancy measure for an MDP with state space $\mathcal{S}$ and initial state distribution $P_{0}$, and let $\mathcal{V}$ denote a vector space. Then for any $f:\mathcal{S}\to\mathcal{V}$, the following holds,

$$ $\displaystyle\mathbb{E}_{(s,a)\sim\mu}\left[f(s)-\gamma\mathbb{E}_{s^{\prime} \sim P(\cdot\mid s,a)}[f(s^{\prime})]\right]=(1-\gamma)\mathbb{E}_{s\sim P_{0} }\left[f(s)\right].$ $$

###### Proof.

Firstly, any discounted state-action occupancy measure $\mu$ is identified with a unique policy $\pi^{\mu}$ as shown by Ho & Ermon ().
So, $\mu$ is characterized by

$$ $\displaystyle\mu(\mathrm{d}s\mathrm{d}a)$ $\displaystyle=(1-\gamma)\pi^{\mu}(\mathrm{d}a\mid s)\sum_{t=0}^{\infty}\gamma^ {t}p^{\mu}_{t}(\mathrm{d}s),$ $$

where $p^{\mu}_{t}(S)=\Pr_{\pi^{\mu}}(S_{t}\in S)$ is the state-marginal distribution under policy $\pi^{\mu}$ at timestep $t$.
Expanding the LHS of the proposed identity yields

$$ $\displaystyle\mathbb{E}_{(s,a)\sim\mu}\left[f(s)-(1-\gamma)\gamma\mathbb{E}_{s ^{\prime}\sim P(\cdot\mid s,a)}[f(s^{\prime})]\right]$ $\displaystyle=(1-\gamma)\sum_{t=0}^{\infty}\gamma^{t}\mathbb{E}_{s\sim p^{\mu} _{t}}[f(s)]-\gamma\mathbb{E}_{(s,a)\sim\mu}\mathbb{E}_{s^{\prime}\sim P(\cdot \mid s,a)}[f(s^{\prime})]$ $\displaystyle=(1-\gamma)\sum_{t=0}^{\infty}\gamma^{t}\mathbb{E}_{s\sim p^{\mu} _{t}}[f(s)]-(1-\gamma)\sum_{t=0}^{\infty}\gamma^{t+1}\mathbb{E}_{s\sim p_{t}^{ \mu}}\mathbb{E}_{a\sim\pi^{\mu}(\cdot\mid s)}\mathbb{E}_{s^{\prime}\sim P( \cdot\mid s,a)}[f(s^{\prime})]$ $\displaystyle=(1-\gamma)\sum_{t=0}^{\infty}\gamma^{t}\mathbb{E}_{s\sim p^{\mu} _{t}}[f(s)]-(1-\gamma)\sum_{t=0}^{\infty}\gamma^{t+1}\mathbb{E}_{s\sim p_{t+1} ^{\mu}}[f(s)]$ $\displaystyle=(1-\gamma)\sum_{t=0}^{\infty}\gamma^{t}\mathbb{E}_{s\sim p^{\mu} _{t}}[f(s)]-(1-\gamma)\sum_{t=1}^{\infty}\gamma^{t}\mathbb{E}_{s\sim p^{\mu}_{ t}}[f(s)]$ $\displaystyle=(1-\gamma)\mathbb{E}_{s\sim P_{0}}[f(s)],$ $$

since $p^{\mu}_{0}=P_{0}$ (the initial state distribution) for any $\mu$.
∎

Intuitively, we will invoke Lemma 1 with $f$ denoting the successor features to derive an expression for the initial state successor features via state transitions sampled from a replay buffer.

*

###### Proof.

Suppose $\mathcal{B}$ contains rollouts from policies $\{\pi_{k}\}_{k=1}^{N}$ for some $N\in\mathbb{N}$. Each of these policies $\pi_{k}$ induces a discounted state-action occupancy measure $\mu_{k}$. Since the space of all discounted state-action occupancy measures is convex (Dadashi et al., ), it follows that $\mu=\frac{1}{N}\sum_{k=1}^{N}\mu_{k}$ is itself a discounted state-action occupancy measure.

Consider the function $f:\mathcal{S}\to\mathbb{R}^{d}$ given by $f(s)=\boldsymbol{\psi}^{\pi}(s,\pi(s))$. We have

$$ $\displaystyle\mathbb{E}_{(s_{t},s_{t+1})\sim\mathcal{B}}[f(s_{t})-\gamma f(s_{ t+1})]$ $\displaystyle=\mathbb{E}_{k\sim\mathsf{Uniform}(\{1,\dots,N\})}\mathbb{E}_{(s_ {t},a_{t})\sim\mu_{k},s_{t+1}\sim P(\cdot\mid s_{t},a_{t})}[f(s_{t})-\gamma f( s_{t+1})]$ $\displaystyle=\mathbb{E}_{(s_{t},a_{t})\sim\mu,s_{t+1}\sim P(\cdot\mid s_{t},a _{t})}[f(s_{t})-\gamma f(s_{t+1})]$ $\displaystyle=\mathbb{E}_{(s,a)\sim\mu}\left[f(s_{t})-\gamma\mathbb{E}_{s^{ \prime}\sim P(\cdot\mid s,a)}[f(s^{\prime})]\right]$ $\displaystyle=(1-\gamma)\mathbb{E}_{s\sim P_{0}}[f(s)],$ $$

where the final step invokes Lemma 1, which is applicable since $\mu$ is a discounted state-action occupancy measure. The claim then follows by substituting $f(s)$ for $\boldsymbol{\psi}^{\pi}(s,\pi(s))$ and multipying through by $(1-\gamma)^{-1}$.
∎

*

###### Proof.

For the loss function

$$ $\mathcal{L}_{G}(\mu)=\frac{1}{2}\|(1-\gamma)^{-1}\mathbb{E}_{s,s^{\prime}\sim \mathcal{B}}[\boldsymbol{\psi}_{\theta}(s,\pi_{\mu}(s))-\gamma\boldsymbol{\psi }_{\bar{\theta}}(s^{\prime},\pi_{\mu}(s^{\prime}))]-\boldsymbol{\hat{\psi}}^{E }\|_{2}^{2}\\$ (12) $$

the gradient for the actor is given by:

$$ $\displaystyle\nabla_{\mu}\mathcal{L}_{G}(\mu)$ $\displaystyle=\frac{1}{2}\nabla_{\mu}\sum_{i=1}^{d}\{(1-\gamma)^{-1}\mathbb{E} _{s,s^{\prime}\sim\mathcal{B}}[\boldsymbol{\psi}_{\theta}(s,\pi_{\mu}(s))- \gamma\boldsymbol{\psi}_{\bar{\theta}}(s^{\prime},\pi_{\mu}(s^{\prime}))]- \boldsymbol{\hat{\psi}}^{E}\}^{2}$ $\displaystyle=\sum_{i=1}^{d}z_{i}\nabla_{\mu}{\{(1-\gamma)^{-1}\mathbb{E}_{s,s ^{\prime}\sim\mathcal{B}}[\boldsymbol{\psi}_{\theta}(s,\pi_{\mu}(s))-\gamma \boldsymbol{\psi}_{\bar{\theta}}(s^{\prime},\pi_{\mu}(s^{\prime}))]- \boldsymbol{\hat{\psi}}^{E}\}}$ $\displaystyle=\sum_{i=1}^{d}z_{i}{\{(1-\gamma)^{-1}\nabla_{\mu}\mathbb{E}_{s,s ^{\prime}\sim\mathcal{B}}[\boldsymbol{\psi}_{\theta}(s,\pi_{\mu}(s))\}}$ $\displaystyle=\sum_{i=1}^{d}z_{i}{\{(1-\gamma)^{-1}\mathbb{E}_{s,s^{\prime} \sim\mathcal{B}}[\nabla_{\mu}\boldsymbol{\psi}_{\theta}(s,\pi_{\mu}(s))\}}$ $\displaystyle=\sum_{i=1}^{d}z_{i}{\{(1-\gamma)^{-1}\mathbb{E}_{s,s^{\prime} \sim\mathcal{B}}[\nabla_{\mu}\pi_{\mu}(a)\nabla_{a}\boldsymbol{\psi}_{\theta}( s,a)|_{a=\pi_{\mu}(s)}\}}$ $$

Here, we defined $z_{i}=(1-\gamma)^{-1}\mathbb{E}_{s,s^{\prime}\sim\mathcal{B}}[\boldsymbol{\psi
}_{\theta}(s,\pi_{\mu}(s))-\gamma\boldsymbol{\psi}_{\bar{\theta}}(s^{\prime},
\pi_{\mu}(s^{\prime}))]-\boldsymbol{\hat{\psi}}^{E}$.
This completes the proof.

∎

*

###### Proof.

Notably, we have that $J(\pi)=w^{\top}\boldsymbol{\widehat{\psi}}^{\pi}$. Thus,

$$ $\displaystyle\lvert J(\pi_{E})-J(\pi_{\mu})\rvert$ $\displaystyle=\lvert w^{\top}(\boldsymbol{\widehat{\psi}}^{E}-\boldsymbol{ \widehat{\psi}}^{\pi_{\mu}})\rvert$ $\displaystyle\leq\|w\|_{2}\|\boldsymbol{\widehat{\psi}}^{E}-\boldsymbol{ \widehat{\psi}}^{\pi_{\mu}}\|_{2},$ $$

by the Cauchy-Schwartz inequality. By assumption, $\|w\|_{2}\leq B$, so we have that

$$ $\displaystyle\lvert J(\pi_{E})-J(\pi_{\mu})\rvert$ $\displaystyle\leq B\|\boldsymbol{\widehat{\psi}}^{E}-\boldsymbol{\widehat{\psi }}^{\pi_{\mu}}\|_{2}$ $\displaystyle\leq B\epsilon.$ $$

∎

###### Lemma 1 .

###### Proof.

###### Proof.

###### Proof.

###### Proof.

## Appendix B Implementation Details

Since SFM does not involve estimating a reward function and cannot leverage an off-the-shelf RL algorithm to learn a Q-funtion, we propose a novel architecture for our method.
SFM is composed of 3 different components- actor $\pi_{\mu}$, SF network $\boldsymbol{\psi}_{\theta}$, base feature function $\phi$ and $f$.
Taking inspiration from state-of-the-art RL algorithms, we mantain target networks for both actor and the SF network.
Since, SF network acts similarly to a critic in actor-critic like algorithms, SFM comprises of two networks to estimate the SF (Fujimoto et al., ).
Here, instead taking a minimum over estimates of SF from these two networks, our method performed better with average over the two estimates of SF.
To implement the networks of SFM, we incorporated several components from the TD7 (Fujimoto et al., ) algorithm.
Moreover, unlike MM (Swamy et al., ), SFM did not require techniques like gradient penalty (Gulrajani et al., ), the OAdam optimizer (Daskalakis et al., ) and a learning rate scheduler.

### B.1 Network Architecture

The architecture used in this work is inspired from the TD7 (Fujimoto et al., ) algorithms for continuous control tasks (2). We will describe the networks and sub-components used below:

- •
Two functions to estimate the SF ($\boldsymbol{\psi}_{\theta_{1}}$, $\boldsymbol{\psi}_{\theta_{2}}$)
- •
Two target functions to estimate the SF ($\boldsymbol{\psi}_{\bar{\theta}_{1}}$, $\boldsymbol{\psi}_{\bar{\theta}_{2}}$)
- •
A policy network $\pi_{\mu}$
- •
A target policy network $\pi_{\bar{\mu}}$
- •
An encoder with sub-components $f_{\nu},g_{\nu}$
- •
A target encoder with sub-components $f_{\bar{\nu}},g_{\bar{\nu}}$
- •
A fixed target encoder with sub-components $f_{\bar{\bar{\nu}}},g_{\bar{\bar{\nu}}}$
- •
A checkpoint policy $\pi_{c}$ and the checkpoint encoder $f_{c}$
- •
A base feature function $\phi$

Encoder: The encoder comprises of two sub-networks to output state and state-action embedding, such that $z^{s}=f_{\nu}(s)$ and $z^{sa}=g_{\nu}(z^{s},a)$.
The encoder is updated using the following loss:

$$ $\displaystyle\mathcal{L}_{\mathsf{Encoder}}(f_{\nu},g_{\nu})$ $\displaystyle=\Big{(}g_{\nu}(f_{\nu}(s),a)-|f_{\nu}(s^{\prime})|_{\times}\Big{ )}^{2}$ (13) $\displaystyle=\Big{(}z^{sa}-|z^{s^{\prime}}|_{\times}\Big{)}^{2},$ (14) $$

where $s,a,s^{\prime}$ denotes the sampled transitions and $|~{}.~{}|_{\times}$ is the stop-gradient operation.
Also, we represent $\bar{z}^{s}=f_{\bar{\nu}}(s)$, $\bar{z}^{sa}=g_{\bar{\nu}}(\bar{z}^{s},a)$, $\bar{\bar{z}}^{s}=f_{\bar{\bar{\nu}}}(s)$, and $\bar{\bar{z}}^{sa}=g_{\bar{\bar{\nu}}}(\bar{\bar{z}}^{s},a)$.

SF network:
Motivated by standard RL algorithms (Fujimoto et al., ; ), SFM uses a pair of networks to estimate the SF. The network to estimate SF are updated with the following loss:

$$ $\displaystyle\mathcal{L}_{\mathsf{SF}}(\boldsymbol{\psi}_{\theta_{i}})$ $\displaystyle=\|\mathsf{target}-\boldsymbol{\psi}_{\theta_{i}}(\bar{z}^{sa}, \bar{z}^{s},s,a)\|_{2}^{2},$ (15) $\displaystyle\mathsf{target}$ $\displaystyle=\phi(s)+\frac{1}{2}\gamma*\mathrm{clip}([\boldsymbol{\psi}_{\bar {\theta}_{1}}(x)+\boldsymbol{\psi}_{\bar{\theta}_{2}}(x)],\boldsymbol{\psi}_{ \min},\boldsymbol{\psi}_{\max}),$ (16) $\displaystyle x$ $\displaystyle=[\bar{\bar{z}}^{s^{\prime}a^{\prime}},\bar{\bar{z}}^{s^{\prime}} ,s^{\prime},a^{\prime}]$ (17) $\displaystyle a^{\prime}$ $\displaystyle=\pi_{\bar{\mu}}(\bar{\bar{z}}^{s^{\prime}},s^{\prime})+\epsilon, \text{where}~{}\epsilon\sim\mathrm{clip}(\mathcal{N}(0,\sigma^{2}),-c,c).$ (18) $$

Here, instead of taking the minimum over the SF networks for bootstrapping at the next state (Fujimoto et al., ), the mean over the estimates of SF is used.
The action at next state $a^{\prime}$ is samples similarly to TD3 (Fujimoto et al., ) and the same values of ($z^{s},z^{sa}$) are used for each SF network. Moreover, the algorithm does clipping similar to TD7 (Fujimoto et al., ) on the predicted SF at the next state which is updated using $target$ (equation 16) at each time step, given by:

$$ $\displaystyle\boldsymbol{\psi}_{\min}$ $\displaystyle\leftarrow\min(\boldsymbol{\psi}_{\min},\mathsf{target})$ (19) $\displaystyle\boldsymbol{\psi}_{\max}$ $\displaystyle\leftarrow\min(\boldsymbol{\psi}_{\max},\mathsf{target})$ (20) $$

Policy:
SFM uses a single policy network which takes [$z^{s}$, $s$] as input and is updated using the following loss function described in section 4.

Upon every $target_update_frequency$ training steps, the target networks are updated by cloning the current network parameters and remains fixed:

$$ $\displaystyle(\theta_{1},\theta_{2})$ $\displaystyle\leftarrow(\bar{\theta}_{1},\bar{\theta}_{2})$ (21) $\displaystyle\mu$ $\displaystyle\leftarrow\bar{\mu}$ (22) $\displaystyle(\nu_{1},\nu_{2})$ $\displaystyle\leftarrow(\bar{\nu}_{1},\bar{\nu}_{2})$ (23) $\displaystyle(\bar{\nu}_{1},\bar{\nu}_{2})$ $\displaystyle\leftarrow(\bar{\bar{\nu}}_{1},\bar{\bar{\nu}}_{2})$ (24) $$

Moreover, the agent maintains a checkpointed network similar to TD7 (Refer to Appendix F of TD7 (Fujimoto et al., ) paper). However, TD7 utilizes the returns obtained in the environment for checkpointing.
Since average returns is absent in the IRL tasks, it is not clear how to checkpoint policies.
Towards this end, we propose using the negative of MSE between the SF of trajectories generated by agent and the SF of demonstrations as a proxy of checkpointing.
To highlight some differences with the TD7 Fujimoto et al. () algorithm, SFM does not utilize a LAP Fujimoto et al. () and Huber loss to update SF network, and we leave investigating them for future research.

Base Features:
Since we use a base feature function $\phi$, we have two networks- 1) To provide the embedding for the state, and 2) To predict the next state from the current state and action. 1 provides the description of the network architectures and the corresponding forward passes.

State-only adversarial baselines:
For the state-only MM method, we used the same architecture as TD7 (Fujimoto et al., ) or TD3 (Fujimoto et al., ) for the RL subroutine. We kept the same architecture of the discriminator as provided in the official implementation.
However, we modified the discriminator to take only states as inputs.
Additionally, we used gradient penalty and learning rate decay to update the discriminator, and OAdam optimizer (Daskalakis et al., ) for all networks.
For GAIfO (Torabi et al., ), we used the same architecture as state-only MM.
However, the discriminator takes the state-transition denoted as the state and next-state pair as input.

###### Pseudo 1 .

###### Pseudo 2 .

###### Pseudo 1 .

###### Pseudo 2 .

## Appendix C Hyperparameters

In Table 1, we provide the details of the hyperparameters used for learning.
Many of our hyperparamters are similar to the TD7 (Fujimoto et al., ) algorithm.
Important hyperparameters include the discount factor $\gamma$ for the SF network and tuned it with values $\gamma=[0.98,0.99,0.995]$ and report the ones that worked best in the table.
Rest, our method was robust to hyperparameters like learning rate and batch-size used during training.

**Table 1: Hyper parameters used to train SFM.**
| Name | Value |
| --- | --- |
| Batch Size | 1024 |
| Discount factor $\gamma$ for SF | .99 |
| Actor Learning Rate | 5e-4 |
| SF network Learning Rate | 5e-4 |
| Base feature function learning Rate | 5e-4 |
| Network update interval | 250 |
| Target noise | .2 |
| Target Noise Clip | .5 |
| Action noise | .1 |
| Environments steps | 1e6 |

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: - what are the hyperparameter search space for SFM and baselines respectively?
soundness: 2
strengths: - The paper is well organized and easy to follow

- The motivation is sound and the resulting algorithm is straightforward (without requiring min-max optimization)
summary: This work considers inverse RL in the state-only setting. Leveraging the linear structure of returns, as inner product of successor features and reward weight, the authors could model inverse RL without adversarially optimizing the reward weight, while is often done in prior works. This allows one to directly optimize policy through minimizing the gap between the successor features of expert policy and of the learned policy.
weaknesses: - It is quite surprising that IQL failed most of the tasks in Figure 3

- The choice of baselines could be expanded. While SFM considers the state-only setting, GAIfO is the only baseline that originally proposed for this setting. It might be reasonable to include a few baselines that are designed for state-only setting, for example [1, 2] (with public implementation if my memory serves me right) and some more up-to-date baselines are appreciated. 

----

Note: I have not actively followed the recent literature on successor features, so I am uncertain about its novelty when applied to the IRL setting. As a result, I have a low confidence score.

[1] Gangwani, Tanmay, and Jian Peng. "State-only imitation with transition dynamics mismatch." arXiv preprint arXiv:2002.11879 (2020).
[2] Zhu, Zhuangdi, et al. "Off-policy imitation learning from observations." Advances in neural information processing systems 33 (2020): 12402-12413.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: 1. How would the method perform on tasks with sparse rewards or requiring significant exploration?
2. Could the approach be extended to work with stochastic policies?
3. How does the method compare to recent offline IRL approaches?
4. What are the computational requirements compared to adversarial methods?
5. How sensitive is the performance to the choice of successor feature architecture?
soundness: 3
strengths: 1. The non-adversarial approach using successor features is novel and elegantly simple compared to existing methods
2. The approach is well-justified with clear theoretical analysis and proofs
3. The method works with state-only demonstrations and single examples, making it widely applicable
4. SFM integrates seamlessly with existing actor-critic frameworks
5. Demonstrates superior performance across multiple tasks and metrics
6. Shows consistent performance even with weaker policy optimizers
summary: This paper introduces Successor Feature Matching (SFM), a novel non-adversarial approach to Inverse Reinforcement Learning (IRL). The key innovation is reformulating IRL as a direct policy optimization problem that matches successor features between the agent and expert demonstrations. The method has three notable contributions:

1. A non-adversarial approach that avoids the computational expense and instability of traditional adversarial IRL methods
2. The ability to learn from state-only demonstrations without requiring expert action labels
3. Strong performance from as little as a single expert demonstration

The method leverages successor features to estimate expected cumulative features and uses policy gradient descent to minimize the gap between learner and expert features. The authors demonstrate superior performance compared to both adversarial and non-adversarial baselines across multiple control tasks.
weaknesses: 1. The paper doesn't fully address how SFM handles the exploration problem inherent in IRL
2. The current implementation is tied to deterministic policy gradients, potentially limiting its applicability
3. The method currently only works with state-only base feature functions
4. While comprehensive, the evaluation is limited to DMC suite tasks; testing on more diverse environments would strengthen the claims

---

confidence: 2
contribution: 4
initial_rating: 8
presentation: 3
questions: - How does SFM handle scenarios where expert demonstrations do not cover the entire state space, particularly in sparse-reward or high-dimensional tasks?
- Can the authors elaborate on potential extensions of SFM to stochastic policy optimizers, and any early experiments indicating feasibility?
soundness: 3
strengths: - **Novel and well-motivated approach:** SFM provides a new angle in IRL by leveraging SFs for direct policy optimization, offering an alternative to adversarial methods.
- **Strong empirical results:** Experiments demonstrate the superiority of SFM over sota methods on normalized return and optimality gap across single-demonstration tasks, demonstrating its effectiveness.
- **State-only learning:** The ability to learn from state-only demonstrations is a great contribution.
- **Robustness to RL optimizer choice:** SFM's performance with both strong (TD7) and weaker (TD3) optimizers shows versatility, making it potentially useful for resource-limited applications.
- The experiments are conducted in clear logic and the analysis and observations are novel and interesting.
summary: The paper introduces Successor Feature Matching (SFM), a novel method to Inverse Reinforcement Learning (IRL) which is non-adversarial and does not require expert action labels. SFM directly optimizes a policy to match the expert's successor features (SFs) using policy gradient ascent. The paper claims that SFM offers several advantages over existing IRL methods, including simplified training, state-only learning and robustness to optimizer choice.
The paper supports these claims through empirical evaluations on the DeepMind Control suite, demonstrating that SFM outperforms state-of-the-art adversarial and non-adversarial baselines on a variety of single-demonstration tasks. Additionally, the paper explores the impact of different base feature functions on SFM's performance, finding that Forward Dynamics Models (FDM) lands the best results.
weaknesses: - **Dependence on deterministic policy gradients:** The current formulation of SFM is tied to deterministic policy gradient algorithms. Exploring extensions to stochastic policies would broaden its scope. However, it's clearly mentioned by the authors in the discussion part.
- **Exploration Challenges:** as stated by the authors, the presented method does not fully resolve IRL exploration issues. I wonder how the performance may vary significantly across domains requiring extensive exploration.

---

confidence: 3
contribution: 2
initial_rating: 3
presentation: 2
questions: 1. How applying l2-loss  in Eq.(4) can be understood for the policy $\pi_\mu$? 
2. I think SFM (random) performed well; what is the reasoning behind this and presenting Eqs? (9-11)? Could the base feature only trained with arbitrary unsupervised learning with only states without the next states, actions, or goals?
soundness: 3
strengths: 1. The proposed SFM, in contrast to adversarial methods, is more rooted in the historical context of early IRL studies.
2. In my opinion, IRL (or even RL) methods do not have to restrict themselves to formulating scalar reward signals. Adaptation SF (Barreto et al., 2017) expands the notion of IRL into feature learning, which can relax some rigidity in RL-IRL formulation. Since the features have successfully formulated vectorized signals in the transfer learning tasks in RL, this could be a significant contribution that relaxes studies of IRL. 
3. The proposed method achieved good performance among modern IRL methods.
4. Propositions 1-3 are straightforward to understand.
summary: This paper proposes Successor Feature Matching (SFM) in the Inverse Reinforcement Learning (IRL) problem.  The authors focused generalized reward-like properties of  successor features (Barreto et al. 2017), e.g. recovering reward, discounted accumulation. These allowed SFM for alternative formulation of policy optimization using L2 loss in Eq. (4). The experimental results suggest that the proposed SFM yields good scores in single-demonstration benchmarks and much more impressive scores among state-only IRL algorithms.
weaknesses: 1. I do not understand why "non-adversarial" property is framed as the main contribution throughout the paper. Adversarial learning and SFM are not mutually exclusive. Eq. (3) shows that the base feature can be trained with adversarial learning by setting $\mathcal{L}_\mathrm{feat} = \mathrm{Eq. (3)}$. If the author intended to deepen our understanding of the role of adversarial learning in IRL, they should have provided (1) another theoretical justification of non-adversarial learning and (2) ablation studies, including Eq. (3) in Fig. 6, and (3) results of combining various base feature losses that verifies adversarial losses might deteriorate IRL performance.  
2. Compared to Figs. 4 and 5, single-demonstration task performance in Fig 3 is only sometimes good, suggesting that SF is more focused on representing states. For some scenarios, action representation performance might be necessary.   
3. To demonstrate scalability, including more complex (or demonstrative) benchmarks in Fig. 3 would be beneficial to IRL researchers to grasp the model's performance. 
4. There are no supporting tables in the appendix that measure the performance of the learning curves in Figs. 3, 5, 6.

Meta-review: This paper studies Inverse Reinforcement Learning (IRL) via a successor-feature-based approach, the Successor Feature Matching (SFM),  which is non-adversarial and does not require expert action labels. In particular, SFM directly optimizes a policy to match the expert's successor features (SFs) using policy optimization. The effectiveness of the proposed approach was then supported by experiments, which showed that SFM outperformed state-of-the-art adversarial and non-adversarial baselines, with low computational cost and sample complexity (even from single-demonstration trajectories), and state-only demonstration data. The technical idea is novel, the problem studied is very well-motivated, and the paper is overall well-written. The main concerns were regarding the use of terminology, the applicability to general stochastic policies, and how to incorporate exploration. I believe the merits outweigh the drawbacks of the paper, and suggest the authors incorporate the feedback from this round in preparing the camera-ready version of the paper.

Decision: Accept (Poster)