Learning Activation Functions for Sparse Neural Networks

Mohammad Loni, Aditya Mohan, Mehdi Asadi, Marius Lindauer
5/18/2023
cs.LGcs.NE

Official code: automl/SAFS (3 stars, Apache-2.0, last commit 2023-05-22).

Abstract

Sparse Neural Networks (SNNs) can potentially demonstrate similar performance to their dense counterparts while saving significant energy and memory at inference. However, the accuracy drop incurred by SNNs, especially at high pruning ratios, can be an issue in critical deployment conditions. While recent works mitigate this issue through sophisticated pruning techniques, we shift our focus to an overlooked factor: hyperparameters and activation functions. Our analyses have shown that the accuracy drop can additionally be attributed to (i) Using ReLU as the default choice for activation functions unanimously, and (ii) Fine-tuning SNNs with the same hyperparameters as dense counterparts. Thus, we focus on learning a novel way to tune activation functions for sparse networks and combining these with a separate hyperparameter optimization (HPO) regime for sparse networks. By conducting experiments on popular DNN models (LeNet-5, VGG-16, ResNet-18, and EfficientNet-B0) trained on MNIST, CIFAR-10, and ImageNet-16 datasets, we show that the novel combination of these two approaches, dubbed Sparse Activation Function Search, short: SAFS, results in up to 15.53%, 8.88%, and 6.33% absolute improvement in the accuracy for LeNet-5, VGG-16, and ResNet-18 over the default training protocols, especially at high pruning ratios. Our code can be found at https://github.com/automl/SAFS

View on arXivView PDF

Code Implementations(1)

automl/SAFSOfficial100%
Apache-2.0

Respository for Sparse Activation Function Search

32Shell, PythonFeb 13, 20233 years agoApache-2.0

Similar Papers

Cite this paper

@article{loni2023learning,
  title  = {Learning Activation Functions for Sparse Neural Networks},
  author = {Mohammad Loni and Aditya Mohan and Mehdi Asadi and Marius Lindauer},
  year   = {2023},
  eprint = {2305.10964},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.10964v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.10964.svg)](https://codeofpaper.com/paper/2305.10964)

Discussion