Abstract
Reinforcement Learning (RL) agents in real-world scenarios often face dynamic action constraints. While truncated distributions offer an elegant theoretical framework for constrained policies, calculating their normalizing constants and ensuring differentiability remains computationally challenging. This paper introduces efficient numerical approximations for log-probability and entropy using interval-based bounds, alongside a hybrid, differentiable sampling strategy. Evaluated on robotic benchmarks including Seeker-2D/3D and Quadrotor tasks, the proposed methods significantly improve learning stability and performance compared to standard projection or non-truncated metric baselines.
Introduction
In many real-world RL applications, such as robotics, agents must operate within feasible sets defined by safety limits, motor torque constraints, or obstacle avoidance. These constraints are often dynamic, changing with the agent's state. Existing methods typically handle these constraints via projection or by defining policies over truncated distributions.
Projection methods often suffer from "zero gradients," where multiple distinct policy intents map to the same physical action, hindering learning. Truncated distributions avoid this but introduce mathematical intractability; calculating the exact normalizing constant (the area under the curve) for complex constraint shapes in high dimensions is difficult. Historically, practitioners have used the metrics of the original, non-truncated distribution as a shortcut, but this often leads to unstable behavior and poor exploration near the boundaries.
Methodology
The authors propose three technical contributions to make truncated distributions practical for modern RL algorithms like Soft Actor-Critic (SAC):
1. Metric Approximations
To estimate the log-probability and entropy, the authors utilize inner and outer interval approximations. By identifying the largest inscribed box and the smallest bounding box for a constraint, they interpolate a highly accurate estimate of the normalizing constant. This provides a stable training signal, particularly in high dimensions where volume concentrates near boundaries.
2. Hybrid Sampling Strategy
Action selection is performed using a hybrid approach. It begins with Rejection Sampling, which is efficient for large feasible sets. If rejection sampling fails after a fixed number of attempts (indicating a small or complex feasible region), the system switches to a Geometric Random Walk (specifically Random Direction Hit-and-Run). This ensures a valid action is always found without the "infinite loop" risk of pure rejection sampling.
3. Differentiable Sampling
To enable the reparameterization trick required by off-policy algorithms, the authors derived a method to pass gradients through the geometric random walk process. This makes the entire constrained sampling pipeline end-to-end differentiable, allowing the agent to learn how its parameters influence the selection of high-reward, valid actions.
Experimental Results
The approach was validated across synthetic numerical data and three robotic benchmarks: Seeker-2D, Seeker-3D, and a Quadrotor stabilization task.
Approximation Accuracy and Sampling Efficiency
Synthetic tests showed that the combined interval approximation achieved the lowest median error across dimensions 2 through 6. Furthermore, the hybrid sampler maintained low median sampling times while eliminating the extreme outliers associated with pure rejection sampling.
RL Performance
The impact on RL performance was most pronounced in the Seeker-3D environment. Policies using original (non-truncated) metrics ("Og" baselines) failed to learn entirely, as their gradients did not account for the truncation boundaries. In contrast, the proposed "App-Poly-Out" and "App-Poly-Comb" methods achieved high returns, demonstrating that accurate metric estimation is critical for constrained RL.
Conclusion
This work addresses the computational hurdles of using truncated distributions in action-constrained RL. By providing efficient metric approximations and a differentiable hybrid sampling strategy, the authors enable agents to learn effectively within complex, dynamic constraints. Future work may explore applying these techniques to physics-informed RL and curriculum learning scenarios.
Summary updated