{"id":25179645,"url":"https://github.com/saran-nns/sorn","last_synced_at":"2025-03-17T08:06:19.367Z","repository":{"id":34293253,"uuid":"174756058","full_name":"Saran-nns/sorn","owner":"Saran-nns","description":"PyPi Package of Self-Organizing Recurrent Neural Networks (SORN) and Neuro-robotics using OpenAI Gym","archived":false,"fork":false,"pushed_at":"2024-09-04T13:15:47.000Z","size":34862,"stargazers_count":37,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-03T11:14:43.951Z","etag":null,"topics":["associative-networks","autonomous-agents","bolzmann-machines","brain-inspired-computing","complex-networks","cortical-learning","cortical-network","hebbian-learning","hopfield-network","machine-learning","neuro-computing","neuroinformatics","neuroplasticity","point-neurons","reinforcement-learning","reservoir-computing","self-organizing-criticality","self-organizing-network","sorn"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Saran-nns.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-09T23:11:40.000Z","updated_at":"2025-02-25T13:11:52.000Z","dependencies_parsed_at":"2025-02-10T08:15:33.195Z","dependency_job_id":null,"html_url":"https://github.com/Saran-nns/sorn","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saran-nns%2Fsorn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saran-nns%2Fsorn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saran-nns%2Fsorn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saran-nns%2Fsorn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Saran-nns","download_url":"https://codeload.github.com/Saran-nns/sorn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243997087,"owners_count":20380979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["associative-networks","autonomous-agents","bolzmann-machines","brain-inspired-computing","complex-networks","cortical-learning","cortical-network","hebbian-learning","hopfield-network","machine-learning","neuro-computing","neuroinformatics","neuroplasticity","point-neurons","reinforcement-learning","reservoir-computing","self-organizing-criticality","self-organizing-network","sorn"],"created_at":"2025-02-09T15:37:37.185Z","updated_at":"2025-03-17T08:06:19.338Z","avatar_url":"https://github.com/Saran-nns.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Self-Organizing Recurrent Neural Networks\n\nSORN is a class of neuro-inspired artificial network build based on plasticity mechanisms in biological brain and mimic neocortical circuits ability of learning and adaptation. SORN consists of pool of excitatory neurons and small population of inhibitory neurons which are controlled by 5 plasticity mechanisms found in neocortex, namely Spike Timing Dependent Plasticity (STDP), Intrinsic Plasticity (IP), Synaptic Scaling (SS),Synaptic Normalization(SN) and inhibitory Spike Timing Dependent Plasticity (iSTDP). Using mathematical tools, SORN network simplifies the underlying structural and functional connectivity mechanisms responsible for learning and memory in the brain\n\n'sorn' is a Python package designed for Self Organizing Recurrent Neural Networks. It provides a research environment for computational neuroscientists to study the self-organization, adaption, learning,memory and behavior of brain circuits by reverse engineering neural plasticity mechanisms. Further to extend the potential applications of `sorn`, a demostrative example of a neuro-robotics experiment using OpenAI gym is also [documented](https://self-organizing-recurrent-neural-networks.readthedocs.io/en/latest/usage.html).\n\n\n[![Build Status](https://github.com/saran-nns/sorn/workflows/Build/badge.svg)](https://github.com/saran-nns/sorn/actions)\n[![codecov](https://codecov.io/gh/Saran-nns/sorn/branch/master/graph/badge.svg)](https://codecov.io/gh/Saran-nns/sorn)\n[![Documentation Status](https://readthedocs.org/projects/self-organizing-recurrent-neural-networks/badge/?version=latest)](https://self-organizing-recurrent-neural-networks.readthedocs.io/en/latest/?badge=latest)\n[![PyPI version](https://badge.fury.io/py/sorn.svg)](https://badge.fury.io/py/sorn)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Downloads](https://pepy.tech/badge/sorn)](https://pepy.tech/project/sorn)\n[![DOI](https://zenodo.org/badge/174756058.svg)](https://zenodo.org/badge/latestdoi/174756058)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/164AKTA-iCVLq-iR-treLA_Y9keRYrQkH#scrollTo=Rt2YZptMtC14)\n[![status](https://joss.theoj.org/papers/7dc447f7a0d17d774b59c8ee15c223c2/status.svg)](https://joss.theoj.org/papers/7dc447f7a0d17d774b59c8ee15c223c2)\n\n\u003ch4 align=\"Left\"\u003eSORN Reservoir\u003c/h4\u003e\n\u003ca href=\"url\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/Saran-nns/sorn/master/imgs/SORN1.png\" height=\"320\" width=\"430\"\u003e\u003c/a\u003e\n\n## Installation\n\n```python\npip install sorn\n```\n\nor to install the latest version from the development branch\n\n```python\npip install git+https://github.com/Saran-nns/sorn\n```\n\n## Dependencies\nSORN supports `Python 3.7+` ONLY. For older Python versions please use the official Python client.\nTo install all optional dependencies,\n\n```python\n  pip install 'sorn[all]'\n```\n## Usage\n### Plasticity Phase\n\n```python\nimport sorn\nfrom sorn import Simulator\nimport numpy as np\n\n# Sample input\nnum_features = 10\ntime_steps = 200\ninputs = np.random.rand(num_features,time_steps)\n\n# Simulate the network with default hyperparameters under gaussian white noise\nstate_dict, sim_dict = Simulator.run(inputs=inputs, phase='plasticity',\n                                     state=None, noise=True,\n                                     timesteps=time_steps,\n                                     callbacks=[\"ExcitatoryActivation\", \n                                                \"WEE\", \n                                                \"EEConnectionCounts\"])\n\n```\n```\nNetwork Initialized\nNumber of connections in Wee 3909 , Wei 1574, Wie 8000\nShapes Wee (200, 200) Wei (40, 200) Wie (200, 40)\n```\n### Training Phase\n```python\nfrom sorn import Trainer\n# NOTE: During training phase, input to `sorn` should have second (time) dimension set to 1. ie., input shape should be (input_features,1).\n\ninputs = np.random.rand(num_features,1)\n\n# SORN network is frozen during training phase\nstate_dict, sim_dict = Trainer.run(inputs= inputs, phase='training',\n                                   state=state_dict, noise=False,\n                                   timesteps=1,\n                                   ne=100, nu=num_features,\n                                   lambda_ee=10, eta_stdp=0.001, \n                                   callbacks=[\"InhibitoryActivation\", \n                                              \"WEI\", \n                                              \"EIConnectionCounts\"] )\n```\n### Network Output Descriptions\n  `state_dict`  - Dictionary of connection weights (`Wee`, `Wei`, `Wie`) , Excitatory network activity (`X`), Inhibitory network activities(`Y`), Threshold values (`Te`, `Ti`)\n\n  `sim_dict` - Dictionary of network states and parameters collected during the simulation/training: Provided, all available options of the argument `callbacks`, then the `sim_dict` should contain the following;\n\n      \"ExcitatoryActivation\" - Excitatory network activity of entire simulation period\n\n      \"InhibitoryActivation\" - Inhibitory network activity of entire simulation period\n\n      \"RecurrentActivation\" - Recurrent network activity of entire simulation period\n\n      \"EEConnectionCounts\" - Number of active connections in the Excitatory pool at each time step\n\n      \"EIConnectionCounts\" - Number of active connections from Inhibitory to Excitatory pool at each time step\n\n      \"TE\" - Threshold values of excitatory neurons at each time step\n\n      \"TI\" - Threshold values of inhibitory neurons at each time step\n\n      \"WEE\" - Synaptic efficacies between excitatory neurons\n\n      \"WEI\" - Connection weights from inhibitory to excitatory neurons\n\n      \"WIE\" - Connection weights from excitatory to inhibitory neurons\n\n\n### Documentation\nFor detailed documentation about development, analysis, plotting methods and a sample experiment with OpenAI Gym, please visit [SORN Documentation](https://self-organizing-recurrent-neural-networks.readthedocs.io/en/latest/)\n\n### Citation\n\n```Python\n@article{Nambusubramaniyan2021,\n  doi = {10.21105/joss.03545},\n  url = {https://doi.org/10.21105/joss.03545},\n  year = {2021},\n  publisher = {The Open Journal},\n  volume = {6},\n  number = {65},\n  pages = {3545},\n  author = {Saranraj Nambusubramaniyan},\n  title = {`sorn`: A Python package for Self Organizing Recurrent Neural Network},\n  journal = {Journal of Open Source Software}\n}\n```\n\n### Contributions\nI am welcoming contributions. If you wish to contribute, please create a branch with a pull request and the changes can be discussed there.\nIf you find a bug in the code or errors in the documentation, please open a new issue in the Github repository and report the bug or the error. Please provide sufficient information for the bug to be reproduced.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaran-nns%2Fsorn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaran-nns%2Fsorn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaran-nns%2Fsorn/lists"}