Learning place cells, grid cells and invariances: A unifying model

Neurons in the hippocampus and adjacent brain areas show a large diversity in their tuning to location and head direction. The underlying circuit mechanisms are not fully resolved. In particular, it is unclear why certain cell types are selective to one spatial variable, but invariant to another. For example, a place cell is highly selective to location, but typically invariant to head direction. Here, we propose that all observed spatial tuning patterns – in both their selectivity and their invariance – are a consequence of the same mechanism: Excitatory and inhibitory synaptic plasticity that is driven by the spatial tuning statistics of synaptic inputs. Using simulations and a mathematical analysis, we show that combined excitatory and inhibitory plasticity can lead to localized, grid-like or invariant activity. Combinations of different input statistics along different spatial dimensions reproduce all major spatial tuning patterns observed in rodents. The model is robust to changes in parameters, develops patterns on behavioral time scales and makes distinctive experimental predictions. Our results suggest that the interaction of excitatory and inhibitory plasticity is a general principle for the formation of neural representations.

1 Neurons in the hippocampus and the adjacent regions exhibit a broad variety of spatial activation patterns that are tuned to position, head direction or both. Common observations in these spatial dimensions are localized, bell shaped tuning curves [1,2], periodically repeating activity [3,4] and invariances [5,6], as well as combinations of these along different spatial dimensions [7,8]. For example, head direction cells are often invariant to location [6], and place cells are commonly invariant to head direction [5].
Most of these models are designed to explain the spatial selectivity of one particular cell type and do not consider invariances along other dimensions, although the formation of invariant representations is a non-trivial problem [31].
In view of the variety of spatial tuning patterns, the question arises if the differences in tuning of different cells in different areas reflect differences in microcircuit connectivity, single cell properties or plasticity rules, or if there is a unifying principle.
In this paper we suggest that both the observed spatial selectivities and invariances can be explained by a common mechanism -interacting excitatory and inhibitory synaptic plasticity -and that the observed differences in the response profiles of grid, place and head direction cells result from differences in the spatial tuning of excitatory and inhibitory synaptic afferents. Here, we explore this hypothesis in a computational model of a feedforward network of rate-based neurons. Simulations as well as a mathematical analysis indicate that the model reproduces the large variety of response patterns of neurons in the hippocampal formation and adjacent areas 2 and make predictions for the input statistics of each cell type.
The suggested mechanism ports the robust pattern formation of attractor models [9,10,12] from the neural to the spatial domain and increases the speed of selforganization of plasticity-based mechanisms [15,[17][18][19] to time scales on which the spatial tuning of neurons is typically measured.

Results
We study the development of spatial representations in a network of rate-based neurons with interacting excitatory and inhibitory plasticity. A single model neuron that represents a cell in the hippocampal formation or adjacent areas receives feedforward input from excitatory and inhibitory synaptic afferents. As a simulated rat moves through an environment, these synaptic afferents are weakly modulated by spatial location and in later sections also by head direction. This modulation is irregular and non-localized with multiple maxima (Fig. 1a, Methods) [32]. Importantly, different inputs show different modulation profiles. We also show results for localized, i.e., place cell-like, input [33][34][35]. The output rate is given by a weighted sum of the excitatory and inhibitory inputs.
In our model, both excitatory and inhibitory synaptic weights are subject to plasticity. The excitatory weights change according to a Hebbian plasticity rule [36] that potentiates the weights in response to simultaneous pre-and postsynaptic activity. The inhibitory synapses evolve according to a plasticity rule that changes their weights in proportion to presynaptic activity and the difference between postsynaptic activity and a target rate (1 Hz in all simulations). This rule has previously been shown to balance excitation and inhibition such that the firing rate of the output neuron approaches the target rate [37]. We assume the inhibitory plasticity to act fast enough to track changes of excitatory weights, so that excitation and inhibition are approximately balanced at all times.
The relative spatial smoothness of the excitatory and inhibitory input determines the firing pattern of the output neuron We first simulate a rat that explores a linear track (Fig. 1). The spatial tuning of each input neuron is random but depends smoothly on the location of the animal (e.g., Fig. 1a). As a measure of smoothness, we use the spatial autocorrelation length of the inputs. In the following, this is the central parameter of the input statistics, which is chosen separately for excitation and inhibition.
At the beginning of each simulation, all synaptic weights are random. As the animal explores the track, the excitatory and inhibitory weights change in response to pre-and postsynaptic activity, and the output cell gradually develops a spatial activity pattern. We find that this pattern is primarily determined by whether the excitatory or inhibitory inputs are smoother in space. If the inhibitory tuning is smoother than the excitatory tuning (Fig. 1b), the output neuron develops equidistant firing fields, reminiscent of grid cells on a linear track [38]. If instead the excitatory tuning is smoother, the output neuron fires close to the target rate of 1 Hz everywhere (Fig. 1c); it develops a spatial invariance. For spatially untuned inhibitory afferents, the output neuron develops a single firing field, reminiscent of a one-dimensional place cell (Fig. 1d, compare [39]).
The emergence of these firing patterns can be best explained in the simplified scenario of place field-like input tuning (Fig. 1e,f ). The spatial smoothness is then given by the size of the place fields. Let us assume that the output neuron fires at 4 the target rate everywhere (Supplementary Online Material, SOM). From this homogeneous state, a small potentiation of one excitatory weight leads to an increased firing rate of the output neuron at the location of the associated place field (highlighted red curve in Fig. 1e). To bring the output neuron back to the target rate, the inhibitory learning rule increases the synaptic weight of inhibitory inputs that are tuned to the same location (highlighted blue curve in Fig. 1e). If these inhibitory inputs have smaller place fields than the excitatory inputs (Fig. 1c), this restores the target rate everywhere [37]. Hence, inhibitory plasticity can stabilize spatial invariance if the inhibitory inputs are sufficiently precise (i.e., not too smooth) in space.
In contrast, if the spatial tuning of the inhibitory inputs is smoother than that of the excitatory inputs, the target firing rate cannot be restored everywhere. Instead, a compensatory potentiation of inhibitory weights increases the inhibition in a spatial region that has at least the size of the inhibitory place fields. This leads to a corona of inhibition, in which the output neuron cannot fire ( Fig. 1e, blue region). Outside of this inhibitory surround the output neuron can fire again and the next firing field develops. Iterated, this results in a periodic arrangement of firing fields (Fig. 1f ).
Spatially untuned inhibition corresponds to an infinitely large inhibitory corona that exceeds the length of the linear track, so that only a single place field remains.
The argument of the preceding paragraph can be extended to the scenario where input is only weakly modulated by space. For non-localized input tuning (Fig. 1b,c,d), any weight change that increases synaptic input in one location will also increase it in a surround that is given by the smoothness of the input tuning (see SOM for a mathematical analysis). In the simulations, the randomness manifests itself in occasional defects in the emerging firing pattern (Fig. 1h, bottom). The above reasoning suggests that the width of individual firing fields is determined by the smoothness 5 of the excitatory input tuning, while the distance between grid fields, i.e., the grid spacing, is set by the smoothness of the inhibitory input tuning. Indeed, both simulations and a mathematical analysis (SOM) confirm that the grid spacing scales linearly with the inhibitory smoothness in a large range, both for localized (Fig. 1g) and non-localized input tuning (Fig. 1h). In summary, the interaction of excitatory and inhibitory plasticity can lead to spatial invariance, spatially periodic activity patterns or single place fields depending on the spatial statistics of the excitatory and inhibitory input.

Emergence of hexagonal firing patterns
When a rat navigates in a two-dimensional arena, the spatial firing maps of grid cells in the medial entorhinal cortex (mEC) show a pronounced hexagonal symmetry [3,4] with different grid spacings and spatial phases. To study whether a hexagonal firing pattern can emerge from interacting excitatory and inhibitory plasticity, we simulate a rat in a quadratic box. The rat explores the arena for 10 hours, following trajectories extracted from behavioral data [40] (SOM). To investigate the role of the input statistics, we consider three different classes of input tuning: i) place cell-like input (Fig. 2a), ii) sparse non-localized input, in which the tuning of each input neuron is given by the sum of 100 randomly located place fields (Fig. 2b) and iii) dense non-localized input, in which the tuning of each input is a random function with fixed spatial smoothness (Fig. 2c). For all input classes, the spatial tuning of the inhibitory inputs is smoother than that of the excitatory inputs.
Initially, all synaptic weights are random and the activity of the output neuron shows no spatial symmetry. While the rat forages through the environment, the output cell develops a periodic firing pattern for all three input classes, reminiscent 6 of grid cells in the mEC [3,4] and typically with the same hexagonal symmetry. This hexagonal arrangement is again due to the smoother inhibitory input tuning, which generates a spherical inhibitory corona around each firing field (compare Fig. 1e).
These center-surround fields arrange in a hexagonal pattern -the closest packing of spheres in two dimensions; compare [41]. We find that the spacing of this pattern is determined by the inhibitory smoothness, whereas the orientation and the phase of the grid depend in decreasing order on the random initialization of the input tuning, the trajectories and the initial synaptic weights (SOM, Fig. S9).
For the linear track, the randomness of the non-localized inputs leads to defects in the periodicity of the grid pattern. In two dimensions, we find that the randomness leads to distortions of the hexagonal grid. To quantify this effect, we simulated 500 random trials for each of the three input scenarios and plotted the grid score histogram (SOM) before and after 10 hours of spatial exploration (Fig. 2d,e,f ). Different trials have different trajectories, different initial synaptic weights and different random locations of the input place fields (for sparse input) or different random input functions (for dense input). For place cell-like input, most of the output cells develop a positive grid score during 10 hours of spatial exploration (26% before to 80% after learning, Fig. 2d). Even for low grid scores, the firing rate maps look grid-like after learning but exhibit a distorted symmetry (Fig. 2d). For sparse non-localized input, the fraction of output cells with a positive grid score increases from 28% to 73% and for dense non-localized input from 20% to 42% within 10 hours of spatial exploration.
In summary, the interaction of excitatory and inhibitory plasticity leads to gridlike firing patterns in the output neuron for all three input scenarios. The grids are typically less distorted for sparser input (Fig. 2g).

