Abstract
Deep Reinforcement Learning (RL) models often function as "black boxes," lacking structured internal representations that facilitate Hierarchical Reinforcement Learning (HRL). This paper introduces the Deep Variational Q-Network (DVQN), which integrates Variational Autoencoders (VAEs) with Deep Q-Learning. By constraining the agent's latent space to a Gaussian distribution, DVQN enables the discovery of interpretable "options" through state clustering. Experimental results across several benchmarks demonstrate that DVQN achieves performance comparable to state-of-the-art models like Rainbow while providing significantly greater transparency into the agent's decision-making process.
Introduction
Traditional Deep RL agents typically map raw inputs to actions through dense or convolutional layers. While effective, the resulting latent representations are often unorganized and sparse, making it difficult to implement HRL. In HRL, agents break complex tasks into smaller sub-policies or "options." Currently, these options are largely hand-crafted due to the difficulty of automating initiation and termination conditions. Furthermore, standard model-free RL often struggles with sample efficiency and sparse rewards.
The Deep Variational Q-Network (DVQN)
The DVQN architecture addresses these challenges by embedding a variational bottleneck within the standard DQN pipeline. This integration forces the network to learn a structured, probabilistic representation of the environment.
The process consists of four primary stages:
- Feature Extraction: Raw inputs (images or vectors) are processed through convolutional or dense layers.
- Variational Bottleneck: Instead of a standard hidden layer, the network outputs parameters ($\mu$ and $\sigma$) for a Gaussian distribution. A latent vector $z$ is sampled from this distribution using the re-parameterization trick.
- Dual-Stream Loss: The model is trained on a combined objective: a VAE loss (minimizing reconstruction error and KL-divergence) and a DQN loss (using standard temporal difference learning).
- Generative Exploration: The probabilistic nature of the latent space allows the agent to explore the environment by sampling from this space, potentially eliminating the need for traditional $\epsilon$-greedy exploration strategies.
Experimental Setup
The researchers evaluated DVQN on four classic benchmarks to test its versatility across control and navigation tasks.
The benchmarks include:
- CartPole-v0: A classic control task involving balancing a pole on a cart.
- Acrobot-v1: A jointed chain swing-up task requiring the agent to hit a target height.
- CrossingS9N3-v0: A grid-world navigation environment.
- FourRooms-v0: A standard HRL benchmark where an agent must navigate through four rooms connected by narrow doorways.
Key Insights and Results
Latent Space Clustering and Option Discovery
By regularizing the latent space with a Gaussian prior, the model naturally clusters similar states. In CartPole, for instance, the model creates distinct clusters for physical states like "leaning left," "leaning right," and "balanced." These clusters provide a principled, automated foundation for defining the initiation and termination conditions of "options" in HRL.
Stability and Performance
DVQN achieved performance parity with high-performance baselines such as Double DQN and Rainbow. Notably, the KL-divergence term acts as a powerful regularizer. The authors found that while DVQN can be more challenging to tune initially, it is remarkably stable and does not diverge even when trained long after convergence—a common failure mode in standard Deep RL.
Interpretability
Visualizations of the latent space revealed human-readable structures. In the FourRooms environment, the latent space effectively mapped the topological layout of the rooms, demonstrating that the agent's internal representation aligns with the physical constraints and connectivity of the environment.
Conclusion
DVQN successfully bridges the gap between high-performance RL and interpretable representation learning. While the model requires more careful hyperparameter tuning and exhibits slightly slower initial convergence than simpler methods, its ability to discover structured options automatically represents a significant step toward autonomous HRL. Future work will focus on fully automating the transition between discovered options and scaling the architecture to higher-dimensional environments.
Summary updated