Programming & AI

How an attempt to train a neural network without backpropagation turned into k-means: a valuable experiment with Hebbian learning.

I read a very honest article on Habr about an attempt to train a neural network's hidden layer without backpropagation, using only local rules. Each neuron sees its own input, its own activity, and its neighbors, and that's it: no global error signal, no labels.

The starting point is the work of Krotov & Hopfield (2019) on competitive learning. The winning neuron adjusts its weights towards the input (Hebbian rule), the neuron in the k-th position adjusts its weights slightly in the opposite direction (anti-Hebbian), and a term from the Oja rule keeps the weights around a value of one. A linear classifier on top of the features is used to evaluate their quality, but it doesn't "see" the labels directly. The protocol is strict: one parameter is changed at a time, with 5 random seeds, the test set is opened only once at the end, and there are benchmarks with the same number of neurons.

What I found most interesting:
* The network "kills" its own neurons: in the prototype, 44% of the neurons were inactive, and with a slightly larger step, everything collapses into a single "average" neuron. The trap lies in the rule itself.
* An adaptive threshold (each neuron has its own) eliminates dead neurons and collapse, but the accuracy hardly increases.
* The main discovery: essentially, this is k-means. With the same features, k-means is almost as good, and the gain from the rule is no more than half a percent. The author's advice: use k-means as a benchmark from the beginning.
* The architecture provided the biggest improvement: local receptive fields (regions of the image) where the layer itself learns lines and curves. The best model achieved 0.9735 on MNIST and 0.8576 on Fashion-MNIST, still lower than backpropagation.
* The rule evolved through CMA-ES "cheated itself": when optimizing for fitness on fixed seeds, it optimized for noise.
* Neither with a small number of labels nor in terms of forgetting the advantages over backpropagation was there any significant improvement.

I especially appreciate the section "where I made mistakes myself": for example, early stopping in scikit-learn with warm_start didn't reset the best result from the previous task, and this made the MLP seem almost incapable of forgetting.

The author carefully limits the conclusions: the scale is small, without convolutions or pooling, so this is not a condemnation of Hebbian learning in general. Have you tried local learning rules in your own projects?

Source: Habr

Comments 0

Leave the first comment, in any language.

Log in to comment