Abstract
Effective activation functions introduce non-linear transformations, providing neural networks with stronger fitting capabilities, which help them better adapt to real data distributions. Huawei Noah's Lab believes that dynamic activation functions are more suitable than static activation functions for enhancing the non-linear capabilities of neural networks. Tsinghua University's related research also suggests using dynamically adjusted activation functions. Building on the ideas of using fine-tuned activation functions from Tsinghua University and Huawei Noah's Lab, we propose a series-based learnable activation function called LSLU (Learnable Series Linear Units). This method simplifies deep learning networks while improving accuracy. This method introduces learnable parameters $\theta$ and $\omega$ to control the activation function, adapting it to the current layer's training stage and improving the model's generalization. The principle is to increase non-linearity in each activation layer, boosting the network's overall non-linearity. We evaluate LSLU's performance on CIFAR10, CIFAR100, and specific task datasets (e.g., Silkworm), validating its effectiveness. The convergence behavior of the learnable parameters $\theta$ and $\omega$, as well as their effects on generalization, are analyzed. Our empirical results show that LSLU enhances the generalization ability of the original model in various tasks while speeding up training. In VanillaNet training, parameter $\theta$ initially decreases, then increases before stabilizing, while $\omega$ shows an opposite trend. Ultimately, LSLU achieves a 3.17% accuracy improvement on CIFAR100 for VanillaNet. Codes are available at https://github.com/vontran2021/Learnable-series-linear-units-LSLU.
Introduction
In deep learning, the activation function serves as the "non-linear engine" that enables networks to learn complex patterns. Most standard architectures rely on static activation functions like ReLU or Sigmoid. While computationally efficient, these functions are often "one-size-fits-all" and do not adapt to specific data distributions or different stages of the training process.
Recent research from institutions like Huawei Noah’s Lab suggests that increasing the non-linearity of individual layers can reduce the necessity for extreme network depth. However, existing dynamic activations can sometimes be unstable or computationally demanding. LSLU aims to bridge this gap by providing a stable, series-based learnable activation.
The LSLU Framework
The core of this approach is the Learnable Series Linear Unit (LSLU). Instead of a fixed mapping, LSLU employs a series expansion to dynamically optimize its shape during training:
$$S(X) = \sum_{n=1}^{N} \theta_n F(X) + \omega_n$$
Where:
- $F(X)$ is a base activation function (e.g., ReLU, SiLU, or GELU).
- $\theta$ (Theta) controls the oscillation amplitude and the overall slope.
- $\omega$ (Omega) controls the oscillation coefficient.
These parameters are initialized (typically $\theta=1, \omega=0$) and updated via standard backpropagation. This "parallel stacking" approach boosts the non-linear capability of a single layer, allowing shallower networks to achieve performance comparable to much deeper standard architectures.
Implementation Strategies
To maintain efficiency and prevent overfitting, the authors employ several strategies:
- Selective Insertion: In deep networks like ResNet, LSLU is primarily used in downsampling layers. In shallower networks like VanillaNet, it can replace all activations.
- Inference Optimization: During the inference stage, learnable parameters are fused with weight matrices and Batch Normalization layers to minimize latency overhead.
Experimental Results
LSLU was evaluated across several benchmarks, including CIFAR-10, CIFAR-100, and a specialized Silkworm dataset (20 classes, 23k images).
- VanillaNet Performance: On CIFAR-100, VanillaNet-6 saw its accuracy jump from 78.12% to 81.29%, a significant 3.17% improvement.
- ResNet-18 Improvements: Using SiLU as the base function, LSLU pushed ResNet-18 accuracy on CIFAR-10 to 96.03%, outperforming the standard ReLU baseline (95.21%).
- Real-world Application: On the Silkworm dataset, LSLU consistently improved Top-1 accuracy across various architectures (MobileNetV3, ShuffleNetV2, EfficientNetV2) with negligible latency increases (approx. +0.2ms).
Analysis and Insights
Tracking the parameters $\theta$ and $\omega$ revealed distinct learning patterns. $\theta$ often drops sharply at the start of training before stabilizing, suggesting the network requires different levels of non-linearity at different phases. Furthermore, class selectivity index analysis shows that LSLU helps filters become more specialized, creating higher and narrower peaks of feature selectivity in shallow layers.
Conclusion
LSLU demonstrates that "smarter," learnable activation functions can compensate for reduced network depth, offering a path toward more efficient and accurate models. While highly effective in image classification, future work will explore the application of LSLUs in Natural Language Processing and Object Detection, as well as refining the placement of these units in extremely deep architectures to avoid overfitting.
Summary updated