CA3 memory model with forgetting mechanism
This sections shows a hippocampus memory model with forgetting mechanism consisting of the minimum operating unit, i.e. the CA3 layer responsible for storage/learning with cues encoded directly in one-hot (Memory class in CA3).
Theoretical model
This memory model comes from the functional minimisation of the hippocampal memory model, CA3, derived from the paper entitled: “A bio-inspired implementation of a sparse-learning spike-based hippocampus memory model”, which can be found here.
To refer to this particular model:
APA: Casanueva-Morato, D., Ayuso-Martinez, A., Dominguez-Morales, J. P., Jimenez-Fernandez, A., & Jimenez-Moreno, G. (2022). A bio-inspired implementation of a sparse-learning spike-based hippocampus memory model. arXiv preprint arXiv:2206.04924.
ISO 690: CASANUEVA-MORATO, Daniel, et al. A bio-inspired implementation of a sparse-learning spike-based hippocampus memory model. arXiv preprint arXiv:2206.04924, 2022.
MLA: Casanueva-Morato, Daniel, et al. “A bio-inspired implementation of a sparse-learning spike-based hippocampus memory model.” arXiv preprint arXiv:2206.04924 (2022).
BIBTEX: @article{casanueva2022a, title={A 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}, journal={arXiv preprint arXiv:2206.04924}, year={2022}}
Class information
- class sPyMem.ca3.CA3.Memory(cueSize, contSize, sim, initCA3W=None, configFilePath=None)
Spike-based bio-inspired hippocampal (CA3 only) memory model with forgetting
- Parameters:
cueSize (int) – number of cues of the memory
contSize (int) – size of the content of the memory in bits/neuron
sim (simulation object (spynnaker8 for spynnaker)) – object in charge of handling the simulation
configFilePath (int, optional) – path + filename to the config file of internal model parameters
initCA3W (list, optional) – list of initial weight to use in CA3 synapse (initial memory content); format of each element of the list: (source_neuron_id, destination_neuron_id, initial_weight, delay)
- Variables:
cueSize (int) – number of cues of the memory, initial value: cueSize
contSize (int) – size of the content of the memory in bits/neuron, initial value: contSize
sim (simulation object (spynnaker8 for spynnaker)) – object in charge of handling the simulation, initial value: sim
CA3cueLayer (population) – CA3cue population
CA3contLayer (population) – CA3cont population
configFilePath (str) – path + filename to the config file of internal model parameters, initial value: configFilePath or internal path to default config file
initCA3W (list) – list of initial weight to use in CA3 synapse (initial memory content); format of each element of the list: (source_neuron_id, destination_neuron_id, initial_weight, delay), initial value: None or input class parameter
popNeurons (dict) – dict that contains the number of neuron of each population, at the input interface level - {“ILayer”: ilInputSize, “DGLayer”: dgInputSize, “CA3cueLayer”: self.cueSize, “CA3contLayer”: self.contSize, “CA1Layer”: self.cueSize, “OLayer”: ilInputSize}
neuronParameters (dict) – all neuron parameters of each population (for more information see Custom config files)
initNeuronParameters (dict) – init membrane potential of each population (for more information see Custom config files)
synParameters (dict) – all synapses parameters of each synapse group (for more information see Custom config files)
synInCueParameters (dict) – IN-CA3cue synapses parameters (for more information see Custom config files)
synInContParameters (dict) – IN-CA3cont synapses parameters (for more information see Custom config files)
synOutCueParameters (dict) – CA3cue-OUT synapses parameters (for more information see Custom config files)
synOutContParameters (dict) – CA3cont-OUT synapses parameters (for more information see Custom config files)
IL_CA3contL_conn (synapse) – IL-CA3cont synapses
IL_CA3cueL_conn (synapse) – IL-CA3cue synapses
CA3cueL_CA3contL_conn (synapse) – CA3cue-CA3cont synapses (STDP)
CA3cueL_OL_conn (synapse) – CA3cue-OL synapses
CA3contL_OL_conn (synapse) – CA3cont-OL synapses
- connect_in(ILayer, synInCueParameters=None, synInContParameters=None)
Create synapses from an input layer to the memory model
- Parameters:
ILayer (population) – input population to the memory model
synInCueParameters (dict) – IL-CA3cueL synapses parameters (for more information see Custom config files)
synInContParameters (dict) – IL-CA3contL synapses parameters (for more information see Custom config files)
- Returns:
- connect_out(OLayer, synOutCueParameters=None, synOutContParameters=None)
Create synapses from the memory model to an output layer
- Parameters:
OLayer (population) – output population of the memory model
synOutCueParameters (dict) – CA3cueL-OL synapses parameters (for more information see Custom config files)
synOutContParameters (dict) – CA3contL-OL synapses parameters (for more information see Custom config files)
- Returns:
- create_population()
Create all populations of the memory model
- Returns:
- create_synapses()
Create all synapses of the memory model
- Returns:
- open_config_files()
Open configuration json file with all the internal parameters needed by the network and assign parameters to variables
- Returns:
- read_json()
Open json file
- Raises:
NameError: path to config file not found- Returns:
the json data as a dict
- Return type:
dict
How to use the model
To integrate the memory model in your own network, just import the model class and instantiate it:
from sPyMem.ca3 import CA3
memory = CA3.Memory(cueSize, contSize, sim)
memory.connect_in(ILayer)
memory.connect_out(OLayer)
The full example can be found at sPyMem Github, and for other examples see Test and applications section.
This model of memory can perform 3 basic operations: learning memories, reacalling learned memories and forgetting them. Forgetting will take place automatically when an attempt is made to learn a memory with the same cue as a previously stored memory.
In order to carry out learning and recall operations in this model, it is necessary to consider the following. For learning operations, spikes need to be held for 3 time units at the input of the memory and no further operation can be performed until 7 time units later. In the case of recall operations, spikes must be displayed for a single time unit and 5 time units must be waited until the next operation.
When performing a learning operation, the network stores a memory and, 3 time units (and 5 time units) after having started the operation, the memory returns the learned memory to its output. In the case of a recall operation, after 3 time units the cue used to start the operation will appear at the memory output and one time unit later the rest of the memory.
The main difference with the hippocampus_with_forgetting and hippocampus_bioinspired_dg_ca1 models is that in this model the cue must be input directly encoded in one-hot, and not in binary encoding. This encoding were avoided in the hippocampus_with_forgetting and hippocampus_bioinspired_dg_ca1 models thanks to the use of the DG layer at the input and CA1 layer at the output. If it makes no difference whether binary or one-hot encoding is used, by using this model, both layers of neurons are eliminated, i.e. computational resources are saved while functionality is maintained. This model opens up the possibility to work with memory implementations of higher learning/storage capacity.
For more information on this temporality, principles of operation, internal functioning, … read the paper.
Custom config files
When the memory model is instantiated, if no value is passed to the configFilePath variable, it will take the default configuration file. This can be found in the sPyMem Github repository.
This file contains all the parameters that define the neuron models and the initial state of the neurons of each population, as well as all the parameters necessary to create the synapses between populations. Among these synapses, there are also those connecting the input and output populations of the model.
Although changes to any internal network parameters are discouraged as the results of the network could be unpredictable, the user is allowed to define a different configuration file. This could be done by downloading the default configuration file, changing the desired parameters and passing the complete path to it as the network creation parameter. In this way, the network will take the internal parameters indicated in the new configuration file.
The file format is a json file with 3 main fields:
neuronParameters: parameters of the LIF neuron model used for each population.
initNeuronParameters: initial conditions at the level of membrane potential of the neurons in each population.
synParameters: internal parameters of the synapse models used for each set of connections between populations.