Multikernel activation functions: formulation and a case study

Simone Scardapane, Elena Nieddu, Donatella Firmani, Paolo MerialdoarXiv 2019

Introduction

In modern deep learning, activation functions are typically fixed, point-wise operations such as the Rectified Linear Unit (ReLU). While effective, these fixed functions may not be optimal for all layers or specific data distributions. Recent research has shifted toward non-parametric activation functions that learn their shape directly from data. One such approach is the Kernel Activation Function (KAF), which models the activation as a one-dimensional kernel expansion.

However, standard KAFs introduce a design bottleneck: the user must manually select a single kernel function (e.g., Gaussian) and its hyperparameters. If the chosen kernel is ill-suited for the task, performance is limited. This paper introduces multi-KAFs, an extension that allows a network to dynamically learn the optimal kernel shape for every neuron by combining multiple kernel types.

Methodology: The Multi-KAF Approach

To overcome the limitations of single-kernel selection, the authors utilize concepts from Multiple Kernel Learning (MKL). A multi-KAF defines the activation function as a weighted linear combination of $M$ different "base" kernels. In this study, the authors employ three base kernels: Gaussian, rational quadratic, and polynomial.

Figure 5: Visualization of a multi-KAF (black line) formed by the combination of base kernels (dashed lines).

Key Technical Features

  • Learnable Mixing: The mixing coefficients for these base kernels are standard network parameters updated via backpropagation. This allows the network to adapt the activation shape per neuron.
  • Computational Efficiency: KAFs evaluate data against a fixed "dictionary" of points. Because all base kernels in a multi-KAF share the same dictionary, the additional computational cost is minimal, adding only $M-1$ parameters per neuron.
  • Initialization: To ensure stability during the early stages of training, multi-KAFs are initialized using Kernel Ridge Regression to mimic the shape of an Exponential Linear Unit (ELU).

Experimental Setup and Dataset

The method was evaluated using a real-world dataset from the "In Codice Ratio" (ICR) project, which focuses on transcribing the Vatican Secret Archives. The dataset consists of 23,000 black-and-white images (56x56 pixels) of handwritten Latin characters from the 13th-century correspondence of Pope Honorii III. The task involves classifying these characters into 23 distinct classes.

Key Results and Insights

The authors compared a baseline Convolutional Neural Network (CNN) using ReLUs against architectures using standard KAFs and the proposed multi-KAFs.

Figure 6: Training loss (top) and accuracy (bottom) comparison between ReLU and multi-KAF architectures.

Performance and Efficiency

  • Higher Accuracy: The multi-KAF achieved a testing accuracy of 96.31% (±0.2), significantly outperforming the ReLU baseline (94.99%) and the single-kernel KAF (94.00%).
  • Parameter Reduction: By increasing the expressivity of the activation functions, the authors were able to reduce the number of convolutional filters and linear neurons by 10%. Consequently, the multi-KAF network required only ~159,000 parameters, compared to ~191,000 for the ReLU baseline.
  • Faster Convergence: As shown in the training curves, multi-KAFs converge faster and exhibit greater stability than standard ReLU networks.

Learned Heterogeneity

Analysis of the learned mixing coefficients revealed that different neurons within the same layer often converged to vastly different kernel combinations. This suggests that a "one-size-fits-all" activation function like ReLU ignores beneficial local variations in data processing. Furthermore, the inclusion of a polynomial kernel allowed the model to capture global trends that localized kernels (like the Gaussian) typically struggle to represent.

Conclusion and Future Work

Multi-KAFs provide a flexible, learnable alternative to fixed activation functions, offering improved accuracy and parameter efficiency. While the current work uses unrestricted linear combinations, future research may explore convex combinations (e.g., via softmax) and the application of multi-KAFs to Recurrent Neural Networks (RNNs) and Generative Adversarial Networks (GANs).

Summary updated

BibTeX
@misc{scardapane2019multikernel,
  author = {Simone Scardapane and Elena Nieddu and Donatella Firmani and Paolo Merialdo},
  title = {{Multikernel activation functions: formulation and a case study}},
  year = {2019},
  eprint = {1901.10232},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1901.10232},
}
Figure