In various brain regions, the neural code tends to be dynamic although behavioral outputs remain stable. Representational drift refers to the dynamic nature of internal representations as they have been observed in sensory cortical areas [13] or the hippocampus [4, 5] despite stable behavior. It has even been suggested that pyramidal neurons from the CA1 and CA3 regions form dynamic rather than static memory engrams [5, 6], namely that the set of neurons encoding specific memories varies across days. In the amygdala, retraining of a fear memory task induces a turnover of the memory engram [7]. Additionally, plasticity mechanisms have been proposed to compensate for drift and to provide a stable read-out of the neural code [8], suggesting that information is maintained. Altogether, this line of evidence suggest that drift might be a general mechanism with dynamical representations observed in various brain regions.

However, the mechanisms underlying the emergence of drift and its relevance for the neural computation are not known. Drift is often thought to arise from variability of internal states [2], neurogenesis [1, 9] or synaptic turnover [10]. Excitability might also play a role in memory allocation [1114], so that neurons having high excitability are preferentially allocated to memory ensembles [1416]. Moreover, excitability is known to fluctuate over timescales from hours to days, in the amygdala [16], the hippocampus [15, 17] or the cortex [18, 19]. Subsequent reactivations of a neural ensemble at different time points could therefore be biased by excitability [20], which varies at similar timescales than drift [21]. Altogether, this evidence suggest that fluctuations of excitability could act as a cellular mechanism for drift [12].

In this short communication, we aimed at proposing how excitability could indeed induce a drift of neural ensembles at the mechanistic level. We simulated a recurrent neural network [22] equipped with intrinsic neural excitability and Hebbian learning. As a proof of principle, we first show that slow fluctuations of excitability can induce neural ensembles to drift in the network. We then explore the functional implications of such drift. Consistent with previous works [21, 2325], we show that neural activity of the drifting ensemble is informative about the temporal structure of the memory. This suggest that fluctuations of excitability can be useful for time-stamping memories (i.e. for making the neural ensemble informative about the time at which it was form). Finally, we confirmed that the content of the memory itself can be steadily maintained using a read-out neuron and local plasticity rule, consistently with previous computational works [8]. The goal of this study is to show one possible mechanistic implementation of how excitability can drive drift.


Many studies have shown that memories are encoded in sparse neural ensembles that are activated during learning and many of the same cells are reactivated during recall, underlying a stable neural representation [12, 26, 27]. After learning, subsequent reactivations of the ensemble can happen spontaneously during replay, retraining or during a memory recall task (e.g. following presentation of a cue [26, 28]). Here, we directly tested the hypothesis that slow fluctuations of excitability can change the structure of a newly-formed neural ensemble, through subsequent reactivations of this ensemble. To that end, we designed a rate-based, recurrent neural network, equipped with intrinsic neural excitability (Methods). We considered that the recurrent weights are all-to-all and plastic, following a Hebbian rule (Methods). The network was then stimulated following a 4-day protocol: the first day corresponds to the initial encoding of a memory and the other days correspond to spontaneous or cue-induced reactivations of the neural ensemble (Methods). Finally, we considered that excitability of each neuron can vary on a day long timescale: each day, a different subset of neurons has increased excitability (Fig. 1a, Methods).

Excitability-induced drift of memory ensembles.

a) Distribution of excitability εi for each neuron i, fluctuating over time. During each stimulation, a different pool of neurons has a high excitability (Methods). b) and c) Firing rates of the neurons across time. The red traces in panel c) correspond to neurons belonging to the first assembly, namely that have a firing rate higher than the active threshold after the first stimulation. The black bars show the stimulation and the dashed lines correspond to the active threshold. d) Recurrent weights matrices after each of the four stimuli show the drifting assembly.

Fluctuations of intrinsic excitability induce drifting of neural ensembles

While stimulated the naive network on the first day, we observed the formation of a neural ensemble: some neurons gradually increase their firing rate (Fig. 1b and c, neurons 10 to 20, time steps 1000 to 3000) during the stimulation. We observed that these neurons are highly recurrently connected (Fig. 1d, leftmost matrix) suggesting that they form an assembly. This assembly is composed of neurons that have a high excitability (Fig. 1a, neurons 10 to 20 have increase excitability) at the time of the stimulation. We then show that further stimulations of the network induce a remodeling of the weights. During the second stimulation for instance (Fig. 1b and c, time steps 4000 to 6000), neurons from the previous assembly (10 to 20) are reactivated along with neurons having high excitability at the time of the second stimulation (Fig. 1a, neurons 20 to 30). Moreover, across several days, recurrent weights from previous assemblies tend to decrease while others increase (Fig. 1d). Indeed, neurons from the original assembly (Fig. 1c, red traces) tend to be replaced by other neurons, either from the latest assembly or from the pool of neurons having high excitability. This is translated at the synaptic level, where weights from previous assemblies tend to decay and be replaced by new ones. Overall, each new stimulation updates the ensemble according to the current distribution of excitability, inducing a drift towards neurons with high excitability.

Activity of the drifting ensemble is informative about the temporal structure of the past experience

After showing that fluctuations of excitability can induce a drift among neural ensembles, we tested whether the drifting ensemble could contain temporal information about its past experiences, as suggested in previous works [23]. Inspired by these works, we asked whether it was possible to decode relevant temporal information from the patterns of activity of the neural ensemble. We first observed that the correlation between patterns of activity after just after encoding across days decreases (Fig. 2a, Methods), indicating that after each day, the newly formed ensemble resembles less the original one. Because the patterns of activity differ across days, they should be informative about the absolute day from which they were recorded. To test this hypothesis, we designed a day decoder (Fig. 2b, Methods), following the work of Rubin et al., 2015 [23]. This decoder aims at inferring the reactivation day of a given activity pattern by comparing the activity of this pattern during training and the activity just after memory encoding without increase in excitability (Fig. 2b, Methods). We found that the day decoder perfectly outputs the reactivation day as compared to using shuffled data (Fig. 2c, blue and orange bars).

Neuronal activity is informative about the temporal structure of the reactivations.

a) Correlation of the patterns of activity between the first day and every other days, for n = 10 simulations. Data are shown as mean ± s.e.m. b) Schema of the day decoder. The day decoder maximises correlation between the patterns of each day with the pattern from the simulation with no increase in excitability. c) Results of the day decoder for the real data (blue) and the shuffled data (orange). Shuffled data consist of the same activity pattern for which the label of each cells for every seed has been shuffled randomly. For each simulation, the error is measured for each day as the difference between the decoded and the real day. Data are shown for n = 10 simulations and for each of the 4 days. d) Schema of the ordinal time decoder. This decoder output the permutation p that maximises the sum S(p) of the correlations of the patterns for each pairs of days. e) Distribution of the value S(p) for each permutation of days p. The value for the real permutation S(preal) is shown in black. f) Student’s test t-value for n = 10 simulations, for the real (blue) and shuffled (orange) data and for different amplitudes of excitability E. Data are shown as mean ± s.e.m. for n = 10 simulations.

After showing that the patterns of activity are informative about the reactivation day, we took a step further by asking to whether the activity of the neurons is also informative about the order in which the memory evolved. To that end, we used an ordinal time decoder (Methods, as in Rubin et al., 2015 [23]) that uses the correlations between activity patterns for pairs of successive days, and for each possible permutation of days p (Fig. 2d, Methods). The sum of these correlations S(p) differs from each permutation p and we assumed that the neurons are informative about the order at which the reactivations of the ensemble happened if the permutation maximising S(p) corresponds to the real permutation preal (Fig. 2e, Methods). We found that S(preal) was indeed statistically higher than S(p) for the other permutations E (Fig. 2f, Student’s t-test, Methods). However, this was only true when the amplitude of the fluctuations of excitability E was in to a certain range. Indeed, when the amplitude of the fluctuations is null, i.e. when excitability is not increased (E = 0), the ensemble does not drift (Fig. S1a). In this case, the patterns of activity are not informative about the order of reactivations. On the other hand, if the excitability amplitude is too high (E = 3), each new ensemble is fully determined by the distribution of excitability, regardless of any previously formed ensemble (Fig. S1c). In this regime, the patterns of activity are not informative about the order of the reactivations either. In the intermediate regime (E = 1.5), the decoder is able to correctly infer the order at which the reactivations happened, better than using the shuffled data (Fig. 2f, Fig. S1b).

A read-out neuron can track the drifting ensemble

So far, we showed that the drifting ensemble contains information about its history, namely about the days and the order at which the subsequent reactivations of the memory happened. However, we have not shown that we could use the neural ensemble to actually decode the memory itself, in addition to its temporal structure. To that end, we introduced a decoding output neuron connected to the recurrent neural network, with plastic weights following a Hebbian rule (Methods). As shown by Rule et al., 2022 [8], the goal was to make sure that the output neuron can track the ensemble even if it is drifting. This can be down by constantly decreasing weights from neurons that are no longer in the ensemble and increasing those associated with neurons joining the ensemble (Fig. 3a). We found that the output neuron could steadily decode the memory (i.e. it has a higher firing than in the case where the output weights are randomly shuffled; Fig. 3b, blue trace for the real output and white, orange and red traces for the shuffled weights). This is due to the fact that weights are plastic under Hebbian learning, as shown by Rule et al. 2022 [8]. We confirmed that this was induced by a change in the output weights across time (Fig. 3c). In particular, the weights from neurons that no longer belong to the ensemble are decreased while weights from newly recruited neurons are increased, so that the center of mass of the weights distribution drifts across time (Fig. 3d).

A single output neuron can track the memory ensemble through Hebbian plasticity.

a) Conceptual architecture of the network: the read-out neuron y in red “tracks” the ensemble by decreasing synapses linked to the previous ensemble and increasing new ones to linked to the new assembly. b) Output neuron’s firing rate across time. The blue trace correspond to the real output. The white, orange and red traces correspond to the cases where the output weights were randomly shuffled for every time points after presentation of the first, second and third stimulus, respectively. C) Output weights for each neuron across time. d) Center of mass of the distribution of the output weights (Methods) across days. The output weights are centered around the neurons that belong to the assembly at each day. Data are shown as mean ± s.e.m. for n = 10 simulations.


Overall, our model suggests a potential cellular mechanisms for the emergence of drift that can serve a computational purpose by “time-stamping” memories while still being able to decode the memory across time. Although the high performance of the day decoder was expected, the performance of the ordinal time decoder is not trivial. Indeed, the patterns of activity of each day are informative about the distribution of excitability and therefore about the day at which the reactivation happened. However, the ability for the neural ensemble to encode the order of past reactivations requires drift to be gradual (i.e. requires consecutive patterns of activity to remain correlated across days). Indeed, if the amplitude of excitability is too low (E = 0) or too high (E = 3), it is not possible to decode the order at which the successive reactivations happened. This result is consistent with the previous works showing gradual change in neural representations, that allows for decoding temporal information of the ensemble [23]. Moreover, such gradual drifts could support complex cognitive mechanisms like mental time-travel during memory recall [23].

In our model, drift is induced by co-activation of the previously formed ensemble and neurons with high excitability at the time of the reactivation. The pool of neurons having high excitability can therefore “time-stamps” memory ensembles by biasing allocation of these ensembles [21, 23, 24]. We suggest that such time-stamping mechanism could also help link memories that are temporally close and dissociate those which are spaced by longer time [3, 12, 29]. Indeed, the pool of neurons with high excitability varies across time so that any new memory ensemble is allocated to neurons which are shared with other ensembles formed around the same time. This mechanism could be complementary to the learning-induced increase in excitability observed in amygdala [16], hippocampal CA1 [15] and dentate gyrus [30].

Finally, our work suggests that drift is determine both by the number of reactivations of the ensemble and the fluctuations of excitability. In particular, it is not directly related to the elapsed time between two recordings. This is consistent with growing evidence that drift is dependent more on the previous experience than on the elapsed time between different recordings [9, 23, 31]. This work is also in line with the recent findings showing that fluctuations of excitability can happen for multiple reasons related to experience such as neurogenesis [9, 29, 32], sleep [33] or increase in dopamine level [34]. Overall, our work is a proof of principle which highlights the importance of considering excitability when studying drift, although further work would be needed to test this link experimentally.


Recurrent neural network with excitability

Our rate-based model consists of a single region of N neurons (with firing rate ri, 1 ≤ iN). All-to-all recurrent connections W are plastic and follow a Hebbian rule given by:

where i and j correspond to the pre- and post-synaptic neuron respectively. τW and τdecay are the learning and the decay time constants of the weights, respectively. A hard bound of [0, 1] was apply to these weights. We also introduced a global inhibition term dependent on the activity of the neurons:

Where I0, I1 and I2 are positive constants. All neurons receive the same input, Δ(t), during stimulation of the network (Fig. 1c, black bars). Finally, excitability is modeled as a time-varying threshold εi of the input-output function of each neuron i. The rate dynamics of a neuron i is given by:

where τr is the decay time of the rates and ReLU is the rectified linear activation function. We considered that a neurons is active when its firing rate reaches the active threshold θ.


We designed a 4-day protocol, corresponding to the initial encoding of a memory (1st day) and subsequent random or cue-induced reactivations of the ensemble [26, 28] (2nd, 3rd and 4th day). Each stimulation consists of Nrep repetitions of interval T spaced by a inter-repetition delay IR. Δ(t) takes the value δ during these repetitions and is set to 0 otherwise. The stimulation is repeated four times, modelling four days of reactivation, spaced by an inter-day delay ID. Excitability εi of each neuron i is sampled from a chi-squared distribution of parameter 1. Neurons 10 to 20, 20 to 30, 30 to 40 and 40 to 50 then receive an increase of excitability of amplitude E, respectively on days 1, 2, 3 and 4 (Fig. 1a). A different seed is used for each repetitions of the simulations.


For each day d, we recorded the activity pattern Vd, which is a vector composed of the firing rate of the neurons 50 time steps after the beginning of the last repetition of stimulation. To test the decoder, we also stimulated the network while setting the excitability at baseline (E = 0), and recorded the resulted pattern of activity for each day d. We then designed two types of decoders, inspired by previous works [23]: (1) a day decoder which infers the day at which each stimulation happened and (2) an ordinal time decoder which infers the order at which the reactivations occurred. For both decoders, the shuffled data was obtained by randomly shuffling the day label of each neuron.

1. The day decoder aims at inferring the day at which a specific patterned of activity occurred. To that end, we computed the Pearson correlation between the pattern with no excitability of the day d and the patterns of all days d from the first simulation Vd. Then, the decoder outputs the day dinf that maximises the correlation:

The error was defined as the difference between the inferred and the real day dinfd.

2. The ordinal time decoder aims at inferring the order at which the reactivations happened from the patterns of activity Vd of every days d. To that end, we computed the pairwise correlations of each consecutive days, for the 4! possible permutations of days p. The real permutation is called preal = (1, 2, 3, 4) and corresponds to the real order of reactivations: day 1 → day 2 → day 3 → day 4. The sum of these correlations over the 3 pairs of consecutive days is expressed as:

We then compared the distribution of these quantities for each permutation p to that of the real permutation S(preal) (Fig. 2). The patterns of activity are informative about the order of reactivations if S(preal) corresponds to the maximal value of S(p). To compare S(preal) with the distribution S(p), we performed a Student’s t-test, where the t-value is defined as :

where µ and σ corresponds to the mean and standard deviation of the distribution S(p), respectively.

Memory read-out

To test if the network is able to decode the memory at any time point, we introduced a read-out neuron with plastic synapses to neurons from the recurrent network, inspired by previous computational works [8]. The weights of these synapses are named and follow the Hebbian rule defined

where and corresponds to the learning time and decay time constant, respectively. h(W out) is a homeostatic term defined as which decreases to 0 throughout learning. h takes the value 1 before learning and 0 when the sum of the weights reaches the value 1. y is the firing rate of the output neuron defined y as:


The following parameters have been used for all simulations, when not specify otherwise. All except N are in arbitrary unit.


Comparison of drifting behavior for different values of excitability amplitude.

a) E = 0, no drift. A neural assembly is initially formed during the first stimulation and later reactivated every subsequent day. b) E = 1.5, partial drift. The ensemble is gradually modified during each new stimulation. c) E = 3, full drift. Each new stimulation leads to formation of a new ensemble, containing neurons that have high excitability during this time.