arXiv:2603.03529cs.LGcs.AI2026-03

首个原生支持苹果芯片的脉冲神经网络库,加速科研部署。

mlx-snn: Spiking Neural Networks on Apple Silicon via MLX

  • 基于MLX框架构建,利用懒加载与函数组合实现高效计算。
  • 在M3 Max上训练速度比snnTorch快2.0–2.5倍,内存降低3–10倍。
  • 支持6种神经元模型与多种编码方式,适合苹果生态研究者。

我们提出mlx-snn,首个基于苹果MLX框架原生构建的脉冲神经网络(SNN)库。随着SNN研究快速发展,现有主流库如snnTorch、Norse、SpikingJelly和Lava均依赖PyTorch或自定义后端,导致Apple Silicon用户缺乏原生支持。mlx-snn提供六种神经元模型(LIF、IF、Izhikevich、自适应LIF、突触型、Alpha)、四种代理梯度函数、四种脉冲编码方法(含一种专用于脑电图的编码器),并实现完整的基于时间反向传播训练流程。该库充分利用MLX的统一内存架构、懒加载机制及可组合函数变换(mx.grad、mx.compile),实现苹果芯片上的高效SNN研究。我们在MNIST手写数字分类任务上验证了mlx-snn,覆盖五组超参数配置与三种后端,在相同M3 Max硬件下,最高准确率达97.28%,训练速度提升2.0–2.5倍,显存占用降低3–10倍。mlx-snn以MIT许可开源,已发布于PyPI。

原文摘要 · Abstract (English)

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

脉冲神经网络苹果芯片MLX高效计算

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。