Supplemental material for the Simbrain simulation Simulations › Competitive › Competitive network (simple). The goal in that simulation is to train the network so that each of five input patterns gets its own winning output unit. This page shows what happens inside the network while you play. Everything here also applies to Simulations › Competitive › Competitive network (shapes), which plays the same game with five pictures on a 10×10 grid of inputs.
A competitive network learns to sort its inputs into groups without being told what the groups are. When an input is presented, the output units compete for it. The unit with the largest weighted input wins, and only the winner learns: its weights move toward the input, so it becomes even more likely to win that input again. Over training, each unit comes to stand for one group of similar inputs.
Because each unit’s weights are normalized to sum to 1, moving toward one pattern means moving away from the others. A unit trained fully onto one pattern lets go of the rest, and an unused unit can pick them up. A unit that keeps winning two patterns instead settles between them and holds on to both, and a unit that never wins never learns.
The network has seven input nodes and five output units. Each pattern turns on three of the seven input nodes (filled circles), and any two patterns share exactly one active node.
Each output unit has seven fan-in weights, so its weight vector is a point in the same 7-dimensional space as the inputs. The weights start random and are scaled to sum to 1. When a pattern is presented, the unit with the largest weighted input wins. Only the winner learns: its weights move a fraction of the way (the learning rate, 0.1 here) toward the input, scaled to sum to 1 as well.
Blue points are the five patterns, red points are the five units’ weight vectors, and dashed lines join each pattern to the unit that currently wins it. Click a pattern to train on it once, like selecting a pattern in Simbrain and pressing Train. Hold the button down to keep training, or press Train ×10 to train the last pattern ten more times. You win when five different units are winning, one for each pattern.
This is not a weight matrix. Each row is one pattern, and each number is one unit’s whole weighted input when that pattern is presented. The biggest number in a row wins, shown in red. Several reds in one column mean that one output unit wins several patterns, so those patterns share it. The goal is one red in every column.
What doesn’t work. The obvious strategy is to take turns: P1, P2, P3, P4, P5, then around again. This rarely wins, about one start in eight. Each step moves the winner only a tenth of the way, so a unit that wins two patterns is pulled back and forth and settles halfway between them, where it keeps winning both. Taking turns keeps that tug of war going forever.
What works. Commit to one pattern at a time. Train it many times in a row (press it, then Train ×10 twice) before moving on. Its unit moves all the way onto that pattern and lets go of the others, and the next pattern you train is then free to land on another unit. This wins about nine times in ten. If two patterns still share a unit at the end, train one of them more until the other moves to a new unit. In the grid simulation, taking turns wins about one time in seven and committing almost always wins.
Settings that reveal the dynamics. These are not on this page, but in Simbrain you can change them by right-clicking the competitive network and choosing Edit.
Normalize inputs off. Now the winner’s weights grow toward 1 on every active input instead of sharing a fixed total, so nothing lets go. The first unit you train responds strongly to every pattern that shares an input with its own, far more than any untrained unit, and it takes every pattern. The game can no longer be won. This shows why normalization matters.Learning rate. At 0.5 each step jumps most of the way to the input, so the tug of war is short and even taking turns often wins. At 0.05 everything slows down and committing takes twice as many steps.Use Leaky learning. Losing units also drift slowly toward each input, which brings dead units into play and helps a little.