Rapid appearance of grid cells
In unfamiliar environments, neurons in the mEC exhibit grid-like firing patterns within minutes [4]. Moreover, grid cells react quickly to changes in the environment [42][43][44]. These observations challenge models for grid cells that require gradual synaptic changes during spatial exploration. In principle, the time scale of plasticitybased models can be augmented arbitrarily by increasing the synaptic learning rates.
For stable patterns to emerge, however, significant weight changes must occur only after the animal has visited most of the environment. To explore the edge of this trade-off between speed and stability, we increased the learning rates to a point where the grids are still stable but where further increase would reduce the stability (SOM, Fig. S8). For place cell-like input, periodic patterns can be discerned within 10 minutes of spatial exploration, starting with random initial weights (Fig. 3a,b). The pattern further emphasizes over time and remains stable for many hours (Fig. 3c).
To investigate the robustness of this phenomenon we ran 500 realizations with different trajectories, initial synaptic weights and locations of input place fields. In all simulations, a periodic pattern emerged within the first 30 minutes, and a majority of patterns exhibited hexagonal symmetry after three hours (increasing from 26% to 72%, Fig. 3c,d). For non-localized input, the emergence of the final grids typically takes longer, but the first grid fields are also observed within minutes and are still present in the final grid, as observed in experiments [4] (SOM, Fig. S6).
In summary, periodic patterns emerge rapidly in our model and the associated time scale is limited primarily by how quickly the animal visits its surroundings, i.e., by the same time scale that limits the experimental recognition of the grids.

