Abstract
In generative adversarial imitation learning (GAIL), the agent aims to learn a policy from an expert demonstration so that its performance cannot be discriminated from the expert policy on a certain predefined reward set. In this paper, we study GAIL in both online and offline settings with linear function approximation, where both the transition and reward function are linear in the feature maps. Besides the expert demonstration, in the online setting the agent can interact with the environment, while in the offline setting the agent only accesses an additional dataset collected by a prior. For online GAIL, we propose an optimistic generative adversarial policy optimization algorithm (OGAP) and prove that OGAP achieves $\widetilde{\mathcal{O}}(H^2 d^{3/2}K^{1/2}+KH^{3/2}dN_1^{-1/2})$ regret. For offline GAIL, we propose a pessimistic generative adversarial policy optimization algorithm (PGAP) and obtain the optimality gap, achieving the minimax lower bound in the utilization of the additional dataset.
Introduction
Imitation Learning (IL) enables agents to acquire complex behaviors by observing expert demonstrations, bypassing the need for meticulously engineered reward functions. While techniques like Behavior Cloning (BC) are straightforward, they often fail due to "compounding errors" where small mistakes lead the agent into unfamiliar states. Inverse Reinforcement Learning (IRL) offers a more robust alternative but is often computationally prohibitive as it requires solving a full reinforcement learning problem in every iteration.
Generative Adversarial Imitation Learning (GAIL) has emerged as a powerful framework that treats imitation as a minimax game between a policy (the generator) and a discriminator. Despite its empirical success, theoretical guarantees for GAIL have largely been confined to tabular environments with small, discrete state spaces. This paper provides a theoretical foundation for GAIL using linear function approximation, addressing both online and offline learning scenarios.
Problem Formulation: Linear MDPs
To handle high-dimensional or continuous state-action spaces, the authors adopt the Linear MDP framework. In this setting, both the transition dynamics and the reward functions are assumed to be linear functions of a known feature map $\phi(s, a)$. This structure allows the agent to generalize across states while maintaining the mathematical tractability required for rigorous convergence proofs.
The learning objective is to find a policy $\pi$ that minimizes the performance gap relative to an expert policy $\pi_E$, ensuring the agent's behavior is indistinguishable from the expert's under a defined class of reward functions.
Proposed Algorithms
The authors propose a unified framework that alternates between two stages: updating the policy via Mirror Descent and updating the reward (discriminator) via Projected Gradient Ascent. This framework is specialized into two distinct algorithms:
1. Online Setting: OGAP
In the online setting, the agent can interact with the environment to collect new data. The authors propose Optimistic Generative Adversarial Policy Optimization (OGAP). To ensure the agent explores sufficiently, OGAP incorporates the "Optimism in the Face of Uncertainty" principle by adding an exploration bonus to the estimated reward. This prevents the agent from getting stuck in sub-optimal regions of the state space by encouraging the discovery of new state-action pairs.
2. Offline Setting: PGAP
In the offline setting, the agent cannot interact with the environment and must rely on a fixed dataset $D^A$ (collected by a non-expert prior) in addition to the expert demonstrations $D^E$. The authors propose Pessimistic Generative Adversarial Policy Optimization (PGAP). Unlike the online setting, exploration is impossible. PGAP employs a "pessimistic" approach, penalizing the reward in state-action pairs that are poorly represented in the offline dataset. This ensures the agent remains within "safe" regions supported by the data, preventing overconfident moves in unfamiliar territory.
Theoretical Results
The paper establishes rigorous upper bounds on the performance gap for both algorithms, proving their sample efficiency:
- Online (OGAP) Regret: The regret scales as $\widetilde{\mathcal{O}}(H^2 d^{3/2}K^{1/2}+KH^{3/2}dN_1^{-1/2})$, where $H$ is the horizon, $d$ is the feature dimension, $K$ is the number of episodes, and $N_1$ is the number of expert trajectories.
- Offline (PGAP) Optimality Gap: With sufficient coverage in the additional dataset, the optimality gap is $\widetilde{\mathcal{O}}(H^{2}dK^{-1/2} +H^2d^{3/2}N_2^{-1/2}+H^{3/2}dN_1^{-1/2} \ )$. This result is minimax optimal regarding the utilization of the additional dataset $N_2$.
Key Insight: Data Synergy
A major finding of this research is the synergy between different data types. The analysis shows that a large non-expert dataset ($N_2$) can significantly reduce the amount of expensive expert data ($N_1$) required to reach a target performance level. This suggests that in practical applications, leveraging existing logs of non-expert behavior can make imitation learning much more accessible.
Conclusion and Future Work
This work provides the first provably efficient algorithms for GAIL with linear function approximation. By introducing optimism for online exploration and pessimism for offline exploitation, the authors demonstrate that GAIL can be both sample-efficient and robust. While the linear MDP assumption is a significant step beyond tabular models, extending these guarantees to general non-linear function approximations (like deep neural networks) and addressing the computational sensitivity of minimax optimization remain important open challenges.
Summary updated