← Home

A compiled graph learns

exp075 · 31 July 2026 · Draft · pdf

Abstract

This is an integration gate, not an MNIST benchmark. A Python snnlang program defines a 128-E/32-I PING network and a standard training recipe. The compiler writes the graph and recipe into a portable bundle; tools/snn train --bundle authenticates both, maps the supported subset onto the existing optimised PyTorch trainer, and trains on only 1000 MNIST examples for 4 epochs. The experiment asks one intentionally unglamorous question: does the compiled network actually learn?

Graph and training scope

The graph fixes the PING topology, 0.5 ms simulation step, mean-voltage classifier, initialisers, and trainable/frozen parameter scope. The recipe fixes unit-weight cross-entropy, AdamW with learning rate 0.001 and weight decay 0.0001, gradient clipping, and epoch count. The runner owns execution choices: the deterministic MNIST subset, batch size 64, 100 ms presentation window, seed 75, and artifact locations.

The current backend is deliberately strict. It accepts trainable input and readout projections with frozen E↔I recurrence; unsupported objectives, parameter scopes, optimisers, or graph structures fail before training.

Training trajectory

The 800-example training split and 200-example held-out split are tiny. Across the short run, training cross-entropy changed by −0.035, held-out cross-entropy by −0.027, and held-out accuracy by 1.5 percentage points. Best held-out accuracy was 64.5% at epoch 2. The trainer wrote both selected and final checkpoints in 14.3 seconds.

Conclusion

The compiled graph trained: optimisation reduced the training objective and emitted ordinary tools/snn checkpoints and metrics. This does not establish competitive accuracy or good generalisation. It establishes the more basic vertical slice needed before migrating real experiments: Python graph → authenticated bundle → existing PyTorch training loop → inspectable evidence.