NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Smoothing Policies and Safe Policy Gradients

Matteo Papini, Matteo Pirotta, Marcello Restelli

Introduction

Reinforcement learning (RL) has demonstrated remarkable success in simulated environments, yet its deployment on physical systems—such as autonomous vehicles or industrial robotics—remains constrained by safety concerns. A primary hurdle is the volatility of the learning process: standard RL agents often experience significant performance degradation during training. In a real-world setting, such oscillations are not merely statistical noise; they represent potential hardware damage or catastrophic failure.

This paper addresses the challenge of safe exploration by focusing on Monotonic Improvement (MI). The authors propose a framework where every policy update is mathematically guaranteed, with high probability, to maintain or improve the agent's performance. By ensuring the agent never regresses into unsafe behavior, the proposed Safe Policy Gradient (SPG) algorithm bridges the gap between theoretical RL and practical, real-world deployment.

Methodology

The authors approach actor-only Policy Gradient methods through the lens of stochastic optimization. Their methodology rests on three pillars: smoothing policies, adaptive batching, and relaxed safety constraints.

Smoothing Policies

The researchers identify a family of parametric policies—including standard Gaussian and Softmax policies—that render the expected reward objective "Lipschitz-smooth." By establishing bounds on the score function and its derivatives, they can mathematically quantify the maximum possible change in performance resulting from a policy update. This theoretical foundation allows RL to leverage classical smooth optimization theory to derive explicit safety constants.

Adaptive Batch Size

A common strategy in safe RL is to reduce the learning rate (step size) when uncertainty is high. However, if the data batch is too small, the "safe" step size can shrink to zero, effectively stalling the learning process. SPG takes a different approach: it maintains a constant step size but adapts the batch size. If a gradient estimate is small relative to its variance, the algorithm enters an inner loop to collect more trajectories. This ensures the gradient estimate is sufficiently precise to guarantee a safe, monotonic step forward.

Safe Policy Gradient (SPG) Algorithm

The SPG algorithm operationalizes these insights by incrementally collecting data until a statistical stopping condition is met. This ensures that the update direction is reliable. Recognizing that strict MI can be overly conservative and slow, the authors also introduce the "milestone constraint." Under this regime, the policy is not required to improve at every single step but is strictly forbidden from dropping significantly below the best performance achieved during the training history.

Experimental Evaluation

The authors evaluated SPG on two standard continuous-control benchmarks:

  1. 1D Linear-Quadratic Regulator (LQR): A classic control task using a Gaussian policy.
  2. Cart-Pole (OpenAI Gym): A benchmark involving continuous states and discrete actions, utilizing a Softmax policy.

Key Results

  • Guaranteed Safety: In both environments, SPG successfully adhered to the safety boundaries. The agent never dropped below the mathematically guaranteed performance thresholds, even during early exploration phases.
  • Efficiency Gains: On the LQR task, SPG converged significantly faster than previous safe policy gradient methods like AdaBatch. Because SPG utilizes tighter theoretical bounds that are independent of the action space volume, it could safely employ a step size over 100 times larger than its predecessors.
  • Balancing Safety and Speed: In the Cart-Pole environment, strict MI proved to be data-intensive. However, the milestone constraint (allowing a maximum 10% drop from the historical peak) enabled the agent to learn efficiently while still providing a rigorous safety floor that prevented catastrophic performance loss.

Discussion and Insights

The core insight of this work is that safety is a tunable parameter. By treating safety as a "dial" rather than a binary switch, practitioners can balance the need for rapid convergence with the necessity of risk mitigation. Furthermore, the shift from adapting step sizes to adapting batch sizes represents a significant conceptual change; it suggests that the "cost" of safety should be paid in data volume rather than in the progress of the optimization itself.

Limitations and Future Work

Despite its theoretical strengths, SPG remains somewhat conservative. The reliance on worst-case, problem-dependent constants can make the algorithm data-hungry in complex environments. Additionally, Gaussian policies present a unique challenge: their score functions are unbounded, which prevents the use of tighter empirical Bernstein bounds and necessitates larger batches to ensure safety.

Future research directions include:

  • Developing tighter concentration inequalities specifically for Gaussian policies.
  • Integrating SPG with variance-reduction techniques to decrease data requirements.
  • Extending these safety guarantees to actor-critic architectures, which typically exhibit lower variance.
  • Adapting the smoothing policy framework to deep reinforcement learning, where policies are parameterized by high-dimensional neural networks.

Summary updated

BibTeX
@article{papini2022smoothing,
  author = {Matteo Papini and Matteo Pirotta and Marcello Restelli},
  title = {{Smoothing Policies and Safe Policy Gradients}},
  journal = {Machine Learning},
  year = {2022},
  doi = {10.1007/s10994-022-06232-6},
}
Figure