1. Introduction
Memory is referred to as the brain’s ability to recall experiences or information that is encountered or learnt previously. If this information is recalled using only partial inputs, we refer to it as Associative Memory (AM) [
1,
2]. There are three main types of memory in the brain, namely sensory memory, short-term or working memory, and long-term memory, which function in different ways, but each of these types are manifested through brain activities in space (areas of the brain) and time (spiking sequences), stored as connection weights and recalled always with only partial input information in time and space. AM in the brain is always spatio-temporal.
Humans can learn and understand many categories and objects from spatio-temporal stimuli by finding spatial and temporal association between them. Inspired by this human brain capability, AM has been introduced to the machine learning field to memorize information and retrieve it from partial or noisy data. For example, neural network models for associative pattern recognition was proposed by J.Hopfield [
3] and B.Kosko [
4]. In 2019 Haga and Fukai [
5] introduced a memory system for neural networks based on an attractor network, which is a group of connected nodes that display patterns of activity and tend towards certain states. They applied the concept of excitatory and inhibitory nodes to their proposed network to mimic the role of hippocampus in balancing network to form new association. The work above related to vector-based data (e.g., static images) and not to spatio-temporal data. None of them related specifically to neuroimaging (NI) data.
The idea of using a brain-inspired and brain-structured spiking neural network (SNN) as a spatio-temporal associative memory (STAM) was first introduced in [
6] as part of the NeuCube SNN architecture, but the main concepts and definitions of STAM were introduced in [
7], where a NeuCube model, trained on complete spatio-temporal data, creating spatio-temporal patterns in its connections, is recalled when only partial spatio- or/and temporal information is provided as inputs.
In this paper we introduce for the first time STAM on NI data, such as EEG and fMRI. The paper is organized in the following way.
Section 2 presents the background concept of STAM from [
7].
Section 3 presents a STAM-EEG classification model, while section 4 presents a STAM-fMRI classification model.
Section 5 is a conclusion and further discussions towards using the STAM approach across bioengineering applications, including multimodal neuroimaging data.
3. STAM-EEG for classification
3.1. The proposed STAM-EEG classification method
The proposed STAM-EEG classification method, consists of the following steps:
Defining the spatial and the temporal components of the EEG data for the classification task, e.g., EEG channels and EEG time series data.
Designing a SNNcube that is structured according to a brain template suitable for the EEG data (e.g., Talairach, or MNI, etc.).
Defining the mapping in the input EEG channels into the SNNcube 3D structure (see
Figure 3a as an example of mapping 14 EEG channels in a Talairach structured SNNcube).
Encode data and train a NeuCube model to classify a complete spatio-temporal EEG data, having K EEG channels measured over time T.
Analyse the model through cluster analysis, spiking activity and the EEG channel spiking proportional diagram (Figs. 3b, c,d,e).
Recall the STAM-EEG model on the same data and same variables but measured over time T1 < T to calculate the classification temporal association accuracy.
Recall the STAM-EEG model on K1<K EEG channels to evaluate the classification spatial association accuracy.
Recall the model on the same variables, measured over time T or T1 < T on a new data to calculate the classification temporal generalization accuracy.
Recall the NeuCube model on K1<K EEG channels to evaluate the classification spatial generalization accuracy using a new EEG dataset.
Evaluate the K1 EEG channels as potential classification brain biomarkers according to the problem at hand.
3.2. Experimental results
The EEG data consist of 60 recordings of 14 EEG channels of a subject who is moving a wrist: up (class 1), straight (class 2) and down (class 3). The data includes 20 samples for each class, each sample measured as 128 time points used to discretize 1,000ms signal.
The main question to address here is: What will be the classification temporal association accuracy when a trained NeuCube STAM-EEG model on all 60 samples and 14 variables is recalled on a shorter sub-section of time of the same variables and same data? The parameter settings of the STAM-EEG NeuCube model are shown
Table 1.
To validate the performance of a NeuCube STAM-EEG model in the realm of associative memory tasks, we initially trained the full model with a complete set of 60 samples (
Figure 3a) and analyzed the connectivity and the spiking activity of the model (
Figure 3b-e).
To evaluate the classification temporal association accuracy of the fully trained NeuCube STAM-EEG model from Figs.4a-e, the model was recalled with the same EEG data but on a smaller percentage of time. The validation results are shown in
Table 2, along with a new association measurement introduced here, called retained temporal association (RTA) as calculated using Equation. 2 below:
where:
Af is the classification accuracy of the full model, validated on the same training data, and
Ar is the accuracy of the model validated on the same data, but using shorter time series.
3.3. Why STAM-EEG are needed?
The proposed in this section method STAM-EEG, based on the NeuCube SNN, is illustrated on a simple EEG problem, but its applicability is wide across any studies involving EEG data. A large STAM-EEG system can be developed for a particular problem, involving millions of EEG samples and hundreds of EEG channels, integrating EEG data from different sources and studies. This model can be validated for its temporal and spatial association and generalisation accuracy on a particular sub-set of EEG channels, measured at shorter times. If the validation accuracies are acceptable, then the model can be successfully used on the new EEG data.
In this case, studies that resulted in smaller, but specific data sets, can benefit from the use of larger models on the same problem.
5. Discussions, conclusions, and directions for further research
The potential applications of the STAM-EEG and STAM-fMRI become evident in various fields, including post-stroke recovery prediction, early diagnosis, and prognosis of mild cognitive impairment (MCI) and Alzheimer's disease (AD), as well as depression and other mental health conditions. These applications can leverage neuroimaging techniques such as EEG and fMRI to analyze spatio-temporal patterns of brain activity and make accurate predictions or classifications.
One notable application is in post-stroke recovery prediction. By training the STAM model on neuroimaging data collected from stroke patients, it can learn the spatio-temporal patterns associated with successful recovery. Subsequently, the model can be recalled using only partial neuroimaging variables or timepoints to predict the recovery trajectory of new stroke patients. This capability can assist clinicians in personalized treatment planning and rehabilitation strategies [
23,
24].
Another application lies in the early diagnosis and prognosis of MCI and Alzheimer's disease. By training the STAM model on longitudinal neuroimaging data, such as EEG and fMRI recordings, from individuals with and without MCI/AD, it can learn the complex spatio-temporal patterns indicative of disease progression. The model can then be utilized to classify new individuals based on their neuroimaging data, enabling early detection and intervention for improved patient outcomes [
25,
26].
Depression is another mental health condition that can benefit from the STAM systems. By training the model on neuroimaging data, such as resting-state fMRI, from individuals with depression, it can capture the spatio-temporal associations related to the disorder. This trained model can subsequently be used to classify new individuals as either depressed or non-depressed based on their neuroimaging data, aiding in early diagnosis and treatment planning [
27].
Furthermore, the STAM systems hold potential for applications in neurodevelopmental disorders, such as autism spectrum disorder (ASD). By training the model on EEG data, it can identify distinctive spatio-temporal patterns associated with ASD, contributing to early diagnosis and intervention [
28]. Similarly, the framework can be applied to investigate brain disorders related to aging, such as Parkinson's disease or age-related cognitive decline [
29].
By incorporating multimodal spatio-temporal data, including clinical, genetic, cognitive, and demographic information, during the training phase, a STAM model can enable comprehensive analyses. This integration of multiple modalities aims to enhance the model's ability to make accurate predictions or classifications, even when only a subset of the modalities is available for recall. Such a capability can provide valuable insights for personalized medicine, treatment planning, and patient management [
30].
One challenge in STAM system design is how it can effectively associate different data modalities during learning, enabling successful recall even when only one modality is available. For instance, can a STAM model learn brain data from synesthetic subjects who experience auditory sensations when they see colors? Addressing this challenge requires leveraging prior knowledge about brain structural and functional pathways, as well as stimuli data and corresponding spatio-temporal data from subjects. Current understanding of structural connectivity and functional pathways during perception can be utilized to initialize the connectivity of the SNN Cube before training [
31,
32,
33].
Another open question pertains to how sound, image, and brain response data (e.g., EEG, fMRI) can be inputted as associated spatio-temporal patterns into dedicated groups of neurons. This concept aligns with the principles employed in neuroprosthetics, where stimulus signals are delivered to specific brain regions to compensate for damage, effectively "skipping" damaged areas [
34], [
35]. Experiments conducted using the STAM-SNN framework have the potential to provide insights and ideas for the development of new types of neuroprosthetics that leverage spatio-temporal associations in neural activity.
Looking ahead, a future challenge in utilizing NeuCube as a STAM is incorporating other multimodal spatio-temporal data in addition to NI data, including clinical, genetic, cognitive, demographic, and other modalities, during the training phase. Subsequently, the model should still be able to achieve accurate classifications or predictions even when only a subset of the modalities is available for recall. This challenge necessitates the exploration of novel methodologies that can effectively handle multimodal spatio-temporal data and extract meaningful patterns from diverse sources.
The STAM approached from [
7] was used here for NI data, but it can be used for multisensory data streams, where spatial or temporal similarity information can be converted into spatial location of neurons in a SNNcube [
36,
37] and then a STAM is developed based on the methods above for early prediction of events, such as stroke [
38], psychosis [
39], air pollution [
40,
41].
STAM, based on SNN, can be implemented in neuromorphic microchips, consuming much less energy and being implantable for on-line adaptive learning and control [42-45] with wider applications [46-51].
Figure 1.
Learning in SNN relates to changes of the connection weights between two spatially located spiking neurons over time, so that both “time” and “space” is learned in the spatially distributed connections (from Wikipedia).
Figure 1.
Learning in SNN relates to changes of the connection weights between two spatially located spiking neurons over time, so that both “time” and “space” is learned in the spatially distributed connections (from Wikipedia).
Figure 2.
The NeuCube brain-inspired SNN architecture (from [
6]).
Figure 2.
The NeuCube brain-inspired SNN architecture (from [
6]).
Figure 3.
a. Training NeuCube STAM-EEG model on full data (60 EEG samples). b. Post-training neuronal connectivity and cluster formations. c. Visual depiction of NeuCube's inhibitory and excitatory connections subsequent to training with the Wrist Movement dataset. d. Visual representation of the neuronal spiking activity in NeuCube following the training for the Wrist Movement dataset. e.f. The proportion of input neurons in NeuCube significantly impacts the classification of EEG data associated with wrist movements. (e) EEG electrodes layout (f) NeuCube input neuron proportions in classification results.
Figure 3.
a. Training NeuCube STAM-EEG model on full data (60 EEG samples). b. Post-training neuronal connectivity and cluster formations. c. Visual depiction of NeuCube's inhibitory and excitatory connections subsequent to training with the Wrist Movement dataset. d. Visual representation of the neuronal spiking activity in NeuCube following the training for the Wrist Movement dataset. e.f. The proportion of input neurons in NeuCube significantly impacts the classification of EEG data associated with wrist movements. (e) EEG electrodes layout (f) NeuCube input neuron proportions in classification results.
Figure 4.
(a) Mapping of the 5,062 fMRI voxels into a 3D SNN model; (b) selecting the top-20 voxels as input variables using SNR ranking (on the y-axis) of top voxels (on the x-axis) related to the affirmative versus negative sentences. The top voxels were selected according to their SNR values that were greater than a threshold= 0.4. (c) NeuCube model trained and tested on the whole fMRI data time points using all the 40 samples resulted in 100% association accuracy.
Figure 4.
(a) Mapping of the 5,062 fMRI voxels into a 3D SNN model; (b) selecting the top-20 voxels as input variables using SNR ranking (on the y-axis) of top voxels (on the x-axis) related to the affirmative versus negative sentences. The top voxels were selected according to their SNR values that were greater than a threshold= 0.4. (c) NeuCube model trained and tested on the whole fMRI data time points using all the 40 samples resulted in 100% association accuracy.
Figure 5.
Three snapshots of learning of 8-second fMRI data in a NeuCube model when a subject is reading a negative sentence (time in seconds); (b) Internal structural pattern represented as spatio-temporal connectivity in the SNN model trained with 8-second fMRI data stream; (c) A functional pattern represented as a sequence of spiking activity of clusters of spiking neurons in a trained NeuCube model.
Figure 5.
Three snapshots of learning of 8-second fMRI data in a NeuCube model when a subject is reading a negative sentence (time in seconds); (b) Internal structural pattern represented as spatio-temporal connectivity in the SNN model trained with 8-second fMRI data stream; (c) A functional pattern represented as a sequence of spiking activity of clusters of spiking neurons in a trained NeuCube model.
Figure 6.
(a). Left panel: SNNcube was trained using all 40 samples of fMRI data, each had 20 voxels recorded for 8 seconds. However, the trained model was tested by recalling the same 40 fMRI samples, but with a smaller temporal length 70% from the initial timepoint of the fMRI samples equals to 5.6-second data. The classification temporal association accuracy is still 100% as shown in middle panel; and the right pane shows the encoding and testing parameter setting. (b): Left panel: Training the SNNcube with all 40 samples of 16-second fMRI data (20 voxels), while tested by recalling the same 40 fMRI samples with 60% of the temporal length (4.8 second data from 20 voxels). The classification temporal association accuracy is 100% as shown in the middle panel. (c): Training the SNNcube with all 40 samples of 16-second fMRI data (20 voxels), while tested by recalling the same 40 fMRI samples with 50% of the temporal length (4 second data from 20 voxels). The classification temporal association accuracy is 100% as shown in the middle panel. Using less than 50% of the time series results in an accuracy less than 100%.
Figure 6.
(a). Left panel: SNNcube was trained using all 40 samples of fMRI data, each had 20 voxels recorded for 8 seconds. However, the trained model was tested by recalling the same 40 fMRI samples, but with a smaller temporal length 70% from the initial timepoint of the fMRI samples equals to 5.6-second data. The classification temporal association accuracy is still 100% as shown in middle panel; and the right pane shows the encoding and testing parameter setting. (b): Left panel: Training the SNNcube with all 40 samples of 16-second fMRI data (20 voxels), while tested by recalling the same 40 fMRI samples with 60% of the temporal length (4.8 second data from 20 voxels). The classification temporal association accuracy is 100% as shown in the middle panel. (c): Training the SNNcube with all 40 samples of 16-second fMRI data (20 voxels), while tested by recalling the same 40 fMRI samples with 50% of the temporal length (4 second data from 20 voxels). The classification temporal association accuracy is 100% as shown in the middle panel. Using less than 50% of the time series results in an accuracy less than 100%.

