Skip to main content

Spiking Neural Network Algorithms

Python 3.10 License: AGPL v3 Code Style: Black Code Coverage

This is a library of Spiking Neural Network algorithms (SNNs), along with their regular/normal/Neumann implementation. to their default/Neumann implementations. The user can specify an SNN and "normal" algorithm which take as input a networkx graph, and compute some graph property as output. The output of the SNN is then compared to the "normal" algorithm as "ground truth", in terms of:

  • Score: How many results the SNN algorithm computed correctly (from a set of input graphs).
  • Runtime In theory, the score should always be 100% for the SNN, as it should be an exact SNN implementation of the ground truth algorithm. This comparison is mainly relevant for the additions of brain adaptation and simulated radiation.

Different SNN implementations may use different encoding schemes, such as sparse coding, population coding and/or rate coding.

Parent Repository

These algorithms can be analysed using this parent repository. Together, these repos can be used to investigate the effectivity of various brain-adaptation mechanisms applied to these algorithms, in order to increase their [radiation] robustness. You can run it on various backends, as well as on a custom LIF-neuron simulator.

Algorithms

An overview is included of the implemented SNN algorithms and their respective compatibilities with brain-adaptation, radiation and backends implementations:

Algorithm Encoding Adaptation Radiation Backend
Minimum Dominating Set Approximation Sparse Redundancy Neuron Death - networkx LIF
- Lava LIF
Some Algorithm Approximation Sparse Redundancy Neuron Death - networkx LIF
- Lava LIF

retry

Algorithm Encoding Adaptation Radiation Backend
Minimum Dominating Sparse Redundancy Neuron Death - networkx LIF
Set Approximation Sparse Redundancy Neuron Death - Lava LIF
Some Algorithm Sparse Redundancy Neuron Death - networkx LIF

Minimum Dominating Set Approximation

This is an implementation of the distributed algorithm presented by Alipour et al.

  • Input: Non-triangle, planar Networkx graph. (Non triangle means there should not be any 3 nodes that are all connected with each other (forming a triangle)). Planar means that if you lay-out the graph on a piece of paper, no lines intersect (that you can roll it out on a 2D plane).
  • Output: A set of nodes that form a dominating set in the graph.

Description: The algorithm basically consists of k rounds, where you can choose k based on how accurate you want the approximation to be, more rounds (generally) means more accuracy. At the start each node i gets 1 random number r_i. This is kept constant throughout the entire algorithm. Then for the first round:

  • Each node i computes how many neighbours (degree) d_i it has.
  • Then it adds r_i+d_i=w_i. In all consecutive rounds:
  • Each node i "computes" which neighbour has the highest weight w_j, and gives that node 1 mark/point. Then each node i has some mark/score m_i. Next, the weight w_i=r_i+m_i is computed (again) and the next round starts. This last round is repeated until k rounds are completed. At the end, the nodes with a non-zero mark/score m_i are selected to form the dominating set.

Metadata

Release files for snnalgorithms 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snnalgorithms 0.0.1
File Size Uploaded Provenance
snnalgorithms-0.0.1.tar.gz 21.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for snnalgorithms 0.0.1
File Interpreter ABI Platform
snnalgorithms-0.0.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 43.0 kB

Release files / snnalgorithms-0.0.1.tar.gz

Download URL snnalgorithms-0.0.1.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e3025b5d39fa1b83ebc96d3cf8851a165f05307a1e04b98b3012a1ded138d3bf
BLAKE2b-256 checksum
How to use checksums
5005a95aec7eaa273fc8642e5073afe6f6ac8a7d0e1e8cabbf9840dc12cd6348
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / snnalgorithms-0.0.1-py2.py3-none-any.whl

Download URL snnalgorithms-0.0.1-py2.py3-none-any.whl
Size 21.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
89e280f97b307759b674310f954e28e50ac325c9e96514597e0a60f1be684537
BLAKE2b-256 checksum
How to use checksums
c1641d2cda5741ef34d63e5d6af078e8b11b17a92d63eab4d54454fa64c58efb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Security for snnalgorithms 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page