Abstract
It has been suggested that reactivation of previously acquired experiences or stored information in declarative memories in the hippocampus and neocortex contributes to memory consolidation and learning. Understanding memory consolidation depends crucially on the development of robust statistical methods for assessing memory reactivation. To date, several statistical methods have seen established for assessing memory reactivation based on bursts of ensemble neural spiking activity during off-line states. Using population-decoding methods, we propose a new statistical metric known as the “weighted distance correlation” to assess hippocampal memory reactivation (i.e., “spatial memory replay”) during quiet wakefulness and slow wave sleep. The new metric can be combined with an unsupervised population decoding analysis such that it can detect statistical dependency beyond linearity in the memory traces and is invariant to latent state labeling. We validate the new metric using two rat hippocampal recordings in spatial navigation tasks. Our proposed analysis framework may have a broader impact on assessing memory reactivations in other brain regions under different behavioral tasks.
1. Introduction
Memory consolidation is a fundamental process for transferring previously acquired experiences into long-term memory, and has been implicated in various forms of learning and memory, including episodic, declarative, procedural and emotional memories. Many brain areas, such as the hippocampus, neocortex, and amygdala, contribute to memory consolidation (McGaugh, 2000, 2015). A hallmark of memory consolidation is memory reactivation—reactivation of spatiotemporal neuronal spike patterns during off-line states, such as quiet wakefulness (e.g., Kudrimoti et al., 1999; Nadasdy et al., 1999; Foster & Wilson, 2001; Davidson et al., 2009; Carr et al., 2011; Kitamura et al., 2017) and sleep (e.g., Wilson & McNaughton, 1994; Skaggs & McNaughton, 1996; Louise & Wilson, 2001; Lee & Wilson, 2002; Rothschild et al., 2017).
In a standard WAKE/SLEEP experimental paradigm (Fig. 1A), animals are trained to perform a specific task behavior during WAKE. Before and right after the task, animals are put into a sleep box. During the whole period, neuronal ensemble activity, including spikes and local field potentials (LFPs), are recorded from the target brain areas. The scientific question of memory reactivation is that how to assess the memory reactivation based on the recorded ensemble neural spiking activity in WAKE and SLEEP alone?
Figure 1:

(A) General paradigm of in WAKE/SLEEP experiments. The scientific question is to assess the “memory codes” during sleep. (B) Graphical overview of the method for assessment of memory reactivation. Step 1: Neural spike trains of a population are fit by a hidden Markov model (HMM) with Bayesian inference. Upon completion of inference, a state transition matrix and firing rate matrix are derived. Step 2: From the candidate event of memory reactivation, bursts of ensemble neural spiking activity are analyzed by a maximum likelihood decoding estimator to infer a state sequence. The derived state sequence is assessed by specific statistical metrics (e.g., weighted distance correlation) followed by a significance test from randomly shuffled data.
To assess memory reactivation in the hippocampus and neocortex, various statistical methods have been developed, including correlation analysis (Wilson & McNaughton, 1994), template matching (Nadasdy et al., 1999; Louie & Wilson, 2001; Euston et al., 2007; Wilber et al., 2017), sequence matching (Lee & Wilson, 2002, 2004), principal component analysis (PCA) (Peyrache et al., 2009, 2010; Gulati et al., 2014; Ramanthan et al., 2015), independent component analysis (ICA) (Lopes-dos-Santos et al., 2013; van den Ven et al., 2016), and population decoding method (Davidson et al., 2009; Wu & Foster, 2014). Typically, for most of methods, the goal is to establish a structure or template in a behavioral (WAKE) state and to seek the “similarity” (by correlation or matching) between the preexistent structure and the tested candidate events during off-line states, such as slow wave sleep (SWS). However, it is noted that except for the population decoding method, other methods cannot identify the content of reactivated memory other than merely establishing significant similarity of spike activities between two states (e.g., WAKE vs. SLEEP). In other words, they can reveal the presence of memory replay but not necessarily the content of replay. A detailed discussion of these methods is referred to (Chen & Wilson, 2017).
In this paper, we proposed an unsupervised population decoding framework and associated statistical methods for assessing memory reactivation of population codes in the hippocampus and neocortex. We focus on the population-decoding method for assessing hippocampal or neocortical memory reactivation. One type of population decoding methods is supervised and based on neuronal receptive fields (RFs), another type is unsupervised and requires no RF assumption. Both methods have been used for identifying rodent hippocampal memory reactivations (e.g., Davidson et al., 2009; Wu & Foster, 2014; Grosmark & Buzsáki, 2016; Chen et al., 2016). We make critical observations on the existing statistical measures and further propose a new statistical measure for assessing memory reactivation. The new measures are motivated to resolve two issues. First, the current correlation-based measure is restricted by the linearity assumption, which can pose challenges when linearizing a complex spatial environment, such as open field, T-maze, and radial maze. In other words, spatial trajectory between two neighboring points in space can be discontinuous due to an arbitrary choice of linearization. The second motivation is to study memory reactivation in non-spatial tasks, in which it is difficult to define linear or nonlinear structure of the abstract event episode. As we will discuss in the remaining paper, our proposed measure is capable of capturing statistical dependency of temporal trajectory points beyond the linearity assumption and is also invariant to latent state labeling or permutation. In developing these methods, we have used hippocampal memory reactivation as a working example. We validate our methods using both synthetic examples and rat hippocampal recordings during spatial navigation and sleep.
2. Assessment of Memory Reactivation
2.1. Population decoding methods
Supervised RF-based population decoding.
The standard population decoding paradigm consists of encoding and decoding phases. In the encoding phase (where spikes and behavioral measures are collected), neuronal RF models are established (Zhang et al., 1998; Brown et al., 1998; Zemel et al., 1998; Barbieri et al., 2004; Agarwal et al., 2016). In the decoding phase, maximum likelihood or Bayesian methods are used to decode the stimulus based on the ensemble neural spiking activity and the established RFs (termed DecodewRF). The encoding phase is to pre-identify the structure or referential content of spikes (i.e., neuronal RF), and the decoding phase is to reconstruct the memory.
Unsupervised RF-free population decoding.
The second population decoding method is unsupervised and requires no neuronal RF information or explicit behavioral measures (termed DecodewoRF). This is achieved by constructing a hidden Markov model (HMM) and associating spatiotemporal spiking patterns with unique latent states without defining the stimulus-specific content of those states a priori. Take rodent navigation as an example, we assume that the latent states follow Markovian or semi-Markovian transition dynamics in a finite state space (where are categorical variables) (Chen et al., 2012, 2014; Chen, Linderman & Wilson, 2016). Animal’s run trajectories across spatial locations (“states”) are associated with consistent hippocampal ensemble spiking patterns, which are characterized by a stationary state transition matrix defining . The observed spike count data, yt, is assumed to follow a state-dependent Poisson probability distribution . The goal of inference is to estimate the maximum a posteriori (MAP) state sequences and the unknown state transition matrix P and firing rate parameters at each state. To estimate the number of latent states m directly from data, we have developed a Bayesian nonparametric version of the HMM: hierarchical Dirichlet process (HDP)-HMM, combined with advanced Markov chain Monte Carlo (MCMC) inference algorithms (Linderman et al., 2016).
In a general term, the problem of assessing memory reactivation can be described as follows: Given ensemble neural spike recordings of hippocampal or neocortical circuits during a specific (either spatial or non-spatial) task and during offline states (QW or sleep), how do we assess the structure or content of memory reactivation during QW or sleep? Overall, our procedure of unsupervised learning for assessing memory reactivations consists of two steps: (i) Apply the unsupervised population decoding analysis to infer latent structures of population codes from the hippocampus or neocortex. (ii) Apply a memoryless maximum likelihood (ML) decoding analysis to extract “memory traces” during the candidate events; apply statistical metrics to assess the fidelity or goodness-of-fit of the memory traces, and test their statistical significance. These two steps are graphically illustrated in Fig. 1B. We will address the second step in the following subsections.
Statistical assumptions.
Our unsupervised population decoding analysis for assessing memory reactivation is built upon a few important statistical assumptions. Without the behavioral or RF measures, we assume that the spike trains from neuronal populations observed in WAKE and SLEEP (or quiet wakefulness) share a similar data structure in their state firing rate map, except that they are subject to a proper time compression or scaling. Furthermore, when only a subset of neurons subset of neurons participate in memory reactivation, events of “sparsified spike trains” can be viewed as random realizations of the wake experiences subject to time compression or velocity variation. Finally, the memory replay events have a similar state-transition matrix as real events, but the timing of these state transitions is not required to be consistent with constant velocity transitions. These assumptions also imply that our analysis will hold for both WAKE→SLEEP and SLEEP→WAKE directions.
In addition, we assume that there are adequate behavioral sampling and sufficient number of recorded neurons that warrant the proposed unsupervised decoding analysis.
2.2. Statistical measures
Linear line fit.
In one-dimensional (1D) spatial navigation task, rodent hippocampal memory activation is expressed by a trajectory across time. The quality of the trajectory (known as “replay score”) can be determined by goodness of the best linear fit. For instance, the replay score may correspond to the mean estimated likelihood that the animal is on the specified trajectory. The test of statistical significance for the observed replay score is compared with sample distributions of score obtained after randomly shuffling the spike data (Davidson et al., 2009).
Weighted correlation.
Correlation measures have been proposed for measuring the hippocampal memory replay. Since the estimated spatial position is associated with a unimodal or multimodal nonnegative posterior probability (Zhang et al., 1998; Zemel et al., 1998), one can use these weights to quantify the strength of correlation between the changes in probability values across time and reconstructed spatial position (Wu & Foster, 2014; Grosmark & Buzsáki, 2016; Chen et al., 2016).
Given a set of paired scalar random variables , assume that the observations to be correlated have different degrees of weights (where ), the weighted mean , weighted covariance and weighted correlation Rw are defined respectively as follows:
| (2.1) |
| (2.2) |
| (2.3) |
where . However, similar to Pearson’s correlation, the weighted correlation Rw is subject to linear assumption between random variables u and v. In the hippocampal replay example, u corresponds to time (horizontal axis), v corresponds to the animal’s position. Due to the linearity assumption, this metric is insufficient for assessing the quality of a discontinuous or curved trajectory. The discontinuity may be induced by arbitrary linearization of the environment, such as the circular track (e.g., Grosmark & Buzsáki, 2016) or Y-maze (e.g., Wu & Foster, 2014). The nonlinear continuity may be induced by time warping (e.g., induced by varying velocity at different time bins), yielding a sigmoid-shape trajectory (unpublished data, M.A. Wilson, personal communication).
Distance correlation.
The distance correlation was initially developed to quantify statistical dependence between two random variables (or two random vectors of arbitrary dimensions) (Székely & Rizzo, 2009). The distance correlation is derived from distance variance and distance covariance between random variables u and v:
| (2.4) |
where . In theory, Rd is zero if and only if u and v are statistically independent; and Rd = 1 is the subspaces spanned by U and V are almost surely equal. In addition, Rd is invariant to scaling and translation and has theoretic links to kernel-based distance metric (Sejdinovic et al., 2013).
To compute the distance covariance for (ui, vi) (i = 1,…,n), we need to define two distance metrics, distu and distv, for all pairwise distances: distu(ui, uj) and distv(vi, vj) (Appendix A). A common choice of the distance metrics can be Euclidean distance, chi-squared distance, Earth Mover’s distance, and L1 distance (e.g., MATLAB function “pdist2”). Moreover, the distance metrics used for u and v may be either identical or different. We can also define a custom distance measure as long as it satisfies all four axioms: (i) dist(u, u) ≥ 0; (ii) dist(u, v) = 0 ⟺ u = v; (iii) dist(u, v) = dist(v, u); and (iv) dist(u, z) ≤ dist(u, v) + dist(v, z).
Notably, the estimation of Rd based on finite samples is statistically biased. Therefore, a bias-corrected distance correlation has been used in practice (Székely & Rizzo, 2013). Given n > 3 samples, the new bias-corrected measure is given by
| (2.5) |
where denotes the modified distance covariance (Appendix A). From now on, we use the notation to represent the bias-corrected Rd.
Distance metrics.
For assessing a spatial memory reactivation event, one variable is time t (horizontal axis), another variable is spatial position (vertical axis), and n corresponds to the number of time bins. For the time variable, we consider two empirical distance metrics. The first one is based on absolute time lag between two points:
| (2.6) |
which is a linear measure. The second one is based on a bounded piecewise distance
| (2.7) |
which only considers the neighboring time bins (less than 4 bins apart, Fig. 2A). The constant dmax controls the maximum distance and the slope.
Figure 2:

