{"id":19647458,"url":"https://github.com/mohazamani/neural-learning-and-coding","last_synced_at":"2026-05-10T20:47:32.204Z","repository":{"id":258179264,"uuid":"804230901","full_name":"MohaZamani/Neural-Learning-and-Coding","owner":"MohaZamani","description":"Explores neural coding schemes and learning mechanisms in neuroscience using STDP and RSTDP models for synaptic plasticity.","archived":false,"fork":false,"pushed_at":"2024-10-17T07:58:11.000Z","size":12916,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T00:24:10.351Z","etag":null,"topics":["computatio","computational-neuroscience","encoding","learning","neural-networks","neuroscience","poisson","spikin","stdp","stdp-learning","ttfs"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MohaZamani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-22T07:48:21.000Z","updated_at":"2024-10-17T14:38:36.000Z","dependencies_parsed_at":"2024-10-17T23:35:06.546Z","dependency_job_id":null,"html_url":"https://github.com/MohaZamani/Neural-Learning-and-Coding","commit_stats":null,"previous_names":["mohazamani/neural-learning-and-coding","mzamani18/neural-learning-and-coding"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MohaZamani/Neural-Learning-and-Coding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FNeural-Learning-and-Coding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FNeural-Learning-and-Coding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FNeural-Learning-and-Coding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FNeural-Learning-and-Coding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MohaZamani","download_url":"https://codeload.github.com/MohaZamani/Neural-Learning-and-Coding/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FNeural-Learning-and-Coding/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285512120,"owners_count":27184313,"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","status":"online","status_checked_at":"2025-11-20T02:00:05.334Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["computatio","computational-neuroscience","encoding","learning","neural-networks","neuroscience","poisson","spikin","stdp","stdp-learning","ttfs"],"created_at":"2024-11-11T14:44:14.754Z","updated_at":"2025-11-20T21:05:35.328Z","avatar_url":"https://github.com/MohaZamani.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neural Coding and Learning Mechanisms in Neuroscience\n\nThis project focuses on various coding schemes and learning methods in neural networks, including **STDP** (Spike-Timing Dependent Plasticity) for unsupervised learning and **RSTDP** (Reward-modulated STDP) for reinforcement learning. It implements models for encoding spike-based information and adjusting synaptic weights in response to input stimuli.\n\n## Table of Contents\n- [Project Overview](#project-overview)\n- [Implemented Features](#implemented-features)\n- [How to Run](#how-to-run)\n- [Results](#results)\n- [References](#references)\n\n## Project Overview\nThe aim of this project is to explore how different neural coding schemes and learning rules can be applied in neuronal networks. It covers spike-based coding strategies such as **Time To First Spike (TTFS)** and **Poisson Distribution Encoding**, as well as learning mechanisms like **STDP** and **RSTDP** for adjusting synaptic weights based on temporal relationships between spikes and rewards.\n\n## Implemented Features\n1. **Neural Coding Schemes**:\n   - **Time To First Spike (TTFS)**: A method of encoding information based on the time of the first spike.\n   - **Poisson Distribution Encoding**: Simulating neuron spiking based on Poisson-distributed input spikes.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./Report/Figs/coding-pic.png\" alt=\"description\" width=\"550\"/\u003e\n\u003c/p\u003e\n\n2. **Unsupervised Learning with STDP**:\n   - **Spike-Timing Dependent Plasticity (STDP)**: Adjusts synaptic weights based on the temporal order of pre- and post-synaptic spikes.\n   \n3. **Reinforcement Learning with RSTDP**:\n   - **Reward-modulated STDP (RSTDP)**: Synaptic plasticity is modulated by external rewards, where rewards reinforce useful patterns of activity.\n\n4. **Synaptic Weight Dynamics**:\n   - Tracks changes in synaptic weights under different input conditions (noisy fixed input, Poisson-distributed inputs).\n\n5. **Cosine Similarity**:\n   - Measures the similarity between synaptic weight vectors over time, showing the clustering of neurons in response to inputs.\n\n6. **Inactive Neuron Impact**:\n   - Analyzes how inactive neurons (neurons that do not spike) affect the overall synaptic weight dynamics.\n\n## How to Run\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/MohaZamani/Neural-Learning-and-Coding.git\n2. Install the necessary dependencies:\n   ```bash\n   pip install -r requirements.txt\n3. Run the simulation notebooks:\n   - **For Encoding**: Open and run `Coding.ipynb`\n   - **For STDP Learning**: Open and run `STDPLearning.ipynb`\n   - **For RSTDP Learning**: Open and run `RSTDPLearning.ipynb`\n\n   You can launch the notebooks using Jupyter by executing:\n   ```bash\n   jupyter notebook\n\n## Results\nResults from the simulations include:\n- **Spike Raster Plots**: Visualizing the spiking activity of neurons under different input coding strategies.\n- **Synaptic Weight Changes**: Charts showing how synaptic weights evolve over time in response to different input conditions.\n- **Cosine Similarity**: Plots measuring the similarity between synaptic weight vectors over time, demonstrating clustering and separation.\n- **Impact of Inactive Neurons**: Analysis of how inactive neurons affect synaptic dynamics and learning processes.\n\nAll simulation results and further analysis is available in the [report](./Report/Report-p03.pdf).\n\n\n## References\n- **Poisson Coding**: [Wikipedia Article on Poisson Distribution](https://en.wikipedia.org/wiki/Poisson_distribution)\n- **Hebbian learning**: [Hebb Rule and Experiments](https://neuronaldynamics.epfl.ch/online/Ch19.S1.html)\n- **Spike-Timing Dependent Plasticity (STDP)**: [Wikipedia Article on STDP](https://en.wikipedia.org/wiki/Spike-timing-dependent_plasticity)\n- **Reward-modulated STDP (RSTDP)**: [Article on R-STDP](https://ieeexplore.ieee.org/document/8460482)\n- **Neural Dynamics**: [Neural Dynamics Online Resources](https://neuronaldynamics.epfl.ch)\n- **Cosine Similarity**: [Wikipedia Article on Cosine Similarity](https://en.wikipedia.org/wiki/Cosine_similarity)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohazamani%2Fneural-learning-and-coding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohazamani%2Fneural-learning-and-coding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohazamani%2Fneural-learning-and-coding/lists"}