A spiking recurrent neural network model to perform a stimulus match / non-match discrimination task 1, 2. We use Nengo to build and parameterize our model. Additionally, the model is constrained in various ways to better emulate real neural data recorded from monkey PFC while the monkeys performed this task 3.
This project is born out of the Telluride 2020 Neuromorphic Engineering Workshop. Some of the contributors to this project are interested in building invasive brain computer interfaces (iBCIs) that are robust to non-stationarity in neuron-sampling space across sessions and robust to non-relevant stimulus processing of naturalistic stimuli. To build and test decoders with these properties of robustness, it is essential to have a model that can generate realistic neural data. In this project we aim to make such a model.
This work is inspired by the work of Kim, Li & Sejnowski 4, 5 which also models this same task and is evaluated against these same data.
The notebooks
folder contains Jupyter notebooks to do different parts of the model building and analysis. Most of these notebooks should be able to run on Google Colab. Just click on the appropriate link in the table in notebooks/README.md
.
However, many of us want to work locally, especially as we are developing and testing, so we use the below instructions to setup our development environment.
nengo-bio only works on Linux currently so that is the only platform supported when using Dale's Law.
- Install miniconda. After miniconda is installed, open a new Terminal or "Anaconda Prompt".
conda config --append channels conda-forge
- Create a new conda environment:
conda create -n srnn_pfc python=3.7 --yes
- Activate the environment:
conda activate srnn_pfc
(sometimessource activate srnn_pfc
on Linux/Mac) - Install the dependencies (this list may update frequently):
- I encountered segfaults when installing OpenCL to the conda env only, so install system OpenCL:
- On Linux if using nVidia opencl:
- Maybe enough to install CUDA
- Otherwise,
sudo apt-get install nvidia-opencl-common nvidia-libopencl1
- On Linux if using intel opencl: Instructions here.
- On Windows, if using Intel: Download and install Intel {X} Processor Runtimes
- On Windows, if using nVidia: I haven't tried this yet.
- On Linux if using nVidia opencl:
- All:
conda install numpy scipy jupyter matplotlib pandas pyopencl ocl-icd-system --yes
ocl-icd-system
tells pyopencl to use the system ICD.
pip install --upgrade nengo nengo-gui nbdev nni xlrd quantities neo elephant nengo-bio pingouin nengo-ocl
- nengo-bio only works on Linux currently
- I encountered segfaults when installing OpenCL to the conda env only, so install system OpenCL:
- Activate nengo jupyter extension:
jupyter serverextension enable nengo_gui.jupyter
- Clone this repository:
git clone https://github.com/neuromorphs/grill-srnn-pfc.git && cd grill-srnn-pfc
- Install this repository's python package in-place:
pip install -e .
- Change to the
notebooks
folder and launch the server:cd notebooks
jupyter notebook
There are more instructions in the notebooks README.md
- 1 Changes in Prefrontal Neuronal Activity after Learning to Perform a Spatial Working Memory Task. Qi et al., Cerebral Cortex, 2011
- 2 Stimulus selectivity in dorsal and ventral prefrontal cortex after training in working memory tasks. Meyer et al., J Neuroscience, 2011
- 3 Christos Constantinidis, Xue-Lian Qi, Travis Meyer (2016). Single-neuron spike train recordings from macaque prefrontal cortex during a visual working memory task before and after training. CRCNS.org. http://dx.doi.org/10.6080/K0ZW1HVD
- 4 Kim & Sejnowski, PNAS 2019
- 5 Kim & Sejnowski, bioRxiv 2020
- Kim & Sejnowski code at https://github.com/rkim35/spikeRNN