Skip to main content

Devatrix SNN: An advanced, batched Spiking Neural Network core engine

Project description

Devatrix SNN Core

Devatrix SNN is a high-performance, batched, and vectorized Spiking Neural Network (SNN) engine built in Python using NumPy.

Features

  • Batched Simulation: Run simulations across multiple batch samples concurrently.
  • Leaky Integrate-and-Fire (LIF) Neurons: Features leak decay, homeostatic threshold fatigue, and post-spike reset hyperpolarization.
  • Refractory Cooldowns: Correct biological modeling of neural refractory periods.
  • Dual Learning (Plasticity):
    • Unsupervised sequence-based learning via Spike-Timing-Dependent Plasticity (STDP).
    • Global reinforcement learning via Dopamine-modulated eligibility traces.
  • Synaptic Masking: Connect arbitrary topologies (dense, sparse, or recurrent).

Installation

From Source (Local Development)

To install the package in editable mode locally:

pip install -e .

Build Package for PyPI

To build package distribution files for PyPI:

python3 -m pip install --upgrade build twine
python3 -m build

Quick Start Example

import numpy as np
from devatrix import DevatrixUltimateEngine

# Initialize engine for a batch size of 2, and 5 neurons
engine = DevatrixUltimateEngine(batch_size=2, num_neurons=5, inhibitory_ratio=0.2)

# Connect neuron 0 to neuron 1 with a weight of 1.5
engine.connect(src=0, tgt=1, weight=1.5)

# Input pulse inputs for 2 batch samples
x_batch = np.array([
    [1.5, 0.0, 0.0, 0.0, 0.0],
    [0.0, 0.0, 0.0, 0.0, 0.0]
])

# Step the network forward
spikes = engine.forward(x_batch)
print("Output Spikes:\n", spikes)

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devatrix-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devatrix-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file devatrix-0.1.0.tar.gz.

File metadata

  • Download URL: devatrix-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for devatrix-0.1.0.tar.gz
Algorithm Hash digest
SHA256 90b698e3080ceccf8b5e504342727071f4641dc34976af68fbbbb662abc3a59f
MD5 3bc6c1311a464ec5e7b277eb64a06778
BLAKE2b-256 d96c11ba20fc5604aecec5297fcbec05255de5d7ce72d8c74a34514c7123f230

See more details on using hashes here.

File details

Details for the file devatrix-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: devatrix-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for devatrix-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5a30ab12af5c18fe5d624a8f7449eae67669bf2115ed1c0b37930b3800987d6
MD5 164ff311af47bb236483d680fbfde1c0
BLAKE2b-256 7a65618cf203d2219faa1c21ee7c69a7db123229fd28930b6b443e1b3d4fd62e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page