Figure 7.
(a). Left panel: SNNcube was trained using all 40 samples of fMRI data, each had 20 voxels recorded for 8 seconds. However, the trained model was tested by recalling the same 40 fMRI samples, but with a smaller temporal length 70% from the initial timepoint of the fMRI samples equals to 5.6-second data. The classification temporal association accuracy is still 100% as shown in middle panel; and the right pane shows the encoding and testing parameter setting. (b): Left panel: Training the SNNcube with all 40 samples of 16-second fMRI data (20 voxels), while tested by recalling the same 40 fMRI samples with 60% of the temporal length (4.8 second data from 20 voxels). The classification temporal association accuracy is 100% as shown in the middle panel. (c): Training the SNNcube with all 40 samples of 16-second fMRI data (20 voxels), while tested by recalling the same 40 fMRI samples with 50% of the temporal length (4 second data from 20 voxels). The classification temporal association accuracy is 100% as shown in the middle panel. Using less than 50% of the time series results in an accuracy less than 100%.
Figure 7.
(a). Left panel: SNNcube was trained using all 40 samples of fMRI data, each had 20 voxels recorded for 8 seconds. However, the trained model was tested by recalling the same 40 fMRI samples, but with a smaller temporal length 70% from the initial timepoint of the fMRI samples equals to 5.6-second data. The classification temporal association accuracy is still 100% as shown in middle panel; and the right pane shows the encoding and testing parameter setting. (b): Left panel: Training the SNNcube with all 40 samples of 16-second fMRI data (20 voxels), while tested by recalling the same 40 fMRI samples with 60% of the temporal length (4.8 second data from 20 voxels). The classification temporal association accuracy is 100% as shown in the middle panel. (c): Training the SNNcube with all 40 samples of 16-second fMRI data (20 voxels), while tested by recalling the same 40 fMRI samples with 50% of the temporal length (4 second data from 20 voxels). The classification temporal association accuracy is 100% as shown in the middle panel. Using less than 50% of the time series results in an accuracy less than 100%.

