AI & ML Atlas
Neural NetworksalgorithmInteractive simulation
Winner-Takes-All Algorithm
Only the most active neuron produces output; the rest are silenced.
The idea
Lateral inhibition makes neurons suppress each other until just one remains active. In software it is simply an argmax. It forces the layer to choose one category per input, which is the core of competitive learning.
Watch it run
This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.
- unit
- winner
- current sample
Four competing units start in the middle. Grey dots are the data.
- step:
- 0
- avg distance to nearest unit:
- 0.256
1/67
Competitive learning: winner-takes-all, like an online version of k-means.
Step by step
- 1Compute each neuron's activation for the input.
- 2Find the neuron with the largest activation.
- 3Set its output to 1 and all the others to 0.
- 4Update only the winner (in learning versions).
Where it is used
Clustering layers, simple classifiers, neuromorphic circuits.
Watch out for
All-or-nothing output loses information about close runners-up.