[Paper Review] SERF: Towards better training of deep neural networks using log-Softplus ERror activation Function
This paper proposes Serf, a novel non-monotonic, self-regularized activation function derived from the Swish family, designed to mitigate the dying ReLU problem and improve optimization. Serf outperforms ReLU, Swish, and Mish across diverse deep learning tasks, including image classification, object detection, machine translation, and multimodal entailment, with consistent gains on deeper architectures.
Activation functions play a pivotal role in determining the training dynamics and neural network performance. The widely adopted activation function ReLU despite being simple and effective has few disadvantages including the Dying ReLU problem. In order to tackle such problems, we propose a novel activation function called Serf which is self-regularized and nonmonotonic in nature. Like Mish, Serf also belongs to the Swish family of functions. Based on several experiments on computer vision (image classification and object detection) and natural language processing (machine translation, sentiment classification and multimodal entailment) tasks with different state-of-the-art architectures, it is observed that Serf vastly outperforms ReLU (baseline) and other activation functions including both Swish and Mish, with a markedly bigger margin on deeper architectures. Ablation studies further demonstrate that Serf based architectures perform better than those of Swish and Mish in varying scenarios, validating the effectiveness and compatibility of Serf with varying depth, complexity, optimizers, learning rates, batch sizes, initializers and dropout rates. Finally, we investigate the mathematical relation between Swish and Serf, thereby showing the impact of preconditioner function ingrained in the first derivative of Serf which provides a regularization effect making gradients smoother and optimization faster.
Motivation & Objective
- Address the dying ReLU problem caused by zero-gradient saturation in negative activation regions.
- Improve optimization stability and gradient flow in deep networks through a smooth, preconditioned activation function.
- Develop a self-regularized activation function inspired by the self-gating mechanism of Swish and Mish.
- Demonstrate superior performance across diverse architectures and tasks, especially in deeper models.
- Investigate the mathematical role of the preconditioner in the derivative of Serf as a source of regularization.
Proposed method
- Propose Serf as $ f(x) = x \cdot \operatorname{erf}(\ln(1 + e^x)) $, combining self-gating with error function-based nonlinearity.
- Leverage the first derivative of Serf to embed a preconditioner function that smoothens gradients and enhances optimization.
- Integrate Serf into state-of-the-art models including ResNet, EfficientNet, YOLOv4, Transformer encoders, and BERT-based architectures.
- Use ablation studies on MNIST and CIFAR-10 to evaluate performance under varying hyperparameters (learning rate, batch size, dropout, weight initialization).
- Compare Serf against ReLU, GELU, Swish, and Mish across multiple benchmarks using standard metrics (accuracy, BLEU, F1-score).
- Analyze the mathematical relationship between Swish and Serf to highlight the regularization effect of the preconditioner in Serf’s derivative.

Experimental results
Research questions
- RQ1Does Serf mitigate the dying ReLU problem more effectively than ReLU, Swish, and Mish in deep networks?
- RQ2How does the preconditioner in Serf’s derivative contribute to smoother gradients and faster optimization?
- RQ3To what extent does Serf improve performance across diverse architectures and tasks, especially in deeper models?
- RQ4How does Serf perform under varying training hyperparameters such as learning rate, batch size, and dropout rate?
- RQ5Can Serf generalize across vision and NLP tasks, including image classification, object detection, machine translation, and multimodal entailment?
Key findings
- Serf achieves a BLEU score of 36.06 on the Multi30k German-English translation task, outperforming ReLU (35.55), GELU (35.62), and Mish (35.36).
- On the IMDb movie review sentiment dataset, Serf achieves 89.03% top-1 accuracy with a 4-layer Transformer, surpassing ReLU (88.82%) and Mish (88.99%).
- For the PolEmo 2.0 sentiment dataset, Serf achieves an F1-score of 0.8342, slightly better than Mish’s 0.8346, with comparable precision and recall.
- In the multimodal entailment task, Serf achieves a mean accuracy of 85.42%, marginally exceeding GELU’s 85.28% over five runs.
- Ablation studies on CIFAR-10 and MNIST confirm Serf’s robustness across varying learning rates, batch sizes, dropout rates, and weight initialization schemes.
- Serf consistently outperforms Swish and Mish across all evaluated tasks and architectures, with larger performance margins observed in deeper models.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.