Ad

mlx-snn: Efficient Spiking Neural Networks on Apple Silicon

mlx-snn provides a Python framework for building spiking neural networks natively on Apple MLX, enabling efficient temporal modeling and leveraging unified memory.
Screenshot of D-ST-Sword/mlx-snn homepage

mlx-snn empowers users to develop and deploy spiking neural networks (SNNs) efficiently on Apple Silicon devices. It offers a research-friendly framework utilizing MLX, a unified memory architecture, simplifying memory management and accelerating training. The library addresses the memory limitations inherent in SNNs by enabling extended temporal windows and larger reservoirs, making it ideal for complex temporal pattern recognition.

mlx-snn unlocks significant performance gains by exploiting Apple Silicon's unified memory, eliminating CPU-GPU data transfers and accelerating training. It offers energy efficiency, enabling faster training with substantially reduced power consumption. The implementation facilitates multi-scale temporal modeling with features like the MSLeaky neuron model, capable of capturing dynamics across different time scales. Furthermore, support for NIR interop allows seamless integration with existing neuromorphic research tools.

  • Neuron Models: Supports Leaky Integrate-and-Fire (LIF), Izhikevich, Alpha, and other neuron models with configurable dynamics and state variables.
  • Surrogate Gradients: Provides 6 differentiable surrogate gradient functions for efficient backpropagation through time (BPTT).
  • Spike Encodings: Offers 8 encoding methods, including rate, latency, and delta modulation, for converting continuous signals into spike trains.
  • Convolutional SNNs: Includes support for building deep convolutional SNNs with spiking convolutions and pooling layers.
  • Liquid State Machines: Enables reservoir computing with configurable connectivity and topology for temporal pattern recognition.
  • BPTT Variants: Offers optimized BPTT implementations including chunked BPTT for handling long sequences, and compiled forward passes.
  • Loss Functions: Provides a range of loss functions tailored for SNN training, including rate, count, and membrane-based loss.

mlx-snn is an actively developed project with a growing community and recent commits, indicating ongoing maintenance and feature additions. The project includes comprehensive documentation and a dedicated GitHub Pages site. A significant number of tests ensure code quality, reflecting a commitment to reliability. The presence of an arXiv publication further validates the project's scientific merit and potential.

mlx-snn benefits researchers and developers working with spiking neural networks by providing an optimized and user-friendly framework for building and training SNN models on Apple Silicon. Its efficient implementation, diverse set of features, and strong community support enable faster development cycles and improved performance compared to traditional approaches or other SNN libraries that lack native Apple Silicon support.

Languages:
Summarize:
Share:
Stars
429
Forks
2
Issues
1
Created
7 months ago
Commit
7 months ago
License
GPL-3.0
Archived
No
Updated 4 hours ago

Similar Repositories