Noisy Activation Functions

Çaglar Gülçehre, Marcin Moczulski, Misha Denil, Yoshua Bengio

Deep learning relies fundamentally on gradients to update model weights. However, popular nonlinear activation functions like sigmoid and tanh suffer from a critical flaw known as "saturation." When the input to these functions is very large or very small, the output flattens out, causing the gradient (the slope) to drop to near zero.

This paper, published at ICML 2016 by researchers at the University of Montreal and Oxford, introduces a clever way to fix this vanishing gradient problem: Noisy Activation Functions. By injecting stochastic noise into the flat regions of these functions, the authors "shake" the activations, allowing gradients to flow and helping models escape local minima. This approach proved especially effective in achieving state-of-the-art results in gated architectures like LSTMs.

The Problem with Gated Architectures

While the Rectified Linear Unit (ReLU) solved the vanishing gradient problem for many standard feed-forward networks, it doesn't always play nicely with the specific gating logic required for complex memory tasks. Architectures like LSTMs or Neural Turing Machines (NTMs) use sigmoid and tanh functions to act as digital-like switches (on/off).

If a gate gets stuck in a saturated state (fully open or fully closed), the gradient vanishes, and the model stops learning. The network becomes trapped, unable to adjust its weights to correct the gate's behavior.

Introducing Noisy Activation Functions

The authors propose a two-step approach to create a "Noisy" activation that maintains the necessary gating behavior while preserving gradient flow:

  1. Hard-Saturating Versions: First, they replace the smooth curves of standard activations with "hard" versions. Instead of a curve that asymptotically approaches 0 or 1, they use a linear approximation around zero and clip it strictly at the boundaries (e.g., hard-tanh is perfectly linear between -1 and 1, and exactly flat elsewhere).
  2. Noise Injection: The core innovation is adding noise ($\xi$) specifically when the unit enters the saturated (flat) regime.
Simulated Tanh with Half-Normal Noise

The amount of noise added is proportional to the saturation magnitude—the further the input is pushed into the "flat zone," the more noise is applied. A learned parameter ($p$) controls the noise scale, allowing the model to dynamically decide how much "exploration" it needs.

Crucially, the authors often employ Half-Normal noise. Rather than just jittering the output randomly, Half-Normal noise specifically "pushes" the activation back toward the active, linear regime. At test time, this noise is replaced by its mathematical expectation, resulting in a clean, deterministic model that benefited from a more thorough, stochastic search during training.

Why Noise Works: Key Insights

  • Noise as a Gradient Bridge: By adding noise to flat regions, the derivative of the activation becomes non-zero almost everywhere. This creates a "stochastic path" for gradients to travel back through the network, even when the "deterministic path" is blocked by saturation.
  • Simulated Annealing Connection: The authors found that gradually reducing (annealing) the noise level during training helps the model converge more reliably. High noise early on allows for broad exploration of the weight space, while low noise later allows for fine-tuning.
  • Better Gating: The "hard" decisions enabled by these functions allow gates to be truly open or truly closed. Usually, this would kill training, but the noise makes these hard decisions "trainable."

Experimental Results and Performance Gains

The authors evaluated their method across a diverse range of challenging tasks, including synthetic program execution, language modeling, machine translation, and associative recall. The "Noisy" variants consistently outperformed their standard counterparts.

Training Perplexity Comparison

Highlights from their experiments include:

  • Language Modeling: On the Penn Treebank (PTB) dataset, Noisy LSTMs achieved a test perplexity of 108.0, a significant improvement over the standard LSTM's 115.6.
  • Machine Translation: Replacing standard activations with Noisy ones in an English-to-French translation model yielded a 2 BLEU point increase, representing a substantial jump in translation quality.
  • Neural Turing Machines: In associative recall tasks, NTMs with noisy controllers converged much faster and successfully solved tasks that standard NTMs failed to learn entirely.
  • Program Execution: The model saw a 2.5% accuracy boost on the synthetic "Learning to Execute" task simply by swapping the activation function.

Limitations and Future Work

While highly effective, the method introduces new hyperparameters (like the noise scale $c$ and the bias $\alpha$) that require careful tuning to achieve optimal results. Furthermore, implementing noisy activations is slightly more complex than using standard, deterministic ReLUs or sigmoids.

The paper focuses heavily on gated recurrent architectures where saturation is a primary bottleneck. The benefit for standard deep convolutional networks—where ReLU is already highly effective—remains less explored. Future work could investigate different types of noise distributions or more sophisticated ways to learn the noise parameters dynamically during training.

Summary updated

BibTeX
@inproceedings{gulcehre2016noisy,
  author = {Çaglar Gülçehre and Marcin Moczulski and Misha Denil and Yoshua Bengio},
  title = {{Noisy Activation Functions}},
  booktitle = {International Conference on Machine Learning},
  year = {2016},
  url = {https://openreview.net/forum?id=HkZV1oW_ZB},
}
Figure