Figure 8.
Distribution of the average connection weights around the input voxels located in the left and right hemispheres of the trained SNN models related to negative sentences (in a) and affirmative sentences (in b). The dominated voxels for the discrimination of the negative and affirmative sentences are: LDLPFC, LIPL, LT and LSGA. .
Figure 8.
Distribution of the average connection weights around the input voxels located in the left and right hemispheres of the trained SNN models related to negative sentences (in a) and affirmative sentences (in b). The dominated voxels for the discrimination of the negative and affirmative sentences are: LDLPFC, LIPL, LT and LSGA. .
Table 1.
NeuCube STAM-EEG Parameter Settings.
Table 1.
NeuCube STAM-EEG Parameter Settings.
Dataset information |
Encoding method and parameters |
NeuCube model |
STDP parameters
|
deSNNs Classifier parameters |
sample number: 60, feature number: 14 channels, time length: 128, class number: 3. |
encoding method: Thresholding Representation (TR), spike threshold: 0.5, window size: 5, filter type: SS. |
number of neurons: 1471, brain template: Talairach, neuron model: LIF. |
potential leak rate: 0.002, STDP rate: 0.01, firing threshold: 0.5, training iteration: 1, refractory time: 6, LDC probability: 0. |
mod: 0.8, drift: 0.005, K: 3, sigma: 1.
|
Table 2.
Classification association accuracy of the NeuCube STAM-EEG model from
Figure 3a-e.
Table 2.
Classification association accuracy of the NeuCube STAM-EEG model from
Figure 3a-e.