Abstract
Recent breakthroughs in Go play and strategic games have witnessed the great potential of reinforcement learning in intelligently scheduling in uncertain environments, but some bottlenecks are also encountered when we generalize this paradigm to universal complex tasks. Among them, the low efficiency of data utilization in model-free reinforcement algorithms is of great concern. In contrast, the model-based reinforcement learning algorithms can reveal underlying dynamics in learning environments and seldom suffer the data utilization problem. To address the problem, a model-based reinforcement learning algorithm with attention mechanism embedded is proposed as an extension of World Models in this paper. We learn the environment model through Mixture Density Network Recurrent Network (MDN-RNN) for agents to interact, with combinations of variational auto-encoder (VAE) and attention incorporated in state value estimates during the process of learning policy. In this way, agents can learn optimal policies through fewer interactions with the actual environment, and final experiments demonstrate the effectiveness of our model in control problems.
Introduction
Reinforcement Learning (RL) has achieved stunning success in games like Go, but it remains notoriously "data-hungry." Model-free algorithms often require millions of interactions with an environment to learn a policy, which is impractical for real-world robotics or autonomous driving where every mistake is costly.
Model-based RL offers a solution: the agent learns a "World Model" (a mental simulation) of the environment and "dreams" up experiences to practice in. However, these models face their own hurdles. Specifically, accurately estimating the value of a state—predicting the long-term reward from a specific moment—is difficult when relying solely on the current observation. Standard models often fail to effectively utilize historical context, treating all past time steps with equal importance or ignoring them entirely. VMAV-C addresses this by integrating an attention mechanism into the Critic’s value estimation, allowing for selective weighting of historical context.
The VMAV-C Architecture
The VMAV-C framework (Variational auto-encoder, Mixture density network-RNN, Attention-based Value function, and Controller) consists of four primary components designed to mimic biological cognitive processes:
- Vision (VAE): A Variational Auto-Encoder compresses high-dimensional raw images (e.g., a 40x80 pixel frame) into a compact 32-dimensional latent vector ($z$).
- Memory (MDN-RNN): A Mixture Density Network combined with a Recurrent Neural Network predicts the next latent state ($z_{t+1}$) and the probability that an episode will end ($d_{t+1}$). This acts as the agent's "internal simulator."
- Attention-based Value Function (AVF): This is the core innovation. Unlike the original World Models paper, VMAV-C uses an Actor-Critic setup with Proximal Policy Optimization (PPO). The "Critic" uses an attention layer to look back at a window of previous hidden states from the RNN, creating a weighted "context vector" for more accurate value estimation.
- Controller: A simple fully connected network that maps the current latent state and the RNN's hidden state to an action.
Decision Process
The interaction between these components follows a structured loop where the agent first encodes its observation, determines an action via the controller, and then updates its internal "memory" (RNN hidden state) based on the results. This process allows the agent to learn from a virtual environment, significantly reducing the need for real-world samples.
Experimental Setup and Results
The researchers evaluated VMAV-C using the CartPole-V0 environment from OpenAI Gym. Crucially, they used raw 2D images (40x80 pixels) rather than standard state vectors to simulate complex, end-to-end control.
Key Insights
- Temporal Selective Hearing: The attention mechanism allows the Critic to focus on pivotal transitions in the past while ignoring noise, which is essential for complex control tasks.
- PPO Stability: Using PPO instead of evolutionary strategies (like CMA-ES) provides a more stable and efficient gradient-based alternative when paired with a robust world model.
- Dream Quality: The length of sequences used to train the MDN-RNN is vital. Training on 32-step sequences captured significantly better environment dynamics than 16-step sequences.
Performance Metrics
VMAV-C was compared against Contractive PPO (model-free) and MDN-RNN PPO (standard World Model without attention). VMAV-C reached higher cumulative rewards faster than both baselines and exhibited a more stable decline in Value Network loss. Sensitivity analysis on the "temperature" parameter ($ au$) showed that the model is robust, performing best with moderate uncertainty ($ au \approx 0.8$ to $1.0$) in the "dreamed" environment.
Conclusion
VMAV-C demonstrates that integrating attention into the value estimation of a model-based RL agent significantly improves data efficiency and stability. While tested on CartPole, the framework's ability to selectively attend to historical context suggests potential for more complex 3D environments and multi-agent systems. Future work will explore scaling these benefits to tasks with sparser rewards and higher dimensionality.
Summary updated