Gamma Synchronization Influences Map Formation Time in a Topological Model of Spatial Learning

The mammalian hippocampus plays a crucial role in producing a cognitive map of space—an internalized representation of the animal’s environment. We have previously shown that it is possible to model this map formation using a topological framework, in which information about the environment is transmitted through the temporal organization of neuronal spiking activity, particularly those occasions in which the firing of different place cells overlaps. In this paper, we discuss how gamma rhythm, one of the main components of the extracellular electrical field potential affects the efficiency of place cell map formation. Using methods of algebraic topology and the maximal entropy principle, we demonstrate that gamma modulation synchronizes the spiking of dynamical cell assemblies, which enables learning a spatial map at faster timescales.


Introduction
The mammalian hippocampus plays a key role in spatial cognition. Hippocampal place cells manifest remarkable spatial specificity of spiking activity: they fire only in select locations in the environment, known as place fields [1]. As a result, place cell spike trains contain information about the animal's current location [2], as well as its future [3] and past [4] navigation routes, both in the wakeful state and even in sleep [5]. Moreover, damage to the hippocampal network impairs spatial learning and navigation planning [6,7]. It is thus believed that the population of place cells encodes a cognitive map of the environment that serves as the basis of animal's spatial awareness [8,9].

Topology vs. geometry
For years it has been assumed that the cognitive map is Cartesian, containing detailed information about locations, distances and angles. Undoubtedly, such information is provided by various brain regions, but increasing evidence suggests that the hippocampal map is topological in nature. For example, electrophysiological recordings in morphing environments demonstrate that the spatial order (overlaps, adjacency and containment) is preserved, even in the face of deformations of the environment that cause the place fields to stretch or change shape [10][11][12][13][14]. In other words, the sequential order of place cell activity induced by the animal's moves through morphing environment remains invariant, at least within a certain range of geometric transformations [15][16][17]. This implies that place cell spiking encodes a rough-and-ready framework into which other brain regions integrate more detailed metrical information [17][18][19][20][21].
What sorts of neuronal computations could produce such a framework [22][23][24][25][26][27]? The approach proposed in [28][29][30] exploits the connection between the place field map and the Alexandrov-Čech theorem, according to which the pattern of overlaps between regular spatial regions U 1 , U 2 , . . .U N covering a space X encodes the topological structure of X [32]. The construction suggested by the Alexandrov-Čech theorem is the following. If the regions U i are represented as vertices, pairs of overlapping regions U i \ U j 6 ¼ ;, as links between these vertices, the triples U i \ U j \ U k 6 ¼ ; as the facets between these links and so forth, then the resulting simplicial complex N is topologically equivalent to X (see Glossary in the Methods section and S1 Fig).
The fact that the place fields produce a dense cover of the environment suggests that the pattern of overlaps between them contains the information required to represent the environment's topology, which we propose holds the key to the way in which the hippocampus encodes its topological map of a given space. Note that the domains where several place fields overlap are precisely the ones where the corresponding place cells cofire: the information about the overlap of place fields is represented via place cell coactivity, which suggests that the Alexandrov-Čech construction can be carried out not only via the geometric pattern of the place field overlaps, but also through analysis of place cell coactivities.
Methods). Together, these coactivity simplexes form a simplicial coactivity complex T s . In this construction, the individual cell assemblies (i.e., a group of neurons that jointly drive a downstream readout neuron), provide local information about a given space; joined together into a neuronal ensemble (i.e., a population of cell assemblies), they represent the space as whole. By analogy, a collection of individual simplexes representing connected locations, together form a simplicial complex which represents environment as a whole. Numerical simulations demonstrate that T s captures the topological structure of the environment and serves as a schematic representation of the hippocampal map [29,31]. For example, the sequences of place cell combinations ignited along the paths traversed by the animal are represented in T s by chains of coactivity simplexes-the simplicial paths [33,34]. A non-contractible simplicial path may represent a navigational path that encircles a physical obstacle, whereas topologically trivial simplicial paths correspond to contractible routes in the physical space (Fig 1A and 1B).
The complex T s begins to form as soon as the rat starts navigating. Every detected instance of place cell coactivity contributes a simplex to T s . At the early stages of navigation, when only a few cells have time to produce spikes, the coactivity complex is small, fragmented, and contains many gaps (in topological terms, "holes"), most of which do not represent physical obstacles in the environment. Such holes tend to disappear as spatial learning continues. Therefore, the minimal time, T min , after which the topology of T s matches the topology of the environment, or more precisely, when the correct number of topological loops emerges, can be viewed as a theoretical estimate of the time required to learn the hippocampal map ( Fig 1C, [29,30]).

