ANS: Adaptive Network Scaling for Deep Rectifier Reinforcement Learning Models

Yueh-Hua Wu, Fan-Yun Sun, Yen-Yu Chang, Shou-De LinarXiv 2018

Introduction

In Deep Reinforcement Learning (DRL), reward scaling is often treated as a "dark art." Practitioners know that multiplying rewards by a constant can be the difference between a model that masters a task and one that fails to learn entirely. However, the underlying mechanism for this sensitivity has remained largely unexplored. This paper introduces Adaptive Network Scaling (ANS), revealing a critical link between reward scales and the "dying ReLU" problem, and provides an automated framework for optimizing these scales.

The Problem: The ReLU Mystery and Manual Tuning

Deep RL is notoriously sensitive to hyperparameters. While researchers previously assumed reward scaling primarily acted as a proxy for the learning rate, this paper identifies two deeper issues:

  1. The Dying ReLU Problem: ReLU activations, while standard, are prone to permanent deactivation (outputting zero) if updates push biases too far into the negative range.
  2. Inefficient Optimization: Finding the optimal reward scale typically requires exhaustive grid searches. Existing normalization techniques like Pop-Art focus on target normalization but do not explicitly optimize for learning health.

To quantify network health, the authors introduce the Pseudo-Dying ReLU Ratio (PDRR), which tracks the percentage of neurons outputting zero for a given data batch. As shown in the Hopper-v2 experiments, there is a clear inverse correlation between PDRR and the agent's cumulative reward.

Hopper-v2: Correlation between PDRR (a) and Cumulative Reward (b). Small scales lead to higher PDRR and lower returns.

Methods: Adaptive Network Scaling (ANS)

The ANS framework addresses these challenges through a two-pronged approach:

  • Adaptive Search Strategy: ANS treats the reward scale as a searchable parameter, assuming a concave relationship between scale and performance. It monitors the agent's return using an exponential moving average and adjusts the scale ($c_{inc}$ or $c_{dec}$) based on performance trends.
  • Instant Network Rescaling: Leveraging the mathematical property of ReLUs ($c \cdot \text{ReLU}(x) = \text{ReLU}(cx)$), ANS redistributes new scale factors across the network's weights and biases. This allows the model to adapt to a new reward scale instantly without retraining from scratch, preserving learned features while adjusting the output range.

Key Insights: Small Scales Kill ReLUs

A core finding is that small reward scales are counter-intuitively detrimental. Small targets tend to update biases negatively, pushing neurons into the "dead" zone. Larger scales (up to a point) clarify the reward signal by enlarging the difference between positive and negative returns, preventing optimization "zig-zagging."

Walker2d-v2: (a) PDRR over time, (b) Return over time, and (c) The inverse relationship between reward scale and PDRR.

Experimental Results

Evaluated on MuJoCo benchmarks, ANS consistently outperformed standard baselines and state-of-the-art normalization methods like Pop-Art.

  • Performance: In Walker2d-v2, standard ReLU models achieved a return of ~45, while ANS reached 1760.07. In the difficult Ant-v2 task, ANS enabled returns of 1000.57 where standard models often failed to learn.
  • Efficiency: ANS typically identifies near-optimal scales in fewer than six search steps, significantly reducing the computational overhead of manual tuning.

Conclusion

ANS provides a robust, automated solution to the reward scaling problem by directly addressing the health of ReLU-based networks. While the current search strategy assumes a concave landscape, future work may explore more complex reward surfaces and the impact of scaling on saturating activations like tanh.

Summary updated

BibTeX
@misc{wu2018ans,
  author = {Yueh-Hua Wu and Fan-Yun Sun and Yen-Yu Chang and Shou-De Lin},
  title = {{ANS: Adaptive Network Scaling for Deep Rectifier Reinforcement Learning Models}},
  year = {2018},
  eprint = {1809.02112},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1809.02112},
}
Figure