mlx-snn: 通过MLX在Apple Silicon上实现脉冲神经网络
mlx-snn: Spiking Neural Networks on Apple Silicon via MLX
AI总结:
mlx-snn是首个在Apple Silicon上原生实现的脉冲神经网络库,提供多种神经元模型和训练流程,实现高效SNN研究。
摘要:
我们介绍了mlx-snn,这是首个原生基于Apple MLX框架构建的脉冲神经网络(SNN)库。随着SNN研究迅速发展,所有主要库——snnTorch、Norse、SpikingJelly、Lava——都瞄准PyTorch或定制后端,使Apple Silicon用户缺乏原生选项。mlx-snn提供了六种神经元模型(LIF、IF、Izhikevich、Adaptive LIF、Synaptic、Alpha)、四种替代梯度函数、四种脉冲编码方法(包括专为EEG设计的编码器)以及完整的反向传播通过时间训练流程。该库利用MLX的统一内存架构、惰性评估和可组合函数转换(mx.grad,mx.compile)来实现高效的Apple Silicon硬件上的SNN研究。我们验证了mlx-snn在MNIST数字分类上的五个超参数配置和三个后端,实现高达97.28%的准确率,训练速度比snnTorch快2.0-2.5倍,GPU内存消耗低3-10倍。mlx-snn以MIT许可证开源,并可在PyPI上获得。https://github.com/D-ST-Sword/mlx-snn
英文摘要:
We introduce mlx-snn, the first spiking neural network (SNN) library built natively on Apple's MLX framework. As SNN research grows rapidly, all major libraries -- snnTorch, Norse, SpikingJelly, Lava -- target PyTorch or custom backends, leaving Apple Silicon users without a native option. mlx-snn provides six neuron models (LIF, IF, Izhikevich, Adaptive LIF, Synaptic, Alpha), four surrogate gradient functions, four spike encoding methods (including an EEG-specific encoder), and a complete backpropagation-through-time training pipeline. The library leverages MLX's unified memory architecture, lazy evaluation, and composable function transforms (mx.grad, mx.compile) to enable efficient SNN research on Apple Silicon hardware. We validate mlx-snn on MNIST digit classification across five hyperparameter configurations and three backends, achieving up to 97.28% accuracy with 2.0--2.5 times faster training and 3--10 times lower GPU memory than snnTorch on the same M3 Max hardware. mlx-snn is open-source under the MIT license and available on PyPI. https://github.com/D-ST-Sword/mlx-snn
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。