Physiological parameters
An important property of the model is that the structure of the coactivity complex T s and the time course of its formation during learning are sensitive to various parameters of the neuronal firing statistics, which allows us to study the effect that changes in any of these parameters (e.g., Fig 1. An animal's movements through a given space are represented in the coactivity complex. A: Two topologically equivalent paths in a physical environment, γ 1 and γ 2 (this commonly used notation for the paths is unrelated to γ-rhythm), encircle an obstacle (white square) and are therefore noncontractible. The path γ 3 does not encircle the obstacle and therefore is contractible and topologically inequivalent to γ 1 and γ 2 . B: A schematic representation of the 2D skeleton of the coactivity complex T s (vertices shown as black dots, the 1D links as white lines and 2D facets as grey triangles) and of the simplicial paths Γ 1 , Γ 2 and Γ 3 , which represent the physical paths γ 1 , γ 2 and γ 3 . The topological equivalences and inequivalences between the simplicial paths (Γ 1 ffi Γ 2 and Γ 1 ≇ Γ 3 , Γ 2 ≇ Γ 3 ) provide qualitative information about the physical paths, encoded via place cell coactivity. Since we are concerned primarily with representing the topological properties of the navigational paths, in the following we discuss only the 2D skeleton of the coactivity complex. C: Timelines of the topological loops encoded in the coactivity complex. As the animal begins to explore its environment, the coactivity complex contains many spurious topological loops (gaps in the information about that part of the environment) most of which do not represent the physical obstacle. This "topological noise" in the depicted graph disappears after about five minutes, which marks the learning time, T min -the moment when the correct topology of space has emerged. One 1D loop represents the obstacle and one 0D loop informs us that the environment is connected. firing rate, place field size, number of neurons) produce in the ability of the ensemble to correctly learn a space. For example, if the firing rate slows, the system can compensate with a change to the place field size or the number of neurons in the ensemble, but only up to a point: beyond certain limits, the assembly will not be able to learn efficiently, or even at all [29]. As another example, the oscillations of the extracellular electrical field potential, typically referred to as the local field potential (LFP), are known to modulate place cells activity at several timescales: each place cell tends to spike within a small range of the phases of the theta component of the LFP (θ, 4-12 Hz [35]), which depends on the distance that the animal has traveled into the corresponding place field. As a rat moves through the place field, the preferred θ-range of a place cell progressively decreases with each new θ-cycle, a phenomenon known as θ-phase precession [36]. The preferred θ-phases of different cells are additionally synchronized by the second major component of the LFP, the gamma rhythm (γ, 30-80 Hz, [37]). In fact, the period of the more rapid γrhythm, T γ , is believed to define the range of the preferred phases within the slower θ-rhythm; on average one θ-period, T θ , contains about seven γ-cycles, T θ % 7T γ (see [38] and S2A Fig).
Numerous experimental [39][40][41][42][43] and theoretical [38,[44][45][46][47] studies demonstrate that both θand γ-waves play key roles in spatial, working, and episodic memory functions. Most theoretical analyses have addressed the way in which the γ-synchronization affects the informational contents of spiking in small networks or in individual cells, but the topological approach allows us to model the formation of cognitive map as a whole. For example, it was used in [30] to demonstrate that θ-precession makes otherwise poorly-performing ensembles more efficient at spatial learning.
The present analysis applies the topological model to study the effect of γ-waves on spatial learning and to demonstrate that γ-synchronization of place cell spiking activity enables the encoding or retrieval of large-scale spatial representations of the environment by integrating place cell coactivity at a synaptic timescale.

Brain rhythms in the topological model
Computational modeling of θ-phase precession is relatively straightforward. At a basic level, it amounts to imposing a particular relationship between a place cell's spiking probability, the phase of the θ-wave and the distance that the animal has traveled into the corresponding place field [48] (see Methods). The effects of the γ-rhythm are, however, more diverse. Electrophysiological experiments suggest that there exist at least two types of place cells: "TroPyr" cells that spike at the trough of the fast γ-wave (50-80 Hz) and "RisPyr" cells that fire at the rising phase of slow γ-waves, overriding θ-precession [49][50][51]. Although we can model both S2 Fig with our approach (see Methods), in the following we will model only the TroPyr cells that exhibit more robust firing patterns and higher firing rates, and therefore may play a primary role in producing the cognitive map [29,30].
γ-modulation of spiking. Physiologically, the γ-wave represents fast oscillations of the inhibitory postsynaptic potentials. As the amplitude of γ drops at a certain location, the surrounding cells with high membrane potential spike [53][54][55]. As a result, the preferred θ-phase of several cells becomes synchronized with a γ-trough, which thereby gates the place cell coactivity. The literature refers to such groups of coactive place cells as "dynamical cell assemblies" (see [60][61][62] and S2A Fig).
Modeling γ-modulation therefore requires adjusting the times of the θ-modulated spikes closer to the troughs of the γ-wave [57]. Algorithmically, this task is similar to the task of distributing particles stochastically over the wells of a 1D potential energy field, which is solved based on the Maximum Entropy Principle [58]. The probability that a particle lands at point x in a potential U(x) is p * e −βU(x) , where the parameter β controls the spread of locations around the minima of U(x). The lower the β, the more random the distribution. In this work we will borrow terminology from statistical physics, where the parameter β is the reciprocal temperature of the system, and lower values of β mean warmer temperatures (higher stochasticity) and higher values of β mean cooler temperatures (lower stochasticity; see S2B Fig).
Viewing the γ-amplitude, A γ (t), as an inhibitory potential extended over the time axis, we confined the place cell firing to the troughs of the γ-wave by modulating their firing rates with the factor e Àb g A g ðtÞ . Thus, the parameter β γ controls the temporal spread Δ β of spikes produced by the dynamical cell assemblies. For small β γ , the cell assemblies are "hot," meaning their spikes are spread diffusely near the γ-troughs. For large β γ the assemblies are "cold," their spikes "freeze" at the γ-troughs (Fig 2 and S3 Fig). In particular, the case in which the spike trains are uncorrelated with the γ-troughs corresponds to the limiting case of an "infinitely hot" (β γ = 0) hippocampus, modeled in [30].
To our knowledge, the statistics of the temporal spreads of the spikes produced by dynamical cell assemblies have not been studied, but the neurophysiological literature suggests that a typical spread is about one γ-period (Δ % T γ % 20 msec) [59][60][61][62]. This implies that the effective temperature of these hippocampal cell assemblies is comparable to the mean γ-trough amplitude 1=b g % A tr (see Methods). In the following discussion, it will be convenient to scale the amplitude of the γ-wave according to its standard deviation from the mean, σ γ , A γ (t) ! A(t) = A γ (t)/σ γ . In turn, this entails the corresponding scaling of the inverse temperature, yielding a parameter β = β γ σ γ with the "physiological" range between 0.5 ≲ β ≲ 2.
Reading out place cell coactivity. The spiking signals produced by the place cells are transmitted to a population of neurons downstream from the hippocampus. In the reader-centric approach to information processing in the hippocampal network [31,61], the cell assemblies are viewed not simply as occasional combinations of coactive place cells, but as functionally interconnected cell groups that exhibit repeated coactivity and jointly trigger The temporal spread of the place cell coactivity exceeds a θ-period, Δ 0 % 1.5T θ , T θ % 125 msec. At β = 1, the intervals of place cell coactivity concentrate near domains of high γ-amplitude, Δ 1 % 0.5T θ . At β = 2, the spikes accumulate near the γ-troughs, Δ 2 % T γ , thus producing dynamical cell assemblies (bottom panel). B: The statistics of interspike intervals (ISI) for different βs. The black dashed line shows the distribution of the time intervals between deep γ-troughs (deeper than two standard deviations of A γ (t) from the mean). As β increases, the intervals between spikes are more controlled by the deep troughs (where the amplitude exceeds three standard deviations of A γ (t) above the mean). Note that the tendency for spikes produced by the same place cell to appear within the same γ-cycle can be viewed as a basic model of bursting [52]. responses from their respective readout neurons. In turn, the readout neuron n σ spikes upon receiving a sufficient amount of timed EPSP inputs over a certain period w σ , defined as the "integration window" [63][64][65], which is the only parameter describing readout neurons in the following discussion. Clearly, different readout neurons may integrate inputs over different time intervals. However, in order to simplify the approach, we will describe the entire population of the readout neurons using a single parameter w σ = w, viewed as the average time over which a typical readout neuron accumulates EPSP inputs [30].
θ and γ synchronicity. In our previous study [30], we modeled assemblies of independently θ-precessing place cells simply as groups of neurons that happened to produce spikes within a certain w-period. The model predicted that the correct spatial information is reliably encoded if the coactivity inputs are identified over the θ-timescale (T θ ≲ w ≲ 2T θ ). However, as w shrinks, the chance of producing and detecting the coactivities within a w-period diminishes, and the topological map takes longer to form. For the intermediate range of values (3T γ ≲ w ≲ 3T θ ), the learning time is approximately inversely proportional to w, but as w reduces to the γ-period, the pool of detected place cell coactivities more frequently fails to capture the topological structure of the environment or requires a much longer time to produce it, exhibiting high variability of T min upon w. In contrast with these results, experimental studies have shown that the synchronicity of the place cell assemblies is best manifested precisely at the γ-timescale [60][61][62]. This implies that the hippocampal network is capable of producing large-scale spatial maps based on γ-timescale readouts. From this, we hypothesized that the failure of the previous (θ-driven) topological model to capture this empirical evidence might be due to poorer synchronization of independent neurons driven by a common θ-pacemaker, rather than to the physiological cell assemblies that are additionally synchronized through synaptic interactions [66].
In the present analysis, we use the effective temperature 1/β to describe phenomenologically these additional synchronization mechanisms. As illustrated in Fig 2, the parameter β controls the temporal spread of spiking activity in cell assemblies Δ β independently from w and allows us to transition from modeling desynchronized cell assemblies to modeling cell assemblies that are tightly coupled with γ-troughs. The results shown in Fig 2 suggest also that binding the coactivity of place cell assemblies within γ-periods (Δ 2 % T γ ) should significantly reduce the time required by the downstream networks to detect place cell coactivity. Thus, γ-synchronization may enable us to construct a reliable neuronal representation of space within a much tighter temporal window, w % T γ , which provides a possible explanation for its functional importance.

Results
To assess the effects of γ-waves on the ability of place cells to encode spatial information, we built the coactivity complex using γ-modulated spike trains for different βs and studied its topological properties for a set of w's, including the values for which the independent θ-precessing place cells fail to produce correct topological maps. The results shown in Fig 3 demonstrate that, at large integration windows (w ! T θ , fat lines), tightening the cell assemblies around the γ-troughs does not produce a significant effect on either the structure of T s or on the times required to learn the map T min . This outcome is easy to explain: if the readout neurons accumulate EPSPs at the θ-timescale, i.e., over hundreds of milliseconds, the temporal arrangement of the spikes at the γ-timescale does not change the combinations of coactive place cell detected downstream. In other words, no matter how the γ-tuned spikes are spread inside a θ-wide window w, the coactivity simplexes, and thus the coactivity complex, remain the same, yielding the same topological information after the same learning period. As w decreases, the temporal spread of the poorly synchronized, hot place cell assemblies (β < 1) begins to exceed w. As a result, only a fraction of the coactive cells can be detected downstream, which leads to a decrease of the number of simplexes in T s and to a proliferation of spurious topological loops during the learning period. Moreover, many of these loops persist indefinitely, preventing the appearance of the correct topological information even at the intermediate values of w (Fig 3C).
In contrast, the behavior of the cold cell assemblies (β > 1, the blue ends of the graphs) is different. First, the number of 2D simplexes increases, because the size of the cell assemblies increases with increasing β (Fig 3A). Second, colder coactivity complexes T s yield fewer, fastercontracting spurious loops (Fig 3B and S4 Fig). Third, the learning times drop significantly: for β = 2, the T min computed for w = 0.5T θ is reduced by about 50% compared to the desynchronized, β = 0 case, which indicates that γ-synchronization promotes the formation of a topological map based on the coactivity information transmitted to the downstream networks at times shorter than one γ-cycle (Fig 3C and S5 Fig). Nevertheless, the results shown in Fig 3 typically do not extend to the γ-timescale of w. The inputs collected from the cell assemblies which cooled to the physiological range of βs (0.5 ≲ β ≲ 2) at w < 0.3T θ often failed to produce an accurate map of the environment. This suggests that producing a correct neuronal map of space within a biologically plausible learning time using w % T γ requires further cooling of T s (by increasing β indefinitely, the cell assemblies can be made to fire as tightly at the troughs as desired). Thus, in order to keep the parameter β within the physiological range, we have deployed an alternative approach.

Clique coactivity complexes
In the above discussion, the central construction of the model, which is the coactivity complex T s , was introduced as a schematic representation of the place field map [31]. However, as shown in [67,68], a coactivity complex can be built not only by detecting higher-order cofiring Influence of γ-modulation on spatial learning in a cell assembly network with coincidence detector readout neurons. There are two major parameters of the model: the mean width of the temporal window w over which the postsynaptic readout neurons integrate spikes from the place cell assemblies (w 1 = 2T θ , w 2 = 1.2T θ , w 3 = 0.8T θ , w 4 = 0.5T θ , w 5 = 0.3T θ , w 6 = 0.2T θ , with larger windows w represented by thicker lines), and the effective temperature 1/β which controls the clustering of place cells' spikes around the troughs of the γ-wave (Fig 2). Larger values of β (indicated by the blue color of the colormap) correspond to tighter coupling between the place cell's spiking probability and the γ-amplitude (S2 Fig). A: The number of 2D simplexes, N 2 , in the coactivity complex T s as a function of β, for different w's. For large integration windows (thicker lines), coupling with the γ-wave produces no significant effect: the N 2 changes less along the β-axis. As w decreases, the number of simplexes drops (the thinner lines lay below the thicker ones). However, the smaller the integration window w, the greater the number of coactive place cell combinations, produced by the cooling of the cell assemblies. For w = T γ (bottom curve) the number of 2D simplexes grows by 40% as β increases from 0 to 2. B: Shrinking the integration window w increases the total number of topological loops observed in T s during the course of learning, whereas cooling down the coactivity complex reduces this number. For example, the number of spurious loops in cold coactivity complexes (cold loops, β = 2) at w = T γ is half the number of those in hot complexes (hot loops, β = 0). C: The learning time T min grows as w shrinks and tends to decrease as a function of β. However, note that even cold simplicial complexes fail to produce the correct topological maps for small w. In the particular map illustrated here (mean place field size s = 24 cm, mean firing rate f = 20 Hz, N c = 450 cells), learning time diverges at w ! 0.5T θ .
doi:10.1371/journal.pcbi.1005114.g003 events that directly mark the locations where several place field overlap, but also by integrating the information provided by the lower-order place cell coactivity. Physiologically, the latter option corresponds to the cell assembly network in which the readout neurons integrate lowerorder coactivity inputs over a working or intermediate memory timescale, rather than merely react to cofiring as all-or-none coactivity detectors [69,70].
To model a network of cell assemblies driving a population of input-integrator readout neurons, we used the following approach. First, we detected the lowest-order, pairwise place cell coactivities and used them to build a connectivity graph G (see [67] and S6 Fig). Fully interconnected subgraphs of G are called cliques (see Methods); cliques of G are identified with the simplexes of a new clique coactivity complex T B . A key property of this algorithm is that the connections constituting a clique or a simplex do not have to be detected simultaneously but can be accumulated over an extended period of time. For physiological accuracy, we restrict this period to 10 mins or less, which results in a coactivity complex whose simplexes emerge over working or intermediate memory intervals.
Although the algorithms for constructing temporal simplicial and clique complexes seem quite different, the actual difference between these two coactivity complexes is not as large. First, as shown in [31,67], most simplexes of T B correspond to the simplexes of T s and viceversa: the identities of the cell assemblies are largely the same, only the time course of their construction changes. Furthermore, the topological structures of these complexes are quite close. Second, most pairwise connections within the cliques of G are produced almost simultaneously while the rat traverses the region where several place fields overlap. In other words, most cliques appear at once, just as the simplexes do, and only a relatively small number of the maximal cliques are actually "corrected" over time [68]. Nevertheless, this effect does improve the overall performance of the clique coactivity complexes, which typically produce far fewer spurious topological loops and shorter learning times T min than those produced by simplicial coactivity complexes.
Implementing the γ-synchronization mechanism in an integrator model yields the results illustrated in Fig 4. First, the structure of the graphs on Figs 3A and 4A is qualitatively similar, though the pool of third-order cliques is slightly larger than the pool of 2D simplexes. This is because not every clique makes a simultaneous appearance as a simplex, but every simplex can be viewed as an instantly detected clique. The behaviors of the topological loops in T B and in T s , shown in Figs 3B and 4B are similar as well. The γ-synchronization reduces the number of cold, spurious loops in both types of complexes (S7 Fig). Physiologically, this implies that a γrhythm produces the same organizing effect on the activity of cell assembly network, whether the latter is based on a coincidence detector or on the input integrator readout neurons. However, it should be noted that, for all βs, the number of loops in T B is smaller than in T s by an order of magnitude, illustrating the efficiency of the input integrating readout neurons. Most importantly, the integrator complex T B produces finite learning times at the γ-timescale integration window, w % T γ . This demonstrates that the hippocampal network can produce a spatial map by reading out γ-synchronized place cell coactivity at the γ-timescale and accumulating the coactivities over the timescale of working or intermediate memory.

Discussion
It has long been established that both θ and γ rhythms correlate strongly with the capacity for learning and memory, but the mechanisms by which they influence cognitive functions has remained unclear. These extracellular fields define the timescale of place cell coactivity, thereby controlling the "parcellation" of the information flow received by downstream networks. In particular, the synchronization of the processes taking place at the synaptic timescale, such as the processes controlled by the membrane time constant, the duration of receptor-mediated postsynaptic spike potentials, the rate of spike-timing dependent plasticity, and so forth, [71][72][73] is manifested at the network level as γ-frequency oscillations [74][75][76][77][78]. Processes that involve slower forms of synaptic plasticity, including slow-changing spiking thresholds [79][80][81][82], synchronize at the θ-frequency timescale. As a result, θ-oscillations provide lower-resolution temporal packaging of place cell coactivity [66,83,84], integrating spiking inputs from several cell assemblies over one or more θ-periods [85][86][87].
Our previous model, based on place cells that are independently θ-precessing, provided a self-consistent description of the hippocampal network's function at the θ-timescale, which predicted an optimal integration window for reading out the information within the θ-range [30]. However, as the integration window became smaller, the spatial map encoded by independently precessing place cells failed to achieve correct spatial representation, which suggested to us the importance of additional synchronization at the γ-timescale. Here we developed a phenomenological model based on the assumption that the γ-rhythm not only controls the probability of the cell assembly spiking but also defines the temporal spread of the spikes produced by the cell assemblies around the troughs of the γ-wave. As a result, the model predicts that if the preferred θ-phases synchronize with the γ-troughs, then topological information about the given environment can be readily captured by integrating place cell coactivity at the γ-timescale. Thus, γ-synchronization of spiking activity is crucial for both encoding and reading out information from the cell assemblies arriving in "γ-packets" [61].
This result suggests a possible phenomenological explanation as to why reduction of the γwave amplitude correlates with impairments in learning, whether the cause is changes in the network's synaptic physiology [88][89][90][91], psychoactive drugs [92][93][94], neurodegeneration, or aging [95,96], whereas an increase of the γ-amplitude correlates with successful learning and retrieval of the learned information [97][98][99][100][101]. According to our model, reducing either the γamplitude or the diffused coupling between the γ-rhythm and place cell spiking activity, the Influence of the γ-modulation on spatial learning in cell assembly network with input integrator readout neurons: clique complexes. A: The dependence of the number of triple connections in the clique coactivity complex T B is similar to the dependence of the number of 2D simplexes in the simplicial coactivity complex. As the integration window narrows (same range of w's as on Fig 3), the number of triple connection cliques drops. Cooling down the assemblies produces no significant effect at large integration windows, but does increase the number of triple connections for small w's (by about 25% for w % T γ ). B: The total number of topological loops observed in the clique coactivity complex T B is reduced with cooling for small w's, in a way similar to the case of the coincidence detection (Čech) coactivity complex. At the γ-timescale, w % T γ , the tendency of the shrinking w's to cause the clique complex to form large numbers of topological loops is nearly compensated by cooling down T B : the number of cold loops (β = 2) in T B is about 50% of the number hot loops (β = 0). Note that despite similar qualitative behaviors, the scales of N s l 1 , and N B l 1 are different: the clique complex produces fewer spurious loops than the simplicial complex. C: Learning times grow as a function of w; however, for the clique complex they remain finite even for w % T γ . The more tightly clustered the clique complex is around the γ troughs, the more rapidly it learns, especially for small w. latter being equivalent to lowering β, should increase learning times and lower the success rate in constructing topologically accurate cognitive maps. Vice versa, high γ-amplitude and strong coupling between the spike times and the γ-wave should result in more effective spatial learning.

Glossary
An abstract simplex of order d, σ d , is a set of (d + 1) elements, e.g., a set of (d + 1) active cells. Note that the subsets of the set σ d form subsimplexes of σ d and that a nonempty overlap of any two simplexes s d 1 and s d 2 is a subsimplex of both s d 1 and s d 2 . A simplicial complex S σ is a family of simplexes. The elements of a simplex σ d can be visualized as vertices of d-dimensional polytopes: σ 0 can be visualized as a point, σ 1 as the ends of a line segment, σ 2 as the vertices of a triangle, σ 3 as the vertices of a tetrahedron, etc. [102]. A clique in a graph G is a set of fully interconnected vertices (i.e., a complete graph). Combinatorially, cliques have the same key properties as the abstract simplexes: any subcollection of vertices in a clique is fully interconnected, and hence forms a subclique. A nonempty overlap of two cliques B d 1 and B d 2 is a subclique in both B d 1 and B d 2 . Therefore, cliques define abstract simplexes and thus the collection of cliques in a graph G defines a clique simplicial complex S B (G).

Choice of the simulated environment
In [30] we showed that the time required to learn a large spatial environment is approximately equal to sum of times required to learn its parts. Therefore, we simulated a non-preferential exploratory behavior in a small planar environment (1m × 1m) shown in Fig 1A, similar to those used in electrophysiological experiments [103].
The Poisson spiking rate of a place cell c at a point r(t) = (x(t), y(t)) is given by

θ-phase precession
As the rat moves over a distance l(t) into the place field of a cell c, the preferred spiking phase is φ y;c ðtÞ % 2pð1 À lðtÞ=L c Þ; where L c * 3s c is the size of the place field [36,104]. To simulate the coupling between the firing rate and the θ-phase, we modulated the original Gaussian firing rate by a θ-factor Λ θ, c (φ), giving L y;c ðφÞ ¼ e using the θ-component of the LFP recorded in wild type rats. The width ε of the Gaussian was defined in [30] to be the ratio of the mean distance that rat travels during one θ-cycle to the size of the place field, ε = 2πv/Lω θ , where v is the rat's speed and ω θ /2π is the frequency of the θ-signal.

γ-modulation
To incorporate the γ-rhythm into our model, we extracted the 30-80 Hz frequency band from the same LFP signal so that all the existing correlations between θ and γ waves are preserved, then we shifted the simulated place cell spiking times towards the troughs of γ amplitude by modulating their respective spiking rates with the additional Boltzmann factor [58], where A γ (t) is the amplitude of the γ-wave and 1/β γ is a formal parameter that plays the role of the effective temperature [105] (Fig 2). Simulating the net firing rate as a product of all three factors l net ¼ l c ðx; yÞL y;c ðφÞL g ðA g Þ preserves spatial selectivity of spiking and the θ-precession (S8 Fig) and forces the preferred phases of the θ-phase precession φ c into the γ-cycles, in accordance with the θ-γ theory [38,41,56].

Temperature of the cell assemblies
In a vicinity of the i th trough, the gamma signal has the form where the parameters A γ,0 are the mean amplitude of A γ ; A γ,i and ω i are its instantaneous amplitude and frequency at the i th trough a γ,i = A γ,0 − A γ,i and the index i runs over all troughs i 2 I. Using the expansion Eq (2) in Eq (1) allows estimating the spread Δ i of the spikes around the i th through from the Gaussian variance as A priori, in order to accurately define the temporal spread of spikes produced by different cell assemblies at different times, the inverse effective temperature should be trough-specific, β γ,i . However, we consider a simplified case in which the average β γ = hβ γ,i i i 2 I defines the coupling between the γ-wave and the place cell spike times across the entire hippocampal network. The variance Eq (3) is about six times smaller than the instantaneous period, i.e., which implies that the effective temperature is approximately equal to the mean γ-amplitude where A γ = hA γ,i i i 2 I . By normalizing A γ with the standard deviation s g ¼ A = A γ /σ γ , we obtain the scaled parameter β = β γ σ γ , with the characteristic value b ¼ 1 A :

Cell types
The described approach can be applied to both the TroPyr and RisPyr cells. Mathematically, the "rising phases of γ" controlling the spiking of RisPyr cells correspond to the vicinities of peaks of the time derivatives of the γ-amplitude. Therefore, the spiking probability of RisPyr cells can be constrained by a factor similar to Eq (1), involving the derivative of the γ-amplitude, A 0 (t), which would override the θ-precession constraint (Λ θ,c (φ) = 1) in the vicinity of the A 0 (t)-peaks. The analysis of the mixed (RisPyr and TroPyr) ensembles is more complex and sui generis.
Mathematical methods required for this study are based on Persistent Homology Theory (see [29] and [106,107]) implemented by the "JPlex" freeware package [108]. A: Spike times precess with the θrhythm (red wave): as the rat traverses a place field, the corresponding place cell discharges at a progressively earlier phase in each new θ-cycle. These "preferred" phases of the θ-rhythm correspond to particular γ-cycles; the blue wave shows the net θ + γ amplitude. The synchronized spikes (shown by tickmarks colored according to the place fields traversed by the animal's trajectory) cluster over the γ-troughs, yielding dynamical cell assemblies. B: Analogy between the stochastic particles (red dots) in a 1D potential (black curve) and the spread of spike times (tickmarks) around the γ-troughs (same black curve). If the temperature is high (dashed line, top panel), the particles spread diffusely over the potential landscape, and when the temperature is low (bottom panel), they are confined at the bottoms of the potential wells. A similar effect is produced if the place cell firing rate is modulated by the Boltzmann factor e Àb g A g ðtÞ , where A γ (t) is the amplitude of the γ-wave and β γ represents the inverse temperature. When β γ is low, the spikes of the dynamical cell assemblies are "hot" (i.e., more spread in time), and when β γ is large, the spikes are concentrated at the γ-troughs. and for different effective temperatures 1/β (colorbar on the right). As the width of the integration window narrows, the number of spurious topological loops in the coactivity complex increases. For large w's, spurious loops tend to disappear with learning (the times T min when the correct topological structure of T s emerges are marked by vertical dashed lines). For small w's, some of these loops persist, indicating that the detected coactivity information is insufficient for eliminating spurious loops in T s . However, cooling down the coactivity complex suppresses the proliferation of the spurious loops: at β = 2 (bottom row) the coactivity complex has a correct structure at the integration window w % (2/3)T θ . (TIF) S5 Fig. The effect of γ-synchronization on spatial learning. Each panel represents the results of simulating 150 neuronal ensembles at different effective temperatures 1/β (colorbar on the right) and different integration times w (scale shown above). Each dot represents a particular ensemble of N c place cells with the mean place field size s. The maximal firing rates of the simulated neurons are distributed lognormally around f = 25 Hz (see Methods in [29,30]). The color of the dot indicates the average time T min required to encode an accurate map of the environment shown on Fig 2A, averaged over ten place field maps with the same (s, N). If the integration window is large (two left-most columns), γ-synchronization does not produce a strong effect on learning times. As the integration window becomes smaller, cooling the coactivity complex increases the scope of successful place cell ensembles. This implies that γ-synchronization increases the resilience of the hippocampal network in the face of variations of the place cell spiking parameters. (TIF) S6 Fig. The effect of γ-synchronization on spatial learning. Each panel represents the results of simulating 150 neuronal ensembles at different effective temperatures 1/β (colorbar on the right) and different integration times w (scale shown above). Each dot represents a particular ensemble of N c place cells with the mean place field size s. The maximal firing rates of the simulated neurons are lognormally distributed around f = 25 Hz (see Methods in [29,30]). The color of the dot indicates the average time T min required to encode an accurate map of the environment shown on Fig 2A, averaged over ten place field maps with the same (s, N). If the integration window is large (two left-most columns), γ-synchronization does not produce a strong effect on learning times. As the integration window becomes smaller, cooling the coactivity complex increases the scope of successful place cell ensembles. This implies that that γ-synchronization increases the resilience of the hippocampal network in the face of variations of the place-spiking parameters.