Place cells, band cells and stretched grids
In addition to grids, the mEC and adjacent brain areas exhibit a plethora of other spatial activity patterns including spatially invariant [6], band-like [8] (periodic along one direction and invariant along the other), and spatially periodic but non-hexagonal patterns [8]. Moreover, place cells in the hippocampus proper are typically only tuned to a single or few locations in a given environment [33,45,46]. If the animal traversed the environment along a straight line, all of these cells would be classified as periodic, localized or invariant (Fig. 1), although the classification could vary depending on the direction of the line. Based on this observation, we hypothesized that all of these patterns could be the result of an input autocorrelation structure that differs along different spatial directions.
We first verified that also in a two-dimensional arena, place cells emerge from a very smooth inhibitory input tuning (Fig. 4a) and spatial invariance results when excitation is broader than inhibition (Fig. 4b). We then varied the smoothness of the inhibitory inputs independently along two spatial directions. If the spatial tuning of inhibitory inputs is smoother than the tuning of the excitatory inputs along one dimension but less smooth along the other, the output neuron develops band cell-like firing patterns (Fig. 4c). If inhibitory input is smoother than excitatory input, but not isotropic, the output cell develops stretched grids with different spacing along two axes (Fig. 4d). For these anisotropic cases, stretched hexagonal grids and rectangular arrangements of firing fields appear similarly favorable (compare  Fig. S10). In summary, the relative spatial smoothness of inhibitory and excitatory input determines the symmetry of the spatial firing pattern of the output neuron.
The requirements for the input tuning that support invariance, periodicity and localization apply individually to each spatial dimension, opening up a combinatorial variety of spatial tuning patterns.
Spatially tuned input combined with head direction selectivity leads to grid, conjunctive and head direction cells Many cells in and around the hippocampus are tuned to the head direction of the animal [2,47,48]. These head direction cells are typically tuned to a single head direction, just like place cells are typically tuned to a single location. Moreover, head direction cells are often invariant to location [6], just like place cells are commonly invariant to head direction [5]. There are also cell types with conjoined spatial and head direction tuning. Conjunctive cells in the mEC fire like grid cells in space, but only in a particular head direction [7], and many place cells in the hippocampus of crawling bats also exhibit a head direction tuning [49].
To investigate whether these tuning properties could also result in our model, we simulated a rat that moves in a square box, whose head direction is constrained by the direction of motion (SOM). Each input neuron is tuned to both space and head direction (e.g., Fig. 5a).
In line with the previous observations, we find that the spatial tuning of the output neuron is determined by the relative spatial smoothness of the excitatory and inhibitory inputs and the head direction tuning of the output neuron is determined by the relative smoothness of the head direction tuning of the inputs from the two populations. If the head direction tuning of excitatory input neurons is smoother than that of inhibitory input neurons, the output neuron becomes invariant to head direction (Fig. 5a). If instead only the excitatory input is tuned to head direction, the output neuron develops a single activity bump at a particular head direction (Fig. 5b,c). The concurrent spatial tuning of the inhibitory input neurons determines the spatial tuning of the output neuron. For spatially smooth inhibitory input, the output neuron develops a hexagonal firing pattern (Fig. 5a,b) and for less smooth inhibitory input the firing of the output neuron is invariant to the location of the animal (Fig. 5c). In summary, the relative smoothness of inhibitory and excitatory input neurons in space and in head direction determines whether the output cell fires like a pure grid cell, a conjunctive cell or a pure head direction cell (Fig. 5d).
We find that the overall head direction tuning of conjunctive cells is broader than that of individual grid fields (Fig. 5e). This results from variations in the preferred head direction of different grid fields. Typically, however, these variations remain small enough to preserve an overall head direction tuning of the cell, because individual grid fields tend to align their head direction tuning (SOM, Fig. S10).
Whether a narrower head direction of individual grid fields is present also in rodents is not resolved.

