Introduction
In conventional deep learning architectures, activation functions (AFs) such as Tanh, Sigmoid, or ReLU are typically treated as fixed hyperparameters. This "one-size-fits-all" approach assumes that a single, predetermined nonlinearity is optimal for every neuron across all layers. However, this paper proposes a more flexible alternative: allowing neural networks to learn their own activation functions on a per-neuron basis using cubic splines.
Methodology: Spline Activation Functions (SAFs)
The authors introduce Spline Activation Functions (SAFs), where the AF is defined by a set of control points (knots) rather than a fixed formula.
Cubic Splines and Locality
The implementation utilizes Catmull-Rom cubic splines. A critical advantage of this choice is locality: adjusting a single control point only affects the function's shape in its immediate neighborhood. This allows the network to fine-tune the AF for specific input ranges without disrupting the global mapping, a significant improvement over parametric functions like polynomials where parameter changes have global effects.
The Damping Criterion
To prevent the flexible splines from overfitting or becoming overly oscillatory, the authors introduce a novel "damping" regularization term. Instead of standard weight decay that pushes values toward zero, this regularizer penalizes the deviation of the control points from an initial baseline shape (e.g., a standard Tanh). This ensures the learned functions remain smooth and grounded while retaining the capacity to adapt to the training data.
Experimental Setup
The SAF approach was evaluated on two regression benchmarks:
- Chemical Dataset: A small dataset (498 examples) from MATLAB’s function fitting testbeds.
- California Housing Dataset: A larger dataset (20,640 examples) used to predict housing prices based on numerical features.
Results and Discussion
Robustness to Suboptimal Hyperparameters
One of the most significant findings is the robustness of SAFs to poor architectural choices. In a scenario with extremely high weight decay, which typically causes severe underfitting, standard networks failed completely (RMSE ~1.0). In contrast, the SAF network adapted its activation shapes to compensate, significantly reducing error.
Learned AF Characteristics
The learned functions revealed several interesting properties that standard AFs lack:
- AFs as Amplifiers: When weights were heavily penalized, SAFs often developed sharp peaks around zero. This behavior allows the activation function to "boost" small signals that the suppressed weights would otherwise lose.
- Asymmetry: The learned functions were rarely symmetric or centered at zero, suggesting that the rigid symmetry of functions like Tanh may be an unnecessary constraint.
Performance Summary
Even after fine-tuning hyperparameters for both models, SAFs consistently outperformed standard networks. For the 'chemical' dataset, the SAF reduced the test NRMSE from 0.32 to 0.28. In the underfitting scenario shown in the table above, the improvement was even more dramatic, with SAFs achieving an RMSE of 0.31 on the 'chemical' dataset compared to 1.00 for the standard model.
Conclusion and Future Work
By replacing fixed nonlinearities with trainable cubic splines, neural networks can better adapt to data and recover from poor hyperparameter settings. While the current study focused on shallow networks to isolate the effects of SAFs, future work will explore their application in deep architectures where neuron activation statistics vary significantly across layers.
Summary updated