(A) Temporal distance metric dij(ti, tj) in equation 2.7. (B) Distance metric dij(Si, Sj) in equation 2.9 with Pmax = 0.5 (solid) and Pmax = 1 (dashed). (C) Distance metric dij(Si, Sj) in equation 2.10 with varying values of scaling parameter α. Here, dmax = 2.
For the spatial position variable, we use different distance metrics for DecodewRF and DecodewoRF. Since the decoded position is known in DecodewRF, we may compute the actual distance between two positions vi and vj:
| (2.8) |
In the standard distance correlation, distance metrics of equations 2.6 and 2.8 are used (Appendix A).
For DecodewoRF, the decoded position is unknown, and we only have the inferred states (which are subject to permutation ambiguity). However, from the estimated state transition , we may define a distance matrix using a piecewise linear transformation:
| (2.9) |
where denotes the maximum value of matrix , and is obtained by removing self-transition probability in the diagonal and renormalized in each row. The parameter denotes the average state transition probability between state i and state j (such that and are symmetric). We can prove that distance metric (2.9) satisfies all four axioms (Appendix B). In addition, dij(Si, Sj) is invariant to the permutation of state label.
Equations 2.8 and 2.9 fulfill the distance triangle inequality. When the distance triangle inequality is not strictly imposed,1 we may employ an empirical nonlinear transformation between ρij and dij:
| (2.10) |
where the scale parameter α controls the shape of the curve (Fig. 2C) and the effective support, which plays a similar role of Pmax in equation 2.9. Depending on the data range and distribution, we choose the scale parameter to maximize the discrepancy between two distinct inputs. When α = 1, the curve is close to a piecewise linear function.
Note that the average transition probability is estimated from the ensemble spike data alone using DecodewoRF. However, if we estimate the transition matrix estimated from the actual behavioral data (namely, , where v(t) denotes the animal’s position at time t), DecodewRF can also employ equation 2.9 or 2.10 to compute .
Weighted distance correlation.
Motivated from weighted correlation Rw and distance correlation Rd, we further propose a new statistical metric called weighted distance correlation Rwd, which integrates a weighting strategy (as in Rw) in computing the distance metric (Appendix C). Using a bias correction procedure (Appendix A), we also derive a bias-corrected estimate of Rwd, denoted as .
Toy examples.
To gain some insight into the difference between three correlation metrics {}, we construct six synthetic trajectories (arranged in the form of 57 spatial bins and 15-20 temporal bins) and compute three correlation metrics (shown in Fig. 3). Specifically, Figure 3A,C,D show linear or piecewise linear trajectories, each with a constant or varying slope; Figure 3B shows an example of two disconnected trajectories. Figures 3E and 3F are “noisy” negative examples.
Figure 3:

