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

Trainable Highly-Expressive Activation Functions

Irit Chelly, Shahaf E. Finder, Shira Ifergane, Oren Freifeld

Introduction

Deep learning models rely heavily on nonlinear activation functions (AFs) to capture complex patterns. While fixed functions like ReLU and GELU are standard, they often represent a "one-size-fits-all" bottleneck. Existing Trainable Activation Functions (TAFs) like PReLU are often too rigid, while more flexible options like Maxout significantly increase parameter counts. This paper introduces DiTAC (Diffeomorphism-based Trainable Activation function), a novel class of AFs that offers high expressiveness with minimal parameter overhead.

Methodology: Diffeomorphic Warping

The core of DiTAC is the use of 1D diffeomorphisms—differentiable, invertible mappings—to "warp" input values. These transformations are based on Continuous Piecewise-Affine Based (CPAB) velocity fields, ensuring they are smooth and monotonically increasing.

Diffeomorphic warping of functions using DiTAC.

DiTAC can be used to enhance existing functions. For instance, a "GELU-like DiTAC" applies a CPAB transformation to inputs within a specific range before passing them through the standard GELU cumulative distribution function. To maintain computational efficiency, the authors implement a lookup table approach. By quantizing the input range into discrete bins (e.g., 256 or 1024) and using a "Straight-Through Estimator" for gradients, DiTAC achieves inference speeds comparable to standard ReLU.

Experimental Results

The researchers evaluated DiTAC across various tasks, from synthetic regression to large-scale image classification and generative modeling.

In 2D function reconstruction, DiTAC demonstrated superior expressiveness compared to traditional TAFs. As shown in the figure below, DiTAC accurately captures the complex contours of the target function, achieving an $R^2$ of 98.37, whereas PReLU ($R^2=96.09$) and ReLU ($R^2=88.86$) struggle with the finer details.

Comparison of 2D function reconstruction between DiTAC and PReLU.

On ImageNet-1K, DiTAC improved Top-1 accuracy for ConvNeXt-T and Swin-T by 0.3% and 0.2%, respectively. In semantic segmentation on the Cityscapes dataset, a ResNet-50 + PSPNet architecture saw its mean Intersection over Union (mIoU) increase from 77.9% (ReLU) to 78.4% (DiTAC).

Perhaps most notably, DiTAC significantly stabilized Generative Adversarial Network (GAN) training. For DCGAN on CelebA, the Fréchet Inception Distance (FID) dropped from 133.5 to 34.6, suggesting that the added flexibility helps the generator and discriminator reach a better equilibrium.

Discussion and Insights

DiTAC provides high expressiveness with minimal overhead; a 10-cell partition adds only 9 parameters per activation instance. This allows the network to learn unique, non-standard shapes tailored to specific layers or datasets. Unlike PReLU, which is limited to a simple "V" shape, DiTAC can learn complex, multi-modal curves.

However, DiTAC introduces new hyperparameters, such as the transformation interval boundaries and the number of partition cells. While a 10-cell partition is generally effective, some tasks may require tuning. Additionally, while the lookup table method mitigates speed issues, full integration into hardware-optimized kernels remains a goal for future work.

Conclusion

DiTAC represents a significant step forward in activation function design, offering a "drop-in" replacement for standard AFs that boosts model performance across diverse domains for a negligible computational cost.

Summary updated

BibTeX
@inproceedings{chelly2024trainable,
  author = {Irit Chelly and Shahaf E. Finder and Shira Ifergane and Oren Freifeld},
  title = {{Trainable Highly-Expressive Activation Functions}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73027-6\_12},
}
Figure