Home

Awesome

sparse-evolutionary-artificial-neural-networks

Implementation 1 - using binary masks - SET-MLP with Keras and Tensorflow (SET-MLP-Keras-Weights-Mask)
Implementation 2 - truly sparse implementation - SET-MLP using just sparse data structures from pure Python 3 (SET-MLP-Sparse-Python-Data-Structures)
Implementation 3 - truly sparse implementation - SET-RBM using just sparse data structures from pure Python 3 (SET-RBM-Sparse-Python-Data-Structures)
Implementation 4 - IJCAI 2019 tutorial - light hands-on experience code (Tutorial-IJCAI-2019-Scalable-Deep-Learning)
Implementation 5 - ECMLPKDD 2019 tutorial - light hands-on experience code (Tutorial-ECMLPKDD-2019-Scalable-Deep-Learning)
References

For an easy understanding of these implementations please read the following articles. Also, if you use parts of this code in your work, please cite the corresponding ones:

  1. @article{Mocanu2018SET, author = {Mocanu, Decebal Constantin and Mocanu, Elena and Stone, Peter and Nguyen, Phuong H. and Gibescu, Madeleine and Liotta, Antonio}, journal = {Nature Communications}, title = {Scalable Training of Artificial Neural Networks with Adaptive Sparse Connectivity inspired by Network Science}, year = {2018}, doi = {10.1038/s41467-018-04316-3}, url = {https://www.nature.com/articles/s41467-018-04316-3 }}

  2. @article{Mocanu2016XBM, author={Mocanu, Decebal Constantin and Mocanu, Elena and Nguyen, Phuong H. and Gibescu, Madeleine and Liotta, Antonio}, title={A topological insight into restricted Boltzmann machines}, journal={Machine Learning}, year={2016}, volume={104}, number={2}, pages={243--270}, doi={10.1007/s10994-016-5570-z}, url={https://doi.org/10.1007/s10994-016-5570-z }}

  3. @phdthesis{Mocanu2017PhDthesis, title = {Network computations in artificial intelligence}, author = {Mocanu, Decebal Constantin}, year = {2017}, isbn = {978-90-386-4305-2}, publisher = {Eindhoven University of Technology}, url={https://pure.tue.nl/ws/files/69949254/20170629_CO_Mocanu.pdf } }

  4. @article{Liu2019onemillion, author = {Liu, Shiwei and Mocanu, Decebal Constantin and Mocanu and Ramapuram Matavalam, Amarsagar Reddy and Pei, Yulong Pei and Pechenizkiy, Mykola}, journal = {arXiv:1901.09181}, title = {Sparse evolutionary Deep Learning with over one million artificial neurons on commodity hardware}, year = {2019}, url={https://arxiv.org/abs/1901.09181 } }

SET shows that large sparse neural networks can be built if topological sparsity is created from the design phase, before training. There are many algorithmic and implementation improvements which can be made. If you find this work interesting, please share the links to this Github page and to Reference 1. For any question, suggestion, feedback please feel free to contact me by email.

Community

Some time ago, I had a very pleasant unexpected surprise when I found out that Michael Klear released "Synapses". This library implements SET layers in PyTorch and as Michael says it is "truly sparse". For more details please read his article:

https://towardsdatascience.com/the-sparse-future-of-deep-learning-bce05e8e094a

And try out "Synapses" yourself:

https://github.com/AlliedToasters/synapses

Many things can be improved in "Synapses". If interested, please contact and help Michael in developing further the project.

Update 4 June 2020

Our paper "Topological insights into sparse neural networks" https://arxiv.org/pdf/2006.14085.pdf has been accepted at ECMLPKDD 2020. It proposes Neural Network Sparse Topology Distance (NNSTD) to measure the distance between different sparse neural networks. The code is here https://github.com/Shiweiliuiiiiiii/Sparse_Topology_Distance. Also, it shows in a principled manner that sparse training easily unveils a plenitude of sparse sub-networks with very different topologies which outperform the dense networks.

Update 30 November 2020

For an interesting quick read about sparse training, please have a look on this blog https://numenta.com/blog/2020/10/30/case-for-sparsity-in-neural-networks-part-2-dynamic-sparsity

Update 14 December 2020

To see how sparse training can be used for feature selection please check our latest paper, titled "Quick and Robust Feature Selection: the Strength of Energy-efficient Sparse Training for Autoencoders", here: https://arxiv.org/abs/2012.00560

and the corresponding truly sparse implementation here: https://github.com/zahraatashgahi/QuickSelection

Many thanks,
Decebal