FlopExa Memory

FlopBrain vs ExaBrain: memory

The same sparse patterns, stored two ways in a space of 4,096 neurons. FlopBrain keeps them in a dense matrix of 16.8 million weights and recalls by iterating: every neuron reads all 4,096 others each cycle, and the most excited stay on. ExaBrain gives each pattern its own episode neuron, wired both ways to its active units: the cue pushes to the episodes, the most-hit one fires and pushes back its pattern.

Patterns stored
Neurons
sliders: hold Shift for powers of two, Alt for 1 · 2 · 5 steps
Active per pattern
Correct units in the test
FlopBrain rule
ExaBrain cores

FlopBrain · dense memory

Neurons
4,096
Connections
Stored as
Work per cycle
16.78 million multiply-adds
Cycles to settle
–
Work per recall
–
Time per recall
–
Recalled
–
Tested · exact · rate
–

ExaBrain · episodic memory

Neurons
Connections
Stored as
Steps
2 (cue → episode → pattern)
Episodes reached by the cue
–
Work per recall
–
Time per recall
–
Recalled
–
Tested · exact · rate
–
Information stored
–
Less work per recall
–
Less storage
–

Capacity sweep

Up to Points Trials per point
FlopBrain, covariance rule FlopBrain, Willshaw rule ExaBrain episodes Dense ±1 Hopfield limit, 0.138 N Same information as 0.138 N dense patterns ExaBrain theory vertical bars: 95% confidence intervals

Table of values
PatternsInformationCovarianceWillshawExaBrain Dense cycles (cov / Willshaw)Covariance timeWillshaw timeExaBrain eventsExaBrain time

The task. Each pattern is a random set of k active units out of 4,096. Recall is tested with the same number of active units as in learning: c of them from a stored pattern, the other k − c random. A recall counts as exact only if the final set of active units is the stored pattern, nothing missing and nothing extra.

FlopBrain, at its best. The covariance rule (Tsodyks and Feigel'man) is the standard way to store sparse patterns in a dense Hopfield-type net; the Willshaw rule is its clipped binary version. Both recall with k-winners-take-all: after each cycle the k most excited units stay on (ties included). That global selection is a help FlopBrain gets for free. The ±1 Hopfield limit of 0.138 N applies to dense patterns and is shown only for reference.

ExaBrain. 4,096 input neurons plus one episode neuron per stored pattern, connected both ways to its k inputs. The cue's units push to every episode they belong to, the most-hit episode fires, and it pushes back its k units. If several episodes tie for the most hits, the cue is ambiguous and one of them is picked at random, which is right only by chance.

Counting the work. FlopBrain is charged 4,096² multiply-adds per cycle, the cost of a dense step, and the time per recall is measured on full dense cycles. In the sweep, the same results are computed faster by adding only the columns of the active units, which gives identical numbers. A dense net that did that every cycle would have stopped pulling and started pushing: it would have become an ExaBrain.

Run. Both networks recall one new test pattern after another, independently. By default each gets the same 8 ms of one CPU core per frame: FlopBrain runs true dense cycles, row by row; ExaBrain completes as many recalls as fit. With FlopBrain on GPU, the dense net runs on the whole graphics processor with 32 recalls in flight, so the GPU is kept busy, and its time per recall is the real wait from cue to settled state. With ExaBrain cores set to a number, ExaBrain runs on that many CPU cores at full speed, each with its own copy of the memory, and the counts add up. GPU against all cores is the whole machine against the whole machine.

Counting the storage. FlopBrain stores 16.8 million weights: 32-bit floats for the covariance rule, 1 bit each for Willshaw. ExaBrain stores k connections per episode, each a 12-bit address of one of the 4,096 inputs, counted twice for the two directions.

Information. One pattern is one of C(N, k) possible sets of k units among N, so it carries log₂ C(N, k) bits: about 148 bits for k = 16 and N = 4,096. The verdict multiplies that by the number of patterns stored.