NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DiffAIL: Diffusion Adversarial Imitation Learning

Bingzheng Wang, Guoqiang Wu, Teng Pang, Yan Zhang, Yilong Yin

Introduction

Imitation Learning (IL) is a critical paradigm for training agents in environments where explicit reward functions are difficult to define, such as autonomous driving or complex robotic manipulation. The current state-of-the-art approach, Adversarial Imitation Learning (AIL), employs a "discriminator" to distinguish between expert demonstrations and agent-generated behaviors. This discriminator provides a surrogate reward signal: the more an agent's action resembles the expert's, the higher the reward.

However, traditional AIL frameworks typically rely on simple binary classifiers as discriminators. These "naive" models often overfit to the specific expert trajectories provided and fail to capture the broader underlying distribution of expert behavior. This leads to poor generalization and compounding errors when the agent encounters states slightly outside the training data.

The DiffAIL Framework

To address these limitations, the authors propose DiffAIL, which replaces the standard binary classifier with a powerful unconditional diffusion model.

Diffusion as a Discriminator

Instead of a simple "Yes/No" classification, DiffAIL models expert state-action pairs $(s, a)$ using a diffusion process. Diffusion models learn to reverse a process of adding noise to data, effectively learning the manifold of the expert distribution.

The discriminator is trained with a dual objective:

  1. Minimize the denoising error for expert data.
  2. Maximize the denoising error for the agent's generated data.

Surrogate Reward Generation

The reinforcement learning agent receives a reward derived directly from the diffusion model's loss. If the model can easily recognize and denoise a state-action pair (resulting in low error), the agent is rewarded for exhibiting "expert-like" behavior. This approach provides a more nuanced and continuous reward signal than a binary classifier.

Experimental Results

The researchers evaluated DiffAIL on the MuJoCo benchmark suite, focusing on continuous control tasks including Hopper, HalfCheetah, Ant, and Walker2d.

Comparison of DiffAIL against state-of-the-art baselines across multiple MuJoCo environments.

Performance and Efficiency

DiffAIL achieved state-of-the-art (SOTA) results across all tasks, significantly outperforming established baselines such as Generative Adversarial Imitation Learning (GAIL), Behavioral Cloning (BC), and CFIL. Notably, DiffAIL demonstrated exceptional sample efficiency, reaching near-expert performance with as little as a single expert trajectory.

Key Insights

Superior Distribution Capture

By leveraging the generative capabilities of diffusion models, DiffAIL captures the "essence" of expert behavior more effectively than standard neural networks. This allows the discriminator to provide meaningful rewards even in states the expert never visited, enhancing the agent's robustness.

Surpassing the Expert

One of the most significant findings is that DiffAIL can actually exceed the performance of the expert demonstrations it learns from.

DiffAIL surpassing expert performance in the HalfCheetah environment.

In the HalfCheetah task, while the expert demonstrations averaged a score of 4463, DiffAIL reached a peak performance of 5362. This suggests that the diffusion-based reward signal helps the agent optimize the task beyond the specific examples provided by the expert.

Reward Correlation

Analysis using Pearson Correlation revealed that DiffAIL's surrogate rewards are much more linearly correlated with the true environment rewards compared to GAIL. This "cleaner" signal facilitates more stable and effective reinforcement learning.

Limitations and Future Directions

While highly effective, DiffAIL introduces some computational overhead due to the iterative nature of diffusion models. Although the authors optimized the process to require only a few tens of steps for control tasks, it remains more intensive than simple MLP-based methods. Additionally, performance is sensitive to the number of diffusion steps ($T$), requiring careful tuning to avoid instability. Future work will focus on scaling DiffAIL to high-dimensional, pixel-based inputs like video game environments.

Summary updated

BibTeX
@inproceedings{wang2024diffail,
  author = {Bingzheng Wang and Guoqiang Wu and Teng Pang and Yan Zhang and Yilong Yin},
  title = {{DiffAIL: Diffusion Adversarial Imitation Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i14.29470},
}
Figure