English

Nerva: a Truly Sparse Implementation of Neural Networks

Machine Learning 2024-07-25 v1

Abstract

We introduce Nerva, a fast neural network library under development in C++. It supports sparsity by using the sparse matrix operations of Intel's Math Kernel Library (MKL), which eliminates the need for binary masks. We show that Nerva significantly decreases training time and memory usage while reaching equivalent accuracy to PyTorch. We run static sparse experiments with an MLP on CIFAR-10. On high sparsity levels like 99%99\%, the runtime is reduced by a factor of 4×4\times compared to a PyTorch model using masks. Similar to other popular frameworks such as PyTorch and Keras, Nerva offers a Python interface for users to work with.

Keywords

Cite

@article{arxiv.2407.17437,
  title  = {Nerva: a Truly Sparse Implementation of Neural Networks},
  author = {Wieger Wesselink and Bram Grooten and Qiao Xiao and Cassio de Campos and Mykola Pechenizkiy},
  journal= {arXiv preprint arXiv:2407.17437},
  year   = {2024}
}

Comments

The Nerva library is available at https://github.com/wiegerw/nerva

R2 v1 2026-06-28T17:52:35.572Z