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

Normalized Activation Function: Toward Better Convergence

Peiwen Yuan, Changsheng ZhuarXiv 2022 · DOI

Introduction

Training deep neural networks is a delicate balancing act. To prevent gradients from vanishing or exploding at the start of training, researchers typically employ sophisticated initialization strategies like Xavier or He initialization. However, these methods primarily address the network's state at iteration zero. As weights evolve during training, the activation functions themselves can gradually degrade these initial conditions, leading to slower convergence and sub-optimal performance.

The Problem: Post-Initialization Sabotage

While weight initialization solves the immediate problem of gradient stability, it does not account for the dynamic changes in data distribution during training. Activation functions such as ReLU or Swish can shift the data distribution away from zero-mean or significantly alter the variance. This phenomenon, closely related to Internal Covariate Shift (ICS), invalidates the mathematical assumptions underlying static initializers. When an activation function shrinks the variance of the signal in the forward pass or the gradient in the backward pass, the network becomes increasingly difficult to optimize.

Methodology: Adaptive Normalization (ANAct)

To address these issues, the paper introduces ANAct (Adaptive Normalization for Activation functions), a plug-and-play method designed to maintain consistent gradient variance across layers throughout the training process. Instead of using a raw activation $\delta(x)$, ANAct wraps it in a dynamic normalization layer:

$$\hat{\delta}(x) = (\lambda + f(\alpha))(\delta(x) - \mu)$$

The mechanism consists of several key components:

  1. Centering ($\mu$): Subtracts the expected value of the activation to ensure the output remains zero-centered.
  2. Scaling ($\lambda$): A derived normalization factor that balances the preservation of signal variance in forward propagation and gradient variance in backward propagation.
  3. Learnable Flexibility ($\alpha$): A small learnable parameter that allows the network to fine-tune the scaling factor for specific tasks.
  4. Dynamic Updates: ANAct tracks moving averages of mini-batch statistics ($\rho$ and $\rho'$) to update $\lambda$ and $\mu$ continuously, ensuring normalization holds as weights evolve.
Comparison between Vanilla and Normalized Activation Functions.

Key Insights

The authors define a "Score" based on how much the forward variance ratio ($\rho$) and backward gradient ratio ($\rho'$) deviate from the ideal value of 1. Their findings indicate a strong inverse correlation: models with scores closer to 1 converge significantly faster.

Furthermore, prevalent activation functions like ReLU and LeakyReLU exhibit a fixed "R-score" (a measure of normalization quality) that remains consistently below zero. ANAct effectively "lifts" these scores toward the ideal zero-line. Interestingly, the use of ANAct allows for the removal of the affine transformation (learnable scale and shift) in preceding Batch Normalization (BN) layers, reducing parameter count while improving performance.

Experimental Results

The effectiveness of ANAct was validated across various architectures (ResNet50, VGG19, Transformer) and datasets (CIFAR-100, Tiny ImageNet, IWSLT 2015).

  • ResNet50 on Tiny ImageNet: Normalized Swish (NSwish) achieved a 1.4% higher top-1 accuracy compared to vanilla Swish.
  • ResNet50 on CIFAR-100: NSwish outperformed vanilla Swish by 1.2%.
  • VGG19 on CIFAR-100: NReLU improved top-1 accuracy by approximately 0.5% over standard ReLU.
Validation accuracy comparison across different activation functions on CIFAR-100.

Conclusion

ANAct provides a robust framework for maintaining the health of gradients during deep network training. By dynamically normalizing activation functions, it ensures that the network remains in a "well-behaved" regime, leading to faster convergence and higher final accuracy. While it introduces some computational overhead and requires careful application in residual blocks, the consistent performance gains across diverse tasks make it a compelling tool for modern deep learning.

Summary updated

BibTeX
@misc{yuan2022normalized,
  author = {Peiwen Yuan and Changsheng Zhu},
  title = {{Normalized Activation Function: Toward Better Convergence}},
  year = {2022},
  eprint = {2208.13315},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.13315},
}
Figure