Introduction
Standard Reinforcement Learning (RL) typically focuses on finding a single optimal policy to maximize a defined reward function. However, this often leads to "mode collapse," where an agent ignores alternative, equally valid strategies. For instance, a robot might always take the same path, even if variations in speed or trajectory are desirable for different contexts. InfoRL addresses this by learning multiple, diverse behaviors for a single task. By maximizing the mutual information between a latent "style" code and the agent's actions, InfoRL enables the discovery of disentangled strategies that can be controlled via simple input parameters.
Methodology
The core of InfoRL is the integration of Information Maximization into the RL objective. The framework augments the standard environment reward with a "posterior reward" to ensure the agent's behavior is conditioned on a latent code $c$.
The architecture consists of three primary components:
- Policy ($\pi$): Receives the current state $s_t$ and a latent code $c_t$ to produce an action $a_t$.
- Posterior Network ($Q$): A discriminator that attempts to recover the latent code $c_t$ from the state-action pair $(s_t, a_t)$.
- Reward Function: The total reward is a combination of the environment reward ($R_{env}$) and a "posterior reward" ($R_{posterior}$) derived from the posterior network's accuracy.
This setup forces the agent to "disentangle" its behaviors. If a specific code corresponds to a certain style (e.g., walking slowly), the agent must make that behavior visually distinct enough for the posterior network to identify it correctly. Unlike methods that calculate mutual information over entire trajectories, InfoRL uses state-action pairs to provide a dense reward signal at every step, improving training stability.
Experimental Setup
The framework was evaluated on several modified OpenAI Gym and MuJoCo benchmarks designed to test behavioral diversity:
- AntDirection-v1: A quadrupedal agent rewarded for moving in any direction on a 2D plane.
- Walker2dSpeed-v1 & HumanoidSpeed-v1: Bipedal agents rewarded for forward movement above a minimum speed threshold.
- FetchGoalReach: A robotic arm reaching for multiple equally-rewarded goal locations.
Results and Key Insights
InfoRL successfully discovered diverse strategies without requiring expert demonstrations or manual labeling. A key finding is the emergence of interpretability: latent codes often mapped linearly to physical properties.
In the AntDirection task, varying a continuous latent code from 0 to 1 allowed precise steering of the agent across a full 360-degree range. Similarly, in Walker and Humanoid tasks, the latent code effectively disentangled movement speed, allowing users to transition from a slow crawl to a fast run using the same policy. In categorical tasks like Fetch, the agent learned to reach specific goals with high correlation to the input one-hot vector.
Conclusion and Future Work
InfoRL demonstrates that information maximization can effectively disentangle complex behaviors in RL agents, providing a mechanism for interpretable control. While currently implemented using on-policy PPO, future work could explore off-policy adaptations (e.g., SAC) to improve sample efficiency. Additionally, these learned "styles" could serve as high-level primitives in hierarchical RL systems or provide strategic unpredictability in competitive multi-agent environments.
Summary updated