Introduction
Reinforcement Learning (RL) typically faces a fundamental trade-off between model-free and model-based methodologies. Model-free methods, such as A3C, are versatile but often suffer from high variance and poor sample efficiency, treating the environment as a black box. Conversely, model-based methods leverage learned dynamics to backpropagate rewards, significantly improving efficiency. However, these methods traditionally rely on pathwise derivatives (the reparameterization trick), which require continuous, differentiable action spaces. This limitation prevents their application to discrete action environments where agents must choose between distinct categories (e.g., Left, Right, Jump).
This paper introduces the Relaxed Policy Gradient (RPG), a hybrid algorithm designed to bring model-based sample efficiency to discrete action spaces by combining pathwise and score function estimators.
Methodology: The Relaxed Policy Gradient
The RPG framework is built upon three core pillars designed to enable gradient flow through discrete choices:
- Policy Relaxation: Deterministic policies are relaxed into a stochastic class using a softmax-like parameterization. An annealing parameter ($\lambda$) is employed to transition the policy from a "fuzzy" stochastic state to a deterministic one as training progresses.
- Dynamics Approximation: To circumvent the non-differentiability of discrete actions, the authors approximate the next state as the expected next state under the current policy distribution: $x_{t+1} = \mathbb{E}_{a \sim \pi}[f(x_t, a)]$. This "expectation trick" ensures the gradient can flow back through time even with discrete actions.
- Hybrid Gradient Estimator: The algorithm derives a novel estimator that integrates pathwise derivatives for state-to-state transitions (leveraging a learned model) with score function estimators (the "log-trick") for discrete action selection.
- Reward Smoothing: Discrete or sparse rewards are handled via sigmoid-based surrogate functions, ensuring the reward signal remains differentiable.
To make this practical, the authors use a Gaussian Mixture Model (GMM) to locally approximate environment dynamics from sampled trajectories, allowing the agent to learn the "physics" of the task online.
Experimental Evaluation
The RPG algorithm was evaluated on four classic control tasks from the OpenAI Gym framework: Cart Pole, Acrobot, Mountain Car, and Hand Mass. Performance was benchmarked against Actor-Critic (A3C) and the Cross-Entropy Method (CEM).
Key Results
RPG demonstrated superior sample efficiency and performance across all evaluated environments, often outperforming A3C by factors of 1.7x to 25x in terms of sample requirements.
Sample Efficiency and Performance
As shown in the comparative analysis, RPG significantly reduced the number of samples required to solve tasks. In Cart Pole, RPG reached the solution threshold in 91 samples, compared to 279 for A3C. Similarly, in Acrobot, RPG required 311 samples versus 541 for A3C.
In more complex tasks like Mountain Car and Hand Mass, RPG achieved higher average rewards within the same sample budget compared to A3C. Furthermore, RPG exhibited greater stability; while A3C required task-specific hyperparameter tuning, RPG maintained consistent performance across all tasks using a single learning rate.
Discussion and Future Work
The success of RPG stems from its ability to understand how an action changes the state to eventually reach a reward, rather than just assigning credit based on the final outcome. This model-guided gradient leads to smoother training curves and avoids the "total failure" modes common in undirected model-free exploration.
Limitations
Despite its efficiency, RPG introduces approximately 18% computational overhead due to the dynamics model fitting (GMM). Additionally, the current reward smoothing technique may struggle with high-dimensional inputs like raw pixels (e.g., Atari games). Future research could explore integrating "imaginary rollouts" to further enhance efficiency and extending reward smoothing to more complex state representations.
Summary updated