Comparison of Rw, and metrics for six synthetic trajectory examples. In the title of top panels, three numbers represent [Rw, , ]. In the bottom panels, horizontal lines represent the result obtained from using equation 2.9 as the distance metric, whereas curves with markers represent the result obtained from using equation 2.10 with varying α as the distance metric. In Fig. 3D, dashed lines represent the results using bimodal weighting. For computing Rwd, we assume a known state transition matrix estimated directly from the animal’s run position.
It is noted that Rw fails to detect two disconnected patterns (Fig. 3B), or underestimates the correlation due to outliers (Fig. 3C). Sometimes, Rw also produces a spurious value for noise (Fig. 3F). The traditional distance correlation metric (equations 2.6 and 2.8) produces a similar value as Rw in some cases (Figs. 3A, D, E), whereas based on a “local” distance metric (equation 2.7) is more insensitive to global patterns (Figs. 3B and 3C) and focuses on local continuity (Fig. 3E). In contrast, combines the features of and and produces a better quantification for “nonlinear curves”. In addition, the linear (equation 2.9) and nonlinear (equation 2.10, α = 1) distance metric produce nearly identical results. Finally, it is found that the weighting produces a more accurate characterization for multi-modal trajectories (Fig. 3D).
2.3. Assessment of significance
All statistical analyses are performed on the “candidate events” of memory reactivation. A candidate event can be determined by one or multiple criteria based on neural recordings, such as multi-unit activity burst or LFPs (e.g., hippocampal sharp-wave ripples or neocortical spindles or slow waves) (e.g., Ji & Wilson, 2007; Davidson et al., 2009).
An event is claimed to be a “statistically meaningful” memory reactivation event if it meets three established criteria for statistical significance:
The |Rw| is greater than a threshold of 0.5 (Wu & Foster, 2014); no threshold is set for Rwd or .2
The time length is at least 5 temporal bins with spike(s) in each bin (i.e., 100 ms for QW or SWS epochs) (Wu & Foster, 2014). Therefore, shorter candidate events are not considered in the current study, although they might also contribute to memory reactivation.
-
In addition, we generate shuffled candidate events from each pre-identified candidate event, and compute the Rshuffle from randomly shuffled ensemble neural spiking activity. Two types of shuffling operations are considered: temporal shuffling and cell shuffling. Algebraically, the spike count matrix is subject to both row (temporal) and column (cell) shuffle operations. A total of 1000 shuffled samples are constructed for each shuffling operation. From the raw and shuffled statistics, we compute the Z-score for R as follows:
The Z-score of Rw, denoted as Zw, is based on the computation of |Rw|. The Z-score of Rwd, denoted as Zwd, is based on the uncorrected version of Rwd. In Appendix D, we show that Zwd is unbiased due to bias cancellation.(2.11) Assuming the null distribution of shuffle statistics is normally distributed, then the event is significant only if the Z-score of R is greater than a threshold 1.65 (which is equivalent to setting a one-tailed P-value 0.05, assuming the null distribution is normally distributed). However, when the null distribution is not normally distributed (e.g., having an asymmetric support), we use the Monte Carlo P-value to identify statistical significance. In reporting the number of statistical events, we use the Monte Carlo P-value criterion. For comparing group statistics or visualization, we also use the Z-score statistics regardless of the shape of null distribution. A high positive Z-score indicates that the raw data statistic is much greater than those obtained by randomly shuffled data (null hypothesis), and therefore is highly significant in a statistical sense. We consider a candidate event statistically significant when two Monte Carlo P-values are both smaller than 0.05 under two independent shuffling operations.
These three criteria are chosen to be consistent with previous published studies (Wu & Foster, 2014; Grosmark & Buzsáki, 2016; Chen et al., 2016). Modifying individual criterion on the length or significance level (e.g., P < 0.01) will inevitably change the statistic number, but our proposed analysis should serve as a standard guideline for similar behavior tasks.
3. Results
Software for all analyses is written in Python and MATLAB. The Python source code for DecodewoRF is available online (https://github.com/slinderman/pyhsmm_spiketrains). The MATLAB code for computing three correlation metrics and shuffle operation is also available (https://github.com/szl/memory). In our analyses, we have tested various distance metrics. Although the exact quantitative statistics may be slightly different, their trends are similar. In all results reported below, we have used equations 2.7 and 2.9 for computing the distance metric.
3.1. Experimental data
We test our methods on two rat hippocampal recordings. The data are publicly available (https://crcns.org/data-sets/hc/hc-11/). The recording session consisted of a long (~4 hour) pre-RUN sleep epoch home-cage recording performed in a familiar room, followed by a RUN epoch (~45 minutes) in a novel circular maze (1 m diameter, Dataset 1, 77 place cells) or in a linear track (1.6 m long, Dataset 2, 79 place cells). After the RUN epoch the animal was transferred back to its home cage in the familiar room where another long (~4 hour) post-RUN sleep was recorded. Details of experimental protocols and data have been published (Grosmark & Buzsáki, 2016; Grosmark et al., 2016; Chen et al., 2016).
In each dataset, from the RUN epoch, we extract place RFs from all putative hippocampal CA1 pyramidal cells. For each selected cell, we compute the spatial information rate (bits/s) as follows (Skaggs et al., 1993): , where denotes the mean firing rate of the c-th hippocampal neuron at spatial location S, and denotes the total average firing rate (spikes/s). To account for the total firing rate effect, we compute the normalized information rate, , measured by bits/spike.
3.2. Decoding analysis setup
For DecodewRF, we assume a Poisson firing rate (Zhang et al., 1998; Davidson et al., 2009). In Dataset 1, we use a 5 cm spatial bin for the linearized circular track, resulting in 57 spatial bins (excluding the reward location). From the RUN period, we use a velocity threshold (>10 cm/s) to identify the RUN period, resulting a total of 3376 temporal bins (bin size: 250 ms). We use 90% RUN spike data for training the model. Based on the constructed place fields, we compute the decoding accuracy on all RUN data (median decoding error: 4.5 cm, mean decoding error: 12.0 cm).
For DecodewoRF, we use a state-of-the-art Bayesian inference algorithm for the HDP-HMM (Linderman et al., 2016; Chen et al., 2016), which accommodates automatic model selection for identifying the number of latent states. The configuration for the hyperparameters is as follows (Linderman et al., 2016): , (for HDP priors) and (for firing rate parameters). The choice of the hyperparameter priors {aα, aγ, ac, bc} is determined by the predictive likelihood of test data over various configurations, each with 10 Monte Carlo runs. We select the optimal hyperparameters among a total of 50 runs for the final evaluation. From the ensemble neural spiking activity alone during RUN, we can infer the state space map and state-transition matrix (Fig. 4).
Figure 4:

(A) State space map. (B) Spatial bins have non-uniform state occupancy distribution shown by the histogram. (C) Inferred state transition matrix inferred from DecodewoRF using spike data alone. (D) Transition matrix inferred from RUN behavior.
The optimal median and mean decoding error from DecodewoRF are 5.6 cm and 13.0 cm, respectively—a performance comparable to those derived from DecodewRF. The inferred number of states varies between 95 and 100, which is relatively consistent for various hyperparameter choices. The inferred state transition matrix (Fig. 4C) also bears a good resemblance with the “ground truth” transition matrix that is estimated directly from animal’s run position (Fig. 4D). Note that DecodewoRF employs an adaptive spatial bin size, allowing non-even spacing within the environment according to the sampling occupancy or spiking frequency (Fig. 4B).
Here, to assess rat hippocampal memory reactivations during QW or SWS, in light of empirical observations (e.g., Davidson et al., 2009; Grosmark & Buzsáki, 2016), we assume that the time compression factor is around 12 during memory reactivation (i.e., 20 ms, as compared to 250 ms in RUN behaviors). In practice, the speedup factor is unknown, and may range from 10 to 33 (Wu & Foster, 2014; Deng et al., 2016). Changing the speedup factor may affect the results reported below. Notably, our previous analyses (Chen et al., 2016) have also shown the inferred state transition structure and decoding error during RUN behaviors is robust across a wide range of temporal bin sizes (150-250 ms).
3.3. Testing the reliability of our method for pattern detection
Before testing our method on real memory reactivation events during QW and SWS—where the ground truth of a “replay” is absent, we first create two “synthetic” memory reactivation events (Fig. 5A) to test the reliability of our method for detecting patterns with known ground truth. The assumption here is that the decoded patterns from the RUN data are similar to those decoded during memory reactivation events.
Figure 5:

(A) Two representative events of run trajectories. (B) Comparison of scatter plots of Z-score statistics between Zwd (derived from Rwd) and Zw (derived from Rw). Each point represents the result from one Monte Carlo run (n = 1000). Lower left corner within the dashed box indicates the non-significant region.
We select actual animal’s run trajectories and the associated ensemble neural spiking activity. Each run trajectory lasts 20 temporal bins (i.e., 5 s duration, 250 ms bin size). The first trajectory consists of two disconnected lines (similar to Fig. 3B) induced by linearization of the circular track. The second trajectory is a full path covering the complete track. Similar to the strategy used in (Chen et al., 2016), we manipulate the ensemble neural spiking activity by systematically changing the active cell percentage, varying from 10%, 15%, 20%, to 25%. At each percentage, we randomly select subsets of cells and remove their spikes. Based on the “sparsified” spike trains, we run the decoding analysis and assess the reconstructed trajectory by Zwd and Zw. We repeat the procedure 1000 times for each event. The results on scatter plots and detection ratios are shown in Fig. 5B and Table 1, respectively. As seen from these two examples, even with an active cell percentage as low as 10-15%, our method is still able to identify the pattern embedded in the rat hippocampal ensemble spiking activity. In all experimental analyses, we use the distance metrics 2.7 and 2.9 for computing Rwd and the respective Zwd. In general, as the percentage of active cells increases, the number of detected signifiant events also increases; but the number of significant events is greater using Zwd than using Zw. This effect is more pronounced in Event 1 than Event 2.
Table 1:
Detection ratios for the “simulated” data on two run trajectories. All results are derived based on DecodewoRF using Zwd.
| Cell percentage | Event 1 | Event 2 |
|---|---|---|
| 10% | 0.593 | 0.788 |
| 15% | 0.726 | 0.884 |
| 20% | 0.771 | 0.955 |
| 25% | 0.828 | 0.972 |
The interpretation of these simulation results is based on the assumption that the replay events can be viewed as “sparsified” spike trains with the same structure as the ones observed in run behavior (subject to additional time compression, which is not simulated here). To test whether our observations also hold for shorter sequences, we also test examples with 5 or 10 temporal bins (250 ms bin size). Similar trends are found between Zwd and Zw.
3.4. Testing the similarity assumption of RUN vs. SLEEP structures
We further test the assumption that the decoded patterns from the RUN data are similar to those candidate events of memory reactivation during SLEEP. Specifically, in parallel with the unsupervised population decoding analysis on the RUN→LEEP paradigm, we reverse the direction and apply the analysis to the SLEEP→RUN paradigm. Specifically, we apply DecodewoRF using n = 117 candidate events (during post-SWS) as the training data. We infer the firing rate matrix from SLEEP epochs and then further infer the state sequence during RUN.
Next, we compare the inferred state sequence during RUN with the observed animal’s position (“ground truth”) to assess the state space map and decoding error (median error: 0.16 m). The results are shown in Fig. 6. Notably, despite the fact that the sleep-associated ensemble neural spiking activity is sparse and fragmental, our method is still capable of extracting meaningful latent structures of “place codes”. Importantly, our method works equally well for both RUN→LEEP and SLEEP→RUN directions, supporting our assumption on the similarity between RUN and SLEEP structures.
Figure 6:

Inferred state space maps. (A) Using rat hippocampal ensemble neural spiking activity from RUN epochs alone (effective number of states: 100) and testing on RUN data (median decoding error: 0.05 m)—replotting Fig. 4A. (B) Using rat hippocampal ensemble neural spiking activity from post-SWS epochs alone (effective number of states: 34) and testing on RUN data (median decoding error: 0.16 m).
3.5. Testing on QW and SWS data
Based on the hippocampal LFP, we compute the delta/theta power ratio and the ripple band (150-300 Hz) power. Combining these features with EMG (electromyography), we classify the sleep stages into WAKE, SWS, and REM states while the animal stay in the sleep box (see Supplementary Fig. S1 in Grosmark & Buzsáki, 2016).
We also identify the quiet wakefulness (QW) periods, when the animal was in an immobile wake state (speed <2 cm/s). For screening the candidate events for hippocampal memory reactivation during QW or SWS, we use hippocampal LFP ripple band power combined with hippocampal multi-unit activity (threshold>mean+3SD). We also impose a minimum temporal bin criterion (≥5 bins consisting of spikes) and a minimum cell activation criterion (at least 10% of cell population). By “active”, we consider two options in which each cell fire at least 1 (termed option 1) or 2 (termed option 2) spikes during the duration of interest. We analyze candidate events from five distinct periods in time: pre-QW, maze-QW, post-QW, pre-SWS, and post-SWS, and report the results in Table 2 (Dataset 1; supplementary table for Dataset 2).
Table 2:
Summary statistics of hippocampal memory replay candidate events from Dataset 1 (ℓ: total number of events; ℓ1: the number of events that had at least 5 temporal bins with spikes and at least 10% active cells (option 1 & option 2); ℓ2: the number of events in which Rw meets the significance criterion (derived from DecodewRF); ℓ3: the number of events in which Rwd meets the significance criterion (derived from DecodewRF) ℓ4: the number of events in which Rwd meets the significance criterion (derived from DecodewoRF with a HDP-HMM). ℓ5: the number of events in which Rwd meets the significance criterion (derived from DecodewoRF with a finite-state HMM).
| Dataset 1 | ||||||
|---|---|---|---|---|---|---|
| ℓ | ℓ1 | ℓ2 | ℓ3 | ℓ4 | ℓ5 | |
| pre-QW | 338 | 271 (option 1) | 11 | 10 | 10 | 15 |
| 164 (option 2) | 7 | 9 | 7 | 12 | ||
| maze-QW | 136 | 93 (option 1) | 16 | 21 | 18 | 18 |
| 51 (option 2) | 14 | 15 | 15 | 16 | ||
| post-QW | 1619 | 1328 (option 1) | 150 | 216 | 189 | 189 |
| 944 (option 2) | 126 | 193 | 160 | 162 | ||
| pre-SWS | 984 | 767 (option 1) | 38 | 23 | 35 | 23 |
| 454 (option 2) | 28 | 12 | 17 | 15 | ||
| post-SWS | 1519 | 1108 (option 1) | 91 | 136 | 123 | 123 |
| 741 (option 2) | 69 | 117 | 108 | 97 | ||
Comparison between Rw and .
We first compare statistics ℓ2 and ℓ3 in Table 2, which employs the supervised population-decoding algorithm DecodeWRF. During maze-QW and post-QW, the fraction of significant events in option 1 is using Zw, and using Zwd. During pre-QW and pre-SWS, the ratio of significant events is smaller, suggesting that memory reactivation is stronger following right after RUN experiences. During pre-SWS, the fraction of significant memory reactivation events is 5.0% using Zw and 3.0% using Zwd. During post-SWS, the fraction of significant memory reactivation events is 8.2% using Zw and 12.2% using Zwd. Therefore in this dataset, Zwd achieves a higher detection significance rate in post-QW or post-SWS and lower significance rate in pre-QW or pre-SWS. This is consistent with our “simulation” studies in section 3.3. This trend is also similar in option 2.
To investigate whether the increase of significance rate is due to the decrease in false negative (FN) or increase in FP, we further compare the scatterplot of Zw and Zwd (Fig. 7). It is found that there are a large percentage of candidate events that Zw and Zwd do not agree on. Because of the lack of ground truth, it is impossible to define exactly the outcome that Zw and Zwd disagree upon. For instance, Figure 8 lists four examples that two criteria do not reach a consensus. In Fig. 8A, we see an instance that Zw cannot capture the nonlinearity pattern; whereas in Fig. 8D, we see another instance that Zwd fails because the neighboring temporal bins are coupled with spatially separated bins (e.g., the positions at the 5th and 6th time bins are 0.5 m apart), which implies a large dij or small Pij inferred from RUN epochs. There are also other ambiguous instances with relatively short events (< 10 time bins, Figs. 8B and 8C).
Figure 7:

Scatter plot comparison of Zwd and Zw derived from DecodewRF for pre-QW, maze-QW, post-QW, pre-SWS and post-SWS candidate events. Lower left corner within the dashed box indicates the non-significant region.
Figure 8:

Discrepancy examples of memory reactivation traces detected by Zwd and Zw derived from DecodewRF. X-axis denotes time bin (bin size: 20 ms).
Due to the lack of growth truth of “memory traces”, it is difficult to define a replay event in a statistical sense. One possible way is to assess the candidate events using multiple independent methods and compare with our proposed statistical measures. For instance, for a spatial task, we can compare with the template matching (Nadasdy et al., 1999; Louie & Wilson, 2001; Euston et al., 2007; Wilber et al., 2017) and line fit (Davidson et al., 2009) methods. In Figs. 8A–D, employing a line fit and assessing the Z-score of its linear correlation yields: …. and …. respectively. However, it should be stressed that the uncertainty of ground truth still remains even when all measures agree with each other in statistical significance. The outstanding question of defining a statistical criterion for memory replay events still remains, especially in the presence of non-spatial tasks.
Comparison between DecodewRF and DecodewoRF.
We further compare the detection performance using Zwd between DecodewRF and DecodewoRF. For DecodewRF, the transition matrix is computed from the RUN behavior (Fig. 4D). For DecodewoRF, the transition matrix is inferred from the ensemble spiking data alone (Fig. 4C).
It is found that the derived Rwd from DecodewRF and from DecodewoRF are correlated, but their Zwd statistics do not completely agree with each other (Fig. 9). Specifically, we observe that (i) the number of significant events derived from DecodewoRF is lower than that derived from DecodewRF (ℓ3 and ℓ4 statistics in Table 2); (ii) the Z-score value in DecodewoRF is often greater than in DecodewRF (see examples in Fig. 10). The significance disagreement between DecodewRF and DecodewoRF (e.g., Fig. 11) may be induced by two factors: (i) the inferred state transition matrix and (ii) adaptive spatial sampling as shown in the state space map. Therefore, the inferred number of states are 100, which is much higher than the number of spatial bins (i.e., 57). They both affect the measure of Rwd as well as Zwd.
Figure 9:

Scatter plot comparison of Zwd between DecodewRF and DecodewoRF for pre-QW, maze-QW, post-QW, pre-SWS and post-SWS candidate events. Lower left corner within the dashed box indicates the non-significant region.
Figure 10:

Examples of significant memory replays detected using Zwd but failed using Zw. (A) Results from DecodewRF. (B) Results from DecodewoRF. The title shows the Z-score. X-axis denotes time bin (bin size: 20 ms). Y-axis denotes the spatial position in panel A and denotes the inferred latent state in panel B.
Figure 11:

Examples of disagreement in detected memory traces from DecodewRF (A) and DecodewoRF (B). The title shows the Zwd statistic. X-axis denotes time bin (bin size: 20 ms). Y-axis denotes the spatial position in panel A and denotes the inferred latent state in panel B.
3.6. Information coding and memory reactivation
Finally, we examine the relationship between information coding and hippocampal memory reactivation during post-QW and post-SWS. For all post-QW and post-SWS candidate events that meet our selection criterion, we compute two statistics: n1—the percentage of active cells among 77 neurons, and n2—the percentage of high spatial information cells among active cells. Neither n1 nor n2 is different between post-QW and post-SWS candidate events (p > 0.5, rank-sum test). However, n1 is positively correlated with Zwd among all (or significant only) candidate events during post-QW (Pearson’s correlation ρ = 0.34, p < 10−3), and post-SWS (ρ = 0.30, p < 10−3), suggesting that the number of active cells is critical for detecting memory replays (Chen et al., 2016; Grosmark & Buzsáki, 2016). In addition, based on the normalized information rate (bits/spike), we compute the active information content (AIC, unit: bits) from each candidate event:
| (3.1) |
assuming mutual independence between all spikes. It is also found that the active information content of candidate events is positively correlated with their Z-scores (ρ = 0.37 for post-QW; ρ = 0.35 for post-SWS, p < 10−3).
4. Discussion
4.1. Limitation of our method
Detecting reactivated memory traces in the hippocampus and neocortex is an important step to study memory consolidation. We have proposed a weighted distance correlation metric (Rwd) for assessing memory reactivation based on rat ensemble neural spiking activity. The new metric goes beyond the linearity assumption of the weighted correlation Rw, and combines the merits of weighting and distance correlation. This metric can be used in both DecodewRF and DecodewoRF.
However, the new metric has also some limitations, as evidenced in our empirical observations from experimental data. First, Rwd may not capture the “parts” in the whole pattern (e.g., Fig. 3C); in other words, it cannot identify only a subset of the pattern. This may contribute to erroneous negatives. Second, Rwd focuses on local distance and ignores the global pattern, and therefore misidentifies certain spurious trajectories, such as the low amplitude zigzag curve (e.g., Fig. 3E). This will contribute to erroneous positives. Third, while combining Rwd and DecodewoRF, our method also relies on dij or Pij, the latter of which is estimated from the spike activity of WAKE behavior. When a reactivated sequence is associated with low Pij values, the event may be assigned with a low score (e.g., Fig. 8D). This will also contribute to erroneous negatives. How to improve these issues will be the subject of our future investigation.
4.2. Detection sensitivity on the number of states
In DecodewoRF, the number of states is inferred directly from the data. One important question is whether the number of states affects Rwd or Zwd. In practice, changing the sample size has a stronger impact on the inferred number of states m. The more the data samples, the larger is the dimensionality m. There is also variability in m by changing hyperparameters, but the effect is relatively smaller.
Different dimensionality of m will affect not only the estimates in the state transition matrix and firing rate matrix, but also the distance metric. To determine whether the choice of a smaller m would affect Zwd, we repeat the unsupervised population decoding analysis using a prefixed 57-state HMM (Chen et al., 2014; Linderman et al., 2016), where m = 57 is chosen to match the spatial RF resolution in DecodewRF. The decoding accuracy of the 57-state HMM is comparable with that of HDP-HMM, with median and mean prediction error as 6.0 cm and 14.6 cm, respectively. The detection results derived from the 57-state HMM are shown in Table 2 (ℓ5 column). By comparing ℓ4 and ℓ5 columns, it is found that the statistics are highly comparable and their Zwd are also correlated (ρ = 0.64, p < 10−10), suggesting that our method is robust with respect to the model dimensionality.
In a general setup, an automatic model selection of dimensionality m is preferred for unbiased assessment. From a model representation perspective, a larger number of latent states would imply a finer spatial representation. Therefore, the posterior weights may be either uniformly distributed or multimodal, which may produce certain biases when using only two dominant modes. To alleviate this issue, first, we can use more posterior modes (Appendix C). Second, we can zero threshold the small transition probabilities Pij to “denoise” the state transition probability matrix before computing the distance metric (see equation B.3).
4.3. Statistical criterion of memory replay
As the goal of our method is to assess the memory reactivation from candidate events, it is impossible to determine a replay event in advance without the ground truth. In principle, one can integrate all available information, such as spikes, LFPs and animal’s behavioral measures (e.g., velocity), to construct a statistical model of replay. In a related work reported in (Deng et al., 2016), a real-time population-decoding method was developed to compute the posterior probability of the replay feature and to classify the discrete replay content of hippocampal memory reactivation candidate events during QW. In their W-maze spatial navigation task, four potential replay contents are “outbound, forward”, “outbound, reverse”, “inbound, forward” and “inbound, reverse”. When assessing or classifying discrete contents of such constrained memory replays, a good statistical criterion can be determined. However, if the contents are drawn from a continuous set or an infinite discrete set, then difficulty will arise. In addition, their approach is based on a supervised population-decoding analysis using animal’s position measures during the encoding phase. How to generalize this statistical measure into an unsupervised decoding analysis setting or extend statistical assessment of replay contents to a non-spatial task remains unresolved.
In practice, we recommend to apply multiple independent or complementary methods for assessing memory reactivation events (see review in Chen & Wilson, 2017). It might be possible to integrate the information from these methods to establish a probabilistic criterion for memory replay. However, it would require to establish some benchmark datasets and conduct systematic investigations.
4.4. Extension to other behavioral tasks
In this paper, we have tested our method using the rodent 1D spatial (i.e., circular track) navigation task as an example. In the presence of complex mazes with multiple choice points (e.g., T-maze or radial maze), the run trajectory discontinuity induced by linearization will occur, especially when the trajectory covers two disjoint arms (e.g., Wu & Foster, 2014). This problem becomes even more challenging for a 2D spatial navigation task. To assess hippocampal memory reactivation in those tasks, the unsupervised population decoding analysis is appealing. Furthermore, Rwd is only dependent on the state transition matrix and is invariant to the space linearization or state permutation. We are planning to extend our investigation to 2D spatial memory reactivation in the rat hippocampus (Kloosterman & Wilson, 2009). In other hippocampal non-spatial tasks (e.g., Allen et al., 2016; Shan et al., 2016), the latent states may accommodate non-spatial features of experiences or distinct behavioral patterns that cannot be defined or measured directly.
In principle, DecodewoRF can be applied to the ensemble neural spiking activity from neocortical or subcortical structures, such as the visual cortex (Ji & Wilson, 2007; Haggerty & Ji, 2015), motor cortex (Gulati et al., 2014; Ramanthan et al., 2015), striatum (Ahmed et al., 2008) and amygdala (McGaugh, 2004). For either spatial or non-spatial tasks, we may assume that the dynamic population firing rates are driven by a latent state sequence, where the content of the latent state is not defined a priori. During SWS or QW epochs, we can adapt a similar strategy to detect the patterns of memory reactivation from ensemble neural spiking activity. In this case, the content-based method has a clear advantage compared to the subspace (e.g., PCA and ICA) methods, since the latter analysis might lead to false statement (see Appendix E). It is hoped that our proposed method will be widely tested in the future practice of assessing memory reactivation in neural data analysis.
4.5. Beyond SWS
In contrast to SWS that has been strongly implicated in memory reactivation and consolidation, the exact function of REM sleep remains elusive. One hypothesis of REM sleep is that the hippocampal readout for declarative memories is attenuated, leading to a functional isolation of limbic/paralimbic structures and the neocortex, resulting in memory reorganization; whereas the amygdala and other networks of the limbic system that are responsible for emotional processing show high reactivation (Landmann et al., 2015). Accumulating evidence has suggested that REM sleep is essential for consolidating contextual or emotional memories (Boyce et al., 2016; Menz et al., 2016; Li et al., 2017). Unlike SWS, there is no population synchrony (“UP state”) associated with hippocampal sharp wave ripples during REM sleep, yet there is a prevalence of theta oscillations in rodents (Louie & Wilson, 2001; Grosmark et al., 2012). As a result, it remains a challenge to assess hippocampal-neocortical memory reactivation during REM sleep in either animals or humans (Louie & Wilson, 2001; Horikawa et al., 2007; Schönauer et al., 2017; Siclari et al., 2017). Here, we have focused on SWS epochs using population decoding analyses. How to apply these methods to REM sleep epochs, such as identifying potential candidate events and proper analysis timescale, remains unsettled. Without a principled guideline, any quantitative measure (e.g., the Rwd statistic derived from population decoding, or the reactivation strengths derived from PCA/ICA, Appendix E) can be misleading or lead to false hypotheses. Therefore, studying memory reactivation during REM sleep requires extra care in future investigations.
Supplementary Material
Figure 12:

Examples of ambiguous candidate events derived from DecodewRF. In these 4 examples, both Zw and Zwd are above the significance level. X-axis denotes time bin (bin size: 20 ms).
Acknowledgments
This work is supported by an NSF-CRCNS (Collaborative Research in Computational Neuroscience) award IIS-1307645 (Z.C.) and an NIH-CRCNS award R01-NS100065 from the NINDS (Z.C.). We thank S. Linderman for contributing software on the HDP-HMM and F. Kloosterman for valuable discussion on distance correlation. Some of work was completed when S.L. conducted a summer internship at New York University.
Appendix A: Bias correction for distance covariance
For self-contained purpose, we show the formula to correct the sample bias in distance covariance (Székely & Rizzo, 2013). Let (aij} and (bij} denote two matrices that contain all pairwise distances between random samples ui and uj and between vi and vj, respectively:
where distu and distv are two custom-defined distance metrics for variables u and v, respectively. Further, the sample distance covariance is defined by (Székely & Rizzo, 2009):
| (A.1) |
where , , , and (similarly defined for ).
For bias correction, we compute the modified terms of Ai,j and Bi,j as follows:
| (A.2) |
and
| (A.3) |
For sample size n > 3, the distance covariance is corrected as
| (A.4) |
Mathematically, the expected value of is unbiased (Székely & Rizzo, 2013):
| (A.5) |
Therefore, the bias-corrected distance correlation is given by
| (A.6) |
when . In theory, the distance covariance and distance correlation are nonnegative and unique (Székely & Rizzo, 2012). Although , can take negative values subject to .
Appendix B: Proof
For simplicity, let dmax = 2Pmax, then equation 2.9 is rewritten as
| (B.1) |
where .
By definition , and it is easy to prove , the last thing we need to prove is the triangle inequality: .
Note that for i ≠ j, i ≠ k, j ≠ k, we have
| (B.2) |
because of , , and , and it completes the proof.
To minimize the impact of small transition probability events (5/total number of states, below which is considered a chance level), we can modify the distance criterion (B.1) as follows
| (B.3) |
From equation B.2, it is easy to prove that this modified version still satisfies the triangle inequality.
In addition, we can incorporate a “time local neighborhood” constraint into equation B.1
| (B.4) |
In general, equation B.4 may violate the triangle inequality.
Appendix C: Weighted distance
Note that the weighted correlation Rw has taken into account the uncertainty of the estimated posterior probability (i.e., multi-modal distribution), but it fails to capture the nonlinearity or discontinuity of a trajectory. In contrast, the distance correlation Rd can capture more complex trajectory shapes and is invariant to the row permutation. To combine the desirable features of Rw and Rd, we propose a new metric called weighted distance correlation, Rwd. The concept of the weighted distance correlation is to compute a weighted distance based on both weighting and a predefined distance metric.
For simplicity, we first extend the unimodal (i.e., the MAP estimate in the y-axis) to bimodal scenario. Let us extract the first two greatest posterior probabilities in each column (i.e., temporal bin). Assume that we compute the weighted distance correlation between two neighboring temporal bins. The two posterior probabilities are normalized. Without loss of generality, we assume that the two normalized posterior probabilities are a and 1 − a in the first temporal bin, associated with the row indices (i.e., spatial bin) i and j, respectively. Similarly, assume that the two normalized posterior probabilities are b and 1 − b in the second temporal bin, with respective row indices k and l.
Next, we define a new “weighted distance” metric, dw, as follows
| (C.1) |
where dik, dil, djk and dkl are the computed distance measures (e.g., equations 2.8, 2.9 or 2.10), and the sum of those weighted coefficient is equal to 1, namely . In the special case when a = 0 (or 1) and b = 0 (or 1), dw reduces to the standard distance metric without weighting. Therefore, we may use the new metric in the place of the standard distance metric for computing the weighted distance correlation.
More generally, we can extend the above bimodal 2-to-2 setting to a multimodal m-to-m setting, which produces a sum of m2 combinatorial terms. Let and denote two weight matrices with nonnegative elements, where , . Then we have
| (C.2) |
In practice, we find that it is sufficient to use 2 to 4 dominant modes for computing the weighted distance dw.
Appendix D: Unbiased Z-score of distance correlation
Let us consider computing the Z-score of distance correlation Rd as follows
| (D.1) |
In the presence of a small sample size n, Rd is over-estimated (which is always nonnegative). Without loss of generality, we assume that estimate of Rd with n samples are , where δ ≥ 0 denotes the estimation bias. Next, we assume that with the same sample size n, the estimation bias δ is statistically identical for different random shuffles. Under this assumption, the bias of is still δ, and the expected bias of is 0 due to bias cancellation. In addition, the standard deviation of Rd,shuffle is independent of the bias constant. Therefore, under these assumptions, Zd will be unbiased even when is potentially biased for a small n. This has been empirically confirmed by a computer simulation experiment (Fig. 13).
Figure 13:

Computer simulations for assessing Rd (equation 2.8) for two independent samples under various sample size n. (A) The ground truth of Rd is 0. Solid and dashed curves denote the uncorrected estimate and its bias-corrected estimate, respectively. Error bar denotes the SEM from 10 Monte Carlo random simulations. (B) Zd (using uncorrected Rd) based on 1000 random shuffles. Error bar denotes the SEM. None of Zd estimate reaches the statistical significant level, and Zd does not change monotonically with respect to the sample size.
The same reasoning also applies to Zwd for weighted distance correlation Rwd.
Appendix E: Subspace methods: PCA and ICA
Subspace methods are derived from second-order correlation statistics (e.g. PCA) or high-order moment statistics (e.g. ICA). However, these methods have several limitations. First, they are linear methods, therefore they are insufficient to capture statistical dependency with nonlinear transformation. Second, a stationary correlation statistic is assumed during the complete TEMPLATE or MATCH period, which is untrue in the presence of distinct or complex behaviors that drive the state-dependent neuronal responses. Third, the derived reactivation strength (RS) from these methods does not identify the content of memory; instead, RS is positively correlated with the quadratic power of temporal firing rate of individual neurons.
To illustrate the third point, let’s consider the PCA method as an example. Specifically, the method consists of three steps (Peyrache et al., 2009): (i) Compute a C × C correlation matrix C from a Z-scored C × T population firing rate matrix collected from C neurons during a TEMPLATE epoch (e.g., during WAKE behavior); (ii) Conduct PCA and extract the dominant eigenvalue λ1 and eigen-subspace P1 such that , where and u1 is the principal eigenvector; (iii) In the testing phase, project the instantaneous C-dimensional firing rate vector vt (Z-scored) onto the dominant subspace and compute the time-varying RS
| (E.1) |
where ⊤ denotes the transpose operator. Note that the second term of the third equation line (off-diagonal elements) characterizes the second-order interaction between pairwise neurons, whereas the first term of the third equation line (diagonal elements) characterizes quadratic power of the firing rate projected onto the dominant eigenspace. Although the first term and the sum of these two terms is nonnegative, the exact value of each term is dependent on the actual values of P1 and vt (i.e., the second off-diagonal term can be a negative value). Mathematically, (where Pcc denotes the c-th diagonal term of P1)—if the value of a single element vc,t is sufficiently large, its contribution may significantly bias the value of RSt and dominate the value of off-diagonal term. Therefore, RSt can be very sensitive to an outlier in the firing rate vector vt for several obvious reasons: (i) biological neuronal firing rates are non-Gaussian distributed and highly skewed (Buzsáki & Mizusek, 2014); (ii) neurons can have intrinsic bursting; (iii) neuronal spike can be corrupted by noise. All these factors would make “outliers” appear more frequently than expected.
For instance, in the presence of two neurons, consider the following two scenarios
where two P1 matrices are orthonormal and positive definite. Note that in both scenarios, the off-diagonal term P12 or P21 characterizes the pairwise neuronal interaction. However, even P12 is much smaller in Scenario 2 (implying their correlation is not significant) than in Scenario 1, the instantaneous RS value can be still very large due to the choice of vt.
More importantly, the RS measure cannot reveal the content of memory reactivation. A high or low value in RS is relative (depending on relative change in population firing rate) and is only meaningful for specific recordings. In other words, the same RS quantity may have different interpretations or implications depending on specific neuronal ensembles. Associating high RS values with memory reactivation may lead to a false hypothesis. This has been confirmed by our empirical observations while working on rodent hippocampal spike data.
Footnotes
A semimetric can be defined, which satisfies the first three axioms but not the triangle inequality.
For the weighted correlation Rw, the threshold criterion is not very critical since nearly all significant events satisfy |Rw| > 0.5, and our final statistics won’t change without this criterion. We set no threshold for the weighted distance correlation, since the measure is biased due to small sample size. The bias correction will vary according to the samples.
References
- Agarwal R, Chen Z, Kloosterman F, Wilson MA, & Sarma SV (2016). A novel nonparametric approach for neural encoding and decoding models of multimodal receptive fields. Neural Computation, 28: 1356–1387. [DOI] [PubMed] [Google Scholar]
- Ahmed OJ, McFarland J & Kumar A (2008). Reactivation in ventral striatum during hippocampal ripples: evidence for the binding of reward and spatial memories? J. Neurosci. 28: 9895–9897. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Allen TA, Salz DM, McKenzie S & Fortin NJ (2016). Nonspatial sequence coding in CA1 neuron. J. Neurosci. 36: 1547–1563. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Boyce R, Glasgow SD, Williams S & Adamantidis A (2016). Causal evidence for the role of REM sleep theta rhythm in contextual memory consolidation. Science, 352:812–816. [DOI] [PubMed] [Google Scholar]
- Buzsáki G & Mizuseki K (2014). The log-dynamic brain: how skewed distributions affect network operations. Nat. Rev. Neurosci, 26: 88–95. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Carr MF, Jadhav SP, & Frank LM (2011). Hippocampal replay in the awake state: a potential substrate for memory consolidation and retrieval. Nat. Neurosci. 14(2):147–153. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Chen Z, Kloosterman F, Brown EN & Wilson MA (2012). Uncovering hidden spatial topology represented by hippocampal population neuronal codes. J. Comput. Neurosci. 33(2):227–255. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Chen Z, Gomperts S, Yamamoto J & Wilson MA (2014). Neural representation of spatial topology in the rodent hippocampus. Neural Computation 26(1):1–39. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Chen Z, Grosmark AD, Penagos H & Wilson MA (2016). Uncovering representations of sleep-associated hippocampal ensemble spike activity. Scientific Reports, 6: 32193. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Chen Z, Linderman SW & Wilson MA (2016). Bayesian nonparametric methods for discovering latent structures of rat hippocampal ensemble spikes. Proc. IEEE Machine Learning for Signal Processing (MLSP), pp. 1–6, Salerno, Italy. [Google Scholar]
- Chen Z & Wilson MA (2017). Deciphering neural codes of memory during sleep. Trends in Neurosciences, 40(5): 260–275. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Davidson TJ, Kloosterman F & Wilson MA (2009). Hippocampal replay of extended experience. Neuron 63(4):497–507. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Deng X, Liu DF, Karlsson MP, Frank LM & Eden UT (2016). Rapid classification of hippocampal replay content for real-time applications. Journal of Neurophysiology, 116: 2221–2235. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Grosmark AD, Mizuseki K, Pastalkova E, Diba K & Buzsáki G (2012). REM sleep reorganizes hippocampal excitability. Neuron 75, 1001–1007. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Grosmark AD & Buzsáki G (2016). Diversity in neural firing dynamics supports both rigid and learned hippocampal sequences Science 351: 1440–1443. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Grosmark AD, Long J & Buzsáki G (2016). Recordings from hippocampal area CA1, PRE, during and POST novel spatial learning. CRCNS.org. 10.6080/K0862DC5 [DOI] [Google Scholar]
- Gulati T, Ramanathan DS, Wong CC & Ganguly K (2014). Reactivation of emergent task-related ensembles during slow-wave sleep after neuroprosthetic learning. Nat. Neurosci. 17(8):1107–1113. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Haggerty DC & Ji D (2015). Activities of visual cortical and hippocampal neurons co-fluctuate in freely-moving rats during spatial behavior. eLife, 4: e08902. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Horikawa T, Tamaki M, Miyawaki Y, & Kamitani Y (2013). Neural decoding of visual imagery during sleep. Science, 340: 639–642. [DOI] [PubMed] [Google Scholar]
- Ji D & Wilson MA (2007). Coordinated memory replay in the visual cortex and hippocampus during sleep. Nat. Neurosci. 10: 100–107. [DOI] [PubMed] [Google Scholar]
- Kitamura T, Ogawa SK, Roy DS, Okuyama T, Morrissey MD, Smith LM, Redondo RL & Tonegawa S (2017). Engrams and circuits crucial for systems consolidation of a memory. Science, 356: 73–78. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kloosterman F & Wilson MA (2009). Neural decoding of rat hippocampal spike trains reveals expression of trajectories in the open field during quiet wakefulness. SfN Abstract, Program No. 480.12. Chicago, IL. [Google Scholar]
- Kudrimoti HS, Barnes CA & McNaughton BL (1999). Reactivation of hippocampal cell assemblies: Effects of behavioral state, experience, and EEG dynamics. J. Neurosci. 19(10): 4090–4101. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lee AK & Wilson MA (2002). Memory of sequential experience in the hippocampus during slow wave sleep. Neuron 36(6): 1183–1194. [DOI] [PubMed] [Google Scholar]
- Lee AK & Wilson MA (2004). A combinatorial method for analyzing sequential firing patterns involving an arbitrary number of neurons based on relative time order. J. Neurophysiol. 92: 2555–2573. [DOI] [PubMed] [Google Scholar]
- Li W, Ma L, Yang G & Gan WB (2017). REM sleep selectively prunes and maintains new synapses in development and learning. Nat. Neurosci, 20: 427–437. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Linderman SW, Johnson MJ, Wilson MA, & Chen Z (2016). A Bayesian nonparametric approach to uncovering rat hippocampal population codes during spatial navigation. J. Neurosci. Methods 236: 36–47. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lopes-dos-Santos V, Ribeiro S, & Tort AB (2013). Detecting cell assemblies in large neuronal populations. J. Neurosci. Methods 220: 149–166. [DOI] [PubMed] [Google Scholar]
- Louie K & Wilson MA (2001). Temporally structured replay of awake hippocampal ensemble activity during rapid eye movement sleep. Neuron 29: 145–156. [DOI] [PubMed] [Google Scholar]
- McGaugh JL (2000). Memory—a century of consolidation. Science, 287: 248–251. [DOI] [PubMed] [Google Scholar]
- McGaugh JL (2004). The amygdala modules the consolidation of memories of emotionally arousing experiences. Ann. Rev. Neurosci, 27: 1–28. [DOI] [PubMed] [Google Scholar]
- McGaugh JL (2015). Consolidating memories. Ann. Rev. Psychology, 66: 1–24. [DOI] [PubMed] [Google Scholar]
- Menz MM, Rihm JS, & Büchel C (2016). REM sleep is causal to successful consolidation of dangerous and safety stimuli and reduces return of fear after extinction. J. Neurosci, 36: 2148–2160. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Nádasdy Z, Hirase H, Czurkó A, Csicsvari J, & Buzsáki G (1999). Replay and time compression of recurring spike sequences in the hippocampus. J. Neurosci. 19(12): 9497–9507. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Peyrache A, Khamassi M, Benchenane K, Wiener S & Battaglia F (2009). Replay of rule-learning related neural patterns in the prefrontal cortex during sleep. Nat. Neurosci. 12(7): 919–926. [DOI] [PubMed] [Google Scholar]
- Peyrache A, Benchenane K, Khamassi M, Wiener S & Battaglia F (2010). Principal component analysis of ensemble recordings reveal cell assemblies at high temporal resolution. J. Comput. Neurosci. 29: 309–325. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Pfeiffer BE & Foster DJ (2013). Hippocampal place-cell sequences depict future paths to remembered goals. Nature, 497:74–79. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Ramanthan DS, Gulati T & Ganguly K (2015) Sleep-dependent reactivation of ensembles in motor cortex promotes skill consolidation. PLoS Biol. 13: e1002263. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Rothschild G, Eban E, & Frank LM (2017). A cortical-hippocampal-cortical loop of information processing during memory consolidation. Nat. Neurosci. 20: 251–259. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Schönauer M, Alizadeh S, Jamalabdi H, Abraham A, Pawlizki A & Gais S (2017). Decoding material-specific memory reprocessing during sleep in humans. Nature Communications 8: 15404. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Sejdinovic D, Spiperumbudur B, Gretton A & Fukumizu K (2013). Equivalence of distance-based and RKHS-based statistics in hypothesis testing. Ann. Stat, 3(5): 2263–2291. [Google Scholar]
- Shan KO, Lubenov EV, Papadopoulou M & Siapas AG (2016). Spatial tuning and brain state account for dorsal hippocampal CA1 activity in a non-spatial learning task. eLife, 5: e14321. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Siclari F, Baird B, Perogamvros L, Bernardi G, LaRocque JJ, Riedner B, Boly M, Postle BR & Tononi G (2017). The neural correlates of dreaming. Nat. Neurosci. 20(6): 872–878. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Silva D, Feng T & Foster DJ (2015). Trajectory events across hippocampal place cells require previous experiences. Nat. Neurosci, 18: 1772–1779. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Skaggs WE, McNaughton BL & Gothard KM (1993). An information-theoretic approach to deciphering the hippocampal code. In Advances in Neural Information Processing System 5, (pp. 1030–1037). San Francisco, CA: Morgan Kaufman Publisher. [Google Scholar]
- Skaggs WE & McNaughton BL (1996). Replay of neuronal firing sequences in rat hippocampus during sleep following spatial experience. Science 271:1870–1873. [DOI] [PubMed] [Google Scholar]
- Székely GJ & Rizzo ML (2009). Brownian distance covariance. Annals of Applied Statistics, 3(4): 1233–1303. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Székely GJ & Rizzo ML (2012). On the uniqueness of distance covariance. Statistics & Probability Letters 82 (12): 2278–2282. [Google Scholar]
- Székely GJ & Rizzo ML (2013). The distance correlation t-test of independence in high dimension. Journal of Multivariate Analysis, 117: 193–213. [Google Scholar]
- van den Ven GM, Trouche S, McNamara CG, Allen K, & Dupret D (2016). Hippocampal offline reactivation consolidates recently formed cell assembly patterns during sharp wave-ripples. Neuron 92: 968–974. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Wilber AA, Skelin I, Wu W & McNaughton BL (2017). Laminar organization of encoding and memory reactivation in the parietal cortex. Neuron, 95: 1406–1419. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Wilson MA & McNaughton BL (1994). Reactivation of hippocampal ensemble memories during sleep. Science 265: 676–679. [DOI] [PubMed] [Google Scholar]
- Wu X & Foster DJ (2014). Hippocampal replay captures the unique topological structure of a novel environment. J. Neurosci, 34: 6459–6469. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Zemel R, Dayan P & Pouget A (1998). Probabilistic interpretation of population codes. Neural Computation 10(2): 403–430. [DOI] [PubMed] [Google Scholar]
- Zhang K, Ginzburg I, McNaughton BL & Sejnowski TJ (1998). Interpreting neuronal population activity by reconstruction: unified framework with application to hippocampal place cells. J. Neurophysiol. 79(2): 1017–1044. [DOI] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
