Abstract
Activation functions are critical components of deep neural networks, enabling the learning of complex non-linear patterns. While the Rectified Linear Unit (ReLU) has long been the standard, it suffers from issues such as the "dying ReLU" problem. This paper introduces Sqish, a novel non-monotonic, smooth activation function derived from a differentiable approximation of the maximum function. Sqish demonstrates superior performance across a variety of tasks, including 2D image classification, object detection, and 3D medical imaging, while significantly improving adversarial robustness.
Introduction
In deep learning, activation functions serve as gatekeepers of information. For years, ReLU has been favored for its simplicity and computational efficiency. However, its zero gradient for negative inputs can lead to "dead" neurons, halting the learning process. While alternatives like Swish and Mish have been proposed, there remains a need for functions that better balance mathematical smoothness, trainability, and generalization across diverse domains like 3D medical segmentation and adversarial defense.
The Sqish Activation Function
The authors propose Sqish, which is mathematically derived from a smooth approximation of the max(x1, x2) function. By replacing the non-differentiable "kink" of standard max functions with a smooth curve, Sqish achieves continuity and differentiability across its entire domain.
The function is defined as: $$f(ax, x; \beta, \gamma) = ax + \frac{(1 - a)x}{\sqrt{1 + \beta e^{-2\gamma(1-a)x}}}$$
Key characteristics include:
- Trainable Parameters: Hyperparameters ($a, \beta, \gamma$) can be fixed or learned during training, allowing the function to adapt to specific data distributions.
- Non-monotonicity: Similar to Swish, Sqish allows for a small negative "dip" for negative inputs, preserving information that ReLU would discard.
- Smoothness: The continuous nature of the function helps stabilize gradients during backpropagation.
Experimental Evaluation
Sqish was evaluated against standard baselines (ReLU, Leaky ReLU, PReLU, ELU, Swish, Mish, GELU, and PAU) across several benchmarks:
- 2D Classification: MNIST, Fashion MNIST, SVHN, CIFAR10/100, and Tiny ImageNet.
- Object Detection: Pascal VOC using the SSD 300 model.
- 3D Medical Imaging: MosMed (COVID-19 CT scans) and BraTS 2020 (Brain tumor MRI segmentation).
- Adversarial Robustness: Tested using the Fast Gradient Sign Method (FGSM).
Results and Discussion
Sqish consistently outperformed modern baselines across nearly all evaluated tasks.
Performance Metrics
In 2D classification, Sqish achieved the highest accuracies on MNIST, Fashion MNIST, and SVHN. On CIFAR100 using ShuffleNet V2, it provided a 5.87% improvement over ReLU. In object detection on Pascal VOC, Sqish reached 78.1 mAP, surpassing all eight baseline functions.
Adversarial Robustness and 3D Tasks
A significant finding was Sqish's resilience to adversarial attacks. On CIFAR100 under FGSM attack, Sqish provided an 8.21% accuracy boost over ReLU. The smooth loss landscape created by Sqish appears to make it harder for gradient-based attacks to succeed. Furthermore, in 3D medical segmentation (BraTS 2020), Sqish achieved a record Dice Score of 97.68, indicating strong generalization to volumetric data.
Conclusion
Sqish represents a powerful alternative to ReLU, offering the "best of both worlds" by approximating ReLU-like behavior while maintaining smoothness and non-monotonicity. While it introduces a slight computational overhead (~5.5µs vs ~3.8µs for ReLU) and additional hyperparameters, its performance gains in accuracy and robustness make it a compelling choice for modern deep learning architectures. Future work will explore its efficacy in Transformer-based models where GELU is currently the standard.
Summary updated