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:
- 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.
- 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.
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."
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 difficultAnt-v2task, 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