Regularized Parameter Uncertainty for Improving Generalization in Reinforcement Learning

Pehuen Moure, Longbiao Cheng, Joachim Ott, Zuowen Wang, Shih-Chii LiuCVPR 2024

Introduction

Reinforcement Learning (RL) agents frequently struggle with overfitting, excelling in specific training simulations but failing when faced with minor environmental variations or real-world hardware. This lack of generalization often stems from agents learning the specific "noise" of a simulator rather than the fundamental underlying physics. While techniques like noise injection and weight decay offer some relief, they often lead to training instability or oversimplified models.

This paper introduces SNR PUN (Signal-to-Noise Ratio regulated Parameter Uncertainty Network), a framework that treats neural network weights as probability distributions. By strictly limiting the signal-to-noise ratio of these distributions, SNR PUN prevents agents from memorizing training quirks, enabling them to generalize to unseen, mutated environments and physical hardware.

Methodology: The SNR PUN Framework

The core of SNR PUN lies in treating each network weight as a Gaussian distribution defined by a mean ($\mu$) and a standard deviation ($\sigma$). Unlike traditional methods that use fixed weights, SNR PUN introduces several key innovations to stabilize and regularize these distributions.

SNR Regularization

The authors define the Signal-to-Noise Ratio (SNR) of a parameter as $|\mu| / \sigma$. A new loss term penalizes parameters where the SNR exceeds a maximum threshold ($\Omega_{Max SNR}$). This constraint forces the network to maintain a minimum level of uncertainty (noise) relative to the signal (the mean weight), preventing "posterior collapse" where uncertainty vanishes.

Comparison of SNR regularization and KL divergence in the parameter space.

As shown in the figure above, the SNR constraint (green region) provides a more flexible regularization boundary compared to traditional KL divergence against a fixed prior. This allows the model to explore a wider range of stable parameter configurations while maintaining necessary stochasticity.

Continuous Resampling and Architecture

To ensure the policy remains inherently stochastic, SNR PUN resamples weights at every timestep rather than once per episode. This high-frequency jittering eliminates the need for traditional entropy bonuses. To maintain learning stability, the SNR PUN architecture is applied to the Actor, while a standard deterministic network is used for the Critic.

Experimental Setup

The framework was evaluated on four classic control benchmarks: CartPoleSwingUp, Acrobot-v1, Quadruped, and Walker. To test out-of-distribution generalization, the researchers "mutated" environmental parameters such as pole length, pendulum mass, friction, and torque. Additionally, a physical Cartpole system was used to evaluate sim-to-real transfer capabilities.

Results and Discussion

SNR PUN demonstrated superior generalization across nearly all mutated environments compared to standard MLPs, Dropout, and Variational Information Bottleneck (VIB) methods. In the Acrobot task, for instance, SNR PUN achieved a score of ~423, significantly outperforming the standard MLP's score of ~160.

Robustness to Environmental Mutations

The effectiveness of SNR regularization is most evident when visualizing performance across a range of environmental parameters.

Performance heatmaps comparing standard PUN (top) and SNR PUN (bottom) across various environmental mutations.

As illustrated in the heatmaps, SNR PUN maintains a much larger "red zone" of high performance compared to the standard PUN. While standard models fail as environmental parameters drift from training values, SNR PUN's constrained uncertainty allows it to remain robust across a wider operational envelope.

Sim-to-Real Transfer

In physical hardware tests, SNR PUN was the only model capable of successfully transferring its learned policy from simulation to the real-world Cartpole system. Other models that performed well in idealized simulations failed to account for the unpredictable variations inherent in physical hardware.

Conclusion

SNR PUN offers a robust "middle ground" for RL regularization. By constraining the signal-to-noise ratio of parameter distributions, it creates a flatter loss landscape that favors generalization over memorization. While the SNR threshold requires tuning based on task complexity, the method's success in sim-to-real transfer and mutated environments suggests it is a powerful tool for developing reliable RL agents for real-world applications. Future work will explore its application to high-dimensional visual inputs and multi-agent systems.

Summary updated

BibTeX
@inproceedings{moure2024regularized,
  author = {Pehuen Moure and Longbiao Cheng and Joachim Ott and Zuowen Wang and Shih-Chii Liu},
  title = {{Regularized Parameter Uncertainty for Improving Generalization in Reinforcement Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
  doi = {10.1109/cvpr52733.2024.02247},
}
Figure