Discussion
We presented a self-organization model that reproduces the experimentally observed spatial and head direction tuning patterns in the hippocampus and adjacent brain regions. Its core mechanism is an interaction of Hebbian plasticity in excitatory synapses and homeostatic Hebbian plasticity in inhibitory synapses [37,50]. The main prediction of the model is that the spatial autocorrelation structure of excita-tory and inhibitory inputs determines -and should thus be predictable from -the output pattern of the cell. Investigations of the tuning of individual cells [51] or even synapses [52] that project to spatially tuned cells would thus be a litmus test for the proposed mechanism.
The origin of synaptic input to spatially tuned cells is not fully resolved [53]. Our model is consistent with input from sensory areas, given that the mechanism is robust to the precise properties of the input and essentially only requires temporally stable tuning in a given spatial environment. The input could also stem from within the hippocampal formation, where spatial tuning has been observed in both excitatory [1] and inhibitory [34,35] neurons. For example, the notion that mEC neurons receive input from hippocampal place cells is supported by several studies: Place cells in the hippocampus emerge earlier during development than grid cells in the mEC [54,55], grid cells lose their tuning pattern when the hippocampus is deactivated [56] and, finally, both the firing fields of place cells and the spacing and field size of grid cells increase along the dorso-ventral axis [57][58][59].
Inhibition is usually thought to arise from local interneurons (but see [60]), suggesting that spatially tuned inhibitory input to mEC neurons originates from the entorhinal cortex itself. Interneurons in mEC display a spatial tuning [32] that could be inherited from hippocampal place cells or other grid cells [13]. The broader spatial tuning required for the emergence of spatial selectivity could be established, e.g., by pooling over cells with similar tuning or through a non-linear input-output transformation in the inhibitory circuitry. If inhibitory input is indeed local, the increase in grid spacing along the dorso-ventral axis [58] suggests that the tuning of inhibitory interneurons gets smoother along this axis. For smoother tuning functions, less neurons are needed to cover the whole environment, in accordance with the decrease in interneuron density along the dorso-ventral axis [61].
The observed spatial tuning patterns have also been explained by other models.
In continuous attractor networks (CAN), each cell type could emerge from a specific connectivity pattern, combined with a mechanism that translates the motion of the animal into shifts of neural activity on an attractor. How the required connectivity patterns could emerge is subject to debate [62]. A measurable distinction of our model from CAN models is its response to a global reduction of inhibition. While a modification of inhibition typically changes the grid spacing in CAN models of grid cells [13,63], the grid field locations generally remain untouched in our model. The grid fields merely change in size, until inhibition is recovered by inhibitory plasticity (Fig. 6a). This can be understood by the colocalization of the grid fields and peaks in the excitatory membrane current (Fig. 6b,c). A reduction of inhibition leads to an increased protrusion of these excitatory peaks and thus to wider firing fields. The observed temporal stability of mEC grid patterns in spite of dopaminergic modulations of GABAergic transmission would be in line with our model [64]. Moreover, we found that for localized input tuning, the inhibitory membrane current typically also peaks at the locations of the grid fields. This co-tuning breaks down for non-localized input (Fig. 6b). In contrast, CAN models predict that the inhibitory membrane current has the same periodicity as the grid, but possibly phase shifted [65].
The grid patterns of topologically nearby grid cells in the mEC typically have the same orientation and spacing but different phases [4]. This property is immanent to CAN models. In contrast, single cell models [14,15,[17][18][19] require additional mechanisms, such as recurrent connections [66], to develop a coordination of neighboring grid cells.
Models that learn grid cells from spatially tuned input do not have to assume 13 a preexisting connectivity pattern or specific mechanisms for path integration [14], but are challenged by the fast emergence of hexagonal firing patterns in unfamiliar environments [4]. Most plasticity-based models require slow learning, such that the animal explores the whole arena before significant synaptic changes occur. Therefore, grid patterns typically emerge slower than experimentally observed [18,62]. This delay is particularly pronounced in models that require an extensive exploration of both space and movement direction [15]. For the mechanism we suggested, the selforganization was very robust and allowed a rapid pattern formation on short time scales, similar to those observed in rodents (Fig. 3). This speed could be further increased by accelerated reactivation of previous experiences during periods of rest [67]. By this means, the exploration time and the time it takes to activate all input patterns could be decoupled, leading to a much faster emergence of grid cells in all trajectory-independent models with associative learning. Other models that explain the emergence of grid patterns from place cell input through synaptic depression and potentiation also develop grid cells in realistic times [17,19]. How these models generalize to potentially non-localized input is yet to be shown.

Experiments show that the pattern and the orientation of grid cells is influenced
by the geometry of the environment. In a quadratic box, the orientation of grid cells tends to align -with a small offset -to one of the box axes [68]. In trapezoidal arenas, the hexagonality of grids is distorted [69]. We considered quadratic and circular (SOM, Fig. S11) arenas with rat trajectories from behavioral experiments and found that the boundaries distort the grid pattern also in our simulations, particularly for localized inputs (SOM, Fig. S11). In trapezoidal geometries, we expect this to lead to non-hexagonal grids. However, we did not observe a pronounced alignment to quadratic boundaries, if the input place fields are randomly located (SOM, Fig. S11).
We found that interacting excitatory and inhibitory plasticity serves as a simple and robust mechanism for rapid self-organization of stable and symmetric patterns from spatially modulated feedforward input. The suggested mechanism ports the robust pattern formation of attractor models [9,10,12] from the neural to the spatial domain and increases the speed of self-organization of plasticity-based mechanisms [15,[17][18][19] to time scales on which the spatial tuning of neurons is typically measured. It will be interesting to explore how recurrent connections between output cells can help to understand the role of local inhibitory connections [13] and the presence or absence of topographic arrangements of spatially tuned cells [59,70,71].
We illustrated the properties and requirements of the model in the realm of spatial representations. Since invariance and selectivity are ubiquitous properties of receptive fields in the brain, the interaction of excitatory and inhibitory synaptic plasticity might be essential to form stable representations from sensory input also in other brain areas [39,72].

Network architecture and neuron model
We study a feedforward network where a single output neuron receives synaptic input from N E excitatory and N I inhibitory neurons (Fig. 1a) with synaptic weight vectors w E , w I and spatially tuned rates r E (x), r I (x), respectively. Here x denotes the location and later also the head direction of the animal. For simplicity and to allow a mathematical analysis we use a rate-based description for all neurons. The firing rate of the output neuron is given by the rectified sum of weighted excitatory 15 and inhibitory inputs: where [·] + denotes a rectification that sets negative firing rates to zero. To comply with the notion of excitation and inhibition, all weights are constrained to be positive.
In most simulations we use four times as many excitatory as inhibitory input neurons

Excitatory and inhibitory plasticity
In each unit time step (∆t = 1), the excitatory weights are updated according to a Hebbian rule: The excitatory learning rate η E is a constant that we chose individually for each simulation. To avoid unbounded weight growth, we use a quadratic multiplicative normalization, i.e., we keep the sum of the squared weights of the excitatory pop- constant at its initial value, by rescaling the weights after each unit time step. We model inhibitory synaptic plasticity using a previously suggested learning rule [37]: with inhibitory learning rate η I and target rate ρ 0 . We always use η I > η E and ρ 0 = 1 Hz. Negative inhibitory weights are set to zero.

Rat trajectory
In the linear track model (one dimension, Figs. 1 and 6), In the open arena model (two dimensions, Figs. 2 to 4 and 6), we use trajectories x(t) from behavioral data [40] of a rat that moved in a 1 m × 1 m quadratic enclosure (SOM).
In the model for neurons with head direction tuning (three dimensions, Fig. 5), we use the same behavioral trajectories as in two dimensions and model the head direction as noisily aligned to the direction of motion (SOM).

Spatially tuned inputs
The firing rates of excitatory and inhibitory synaptic inputs r E i , r I j are tuned to the location x of the animal. In the following, we use x and y for the first and second spatial dimension and z for the head direction.
For place field-like input, we use Gaussian tuning functions with standard deviation σ E , σ I for the excitatory and inhibitory population, respectively. In Fig. 4 the standard deviation is chosen independently along the x and y direction. The centers of the Gaussians are drawn randomly from a distorted lattice (SOM). This way we ensure random but spatially dense tuning. The lattice contains locations outside the box to reduce boundary effects.
For sparse non-localized input with N f P fields per neuron of population P, we first create N f P distorted lattices, each with N P locations. We then assign N f P of the resulting N f P N P locations at random and without replacement to each input neuron (SOM).
For dense non-localized input, we convolve Gaussians with white noise and increase the resulting signal to noise ratio by setting the minimum to zero and the For combined spatially and head direction tuned input, we use the Gaussian tuning curves described above for the spatial tuning and von Mises distributions along the head direction dimension.

Initial synaptic weights and global reduction of inhibition
We specify a mean for the initial excitatory and inhibitory weights, respectively, and randomly draw each synaptic weight from the corresponding mean ±5%. The excitatory mean is chosen such that the output neuron would fire above the target rate everywhere in the absence of inhibition; we typically take this mean to be 1 ( Table 1, SOM). The mean inhibitory weight is then determined such that the output neuron would fire close to the target rate, if all the weights were at their mean value ( Table 2, SOM).
We modeled a global reduction of inhibition by scaling all inhibitory weights by a constant factor, after the grid has been learned.
18 Figure 1: Emergence of periodic, invariant and single field firing patterns. a) Network model for a linear track. A threshold-linear output neuron (gray) receives input from excitatory (red) and inhibitory (blue) cells, which are spatially tuned (curves on top and bottom). b) Spatially tuned input with smoother inhibition than excitation. The fluctuating curves (top) show two exemplary spatial tunings (one is highlighted) of excitatory and inhibitory input neurons. Interacting excitatory and inhibitory synaptic plasticity gradually changes an initially random response of the output neuron (firing rate r out ) into a periodic, grid cell-like activity pattern. c) If the spatial tuning of inhibitory input neurons is less smooth than that of excitatory input neurons the interacting excitatory and inhibitory plasticity leads to a spatially invariant firing pattern. The output neuron fires close to the target rate of 1 Hz everywhere. d) For very smooth or spatially untuned inhibitory inputs, the output neuron develops a single firing field, reminiscent of a place cell. e) The mechanism, illustrated for place cell-like input. When a single excitatory weight is increased relative to the others, the balancing inhibitory plasticity rule leads to an immediate increase of inhibition at the associated location. If inhibitory inputs are smoother than excitatory inputs, the resulting approximate balance creates a center surround field: a local overshoot of excitation (firing field) surrounded by an inhibitory corona. The next firing field emerges at a distance where the inhibition has faded out. Iterated, this results in a spatially periodic arrangement of firing fields. f ) Inputs with place field-like tuning. Gaussian curves (top) show the spatial tuning of excitatory and inhibitory input neurons (one neuron of each kind is highlighted, 20 percent of all inputs are displayed). A grid cell firing pattern emerges from an initially random weight configuration. g) Grid spacing scales with inhibitory tuning width σ I . Simulation results (dots) agree with a mathematical bifurcation analysis (solid). Output firing rate examples at the two indicated locations are shown at the bottom. h) Inhibitory smoothness σ I,corr controls grid spacing; arrangement as in d. ; spatial firing rate map of the output neuron and corresponding autocorrelogram before and after spatial exploration of 10 hours. The number on the correlogram shows the associated grid score. Different rows correspond to different spatial tuning characteristics of the excitatory and inhibitory input. For all figures the spatial tuning of inhibitory input neurons is smoother than that of excitatory input neurons. a) Each input neuron is a place cell with random location. b) The tuning of each input neuron is given as the sum of 100 randomly located place fields. c) The tuning of each input neuron is a random smooth function of the location. This corresponds to the sum of infinitely many randomly located place fields. Before learning the spatial tuning of the output neuron shows no symmetry. After 10 hours of spatial exploration the output neuron developed a hexagonal pattern. d) Grid score histogram for 500 output cells with place cell-like input. Before learning (light blue) 26% of the output cells have a positive grid score. After 10 hours of spatial exploration this value increases to 80%. Two example rate maps are shown. The arrows point to the grid score of the associated rate map. Even for low grid scores the learned firing pattern looks grid-like. e,f ) Grid score histograms for input tuning as in b,c, arranged as in d. g) Fraction of neurons with positive grid score before (light blue) and after learning (dark blue) as a function of the number of fields per input neuron. show two different realizations with a good (red star) and a bad (orange triangle) grid score development. After few minutes a periodic structure becomes visible and enhances over time. c) Time course of the grid score in the simulations shown in a (red) and b (orange). While the periodic patterns emerge within minutes, the manifestation of the final hexagonal pattern typically takes a couple of hours. Once the pattern is established it remains stable for many hours. The gray scale shows the cumulative histogram of the grid scores of 500 realizations (black=0, white=1). The solid white and black lines indicate the 20% and 80% percentile, respectively. d) Histogram of grid scores of the 500 simulations shown in c. Initial histogram in light blue, histogram after 1 hour and after 3 hours in dark blue. Numbers show the fraction of cells with positive grid score at the given time. Rat trajectories taken from [40]. The output neuron develops an invariance, if the spatial tuning of inhibitory input neurons is less smooth than the tuning of excitatory input neurons. c) Band cells emerge if the spatial tuning of inhibitory input is asymmetric, such that the autocorrelation length is larger than that of excitatory input along one direction (here the y-direction) and smaller along the other (here the x-direction). d) Overview of how the shape of the inhibitory input tuning determines the firing pattern of the output neuron. Each element depicts the firing rate map of the output neuron after 10 hours. White ellipses of width 2σ I,x and 2σ I,y in x− and y−direction indicate the direction-dependent standard deviation of the spatial tuning of the inhibitory input neurons. The width of the excitatory tuning fields, σ E , is the same in all simulations. The red circle at the axis origin is of diameter 2σ E . Figure 5: Combined spatial and head direction tuning. a,b,c) Columns from left to right: Spatial tuning and head direction tuning (polar plot) of excitatory and inhibitory input neurons (one example each); spatial firing rate map of the output neuron before learning and after spatial exploration of 10 hours with corresponding autocorrelogram; head direction tuning of the output neuron after learning. The numbers in the polar plots indicate the peak firing rate at the preferred head direction after averaging over space. a) Wider spatial tuning of inhibitory input neurons than of excitatory input neurons combined with narrower head direction tuning of inhibitory input neurons leads to a grid cell-like firing pattern in space with invariance to head direction, i.e. the output neuron fires like a pure grid cell. b) The same spatial input characteristics as in a combined with head direction-invariant inhibitory input neurons leads to grid cell-like activity in space and a preferred head direction, i.e. the output neuron fires like a conjunctive cell. c) If the spatial tuning of inhibitory input neurons is less smooth than that of excitatory neurons and the concurrent head direction tuning is wider for inhibitory than for excitatory neurons, the output neuron is not tuned to space but to a single head direction, i.e. the output neuron fires like a pure head direction cell. d) Head direction tuning and grid score of 10 simulations of the three cell types. Each symbol represents one realization with random input tuning. The markers correspond to the tuning properties of the input neurons as depicted in a, b, c: grid cell (triangles), conjunctive cell (squares), head direction cell (circles). The values that correspond to the output cells in a, b, c are shown as filled symbols. e) In our model, the head direction tuning of individual grid fields is sharper than the overall head direction tuning of the conjunctive cell. Depicted is a rate map of a conjunctive cell (left) and the corresponding head direction tuning (right, dashed). For three individual grid fields, indicated with colored squares, the head direction tuning is shown in the same polar plot. The overall tuning of the grid cell (dashed) is a superposition of the tuning of all grid fields. Numbers indicate the peak firing rate (in Hz) averaged individually within each of the four rectangles in the rate map. We obtained similar results for non-localized spatial and head direction input (SOM, Fig. S7). Figure 6: The effect of reduced inhibition on grid cell properties. a) Reducing the strength of inhibitory synapses to a fraction of its initial value (from left to right: 1, 1/2, 1/4) leads to larger grid fields but an unchanged grid spacing in our model. In continuous attractor network models, the same reduction of inhibition would affect not only the field size but also the grid spacing. b) Excitatory (red) and inhibitory (blue) membrane current to a cell with grid like firing pattern (gray) on a linear track. The currents are normalized to a maximum value of 1. Different rows correspond to different spatial tuning characteristics of the input neurons. From top to bottom: Place cell-like tuning, sparse non-localized tuning (sum of 100 randomly located place fields), dense non-localized tuning (Gaussian random fields). Peaks in excitatory membrane current are colocalized with grid fields (shaded area) for all input statistics. In contrast, the inhibitory membrane current is not necessarily correlated with the grid fields for non-localized input. Moreover, the dynamic range of the membrane currents is reduced for non-localized input. A reduction of inhibition as shown in a corresponds to a lowering of the blue curve. c) Excitatory and inhibitory membrane current to a grid cell receiving sparse non-localized input (sum of 100 randomly located place fields) in two dimensions. Top: Tuning of output firing rate, normalized excitatory and inhibitory membrane current. Bottom: autocorrelograms thereof. The grid pattern is strongly apparent in the spatial tuning of the excitatory membrane current but less in the inhibitory membrane current.