Stable learning using spiking neural networks equipped with affine encoders and decoders (Journal of Machine Learning Research, 2026)