Research preprint · Open academic deposit
Two margins, opposite directions
Why trained spiking networks tolerate low precision — even as training collapses their internal margin. Both findings hold at once, and understanding why changes which quantity has to be measured to judge an embedded network.
The apparent paradox
It is commonly observed that a trained spiking network keeps working well once quantised to low precision. The usual conclusion is that training makes the network robust to quantisation.
This work shows that the opposite happens inside the network — and that the two findings are compatible because they do not concern the same quantity. The hypothesis tested is precise: does training compress the internal margin of hidden neurons — the one that governs exact spike identity — while the decision margin widens at the same time?
The starting point is a measured relation. On 300 configurations of independent LIF neurons (6 dynamics × 10 time constants × 5 seeds, Q4 to Q24 against float64), the minimum precision that keeps spikes bit-identical is well predicted by the internal margin: R² = 0.896 on data held out from the fit (unseen time constants and an unseen dynamics class), mean error 1.50 bits. The memory time constant is statistically detectable but adds almost nothing (R² +0.003): this is a margin-dominated relation, not a two-factor law. Applied as is to trained networks, where the internal margin collapses, this relation predicts severe fragility. That prediction is wrong, and the paper explains why.
The two margins, defined
The second is the quantity one would naturally instrument: the closer a neuron sits to its threshold, the smaller the rounding error needed to flip its firing — and thereby to change, in cascade, the spikes that follow. The first concerns what the network decides. A flipped spike does not necessarily change the decision: that is the whole point of the paper, which shows that, in the setting tested, it is the decision margin that tracks functional robustness.
What the measurement shows
source: metrics_by_epoch.csv (data file deposited with the paper) – mean of 5 seeds, 16 points per seed
The contrast is striking. While the network learns — its mean accuracy rising from 4.6% at epoch 0 to 67% at epoch 15, according to the same data file — two opposite things happen under the hood: the verdict becomes ever more clear-cut, and each neuron sits ever closer to its threshold. The internal margin ends at 0.0004, essentially glued to the threshold.
The correlations, quantified
These trends are not qualitative; they are measured. Here are the correlations between training progress and each quantity, then between each margin and the accuracy measured after Q8 quantisation:
| Measured relation | Correlation | Reading |
|---|---|---|
| Epoch ↔ decision margin | +0.96 | it grows with training |
| Epoch ↔ mean internal margin | −0.90 | it collapses with training |
| Decision margin ↔ Q8 accuracy | +0.95 | they rise together: the margin aligned with functional robustness |
| Mean internal margin ↔ Q8 accuracy | −0.96 | it collapses while Q8 accuracy rises: a misleading proxy for risk |
The last two rows have to be read together. The correlation between the internal margin and Q8 accuracy is negative: the internal margin collapses while Q8 accuracy improves with training. If the internal margin governed functional robustness, the two would fall together; they move in opposite directions. In this setting, it is the decision margin (+0.95) that tracks functional robustness. This ordering is an association observed in the protocol tested; the paper does not present it as a general law.
The resolution also qualifies the starting relation: the margin that matters is the one attached to the property being guaranteed. For exact spike identity it is the internal margin (hence R² = 0.896 on independent neurons); for the decision it is the decision margin. Using the first to predict the second is exactly what would produce a false alarm.
Key point
A trained network that tolerates low precision owes it, in this setting, to its decision margin, which widens while the internal margin collapses (a 548-fold division). Judging its robustness on the internal margin, the quantity one would naturally instrument, would have predicted a fragility that does not occur.
The concrete, methodological consequence: to judge whether a network suits embedded deployment, measure the margin that belongs to the property to be preserved — the distance to threshold of hidden neurons for spike identity, the decision margin for the decision. Whether this holds for other tasks and architectures is untested.
The real cost at low precision
How much does quantisation actually cost, precision by precision? I evaluate the same network at six levels, at the 80 training checkpoints (5 seeds × 16 epochs), without retraining. Comparing untrained and trained checkpoints shows where fragility appears.
In the trained-network experiments, “Qk” denotes weight-only rounding to the nearest multiple of 2−k; the network then runs in a float64 datapath (membrane potentials, accumulation, thresholds and spike decisions are not quantised). This is post-training quantisation of the parameters, not fixed-point arithmetic. On the same SHD benchmark, a full integer datapath loses 24.6 accuracy points (77.3% in float64 against 52.74% at Q16.16, measured in companion paper D). The two measurements do not conflict, but no precision called “free” here may be read as a statement about fixed-point deployment.
source: cross_precision.json – 80 checkpoints, 5 seeds x 16 epochs
See the data
| Precision | Untrained gap | Mean gap (80 checkpoints) | Max gap |
|---|---|---|---|
| Q2 | 0.000 | 0.430 | 0.646 |
| Q4 | 0.000 | 0.119 | 0.268 |
| Q6 | 0.000 | 0.013 | 0.066 |
| Q8 | 0.000 | 0.000 | 0.024 |
| Q12 | 0.000 | −0.001 | 0.013 |
| Q16 | 0.000 | 0.000 | 0.005 |
The cautious reading: in this protocol, the accuracy gap was zero at the untrained checkpoints. That is an observation about the points measured, not a demonstration that quantisation is free in general, nor that fragility is entirely caused by training.
Two evaluations of the same network give two Q8 figures, and both should be quoted. The five-seed evaluation of the final model gives a gap of 0.12% ± 0.61%, within between-seed variability; the re-evaluation of all 80 checkpoints gives 1.3% at the final checkpoint and 2.4% at the worst. Both agree: the Q8 gap stays below 3%.
A negative result, reported as such: the quantisation-aware training (QAT) recipe tested brings no mean improvement at Q8 across five unpaired seeds (0.34% ± 0.59% against 0.12% ± 0.61%, marginally worse). This is a descriptive comparison with no statistical test: it establishes neither an absence of effect nor that QAT is useless in general.
Three simulated arithmetic profiles
Beyond the trained network, a sweep of 400 network configurations under three simulated arithmetic profiles shows an analogous pattern: spikes diverge, but the decision holds. The mechanism is not established there: no margin is measured in that sweep, and these are different networks from the trained one.
source: hardware_profiles_summary.json – simulated arithmetic profiles, n = 400
These three profiles are simulated in software; no chip was measured. The third is an emulation: Python floating-point values rounded after each operation, with weights, drive, decay, threshold and stored state on an 8 fractional-bit grid and intermediate accumulation on a 24 fractional-bit grid. It is neither a signed 24-bit integer datapath nor a model of a named chip.
Scope and limitations
- Reduced pilot protocol, CPU only, a single dataset (SHD), a single three-layer architecture, five seeds, one QAT recipe. No general causal attribution — only an association measured within this protocol: both margins are consequences of the same training run, and I never intervene on one while holding the other fixed. The experiment that would settle it (margin-regularised retraining) exists here only at one seed per setting: it remains exploratory.
- Scope of “Qk”: in the trained-network experiments only the weights are rounded, in a float64 datapath. These figures must not be read as fixed-point deployment, which costs 24.6 points on the same benchmark (paper D).
- The margin–precision relation (R² = 0.896) is established on independent neurons only; it is consistent with the trained-network results but not validated on them. Only spike identity is well predicted; the rate (R² = 0.350) and decision (R² = 0.251) contracts remain poorly explained.
- The Q4–Q6 fragility threshold is an observation in this domain, not a law: nothing here licenses the claim that spiking networks need at least Q6, nor extrapolating below Q6 what is observed from Q8 to Q16.
- The 80 checkpoints are 5 repeated trajectories, not 80 independent observations. Correlations and trends are descriptive.
- An unsupervised local-learning baseline (STDP) was planned and not implemented: it requires a radically different training loop. The control actually carried out is the untrained/trained comparison.
- No hardware measurement: no area or energy saving is claimed. The hardware motivations cited are conditional.
- The absence of an accuracy gap does not mean identity of predictions, spikes or internal states. Each statement names the quantity measured.
- The Q8 storage profile with a 24 fractional-bit accumulator is not a 24-bit data path.