Skip to content

A fully-functional real-time application for simple image storage serving as a proof of concept of a sparse-learning spike-based bio-inspired hippocampal memory model implemented with SNN technology in the SpiNNaker hardware

License

Notifications You must be signed in to change notification settings

dancasmor/Real-time-spike-based-hippocampus-memory-model-for-image-storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Live Demonstration: Bio-inspired implementation of a sparse-learning spike-based hippocampus memory model

Description

Code on which the paper entitled "Live Demonstration: Bio-inspired implementation of a sparse-learning spike-based hippocampus memory model" is based, published in 2023 IEEE International Symposium on Circuits and Systems (ISCAS).

A real-time demonstration of hippocampal bio-inspired spiking memory operation, presented in previous work and present in the Python sPyMem library, is presented through an image learning and recall application. The user is allowed through a GUI to create 5x5 pixel black and white images that will be spatially encoded and sent to memory. The result of the simulation during both operations is represented as a reconstructed image based on the output spiking activity of the network. Moreover, an additional application is included that allows to visualise the internal spiking activity of the network during the simulation in detail for each time step.

Please go to section cite this work to learn how to properly reference the works cited here.

Table of contents

Article

Title: Live Demonstration: Bio-inspired implementation of a sparse-learning spike-based hippocampus memory model

Abstract: The hippocampus acts as a short-term memory capable of recalling a previously-learned complete memory from a fragment of it. Inspired by the hippocampus and taking into account its input from the visual stream, a neuromorphic system capable of learning images and remembering them from a fragment of it in real time was developed. The system contains a bio-inspired hippocampal spiking memory that acts as an autoassociative network that, for each input image, associates the spatial activation patterns of the pixels of the image. A monitor has been designed to visualize the internal spiking activity of the network during the simulation.

Keywords: Hippocampus model, Spiking neural networks, Spiking memory, Neuromorphic engineering, SpiNNaker

Author: Daniel Casanueva-Morato

Contact: dcasanueva@us.es

Instalation

  1. Have or have access to the SpiNNaker hardware platform. In case of local use, follow the installation instructions available on the official website
  2. Python version 3.8.10
  3. Python libraries:
    • sPyNNaker8 or sPyNNaker (changing "import spynnaker8 as sim" to import "pyNN.spiNNaker as sim")

    • PyQt5 5.15.6
    • sPyMem

To run any script, follow the python nomenclature: python script.py

Repository content

  • real_time_image_memory_app.py: script in charge of building and launching the simulation of the spiking neuromorphic system, as well as launching the graphical user interface (GUI). This system consists of a hippocampus bio-inspired spiking memory from the library sPyMem and allows the learning and recall of 5x5 pixel black and white images with spiking spatial coding, all in real time. At the end of the simulation, the simulation results can be saved in two files in the data folder.

  • gui.py: script in charge of managing the GUI for communication with the spiking memory. It allows the user to construct the input images to the network, manage the operations (learning and recall) to be performed with the memory and the reconstruction of the network output images from its output spiking activity.

  • trace_app.py: script that allows the user through a GUI to navigate and visualise the spiking activity of the whole network throughout the simulation. To select the simulation to visualise, the path to the file "_trace.txt" can be passed as an argument in the execution command or the internal path parameter of the code can be modified.

  • gui.ui and trace.ui: files with the information needed in PyQt5 to generate the GUI.

  • data folder: contains the results of the saved simulations. For each simulation, 2 files are generated and stored. The file ending in "_memory.txt" stores the contents of the memory at the end of the simulation. The file ending "_trace.txt" contains the spiking activity trace of the whole network which can be visualised with the script trace_app.py.

  • media folder: contains the GUI images of both applications in operation, as well as a video demonstration of their operation.

Usage

To run the live demonstration of the bio-inspired hippocampus spiking memory with the ability to learn and recall 5x5 pixel black and white images, run real_time_image_memory_app.py. This will display the GUI in charge of user interaction with the spiking system. Initially, it will be necessary to indicate the simulation time to be used. After that, press the start simulation button. When the simulation is ready, the panel for drawing the 5x5 image (by clicking with the mouse on each pixel) and the buttons for learning and recall operations will be unlocked. The 5x5 panel on the right represents the reconstruction of the output image of the network from its output pulsed activity.

After finishing the simulation, the simulation result can be saved by clicking on the save button. This will generate two data files which are detailed in Repository content. To check the spiking activity trace of the network during the simulation you can run trace_app.py by passing the path to the generated "_trace.txt" file as an execution parameter (or you can also modify the path parameter of the script). In the application window that will open, the characteristics of the simulation and the network can be observed, as well as the visualisation of the spiking activity of the network both schematically (drawing of the network with green activation of the populations that are being activated) and in detail (indicating each neuron of each population that is activated) at each instant of time.

Cite this work

APA: Casanueva-Morato, D., Ayuso-Martinez, A., Dominguez-Morales, J. P., Jimenez-Fernandez, A., & Jimenez-Moreno, G. (2023, May). Live Demonstration: Bio-inspired implementation of a sparse-learning spike-based hippocampus memory model. In 2023 IEEE International Symposium on Circuits and Systems (ISCAS) (pp. 1-1). IEEE.

ISO 690: CASANUEVA-MORATO, Daniel, et al. Live Demonstration: Bio-inspired implementation of a sparse-learning spike-based hippocampus memory model. En 2023 IEEE International Symposium on Circuits and Systems (ISCAS). IEEE, 2023. p. 1-1.

MLA: Casanueva-Morato, Daniel, et al. "Live Demonstration: Bio-inspired implementation of a sparse-learning spike-based hippocampus memory model." 2023 IEEE International Symposium on Circuits and Systems (ISCAS). IEEE, 2023.

BibTeX: @inproceedings{casanueva2023live, title={Live Demonstration: Bio-inspired implementation of a sparse-learning spike-based hippocampus memory model}, author={Casanueva-Morato, Daniel and Ayuso-Martinez, Alvaro and Dominguez-Morales, Juan P and Jimenez-Fernandez, Angel and Jimenez-Moreno, Gabriel}, booktitle={2023 IEEE International Symposium on Circuits and Systems (ISCAS)}, pages={1--1}, year={2023}, organization={IEEE} }

Credits

The author of the original idea is Daniel Casanueva-Morato while working on a research project of the RTC Group.

This work is supported by grant MINDROB (PID2019-105556GB-C33) funded by MICIU/AEI /10.13039/501100011033.

D. C.-M. was supported by a “Formación de Profesorado Universitario” Scholarship from the Spanish Ministry of Science, Innovation and Universities.

License

This project is licensed under the GPL License - see the LICENSE.md file for details.

Copyright © 2022 Daniel Casanueva-Morato
dcasanueva@us.es

License: GPL v3

About

A fully-functional real-time application for simple image storage serving as a proof of concept of a sparse-learning spike-based bio-inspired hippocampal memory model implemented with SNN technology in the SpiNNaker hardware

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages