Robust spatial memory maps encoded by networks with transient connections

The spiking activity of principal cells in mammalian hippocampus encodes an internalized neuronal representation of the ambient space—a cognitive map. Once learned, such a map enables the animal to navigate a given environment for a long period. However, the neuronal substrate that produces this map is transient: the synaptic connections in the hippocampus and in the downstream neuronal networks never cease to form and to deteriorate at a rapid rate. How can the brain maintain a robust, reliable representation of space using a network that constantly changes its architecture? We address this question using a computational framework that allows evaluating the effect produced by the decaying connections between simulated hippocampal neurons on the properties of the cognitive map. Using novel Algebraic Topology techniques, we demonstrate that emergence of stable cognitive maps produced by networks with transient architectures is a generic phenomenon. The model also points out that deterioration of the cognitive map caused by weakening or lost connections between neurons may be compensated by simulating the neuronal activity. Lastly, the model explicates the importance of the complementary learning systems for processing spatial information at different levels of spatiotemporal granularity.


Introduction
Functioning of the biological networks relies on synaptic and structural plasticity processes taking place at various spatiotemporal timescales [1][2][3][4]. For example, the so-called place cells in mammalian hippocampus learn to spike within specific locations of a new environment (their respective place fields) in a matter of minutes and then exhibit slow tuning of their firing rates for weeks [5][6][7]. The functional architecture of the hippocampal network constantly changes due to formation, adaptation and pruning of the synaptic connections via fast and slow plasticity mechanisms [8]. Its key components-the dynamical cell assemblies [9,10]may emerge from place cell coactivities and disappear due to reduction or cessation of spiking at working and intermediate memory timescales, between minutes [11,12] and hundreds of milliseconds [13,14]. In contrast, spatial memories in rats can last much longer [15,16], which poses a principal question: how can a rapidly rewiring network produce and sustain a stable cognitive map? In the following, we address this question by modeling a population of dynamical place cell assemblies and study the effect produced by the network's transience on the large-scale representation of space, using algebraic topology tools. In particular, we demonstrate that despite rapid changes in its synaptic architecture, a transient cell assembly network can encode a stable large-scale topological map within a biologically plausible period.
The paper is organized as follows. We start with a general outline of the key ideas behind the topological approach and describe a schematic model of a transient cell assembly network. We then study the statistics of its connections' turnover, the resulting dynamics of the network as a whole and of the spatial map encoded by this network (Fig 1). The results are tested for several connection decay rates, in different setups and summarized in the Discussion. The required mathematical and computational details are provided in the Methods section.

The topological model
General outline. Our approach is based on recent experimental results [17][18][19], which suggest that the hippocampal spatial map derived from place cell co-firing emphasizes contiguities between locations and the temporal sequence in which they are experienced. In other words, this map is topological in nature, i.e., akin to a subway map, as opposed to a topographical city The topological structure of a steadily growing coactivity complex can be described using persistent homology theory methods [30,31]. In particular, this theory allows detecting topological loops in T ðM E Þ-closed chains of simplexes identified up to topological equivalence [32]-on a moment-by-moment basis (Fig 2B). Such loops provide a convenient semantics for describing how T ðM E Þ unfolds in time. For example, the number of inequivalent topological loops that can be contracted to a zero-dimensional vertex defines the number of the connected components in T ðM E Þ; the number of loops that contract to a one-dimensional chain of links defines the number of holes and so forth. In mathematical literature, the number of k-dimensional topological loops in a space X is referred to as its k-th Betti number, b k (X), and the list of all Betti numbers defines the topological barcode, bðXÞ ¼ ðb 0 ðXÞ; b 1 ðXÞ; . . .Þ of X [33]. For example, the simply connected, square environment E with a single hole in the middle (Fig 2A and Methods) has the Betti numbers b 0 ðEÞ ¼ b 1 ðEÞ ¼ 1, with no higher order loops, b k>1 ðEÞ ¼ 0; hence its topological barcode is bðEÞ ¼ ð1; 1; 0; 0; . . .Þ. The time T min required by the coactivity complex to produce the topological barcode of the underlying environment, bðT Þ ¼ bðEÞ, can serve as a theoretical estimate for the "learning" period needed to accumulate spiking data for establishing the large-scale spatial structure of the environment [25][26][27][28][29].
The construction of the coactivity complexes may be adopted to reflect physiological aspects of the hippocampal network. For example, the simplexes of the coactivity complex may represent not just arbitrary combinations of coactive cells, but the neuronal assembliesgroups of cells that jointly elicit spiking activity in the downstream neurons. As mentioned in the Introduction, these assemblies are unstable, transient structures that are recycled, according to different estimates, at the timescale between minutes to hundreds of milliseconds [9,10].
In order to represent this transience, the simplexes of the coactivity complex are allowed to appear and to disappear, i.e., "flicker," following the appearances and disappearances of the corresponding cell assemblies. As a result, certain parts of the resulting "flickering" coactivity complex F ðM E Þ complex may produce holes, fractures or fragment into pieces that can inflate or shrink, at different rates and in various sequences ( Fig 2C). The topology of such a complex cannot, in general, be described using ordinary persistent homology theory methods (Fig 2D), and requires a different mathematical apparatus-Zigzag persistent homology theory, outlined in the Methods section and in [34][35][36].
Implementation. An efficient implementation of the coactivity complex is based on a classical "cognitive graph" model of the hippocampal network [37][38][39][40]. In this model, each active place cell c i corresponds to a vertex v i of a graph G, and the connections between pairs of cells (physiological or functional) are represented by the links B ij = [v i , v j ] of G. The assemblies of place cells c 1 , c 2 , . . ., c n ("synaptically interconnected networks" in terminology of [10]) can then be naturally interpreted as fully interconnected subgraphs between the corresponding vertexes, i.e., as the maximal cliques B = [v 1 , v 2 , . . ., v n ] of G [28,29]. The connection with the topological model described above comes from the observation that cliques, as combinatorial objects, can be viewed as simplexes spanned by the same sets of vertexes. In other words, the collection of cliques of any graph G defines the so-called clique complex S(G) [41], and hence the set of the coactivity cliques of G produces a coactivity complex associated with the cognitive graph. Such a complex effectively accumulates the information about place cell coactivity at various timescales, capturing the correct topology of planar [25][26][27][28] and voluminous [29] environments within minutes.
This construction provides a suitable ground for modeling a population of dynamical cell assemblies. Specifically, one can use a coactivity graph with appearing and disappearing (flickering) links to describe the appearing and disappearing connections in the hippocampal network. The topological shape of the corresponding flickering coactivity complex, will then represent the net topological information encoded by this network. This constitutes a simple phenomenological model that connects the information provided by individual dynamical place cell assemblies and their physiological properties (e.g., the rate of their transience) to the structure of the large-scale topological maps encoded by the cell assembly network as a whole. We implemented this model using the following basic assumptions.
Decay of the connections. A simple description of a transient network can be given in terms of the probabilities of the links' appearances and disappearances at a given moment. For the latter, we adopt a basic "decay" model, in which an existing link B ij between cells c i and c j can disappear with the probability where the time t is counted from the moment of the link's last appearance and the parameter τ ij defines its mean decay time. The decay times of the higher order cliques in the coactivity graph (i.e., of the higher order cell assemblies in the hippocampal network) are then defined by the corresponding links' half-lives. In a physiological cell assembly network, the decay times τ ij are distributed around a certain mean τ with a certain statistical variance [42]. However, in order to simplify the current model and to facilitate the interpretation of its outcomes, we attribute a single value τ ij = τ to all links in G and use a unified distribution to describe the deterioration of all the connections within all cell assemblies. Thus, τ will be the only parameter that describes the decay of the functional connections in the model. We will therefore use the notations G t and F t to refer, respectively, to the flickering coactivity graph with decaying connections and to the resulting flickering clique coactivity complex with decaying simplexes.
Appearances and rejuvenations of the connections. A connection B ij in the graph G appears if the cells c i and c j become active within a w = 1/4 second period (biologically, this corresponds to two consecutive periods of the θ-rhythm [26,43]). The subsequent coactivities of the pair [c i , c j ] either reinstate the link B ij (if it has disappeared by that moment) or rejuvenates it (i.e., its decay restarts). As a result, the links' actual or effective mean lifetime τ e may differ from the proper decay time τ that defines the expected lifetime of an unperturbed connection. Indeed, if the connection B ij that appeared at a moment t 1 , does not disappear by the moment t 2 when it reactivates, then its net expected lifetime becomes t 2 − t 1 + τ. If it does not decay before being "rejuvenated" again at a later moment t 3 , then its net expected lifetime is t 3 − t 1 + τ and so forth. Notice however, that since place cells' spiking in learned environments is stable [44], the vertexes in the coactivity complex F t appear with the first activation of the corresponding place cells and then never disappear.
Fixed geometric parameters. The series of instances at which a given combination of cells may become active is defined by the geometry of the place field map M E and by the times of the rat's visits into the locations where the corresponding place fields overlap [45,46]. In order to study how the dynamics of the Betti numbers b k ðF t ðM E ÞÞ depends on the links' decay time τ, we selected a specific trajectory γ(t) and used place field maps M E that induce coactivity complexes with the correct topological shape in the "perennial" (τ = 1) limit [25,26]. In the following, we will omit references to these parameters in the notations of the coactivity graph or the coactivity complex, and write simply G t and F t .
Restricted dimensionality. Although the coactivity complex is multidimensional [28], for a topological description of a planar environment it suffices to consider only the two-dimensional skeleton of F t , i.e., the collection of second and third order connections (i.e., second or third order cliques of G t or two-or three-vertex simplexes of F t ). Thus, in the following we will compute the coactive pairs and triples of the simulated neurons in order to study the topological properties of F t as function of τ in the lowest two dimensions.
A priori, one would expect that if τ is too small, then the flickering complex F t deteriorates too rapidly to produce a stable topological representation of the environment. In contrast, if τ is too large, then the effect of the decaying connections will not be significant. Thus, our goal will be to identify just how rapidly the coactivity simplexes can recycle while preserving the net topological structure of F t . Physiologically, this will provide an estimate for how rapidly the hippocampal cell assemblies can rewire without jeopardizing the integrity of the topological map of the environment.

Results
To start the simulations, we reasoned that in order for the flickering complex F t to accumulate a sufficient number of simplexes and capture the topology of the environment, its simplexes should not disappear between two consecutive coactivities of the corresponding cell groups. In other words, the characteristic lifetime of the links of the coactivity graph should exceed the typical interval between two consecutive activations of the corresponding cell pairs. First, we simulated a map produced by N = 300 place cells with mean maximal firing rate f = 14 Hz and mean place field size of 20 cm; a typical link B in the corresponding connectivity graph G activates about hn 2 i = 50 times during the T tot = 25 min navigation period, i.e., the mean activation frequency is f 2 % 1/30 Hz (Fig 3). Hence, in order to make room for the rejuvenation effects, we first tested the decay time of τ = 100 secs, which is about three times longer than the inter-activity period and by an order of magnitude smaller than the total navigation time τ % T tot /15.
A histogram of the time intervals Dt B i between the i th consecutive birth (b i ) and death (d i ) shows that the distributions of the connections' effective lifetimes is bimodal (Fig 4A). The relatively short (Δt 10τ) lifetimes are exponentially distributed, implying that these connections are short-lived (the mode of the exponential distribution vanishes) and may be characterized by the effective decay times that are about twice higher for the links, t ð2Þ e % t, than for the triple connections, t ð3Þ e % t (Fig 3). In addition, the bulging tails of the distributions shown on Fig 4A and 4B represent an emergent population of long-lived connections, i.e., a set of "survivor" simplexes that persist throughout the navigation period (Δt B % T tot ).
In other words, the net structure of the lifetimes' statistics suggests that the coactivity complex contains a stable "core" formed by a population of surviving simplexes, enveloped by a population of rapidly recycling, "fluttering," simplexes. The mean lifetime of each individual link, averaged over all the appearances across the entire navigation period, can be approximated by a lognormal distribution with the mode m 2 % 4 minutes (Fig 4C), which corresponds to the mean lifetime of the "fluttering" connections ( Fig 4A). Similarly, a typical third-order simplex appears for about two minutes (Fig 4D), as suggested by the mean of the distribution shown on Fig 4B. Thus, on average, both the coactivity graph G t and the corresponding coactivity complex F t exhibit persistent structures, despite rapid flickering of the individual connections.
The rejuvenation of simplexes also affects the frequency of their (dis)appearances. As shown on Fig 4E and 4F, a typical link and a typical third order connection disappear about 4 − 5 times during the navigation period, which is by an order of magnitude less than the links' activation rate ( Fig 4B). Thus, a typical simplex rejuvenates about 10 times before getting a The mean of the exponential that fits the left side of the histogram (dark-blue line) is shown at the top of the panel. The pink arrow points at the population of the "survivor" links. The red line marks the distribution (1). B: Similar histogram for the third order simplexes. The histograms of the lifetimes averaged over all the instances of a given simplexes' appearances Zigzags of spatial memory map chance to decay. The histograms of the net lifetimes, i.e., of the total time that a given link or a clique spends in existence (ΔT B = S i Δt B,i ) shown on Fig 4G and 4H exhibit an even more salient contribution of the survivor simplexes. Note that the average net lifetime is approximately equal to the product of the mean effective lifetime and the mean number of appearances, ΔT e,B % n e,B τ e,B , as expected.

Dynamics of the flickering coactivity complexes
How does the decay of the connections affect the net structure of the flickering complex F t ? As shown on Fig 5A, the numbers of links N 2 (t) and of the triple connections N 3 (t) rapidly grow at the onset of the navigation and begin to saturate in about t s % 4 minutes (i.e., by the time when a typical link had time to make an appearance), reaching their respective asymptotic values in t a % 7 minutes. To put the size of the resulting flickering complex into a perspective, note that the number of simplexes in a decaying complex F t<1 can never exceed the number of simplexes that would have existed in absence of decay, i.e., in the "perennial" coactivity complex, F 1 T . Thus, the size of the complex at a moment t, F t ðtÞ, can be characterized by the proportion of simplexes that happened to be actualized at that moment. As illustrated on Fig 5A, these numbers fluctuate around 60% for the second order simplexes ij and d ð3Þ ij (note the difference in scales shown by the color bars), computed over a five minutes time interval. The changes in the coactivity complex accumulate at the τ e timescale. C: The proportions of second and third order connections shared by the coactivity complexes at the consecutive moments, computed for links (top light-green line) and for the triple connections (top light-blue line) closely follow the 100% mark, which implies that F t ðtÞ deforms slowly. The numbers of connections present at a moment of time when the coactivity complex is inflated (t Ã % 9 min) that are also present at another moment t, N k ðF t ðt Ã Þ \ F t ðtÞÞ, fluctuate around $ 80% for links (blue trace) and $ 60% for triple connections (green trace), implying that the same set of connections is being reactivated. D: Timelines of 0D (light-blue) and 1D (light-green) topological loops in F t ðtÞ indicate a splash of topological fluctuations near the inflation time t Ã = 9 minutes. During other periods, F t ðtÞ contains only one persistent loop in each dimension. E: The instantaneous Betti numbers, b 0 ðF t Þ and b 1 ðF t Þ increase around t Ã = 9 min, but retain their physical values b 0 ðF t Þ ¼ b 1 ðF t Þ ¼ 1 for the rest of the navigation period, which implies that, despite flickeringinduced deformations, the topological shape of the coactivity complex remains stable during almost the entire navigation period. and around 40% for the third order simplexes, with the relative variances ΔN 2 /N 2 % 12% and ΔN 3 /N 3 % 17% respectively. In other words, the perennial coactivity complex F 1 ðtÞ loses about a half of its size due to the flickering of the simplexes, and fluctuates within about 15% margins from the mean.
To quantify the changes in the complexes' structure as a function of time, we evaluated the number of two-and three-vertex simplexes that are present at a given moment of time t i , but are missing at a later moment t j , normalized by the size of F t ðt i Þ, i.e., As shown on Fig 5B, these numbers, which we refer to, respectively, as the second and third asymmetric distances between F t ðt i Þ and F t ðt j Þ, rapidly grow as a function of temporal separation |t i − t j |. In fact, after approximately the effective decay time t ð2Þ e , the difference between F t ðt i Þ and F t ðt j Þ becomes comparable to the sizes of either F t ðt i Þ or F t ðt j Þ, which implies that the pool of simplexes in the simplicial complex is replenished at the effective decay timescale. However, the shape of the coactivity complex changes slowly: Fig 5C demonstrates that nearly 100% of the connections are shared at two consecutive moments, i.e., the changes in flickering complex from one moment of time to the next are marginal. Over longer periods, the flickering complex can change significantly. For example, the proportion of simplexes that are present at t Ã = 9 minutes, when F t is particularly inflated, and at other moments, varies around N 2 ðF t ðt Ã Þ \ F t ðtÞÞ % 82% for second and N 3 ðF t ðt Ã Þ \ F t ðtÞÞ % 64% for the third order simplexes (Fig 5C).

Topological dynamics
Despite the rapid recycling of the individual simplexes, the large-scale topological characteristics of the flickering complex remain relatively stable. As demonstrated on Fig 5D, after the initial stabilization period of about two minutes (which biologically may be interpreted as the initial learning period), F t contains only one zero-dimensional and a single one-dimensional topological loop-as the simulated environment E. Some topological fluctuations appear around t Ã % 9 minutes, as indicated by an outburst of short-lived spurious loops, most of which last less than a minute. After this period, the first two Betti numbers of F t retain their physical values b 0 ðF t Þ ¼ b 1 ðF t Þ ¼ 1 (Fig 5E). Since Zigzag homology theory allows tracing individual loops in F t continuously across time, these persistent topological loops can be viewed as ongoing representations of the simply connected environment E and of the physical hole in it. Thus, the coactivity complex F t preserves, for the most time, not only its approximate size, but also its topological shape-despite transience at the "microscale", i.e., at the individual simplex level.
Physiologically, these results indicate that the large-scale topological information significantly outlasts the network's connections: although in the discussed case about a half of the functional links rewire within a t ð2Þ e -period, the topology of the cognitive map encoded by the cell assembly network remain stable. In other words, a transient cell assembly network can encode stable topological characteristics of the ambient space, despite transience of the connections.

Dependence on the proper decay time τ
We investigated the topological stability for a set of proper decay times τ ranging from one to five minutes. As one would expect, the number of simplexes in the flickering complex increases with growing τ: in the studied map, the number of links raises from about 40% of the maximal value at τ = 75 secs to just under 60% for τ = 200 secs, whereas the number of the third order connections raises from 60% to about 80% (Fig 6A). The distributions of the effective lifetimes for the short-lived (fluttering) connections retain their exponential shapes (see Suppl. Materials) with the means that are approximately proportional to the proper decay times, t ð2Þ e % 2t and t ð3Þ e % t (Fig 6B and 6C). The contribution of the surviving simplexes also steadily grows with τ (see Suppl. Materials); as a result, the net average lifetimes, computed for the entire population of simplexes, grow faster Dt B 2 % 3t and Dt B 3 % 2t.
As τ increases, the Betti numbers rapidly reduce to their physical values, b 0 ðF t Þ ¼ b 1 ðF t Þ ¼ 1: the lower is the connection decay rate, the smaller are the topological fluctuations generated in the flickering complex (Fig 6D and Suppl. Materials). This is a natural result: the longer the simplexes survive, the closer the topological shape of F t is to the topological shape of the environment E. Physiologically, it implies that the lower is the cell assembly decay rate, the more stable is the cognitive map's topological structure. As shown on Fig 6D, a stabilization of topological barcode is achieved around τ $ 2 minutes. This value can also be naturally interpreted: for such τ, the rat moving at the mean speed of about 25 cm/sec has time to visit most of the environment and reactivate connections in all parts of F t before they may decay, which allows the induced coactivity complex to contract the spurious topological loops, to assume and to retain the correct topological shape. Note however, that this is only a qualitative argument since the expected lifetimes of over 63% of links is smaller than τ and the lifetimes of 15% of them live longer than 2τ.

Fixed connection lifetimes
To test how these results are affected by the spread of the link lifetimes, we investigated the case in which the lifetimes of all the links are fixed, i.e., the decay probability is defined by the function while keeping the other parameters of the model unchanged. The results shown on Fig 7A demonstrate that due to the rejuvenation effects, the range of the effective lifetimes widens and becomes qualitatively similar to the histograms induced by the decay distribution (1). As before, there appear two distinct populations of links: the short-lived links whose lifetimes concentrate around the singular proper lifetime τ, and the "survivor" links, whose lifetimes approach T tot . However, the topological structure of the "fixed-lifetime" coactivity complex F Ã t differs dramatically from that of the decaying complex F t . As shown on Fig 7C,   number of short-lived, spurious topological loops even for the values of τ that reliably produce physical Betti numbers in the case of the exponentially distributed lifetimes. For example, at τ = 100 secs, the zeroth Betti number of F Ã t hovers at the average value of hb 0 i % 40, reaching at times b 0 $ 100, with nearly unchanged b 1 = 1, which indicates that F Ã t is split into a few dozens of disconnected, contractible islets.
As the proper decay time increases, the population of survivor links grows and the disconnected pieces of F Ã t begin to pull together: at τ = 200 secs, the Betti numbers b k ðF Ã t Þ retain their physical values most of the time, yielding occasional splashes of topological fluctuations (Fig 7C and 7D).
These differences between the topological properties of F t and F Ã t indicate that the tail of the exponential distribution (1), i.e., the statistical presence of long-lasting connections is crucial for producing the correct topology of the flickering complex. Physiologically, this implies that the statistical spread of the connections' lifetimes plays important role: without it, the dynamical cell assembly network fails to represent the topology of the environment reliably.

Randomly flickering connections
These observations led us to another question: might the topology of the flickering complex be controlled by the shape of the lifetimes' distribution and the sheer number of links present at a given moment, rather than the specific timing of the links' appearance and disappearance? To test this hypothesis, we computed the number N 2 (t) of links in the decaying coactivity graph G t ðtÞ for τ = 100 sec at every discrete moment of time t (see Methods), and randomly selected the same number of links from the maximal available pool, i.e., from the graph G 1 ðtÞ that would have formed by that moment without links' decay ( Fig 8A). The collections of links randomly selected at consecutive moments of time can be viewed as instances of a random connectivity graph G r ðtÞ, i.e., as a graph whose links can randomly appear and disappear, in contrast with the decaying links of G t ðtÞ (compare Figs 8B and 3B).
As it turns out, the random and the decaying graphs G r ðtÞ and G t ðtÞ, as well as their respective clique complexes F r ðtÞ and F t ðtÞ exhibit a number of similarities. First, the histogram of the net lifetimes of the links in G r ðtÞ shown on Fig 8C is bimodal, with an exponential component characterized by the mean hT 2 i = 124 sec, and a component representing a population of surviving connections, similar to the histograms shown on Fig 4G and 4H. Second, the Betti numbers of the random coactivity complex F r converge to the Betti numbers of the Zigzags of spatial memory map environment in about 3 minutes-about as quickly as the Betti numbers of its decaying counterpart F t (Fig 8D). However, in contrast with the decaying flickering complex F t , the random flickering complex F r keeps producing occasional one-dimensional loops over the entire navigational period at a low rate (about 3% of the time, see Suppl. Materials). Thus, according to the model, the topological properties of the map encoded by a network with randomly formed and pruned connections are similar to the properties of a map produced by a network with decaying connections, as long as the net probability of the links' existence are same. In either case, rapidly rewiring connections do not preclude the appearance of a stable topological map, which once again demonstrates that the latter is a generic phenomenon.

Compensatory mechanisms
The turnover of memories (encoding new memories, integrating them into the existing frameworks, recycling old memories, consolidating the results, etc.) is based on adapting the synaptic connections in the hippocampal network [47]. In particular, these processes require a balanced contribution of both "learning" and "forgetting" components, i.e., of forming and pruning connections [11,12]. The imbalances and pathological alterations in the corresponding synaptic mechanisms are observed in many neurodegenerative conditions, e.g., in the Alzheimer's disease, which is known to affect spatial cognition [48]. However, interpreting the physiological meaning of these alterations is a challenging task, in particular because certain changes in neuronal activity may not be direct consequences of neurodegenerative pathologies. For example, it is believed that neuronal ensembles may increase the spiking rates of the active neurons in order to compensate for the reduced synaptic efficacies [49][50][51][52][53][54][55]. Such considerations motivate deep brain stimulation and other treatments that help to improve cognitive performance in animal models of Alzheimer's diseases and in Alzheimer's patients, by increasing the electrophysiological activity of hippocampal cells [56,57].
Previous studies, carried out for the models of perennial cell assembly networks [58], provided a certain theoretical justification for these approaches. It was demonstrated that a place cell ensemble that fails to produce a reliable topological map of the environment due to an insufficient number of active neurons might be forced to produce a correct map by increasing the active place cells' firing rates. Similarly, the reduction in the firing rates or poor spatial selectivity of spiking may sometimes be compensated by increasing the number of active cells and so forth. Since the current model allows modeling networks with transient connections, we wondered whether it might indicate a theoretical possibility to compensate for the reduced cell assemblies' lifetimes by altering the place cell spiking parameters.
To that end, we varied the mean firing rate f and the number of cells N in the simulated place cell ensemble and studied the topological properties of the resulting coactivity complex as a function of the links' proper half-life, τ. The results shown on Fig 9 demonstrate that indeed, increasing neuronal activity helps to suppress topological fluctuations in the flickering coactivity complex for a wide range of the connections' decay times. Moreover, these changes also increase the proportion of trials in which the place cell ensemble captures the correct signature of the environment (see Suppl. Materials).
Physiologically, these results indicate that recruiting additional active cells and/or boosting place cell firing rates helps to overcome the effect of overly rapid deterioration of the network's connections, i.e., increasing neuronal activity stabilizes the topological map. In particular, a higher responsiveness of the Betti numbers of the flickering coactivity complex to an increase of the mean firing rate (Fig 9C and 9E) as compared to the number of active place cells ( Fig  9A) suggests that targeting the active neurons' spiking may provide a better strategy for designing clinical stimulation methods.

Discussion
The formation and disbanding of dynamical place cell assemblies at the short-and intermediate-memory timescales enable rapid processing of the incoming information in the hippocampal network. Although many details of the underlying physiological mechanisms remain unknown, the schematic approach discussed above provides an instrument for exploring how To compactify the information, we use the sum of the first two Betti numbers, b = (b 0 + b 1 ), which describes the total number of 0D and 1D loops as a function of decay rate τ, computed for several ensemble sizes. As the number of active cells with mean firing rate f = 14 Hz increases from N = 100 to N = 400 cells, the number of loops decrease from 3-4 (indicating at least one spurious loop in 0D or in 1D) to the physical value b 0 ðEÞ þ b 1 ðEÞ ¼ 2. B: The proportion of trials -the success rate, ξ-in which the coactivity complex produces the correct signature, b k ðF t Þ ¼ b k ðEÞ, as a function of the number of cells, N. Larger place cell ensembles tend to represent the topology of the environment more reliably. C: Sum of Betti numbers encoded by an ensemble of N = 300 place cells. As the mean ensemble firing rate increases from f = 8 to f = 24 Hz, the spurious loops die out, i.e., the topological fluctuations in F t are suppressed. D: The success rate ξ k as a function of the decay rate τ, computed for N = 300 place cells and a set of ensemble mean firing rates. As before, the reliability of the map increases with the ensemble mean rate, for the entire range of the proper decay times. E: Betti numbers b k ðF t Þ, k = 0, 1, converge to their physical values b k ðEÞ faster and their respective success rates ξ k grow more rapidly at higher firing rates.
https://doi.org/10.1371/journal.pcbi.1006433.g009 the information provided by the individual cell assemblies may combine into a large-scale spatial memory map and how this process depends on the physiological parameters of neuronal activity. In particular, the model demonstrates that a network with transient connections can successfully capture the topological characteristics of the environment.
Previously, we investigated this effect using an alternative model of transient cell assemblies, in which the connections were constructed by identifying the pool of cells that spike within a certain "coactivity window," $, and building the coactivity graph G $ from the most frequently cofiring pairs of neurons [58]. The accumulation of topological information within each $-period, was then described using persistent homology theory techniques. The results indicate that if $ extends over 4-6 minutes or more, the topological fluctuations in the flickering complex are suppressed and the topological shape of F $ becomes equivalent to the shape of the environment.
In the current model, enabled by a much more powerful Zigzag persistent homology theory [34][35][36], we employ an alternative approach, in which the links of the coactivity graph appear instantly following pairwise place cell coactivity events. Thus, in contrast with the model discussed in [58], the current model involves no selection of the "winning" coactivity links, which one might hold responsible for stabilizing the shapes of the flickering coactivity complexes. Nevertheless, this model demonstrates the same effect: the large-scale topological shapes of resulting coactivity complexes stabilize, given that the connections decay sufficiently slowly and have sufficiently broadly distributed lifetimes. The connections' lifetimes required to achieve such stabilization in the "latency free" model are longer than in the input integration model (τ % 100 sec vs. t $ % 10 sec), which indicates that physiological networks may integrate spiking information over a certain extended period $ and optimize the network's architecture over this information. However, the fact that stable topological maps can emerge in all these different types of transient networks (including randomly flickering networks) suggests that this is a generic effect that fundamentally may be responsible for the appearance of stable cognitive representations of the environment in the physiological neuronal networks with transient connections. In other words, the emergence of stable topological maps may represent a common "umbrella" phenomenon that can be implemented via different physiological mechanisms.
In all cases, the model reveals three principal timescales of spatial information processing. First, the ongoing information about local spatial connectivity is rapidly processed at the working memory timescale, which physiologically corresponds to rapid forming and disbanding of the dynamical place cell assemblies in the hippocampal network. The large-scale characteristics of space, as described by the instantaneous Betti numbers, unfold at the intermediate memory timescale. At the long-term memory timescale the topological fluctuations average out, yielding stable, qualitative information about the environment. While the former may take place in the hippocampus, the latter two might require involvement of the cortical networks. Thus, the model reaffirms functional importance of the complementary learning systems for processing spatial information at different timescales and at different levels of spatial granularity [47,59,60].

Methods
Simulated environment E represents a small (1m × 1m) square arena with a square hole in the middle, similar to the environments used in electrophysiological experiments [61]. Fig 10 shows the simulated trajectory, the uniform layout of the place fields in the place field map M E , and the occupancy map. In [26] we demonstrated that different parts of the environment can be learned independently from one another. Thus, knowing how learning works in smaller domains, one can "map out" learning in larger environments.
Place cell spiking activity is modeled as a stationary temporal Poisson process with the maximal firing rate f c localized at the place field center r c , where s c defines the place field's size [62]. If the place field centers are scattered uniformly over the environment, then an ensemble of N place cells, c = 1, . . ., N, is defined by 2N independent parameters, which we consider as random variables drawn from stationary lognormal distributions with the respective means f and s. In addition, spiking is modulated by the θ-rhythm of the hippocampal extracellular local field oscillations, with the frequency of $ 8 Hz [63]. The distributions parameters and the details of the spike simulation algorithms are provided in [25,26].

Place cell coactivity
We consider a group of place cells c 0 , . . ., c k coactive, if they produce spikes within two consecutive θ-periods [26,43]. As a result, the time interval [0, T tot ] splits into 1/4 sec long time bins that define the discrete time steps t 1 , . . ., t n .

Simplicial complexes
We use simplexes and simplicial complexes to represent combinatorially the topology of the neural activity. An abstract simplex of dimensionality n is a set containing n + 1 elements. A subset of a simplex is called its face. A simplicial complex is a collection of simplexes closed under the face relation: if a simplex belongs to a simplicial complex, then so do all of its faces (Fig 11).
In the constructions studied in this paper, our simplicial complexes consist of coactive place cells. If all cells {c 0 , . . ., c k } are coactive within a given time window, then so is any subset of them, meaning coactive simplexes form a complex. In fact, because coactivity is defined for a pair of cells, our simplexes are precisely the cliques in the coactivity graph. A simplex {c 0 , . . ., c k } is present if and only if all of its cells are pairwise coactive. In flickering clique complexes, certain pairwise connections may decay over time, while others appear as time progresses. The effect on the simplicial complex is that some simplexes are removed from the complex, while others are added to it. So we get a sequence of "flickering complexes," X i , connected by alternating inclusions:

Cycles, boundaries, and homology
A k-dimensional chain is a set of k-dimensional simplexes (Fig 11) that can be combined with suitable coefficients. If the coefficients form an algebraic field, then the chains form a vector space. Here we use the simplest algebraic field Z 2 , which consists of two Boolean values 0 and 1. A boundary of the simplex is the sum of its one-dimension-lower faces: @ k fc 0 ; . . . ; c k g ¼ P k i¼0 fc 0 ; . . . ; c iÀ 1 ; c iþ1 ; . . . ; c k g. The map extends linearly to the entire simplicial complex, X, mapping its k-dimensional chains to its (k − 1)-dimensional chains. The kernel of this map, i.e., all the chains without a boundary, is the set of cycles of the complex, denoted by Z k (X) = ker @ k . The image of @ k+1 consists of the k-dimensional chains that are boundaries of some (k + 1)-dimensional chains, denoted by B k (X) = im @ k+1 . ijk -to a filled triangle; a three-dimensional (3D) simplex s 3 ijkl -to a filled tetrahedron, etc. The n vertexes connected by the full set of 1D links form cliques, σ n , of the corresponding order. B: A single simplex σ n is a contractible figure, i.e., it can be collapsed into one of its facets σ n−1 , then to a facet of lower dimensionality σ n−2 and eventually to a point σ 0 . Shown is a triangle contracting onto its bottom edge and then to the right vertex. C: A linear chain of simplexes bordering each other at a common face is also contractible. The shade of the triangles constituting the chain defines the order in which the triangles can be contracted (the lighter is the triangle, the sooner it contracts) and the arrows indicate the direction of the contractions. D: If a chain of simplexes loops onto itself and encircles a gap in the middle, then it is not contractible. Collapsing the triangles on the sides of such a closed chain produces an equivalent closed loop, which, ultimately, can be reduced to a non-contractible 1D loop, but not to a 0D vertex (the hole in the middle prevents that). Topologically, the deformed loops are equivalent to one another, i.e., they should be viewed as deformations of the same topological loop. E: Three simplicial complexes: a complex shaped as the environment E (see Fig 2), a toroidal and a spherical complexes (figures obtained using MATLAB mesh generator [64]). Non-contractible topological loops are shown as closed chains of red triangles and contractible loops are shown in shades of blue. https://doi.org/10.1371/journal.pcbi.1006433.g011 Cycles count "k-dimensional holes" in the complex. But not all such holes are independent of each other. We consider two cycles equivalent, or homologous, if they differ by a boundary. Algebraically, one can verify that boundaries themselves have no boundaries, @ k @ k+1 = 0. In other words, boundaries are cycles. This allows us to take a quotient, H k (X) = Z k (X)/B k (X), called the k-dimensional homology vector space. By definition, it considers two cycles equivalent, if their difference is a boundary of some (k + 1)-dimensional chain. The dimension of this vector space, called the k-th Betti number, β k (X) = dim H k (X), counts the number of independent holes in the topological space.

Zigzag persistent homology
Given the sequence of flickering complexes above, we compute homology of each one. Inclusions between complexes induce maps between the homology vector spaces: the homology class of a cycle in the smaller complex maps to the homology class of the same cycle in the larger complex. Accordingly, we get a sequence of homology vector spaces, connected by linear maps: This sequence, called zigzag persistent homology, generalizes ordinary persistent homology [36], where all the maps between homology groups point in the same direction. It is this generalization to the alternating maps that allows us to handle the flickering complexes.
On the surface, zigzag persistent homology tracks how the Betti numbers of the flickering complexes change. But the maps that connect homology vector spaces provide extra information. It is possible to select a basis for each vector space in this sequence, so that the bases for adjacent vector spaces are compatible [34]. Specifically, we can select a collection of elements fz j i g j for each vector space H k (X i ), such that the non-zero elements form a basis for the homology vector space H k (X i )-in other words, they represent a set of independent holes in X i . Furthermore, such collections are compatible in the sense that adjacent basis elements map into each other: if we have a map f: H k (X i ) ! H k (X i±1 ), then f ðz j i Þ ¼ z j iAE1 , if z j i 6 ¼ 0. The experiments in this paper use the algorithm of Carlsson et al. [35] to compute such compatible bases.
It follows that the sequence of homology vector spaces can be decomposed into a barcode, where each bar represents the part of the sequence, where a particular basis element is nonzero. The bars capture when independent holes appear in the flickering complex, how long they persist, and when they eventually disappear. The authors will provide the software used for these computations upon request.