CA3 content addressable memory model with forgetting mechanism

This sections shows a hippocampus memory model with forgetting mechanism and addressable by address and content (Memory class in ca3_content_addressable).

Theoretical model

This hippocampal memory model builds on the foundations of the CA3 model to address content from the addresses to which they are associated and extends it to address addresses from content. In other words, from a binary content input (each bit/neuron of the content is made up of 0’s or no pulse and 1’s or neuron activation), the memory returns in which addresses it has as content at least one 1 (or active neuron) in one of those positions.

(In progress to publish this new model …)

Class information

class sPyMem.CA3_content_addressable.CA3_content_addressable.Memory(cueSize, contSize, sim, initCA3CueContW=None, initCA3ContCueW=None, configFilePath=None)

Spike-based bio-inspired hippocampal (CA3 only with complex interconections) memory model with forgetting and content addressable

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

  • initCA3CueContW (list, optional) – list of initial weight to use in CA3cue-CA3cont synapse (initial memory content); format of each element of the list: (source_neuron_id, destination_neuron_id, initial_weight, delay)

  • initCA3ContCueW (list, optional) – list of initial weight to use in CA3cont-CA3cue 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

  • CA3cueCueRecallLayer (population) – CA3cueCueRecall population

  • CA3cueContRecallLayer (population) – CA3cueContRecall population

  • CA3contCueRecallLayer (population) – CA3contCueRecall population

  • CA3contContRecallLayer (population) – CA3contContRecall population

  • CA3contCondLayer (population) – CA3contCond population

  • CA3contCondIntLayer (population) – CA3contCond population

  • CA3mergeCueLayer (population) – CA3mergeCue population

  • CA3mergeContLayer (population) – CA3mergeCont population

  • configFilePath (str) – path + filename to the config file of internal model parameters, initial value: configFilePath or internal path to default config file

  • initCA3CueContW (list) – list of initial weight to use in CA3cue-CA3cont synapse (initial memory content); format of each element of the list: (source_neuron_id, destination_neuron_id, initial_weight, delay)

  • initCA3ContCueW (list) – list of initial weight to use in CA3cont-CA3cue synapse (initial memory content); format of each element of the list: (source_neuron_id, destination_neuron_id, initial_weight, delay)

  • 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) – IL-CA3cueCueRecallL synapses parameters (for more information see Custom config files)

  • synInContParameters (dict) – IL-CA3contCueRecallL synapses parameters (for more information see Custom config files)

  • synOutCueParameters (dict) – CA3mergeCue-Output synapses parameters (for more information see Custom config files)

  • synOutContParameters (dict) – CA3mergeCont-Output synapses parameters (for more information see Custom config files)

  • IL_CA3cueCueRecallL_conn (synapse) – IL-CA3cueCueRecallL synapses

  • CA3cueCueRecallL_CA3cueContRecallL_conn (synapse) – CA3cueCueRecallL-CA3cueContRecallL synapses

  • CA3cueCueRecallLL_CA3cueContRecallL_inh_conn (synapse) – CA3cueCueRecallL-CA3cueContRecallL-inh synapses

  • IL_CA3contCueRecallL_conn (synapse) – IL-CA3contCueRecallL synapses (STDP)

  • CA3contCueRecallL_CA3contContRecallL_conn – CA3contCueRecallL-CA3contContRecallL synapses (STDP)

  • CA3contCueRecallLCA3contCondL_conn (synapse) – CA3contCueRecallL-CA3contCondL synapses

  • CA3contCueRecallLCA3contCondIntL_conn (synapse) – CA3contCueRecallL-CA3contCondIntL synapses

  • CA3contCondIntLCA3contCondL_conn (synapse) – CA3contCondIntL-CA3contCondInt synapses

  • CA3contCondLCA3contContRecallL_conn (synapse) – CA3contCondL-CA3contContRecallL synapses

  • CA3contContRecallL_CA3cueContRecallL_conn (synapse) – CA3contContRecallL-CA3cueContRecallL synapses

  • CA3cueCueRecallL_CA3mergeCueL_conn (synapse) – CA3cueCueRecallL-CA3mergeCueL synapses

  • CA3cueContRecallL_CA3mergeCueL_conn (synapse) – CA3cueContRecallL-CA3mergeCueL synapses

  • CA3contCueRecallL_CA3mergeContL_conn (synapse) – CA3contCueRecallL-CA3mergeContL synapses

  • CA3contContRecallL_CA3mergeContL_conn (synapse) – CA3contContRecallL-CA3mergeContL synapses

  • CA3mergeCueL_OL_conn (synapse) – CA3mergeCueL-OL synapses

  • CA3mergeContL_OL_conn (synapse) – CA3mergeContL-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-CA3cueCueRecallL synapses parameters (for more information see Custom config files)

  • synInContParameters (dict) – IL-CA3contCueRecallL 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) – CA3mergeCue-Output synapses parameters (for more information see Custom config files)

  • synOutContParameters (dict) – CA3mergeCont-Output 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_content_addressable import CA3_content_addressable

memory = CA3_content_addressable.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 the 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. The main difference with CA3 model is that it has two types of recall operations. The first is to recall the content from a cue, for which a cue or address is passed and the memory returns the rest of the content associated with that address. The second is to recall which addresses are associated with a piece of content. To do this, a piece of content is passed and the memory returns those addresses that match at least one 1 of the content with which they are associated.

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 6 time units must be waited until the next operation.

When performing a learning operation, the network stores a memory and, 5 (and 7) time units after having started the operation, the memory returns the learned memory to its output. In the case of a recall operation, after 5 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.

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.