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

Stochastic Adaptive Activation Function

Kyungsu Lee, Jaeseung Yang, Haeyun Lee, Jae Youn Hwang

Introduction

Researchers have introduced Adaptive SwisH (ASH), a novel activation function that mimics the variable thresholds of human neurons by adaptively sampling the top percentile of informative features. By assuming a Gaussian distribution of neuron outputs, ASH provides a theoretical foundation for the popular Swish activation function while delivering superior accuracy and faster convergence across classification, detection, and segmentation tasks.

The Limitations of Standard Activation Functions

In deep learning, activation functions like ReLU act as the "gatekeepers" of information. However, compared to biological neurons, most standard functions suffer from two major flaws:

  1. Passivity: They are element-wise, meaning they decide to "fire" based only on a single value, ignoring the broader context of the input feature map.
  2. Invariance: Once a model is trained, the behavior of the activation function is fixed. It does not adapt its threshold based on the specific characteristics of a new input image.

Human neurons, by contrast, exhibit different threshold potentials depending on their location and the signals they receive. This paper bridges that gap by creating an "active," context-aware activation function that can adaptively change its threshold.

Adaptive SwisH (ASH): A Context-Aware Approach

The authors propose ASH (Adaptive SwisH). The core idea is to allow only the most "informative" features—defined as those in the top-$k$ percentile of the input—to pass through, while rectifying (zeroing out) the rest.

Standard ReLU Activation
ASH Activation retaining the top 50% of features
Unlike standard ReLU, which simply zeros out negative values regardless of the overall distribution, ASH evaluates the entire feature map to retain only the top percentile of activations, providing a context-aware threshold.

The technical challenge is that sorting an entire feature map to find the top-$k$ percentile is computationally expensive. To solve this, the authors observed that in deep networks, the outputs of convolutional layers tend to follow a Gaussian (normal) distribution.

By assuming normality, they calculate a threshold ($\theta$) using just the mean ($\mu$) and standard deviation ($\sigma$) of the input: $$\theta = \mu + z_k\sigma$$ where $z_k$ is a trainable Z-score corresponding to the desired percentile. To make this process differentiable for training, they approximated the "hard" thresholding with a smooth version using a sigmoid function, resulting in the formula: $f(x) = x \cdot \text{sigmoid}(ax + b)$.

Key Insights and Theoretical Contributions

  • The "Aha!" Moment for Swish: Perhaps the most significant theoretical contribution is the link to the Swish activation function ($x \cdot \text{sigmoid}(x)$). While Swish was originally discovered via automated search, this paper proves that Swish is actually a generalized form of stochastic adaptive sampling. ASH provides the mathematical "why" behind Swish's empirical success.
  • Trainable Sparsity: Because the $z_k$ parameter is learned, the model can automatically decide how sparse its activations should be for a given task. For example, object detection tasks might benefit from lower thresholds (retaining more information) than simple image classification.

Empirical Validation

The researchers put ASH through a rigorous "decathlon" of computer vision benchmarks, including ImageNet, CIFAR, MS COCO, PASCAL VOC, and ADE20K.

ASH consistently outperformed established functions like ReLU, GELU, and even the original Swish:

  • Superior Accuracy: On ImageNet, ASH achieved a Top-1 accuracy of 78.5%, notably higher than ReLU (76.4%) and Swish (77.5%).
  • Faster Convergence: ASH reaches lower validation loss significantly faster than its competitors, potentially reducing the time and energy required for training.
  • Robustness: The performance gains were consistent across different architectures, including ResNet, WideResNet, and DenseNet, proving it is not overfit to one specific model type.

Limitations and Future Work

The primary limitation acknowledged by the authors is the reliance on the Gaussian distribution assumption. While convolutional outputs often follow this distribution, it may not hold true for all types of neural architectures or unconventional data types. Future work will explore how ASH performs in non-vision domains, such as Natural Language Processing with Transformers, and investigate if the "context" used for the threshold can be expanded beyond simple mean and variance to include more complex spatial relationships.

Summary updated

BibTeX
@inproceedings{lee2022stochastic,
  author = {Kyungsu Lee and Jaeseung Yang and Haeyun Lee and Jae Youn Hwang},
  title = {{Stochastic Adaptive Activation Function}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=wtuYr8_KhyM},
}
Figure