Spiking Network: float vs 8-bit fixed-point
50 leaky integrate-and-fire neurons with random connections, driven by random input spikes. The same network runs twice on identical input: once with ordinary decimal numbers, once with small integers like a hardware chip would use. Change the number of bits and watch how the behaviour changes.
Float (decimal numbers)
Fixed-point (integers)
■ excitatory neuron
■ inhibitory neuron
Each dot is a spike. Bars at the bottom: spikes per step.
Chance per step that a neuron gets an outside spike.
How strongly an excitatory spike pushes its targets.
How strongly an inhibitory spike pulls its targets down.
Each step the neuron loses 1/2^K of its charge, so beta = 1 - 1/2^K. Both networks use this beta.
Fewer bits means coarser weights in the fixed-point network.
Range of the stored membrane potential.
Same seed, same network and same input every time.
What to try
- With defaults, both networks fire at similar rates, but the exact spike times drift apart after a few steps.
- Lower the weight bits to 3 or 4. Weights get rounded to coarse values, and the fixed-point network can behave very differently.
- Set membrane bits to 8 and raise the inhibitory weight. The potential hits its limits and the saturation counter climbs.
- Rates are a better comparison than exact spike times, because small rounding differences grow in a recurrent network.
This is a teaching model with no learning in it. It is not an accurate copy of any specific chip.