Introduction
Imitation Learning (IL) provides a framework for training agents to perform complex tasks by observing expert behavior, bypassing the need for manually engineered reward functions. Generative Adversarial Imitation Learning (GAIL) has emerged as a leading approach, framing the problem as a minimax game between a policy (learner) and a discriminator. However, GAIL often fails in high-dimensional environments, such as Atari games played from raw pixels. This failure stems from a "discrimination-rewarding trade-off": with limited expert data, the discriminator quickly learns to distinguish expert and learner states based on trivial pixel-level differences, leading to uninformative reward signals that fail to guide the agent toward the expert's actual strategy.
The HashReward Framework
To address the curse of dimensionality, we introduce HashReward, an algorithm that leverages supervised hashing to create compact, binary representations of high-dimensional states. By mapping complex pixel inputs to a $k$-bit binary code, HashReward prevents the discriminator from overfitting to high-frequency noise while preserving essential features for imitation.
The architecture consists of three primary components:
- Supervised Hashing: Unlike unsupervised dimensionality reduction (e.g., standard autoencoders), HashReward uses a supervised loss to ensure that binary codes effectively differentiate between expert and learner states. This ensures that the dimensionality reduction process retains the subtle features defining expert behavior.
- Multi-Part Loss Function: The model optimizes a combination of reconstruction loss (to maintain structural information), quantization loss (to force outputs toward binary values), and the core supervised hashing loss.
- Adversarial Training: The resulting binary codes, concatenated with the agent's actions, serve as inputs to a discriminator. This discriminator then provides the pseudo-reward for a standard Reinforcement Learning algorithm, such as Proximal Policy Optimization (PPO).
Experimental Results
HashReward was evaluated on the Arcade Learning Environment (ALE) and pixel-based MuJoCo tasks, using a constrained dataset of only 20 expert trajectories per environment.
Performance Benchmarks
- Atari 2600: HashReward achieved the highest scores in 12 out of 15 games. Notably, in games like Boxing and Qbert, it reached expert-level performance where previous methods like GAIL, VAIL, and GIRIL failed to learn meaningful strategies.
- Pixel-based MuJoCo: In continuous control tasks modified for pixel inputs, HashReward outperformed baselines in 3 out of 5 environments, demonstrating its versatility across both discrete and continuous action spaces.
- Qualitative Success: In Pong, HashReward was the only method to learn advanced strategies, such as the "kill-shot" (hitting the ball with the paddle's edge), whereas other methods struggled to even return the ball consistently.
Discussion and Conclusion
The success of HashReward highlights that dimensionality reduction for imitation learning must be task-aware. By integrating supervision into the hashing process, the model maintains a distance-preserving property in the latent space, ensuring that rewards increase smoothly as the learner's behavior approaches the expert's. While challenges remain in "hard exploration" tasks like Montezuma's Revenge, HashReward represents a significant step toward robust imitation learning from raw visual inputs, overcoming the limitations of traditional adversarial methods in high-dimensional spaces.
Summary updated