Awesome Open Source
Awesome Open Source

Pytorch implementation of Hebbian learning algorithms to train deep convolutional neural networks. A neural network model is trained on CIFAR10 both using Hebbian algorithms and SGD in order to compare the results. Although Hebbian learning is unsupervised, I also implemented a technique to train the final linear classification layer using the Hebbian algorithm in a supervised manner. This is done by applying a teacher signal on the final layer that provides the desired output; the neurons are then enforced to update their weights in order to follow that signal.

You might want to give a look at the new repos as well!
Latest updates:

In order to launch a training session, type:
PYTHONPATH=<project root> python <project root>/ --config <config family>/<config name>
Where <config family> is either gdes or hebb, depending whether you want to run gradient descent or hebbian training, and <config name> is the name of one of the training configurations in the file.
PYTHONPATH=<project root> python <project root>/ --config gdes/config_base
To evaluate the network on the CIFAR10 test set, type:
PYTHONPATH=<project root> python <project root>/ --config <config family>/<config name>

For further details, please refer to my thesis work:
"Hebbian Learning Algorithms for Training Convolutional Neural Networks; G. Lagani"
available at and the related paper:
"Hebbian Learning Meets Deep Convolutional Neural Networks; G. Amato, F. Carrara, F. Falchi, C. Gennaro and G. Lagani"
available at:

Author: Gabriele Lagani - [email protected]

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (1,147,256
Pytorch (11,655
Network (3,730
Learning (3,420
Vision (577
Computer (332
Deep (296
Neural (181
Convolutional (28
Hebbian (3
Related Projects