Oscillatory neurocomputing with ring attractors: a network architecture for mapping locations in space onto patterns of neural synchrony

Theories of neural coding seek to explain how states of the world are mapped onto states of the brain. Here, we compare how an animal's location in space can be encoded by two different kinds of brain states: population vectors stored by patterns of neural firing rates, versus synchronization vectors stored by patterns of synchrony among neural oscillators. It has previously been shown that a population code stored by spatially tuned ‘grid cells’ can exhibit desirable properties such as high storage capacity and strong fault tolerance; here it is shown that similar properties are attainable with a synchronization code stored by rhythmically bursting ‘theta cells’ that lack spatial tuning. Simulations of a ring attractor network composed from theta cells suggest how a synchronization code might be implemented using fewer neurons and synapses than a population code with similar storage capacity. It is conjectured that reciprocal connections between grid and theta cells might control phase noise to correct two kinds of errors that can arise in the code: path integration and teleportation errors. Based upon these analyses, it is proposed that a primary function of spatially tuned neurons might be to couple the phases of neural oscillators in a manner that allows them to encode spatial locations as patterns of neural synchrony.

Oscillatory neurocomputing with ring attractors: a network architecture for mapping locations in space onto patterns of neural synchrony Hugh T. Blair 1 , Allan Wu 2 and Jason Cong 2 1 Psychology Department, UCLA, and 2 Computer Science Department, UCLA, Los Angeles, CA 90095, USA Theories of neural coding seek to explain how states of the world are mapped onto states of the brain. Here, we compare how an animal's location in space can be encoded by two different kinds of brain states: population vectors stored by patterns of neural firing rates, versus synchronization vectors stored by patterns of synchrony among neural oscillators. It has previously been shown that a population code stored by spatially tuned 'grid cells' can exhibit desirable properties such as high storage capacity and strong fault tolerance; here it is shown that similar properties are attainable with a synchronization code stored by rhythmically bursting 'theta cells' that lack spatial tuning. Simulations of a ring attractor network composed from theta cells suggest how a synchronization code might be implemented using fewer neurons and synapses than a population code with similar storage capacity. It is conjectured that reciprocal connections between grid and theta cells might control phase noise to correct two kinds of errors that can arise in the code: path integration and teleportation errors. Based upon these analyses, it is proposed that a primary function of spatially tuned neurons might be to couple the phases of neural oscillators in a manner that allows them to encode spatial locations as patterns of neural synchrony.
Here, it is shown how a continuous attractor networknamely bank of ring attractors that stores circulating activity bumps-can be alternatively configured to implement either a population vector code stored by spatially tuned grid cells, or a synchronization vector code stored by rhythmically bursting theta cells (which lack spatial tuning). The network exhibits high coding capacity [5,6] and strong fault tolerance [45] under both configurations, but there are a number of fundamental differences between the two coding schemes: the spatial tuning properties and temporal dynamics of neurons in the ring attractors, the reference frame in which activity bumps are measured, and the topology of the mapping from spatial locations onto firing rate space. It is conjectured here that because of these differences, a spatial code might be stored more efficiently by synchronization than population vectors.

Population versus synchronization coding
A neural code can be specified by a mathematical function, f : D ! R, that maps a domain of world states, D, onto a range of brain states, R. Here, we consider coding functions that can represent an animal's location in space, so D will be some finite set of locations in the world that the animal can occupy, and R will be some set of brain states that can represent locations in D. The mapping from world states onto brain states may be thus written in the form This is a mapping from positions in an interval of length l on a linear track onto a phase angle stored by the angular position of an activity bump in a single ring attractor composed from M neurons (figure 1a). As the animal moves across the track, the activity bump circulates around the ring at a rate proportional to movement speed. The rate of bump circulation at time t is given by where v is the angular frequency of bump circulation in radians s 21 , and v is the animal's movement speed. Integrating equation (2.4) with respect to time yields an expression for the angular position (or phase) of the activity bump as a function of the animal's position on the track, where d ¼ 1/l is the spatial frequency, and w is a spatial reference phase that denotes the bump's position in the ring when the animal is at position x ¼ 0. The animal's position on the track can be decoded from the bump phase by solving for x, Equation (2.6) measures the position of the activity bump by comparing it against w, a static reference point within the ring attractor. Note that any phase noise in f(t) would lead to inaccuracies in the decoded position signal, commonly referred to as path integration errors.
The activity bump shifts one full cycle (2p radians) against w each time the animal traverses a distance l along the track. Hence, neurons in the ring can behave like grid cells, firing periodically at regular intervals along the track (figure 1a). However, the CPC network suffers from limitations on storage capacity, because positions on the track are only represented by firing rate vectors that lie upon a circular manifold in firing rate space (figure 1a). Because the vast majority of firing rate vectors do not lie upon this circle (and thus do not encode any position on the track), most of the CPC network's potential storage capacity is unused. This is analogous to having a digital computer with many gigabytes of memory capacity, but only being permitted to use a few bytes for data storage. One strategy for expanding the coding capacity is to implement more complex patterns of connectivity among neurons in the ring, thereby allowing more of the representation space to be used [46][47][48]. An alternative strategy is to divide up the CPC ring to implement a different type of population code.

(b) Grid population code
Sreenivasan & Fiete [45] have introduced the acronym GPC (grid population code) to label a class of phase codes that possess more degrees of freedom than the spatial environment they represent, so that N . P in equation ( In the rodent brain, grid cells are topographically organized into distinct anatomical modules, so that cells residing in the same module have firing fields with the same vertex spacing and orientation (but different translational phases), whereas cells residing in different modules exhibit different spacings and orientations [22,49,50]. If each ring in the GPC network is assigned its own length constant, l n , then different rings can encode positions on the track at different spatial resolutions (figure 1b), and thereby simulate distinct modules composed from grid cells with different vertex spacings. Each ring implements a mapping from track positions to bump positions (equation ( shown that l can be chosen so that D ) l n for all n; that is, the track interval encoded by the entire GPC network can be far larger than the track interval encoded by any individual ring [5,6]. The multi-ring GPC network maps the animal's position into the same firing rate space as the single-ring CPC network (because the number of neurons has not changed), but now, more of the available coding capacity can be used, because S N fills up more of the firing rate space than S 1 . However, this expanded coding capacity comes at a cost, because phase noise can cause more severe consequences under GPC than CPC. Under CPC, phase noise gives rise to path integration errors, which may be defined as inaccuracies in the estimate of an animal's position within its environment. Under GPC, phase noise can give rise to teleportation errors, which may be defined as inaccuracies in the estimate of which environment the animal is in.
To see how teleportation errors arise, it may be observed that equation (2.7) maps a low dimensional space of world states (positions on the one-dimensional track) into a high dimensional space of brain states ( phase vectors on the N-torus). Because dimensionality increases under this transformation, every continuous trajectory on the line, X,[0, D) is guaranteed to map onto a continuous trajectory in phase space, fðXÞ , S N . But to decode the rat's position, the mapping of equation (2.7) must be inverted to obtain a mapping from a high to a low dimensional space: 2), most trajectories in phase space are 'non-invertible' in that they map back to non-continuous trajectories through the environment. Consequently, if noise perturbs the GPC network's activity bumps by a small amount that shifts f along a non-invertible trajectory, then this small error in the phase code can generate huge discontinuous 'jumps' in the decoded position signal (such as travelling from New York to Paris in a single instant). This is a teleportation error. Sreenivasan & Fiete [45] have suggested how such errors might be beneficial rather than detrimental. Teleportation magnifies small phase errors in a way that makes them easy to detect, and thus also possibly easier to correct. According to this logic, ... GPC networks might be highly tolerant to phase noise if they can exploit error correction mechanisms that detect large discontinuities in x to correct small errors in f. However, an important constraint upon this strategy is that the cost of the error correction mechanism should not exceed the benefits that it yields in the form of fault tolerance [45]. Hence, error correction networks should be implementable at a low enough cost to justify their yield in performance gains. It is proposed below that one approach to minimizing the cost of error correction might be to use a synchronization code rather than a population code to store phase vectors.

(c) Oscillatory synchronization code
We shall use the acronym OSC (oscillatory synchronization code) to label a class of phase codes that share many key features of GPC, but store information as synchronization rather than as population vectors. Under the population codes described above (CPC and GPC), the animal's position is decoded by measuring each bump's phase with respect to a fixed reference point, w, as stated by equation (2.6). Each ring performs path integration by shifting its bump against w at an angular frequency that depends linearly upon the animal's running speed, as in equation (2.4). In a GPC network consisting of multiple rings, the slope of this linear relationship can differ among rings (by assigning each ring its own length constant, l n ), but the y-intercept must be zero in all rings to maintain a fixed relationship between track positions and bump phases. That is, each bump must stop moving through its ring (v ¼ 0) whenever the animal stops moving across the track (v ¼ 0). To convert the ring attractor network from GPC to OSC, we relax the requirement that all y-intercepts must equal zero, but retain the requirement that they must be equal to one another. This change is implemented by assigning the angular frequencies of activity bumps to vary with movement velocity in the manner prescribed by oscillatory interference models [10,11]: v n ðtÞ ¼ VðtÞ þ d n vðtÞ; ð2:9Þ where V is referred to as the base frequency because it denotes the bump's angular frequency when the animal's movement velocity is zero. Equation (2.9) may integrated in time to obtain an expression for the phase of the activity bump in ring n as a function of both x and t: where F(t) is the time integral of the base frequency, This value shall be referred to as the temporal reference phase, because it is the sole component of f n that varies with t independently from x. Equations (2.10) and (2.11) assume (without loss of generality) that F and x are both initially zero: The presence of F(t) on the right-hand side of equation (2.10) implies that f n continues to change even when x is held fixed; that is, activity bumps continue moving through their rings even when the animal is sitting still. Consequently, neurons in the rings no longer exhibit spatial tuning functions resembling grid cells. Instead, the neurons burst rhythmically as activity bumps circulate around the rings. If V is assigned a value that lies within the theta frequency band of 4-12 Hz, as in prior oscillatory interference models [10 -20], then neurons in the rings burst at a frequency in the theta range. The burst frequency shifts linearly with v, at a slope determined by d n . If d n differs among rings, then neurons within the same ring always burst at the same frequency, whereas neurons in different rings burst at different frequencies for v = 0 and at the same frequency for v ¼ 0 (because F(t) is equal across all rings). The rodent brain contains 'theta cells' that burst rhythmically at velocity-dependent frequencies between 4 and 12 Hz, but lack strong spatial tuning of their firing rates [17,51,52]. In the OSC network, neurons in the ring attractors behave similarly to such theta cells [12,17,19].
If rings are composed from theta cells that do not exhibit spatial tuning, then the animal's position on the track cannot be decoded by measuring bump positions with respect to w, as in equation (2.6). However, track positions can be decoded if the bump positions are measured in a new reference frame. Position may be decoded from phase by solving equation (2.10) for x to obtain xðf n ; tÞ ¼ f n ðxÞ À w n À FðtÞ 2pd n : ð2:12Þ Equation (2.12) measures the position of the activity bump by comparing it not only against w n (a static reference in ring n), but also against F(t) (a non-stationary reference shared by all rings). It is this non-stationary reference frame for measuring the bump position that distinguishes a synchronization code (such as OSC) from a population code (such as CPC or GPC).
(d) Decoding position from synchrony Equation (2.12) implies that to decode positions from phase, f n must be compared against F(t). To facilitate this, some interference models incorporate a 'reference oscillator' assigned a zero length constant (l 0 ¼ 0), so that its phase is identical to the temporal reference, f 0 ¼ F [11][12][13][14][15][16]. Implementing a reference oscillator allows F to be explicitly observed and measured, but also consumes resources (for example, an additional ring attractor to serve as the reference). An alternative approach is to treat F as a 'hidden state' of the network, which cannot explicitly be measured and thus remains unknown to any external observer or decoder. As long as it is known that rings obey equation (2.9), then the actual value of F can remain unknown, because position can be decoded by comparing the phase of one bump against another, rather than against F (strategies for enforcing obedience to equation (2.9) without a reference oscillator will be discussed below). The bump positions in two rings, i and j, may be compared by subtracting their phases, This expression has the same form as equation (2.6), except that instead of comparing the position of a single bump against its reference phase, equation (2.14) decodes the animal's position on the track by comparing the phase alignment between two bumps,f ij , against a reference alignment,w ij (the alignment between bumps i and j at x ¼ 0). The phase alignment between i and j shifts one full cycle (2p radians) each time the animal traverses a distancel ij ¼ 1/d ij along the track (figure 1c).
rstb.royalsocietypublishing.org Phil. Trans. R. Soc. B 369: 20120526 In an OSC network consisting of N ring attractors, there are N21 unique pairs of rings that can be compared with one another; the total number of pairs is (N 2 2N)/2, but only N21 pairs are non-redundant. Hence, the network represents the animals position as a vector of differences between bump phases,f ¼ ½f 1 ;f 2 ; . . . ;f NÀ1 . Such a vector of bump phase differences shall henceforth be referred to as a synchronization vector, denoted by placing a tilde over the vector of raw bump phases from which it is computed. There are many different ways to definef, depending upon how bump phases are paired up with one another for comparison. For example, one might arbitrarily assign some specific bump phase, f i , to be a 'pseudo-reference' so thatf can then be defined as the vector of all phase differences f i 2 f j for which i = j. An alternative approach, which shall be adopted in the analyses below, is to define the synchronization vector as a first-order difference vector of bump phases, Anyf that contains a complete set of non-redundant phase pairings defines a one-to-one mapping from locations in the environment onto the surface of a torus with N 2 1 dimensions, fðxÞ : ½0;DÞ ! S NÀ1 : ð2:16Þ The length,D, of the track interval encoded by the OSC network depends upon what vector of spatial frequency differences,d ¼ 1/l, is chosen for the ring attractors, in exactly the same way that value of D for the GPC network depends upon what vector of spatial frequencies, d ¼ 1/l, is chosen for the ring attractors (see equation (2.7)). So, in principle, any GPC network's spatial frequency vector, d GPC , could be matched exactly by a corresponding OSC network that contains one additional ring, with spatial frequencies chosen so thatd ¼ d GPC . It follows from this that desirable properties of GPC codes, such as their potential for high coding capacity [5,6] and strong fault tolerance [45], can be shared also by OSC codes. However, OSC has one less degree of freedom than GPC (compare equations (2.7) versus (2.16)), and therefore, an OSC network requires one more ring to achieve the same storage capacity as a comparable GPC network. But importantly, ring attractors obey different dynamics in OSC and GPC networks. Simulations presented below indicate that the cost of implementing each ring may be lower for OSC, raising the possibility that OSC may be more efficient than GPC, despite requiring an additional ring.
Unlike population codes, synchronization codes do not implement a one-to-one mapping of spatial locations onto firing rate vectors (equations (2.1) and (2.3)). Instead, the mapping onto firing rate vectors is one-to-many, because the animal's position is represented by the positions of activity bumps with respect to one another (equation (2.14)), rather than with respect to static reference points in their own rings (equation (2.6)). Consequently, the OSC network maps each location in the environment onto a circular manifold S in firing rate space (figure 1c), containing the set of all rate vectors for which activity bumps are in the same alignment relative to one another, but at different absolute positions in their respective rings. OSC thus possesses a property that GPC lacks: flexibility to represent each location in space by more than one firing rate vector. It shall be conjectured below that this property might make it possible for teleportation errors to be detected and corrected more efficiently under OSC than GPC.

A ring attractor network for synchronization coding
In this section, we present simulations to show how OSC can be implemented by a network of ring attractors composed from spiking neurons. The ring attractor model described here is adapted from Song & Wang's [53] model of angular path integration by head-direction cells. They described a ring attractor composed from three circular layers-one excitatory and two inhibitory-of integrate-and-fire neurons, with movement of the activity bump controlled by the balance of external driving inputs onto the inhibitory layers [38]; equal drive to both inhibitory layers held the bump still, whereas unequal drive pushed the bump clockwise or anticlockwise (depending upon which layer received the stronger driving input). Here, we modify the original circuit, so that the activity bump circulates in only one direction. The model was implemented using an engine for simulating integrateand-fire networks in real time on field-programmable gate array (FPGA) microchips [54] (see electronic supplementary material, Methods).

(a) Ring oscillator circuit
Unidirectional bump circulation requires only one inhibitory layer (rather than two), so in the current model, each ring contains two layers of neurons: one excitatory and the other inhibitory ( figure 2a). There were 108 integrate-and-fire neurons in each layer, and thus 216 neurons in each ring. Ring layers were interconnected by Gaussian weight vectors (see electronic supplementary material, equation S1). Rates of bump circulation were regulated by a velocity signal represented in the mean firing rates of AMPAergic Poisson spike train inputs onto the excitatory layers of the rings. The nth ring's mean Poisson input rate, T n ðtÞ, was linearly modulated around a fixed baseline rate, b, in proportion to the animal's movement velocity along a preferred vector assigned to that ring. Hence, the nth activity bump's circulation frequency is v n ðtÞ % a n ½T n ðtÞ À b þ v b þ 1 n ðtÞ; ð3:1Þ where v b is the mean frequency for T(t) ¼ b (which is identical across rings), 1 n (t) is an error term added to account for frequency noise arising from the Poisson spike inputs, and a n is the slope of the linear relationship between v(t) and T(t) 2 b. The values of a n and v b were empirically determined, so that the oscillation frequency varied within the theta band of 6-9 Hz for values of T ranging between 1 and 3 kHz (figure 2b). The high mean firing rates of the Poisson inputs were intended to represent the summed influence of noisy synaptic inputs from a large number of neurons with velocity-dependent firing rates, as in [53].  [11 -17]. The scalar spatial frequency, d n (equations (2.9) and (2.10)), must now be replaced by a Cartesian vector, d n ¼ l À1 n cos u n sin u n ; ð3:2Þ which defines a 'preferred' direction, u n , along which displacement of the animal's position causes the nth ring's phase, f n (t), to shift against the global reference phase, F(t), with a slope determined by l n . Equation (2.13) thus becomes

(b) Synchronization coding in two dimensions
which states that the phase alignment (or synchronization) between two ring oscillators, i and j, encodes the animal's position along a two-dimensional vector,d ij ¼ ðd i À d j Þ. Simulated ring oscillators were induced to behave this way by assigning the Poisson rate of driving inputs to each ring as T n (t) % b þ d n . v(t) (equation (3.1)), where v(t) is the animal's movement velocity at time t.
Here, we implement a minimal oscillatory interference model for grid cells in an open field, consisting of three oscillators [14,15]. Three ring oscillators integrate the animal's movement velocity along different vectors of identical length, jd 1 j ¼ jd 2 j ¼ jd 3 j ¼ 1/l, but oriented 1208 apart, figure 3). Substituting these values into equation (3.3) yields a coding function,fðxÞ, that can be inverted to decode position from synchrony as follows: This function decodes a two-dimensional synchronization vector to specify the animal's position within a rhombus-shaped region of the environment,D, with sides of length L ¼ 4p/ p 3jd ij | (figure 3c). Poisson velocity inputs give rise to independent frequency noise in each ring, denoted by 1 n in equation (3.1). This frequency noise is directly analogous with noisy drifting of the activity bumps in continuous attractor models. Integration of this frequency noise produces path integration errors, so that the decoded position signal derived by equation (3.4) deviates from the animal's true position. Becausef has the same number of dimensions as the environment (two), teleportation errors cannot occur in this minimal grid cell model (strategies for correcting teleportation errors in larger networks are discussed in §3e). Figure 3e shows how path integration error accumulates in a simulation of three uncoupled ring oscillators. All ring phases were initialized to identical values, , so the starting position of the simulated animal was at the origin. Identical Poisson inputs ranging from T ¼ 1.5 to 2.5 kHz were then delivered constantly to all three rings, encoding a movement velocity of zero, so the 'true' position remained fixed at the origin throughout the simulation. Under these conditions, xðfÞ was observed to drift along a Brownian trajectory as error accumulated with time (figure 3e, left).

(c) Phase resetting by grid cells
Because the position estimate is decoded from the synchronization vector,f, and not from the raw oscillator phases, f, reducing path integration error does not mandate reduction of frequency noise in the rings, but instead merely requires that any frequency noise that is present must be shared among the rings, by becoming absorbed into the temporal reference phase, F [14,55]. This requires some mechanism for coupling the ring oscillators together in a way that allows them to share noise. Here, we propose how grid cells might provide such a mechanism.
Grid cells were simulated by single-compartment neurons that detected synchrony among inputs from all three ring oscillators. Each grid cell received input from the inhibitory layer of one ring, and from and the excitatory layers of the other two rings (figure 3c). Input from ring n was weighted by a Gaussian vector with a centre phase, m n , that corresponded to the spatial reference phase, w n , in equation (2.12) (for explanation, see the electronic supplementary material, equation (S3)). Therefore, assigning the centre phases of the input weights determined which particular alignment of the three activity bumps would produce synchronized input to the grid cell. Specifically, a grid cell's oscillatory inputs from rings n ¼ 1, 2, 3 were synchronized wheñ ð3:5Þ which shall be referred to as the grid cell's target synchronization vector. Whenf ¼w, the grid cell was maximally excited to burst along with its synchronized inputs from the three rings. Disregarding path integration error,f ¼w is satisfied at a set of locations which form a hexagonal lattice, and these are the vertices of the grid cell's firing field. The grid cell has a vertex at the origin of the plane ifw ¼ ð0; 0Þ, which occurs when If the spatial reference phase of ring n is shifted by an arbitrary offset, w n þ Dw n , then the grid field translates in the direction of ring n's frequency vector, u n , by a distance Dw n Â L=2p.
Grid cells not only received input from the rings, but also sent feedback projections to the rings, which targeted only the excitatory but not the inhibitory layer. Like feedforward projections, feedback projections were also weighted by Gaussian vectors, with centre phases tuned so that when a grid cell fired, the system was nudged towards a basin of attraction at the point wheref ¼w (see electronic supplementary material, figure S1). This recurrent loop between ring oscillators and the grid cell formed a kind of 'oscillatory attractor' network, where the grid cell greedily tried to keep itself active by forcing the ring oscillators into the specific alignment that caused it to fire.
To simulate the oscillatory attractor with a single grid cell, the three ring oscillators were initialized with identical bump phases, so that the simulated animal's starting position was initialized at the origin. Centre phases for inputs to the grid cell were assigned so the starting position was also the attractor state,fð0Þ ¼w ¼ ð0; 0Þ. Identical driving inputs of 2 kHz were delivered throughout the simulation to encode a movement velocity of zero (that is, a stationary animal). Simulation showed that the decoded position signal remained well confined to a small neighbourhood surrounding the origin wheref ¼w (figure 3e, middle), in contrast to the Brownian drift that was observed without coupling. There was still some residual path integration error in the decoded position signal, causing it to fluctuate within a small neighbourhood of the origin. This residual error occurred because resetting of the ring phases by feedback from the grid cell is noisy (it does not reliably reset the phase difference vector to exactlyf ¼w on every cycle), and because phase resetting occurs only once per theta cycle. To reduce within-cycle error accumulation, two additional grid cells were added to the circuit, yielding a total of three grid cells. For the sake of symmetry, each of the three grid cells received its inhibitory input from a different ring oscillator, and received excitatory input from the remaining two rings (see electronic supplementary material, equation (S4)). All three grid cells were assigned to have overlapping grid fields by setting their target synchronization vectors equal to one another, w 1 ¼w 2 ¼w 3 ; where subscripts index the three grid cells. This caused the three grid cells to fire at identical locations, but they did not fire at identical times; they were assigned to fire on staggered phases of the theta cycle by setting their centre phases so that their spatial reference phase vectors differed by constant offsets: Consequently, the three grid cells cooperatively delivered feedback pulses to the ring oscillators on three distinct phases of the theta cycle, an arrangement referred to as triphasic entrainment. Under triphasic entrainment, the decoded position signal remained tightly confined near xðfÞ ¼ ð0; 0Þ throughout a 5 s simulation (figure 3e, right).
(d) Microcircuit architecture for a grid module . Grid cells at the same row and column position in different sheets have the same spatial phase, but fire on staggered temporal phases of the theta cycle (consistent with recent data [56] showing that simultaneously recorded pairs of entorhinal neurons tend to fire at characteristic phase offsets from one another). Feed-forward weight vectors obeyed the convention that each grid cell received inhibitory input from one ring, and excitatory input from the other two rings. A formula for assigning centre phases that meet these constraints is given by the electronic supplementary material, equation (S6). Each grid cell sends feedback to all three rings, to reset their phases in such a way that when any given grid cell fires, the synchronization state is pushed towards its own target synchronization vector,f !w p;q k (where k indexes the sheet, and p, q indexes the row and column position of a grid cell within its sheet). This places grid cells at different positions within the same sheet in competition with one another, and at the same position in different sheets in cooperation with one another, to lock the ring phases into their own preferred phase alignments,w p;q 1 ¼w p;q 2 ¼w p;q 3 . Such competition endows the grid module circuit with heteroclinic stability in synchronization space, so that the system rests 'uneasily' in a discrete set of semi-stable synchronization states, each preferred by a different grid cell.
To demonstrate the activity of a single grid module, a 3 s simulation was run in which the Poisson velocity input to the rings was assigned to encode movement in the rightward direction along the horizontal at a constant velocity (figure 4b).
Neural activity propagated through the rings and the grid sheets as the simulated animal moved along a straight path   ). As in prior oscillatory interference models [10][11][12][13][14][15][16][17][18][19][20], simulated grid cells exhibit hexagonal firing fields, as well as temporal modulation of their spike trains by theta oscillations. Membrane voltages of individual grid cells were qualitatively similar to intracellular recordings of grid cells from behaving rodents [57][58][59], in that they were modulated by subthreshold theta oscillations when the animal was outside the grid field, and then spikes were generated during passage through grid fields (figure 4d). Voltage traces in figure 4d do not exhibit the membrane voltage 'ramps' that precede spiking in rodent grid cells, but such ramping has been shown to emerge when lateral inhibition is present among grid cells [58], which were not included in the implementation simulated here.

(e) Correcting teleportation errors among multiple grid modules
If the network contains more than three rings, then neurons can synthesize spatial tuning functions more complex than hexagonal grids via oscillatory interference. For the general case of a post-synaptic cell that fires when its inputs from N ring oscillators are synchronized, the firing rate map may be approximated as a two-dimensional spatial envelope function [17,18]: w n exp½if n ðxÞ ; ð3:6Þ where i ¼ ffiffiffiffiffiffi ffi À1 p , and w n is the synaptic weight on the input from ring n. Equation (3.6) implies that if the weighting coefficients and local reference phases are properly chosen, then a neuron that detects synchrony among N rings can act as a Fourier synthesizer to generate almost any spatial tuning function, including functions that resemble the firing rate maps of grid, place or border cells [17,18].
If the network is expanded to more than three rings, thenf acquires more dimensions than the two-dimensional spatial environment, and teleportation errors can occur. An error correction mechanism must therefore be implemented to prevent teleportation, by constraining the system to follow only invertible phase trajectories. This is tantamount to coupling the rings together so that they share a common temporal reference phase, because invertible trajectories are precisely those for which there exists a function, F(t), that can substituted into equation (2.12) to assure that all ring phases, f n , yield mutually compatible (non-contradictory) descriptions of the decoded movement trajectory along their individual path integration vectors, d n . If a solution for F(t) exists given some trajectory T, then that trajectory must invertible. Conversely, if T is invertible, then a solution for F(t) must exist, but position can be decoded from the bump phases even if the value of F(t) remains hidden from the decoder (equation (3.3)).
These considerations suggest two possible error correction strategies for synchronization coding networks. One approach would be to explicitly represent F(t) by assigning a reference oscillator to encode its value [11][12][13][14][15][16]; it might then be possible to implement some mechanism that forces a bank of N oscillators to follow only trajectories for which F(t) yields a solution to equation (2.12) that gives mutually compatible position estimates across all oscillators. However, we do not know of proven solutions to this reference oscillator coupling problem for arbitrarily large N. Another approach would be to ignore the temporal phase, F(t), and focus instead upon the spatial phases of grid cells. If each grid module contains three ring oscillators (as in figure 4a), then a network composed from Z grid modules ( presumably with different orientations and spacings) would contain N ¼ 3Z ring oscillators. Preventing oscillators from following noninvertible phase trajectories becomes identical to the problem of prohibiting grid cells across modules from encoding trajectories that deviate from one another. A solution to this problem has previously been proposed by Sreenivasan & Fiete [45], who suggested how an error correction network composed from place cells could enforce fault tolerance upon a population vector code stored by grid cells. Their solution involved no reference oscillator, because it was proposed for a population coding network in which F(t) does not exist at all. We see no reason why a similar error correction mechanism could not be implemented in a synchronization coding network, because even though the value of F(t) would not be explicitly represented by such a solution, its existence would be implicitly guaranteed by rigid coupling among grid modules. An interesting question for future study is whether an error correction mechanism similar to that proposed by Sreenivasan & Fiete [45] might be improved upon-that is, made less costly and more efficient-by implementing it under a synchronization code rather than a population code (see §4).

Discussion
Here, we have shown how a bank of ring attractors can be configured to implement either a population vector code, stored by spatially tuned grid cells, or a synchronization vector code, stored by rhythmically bursting theta cells (which lack spatial tuning). The network exhibits high coding capacity [5,6] and strong fault tolerance [45] under both configurations, but we conjecture that a spatial code might be stored more efficiently by synchronization than population vectors, based on several differences between the two coding schemes: the temporal dynamics of network activity, the reference frame in which activity bumps are measured, and how spatial locations are mapped into firing rate space.

(a) Potential benefits of synchronization coding
Simulations presented above suggest that because of differing temporal dynamics, a synchronization code (OSC) might be implemented using fewer neurons and synapses than a population code (GPC) with similar storage capacity. This may seem counterintuitive, since OSC requires one more ring than GPC (compare equations (2.7) versus (2.16)). However, under GPC, activity bumps must be able to shift through their rings in either direction (and remain stationary when the animal stops moving), and a standard solution for implementing this functionality in a ring attractor circuit requires three layers of neurons [38,53]. By contrast, under OSC, the bumps only need to shift in one direction, and need never remain stationary. We have shown that this functionality can be implemented by a reduced attractor model with only two layers. Further study is needed to verify whether coding capacity is fully preserved under this modification under comparable noise conditions, but if each ring in the network can be built with fewer neurons and synapses, then it is possible that an OSC network might be implemented at a lower cost of resources than a comparable GPC network, with the cost savings proportional to the number of rings. rstb.royalsocietypublishing.org Phil. Trans. R. Soc. B 369: 20120526 As the number of rings in the network increases, so too does the need for an efficient mechanism to prevent teleportation errors by controlling phase noise. Oscillatory interference models have sometimes been criticized as implausible on the grounds of their vulnerability to phase noise, but such criticisms are misplaced, because any high dimensional phase code exhibits 'pathological sensitivity to noise' [45], regardless of whether it is stored by population vectors (as in GPC) or synchronization vectors (as in OSC). Prior studies have proposed plausible mechanisms for noise reduction in oscillatory interference models [16,55] as well as continuous attractor models [45]. Here, we proposed how phase errors in ring oscillators might be corrected through entrainment of theta cells by grid cells (figure 3c), and how reciprocal connections between grid and theta cells could implement an 'oscillatory attractor network' that exhibits heteroclinic stability in phase space (figure 4a). Under such an arrangement, teleportation errors might be corrected by rigidly coupling multiple grid modules together, possibly by adapting a prior solution in which place cells enforce fault tolerance upon a population code stored by grid cells [45]. It remains an open question whether alternative error correction schemes might be possible in synchronization coding networks, and what efficiency gains might be realized by such alternatives. Perhaps by exploiting reference oscillators, or by capitalizing upon the ability to represent a single location by multiple firing rate vectors, synchronization coding might offer possibilities for highly efficient error correction. Further research is needed to compare how the performance of different error correction mechanisms scale with their cost.
Population vectors are decoded by measuring the position of each activity bump within the ring that stores it, whereas synchronization vectors are decoded by measuring the position of an activity bump in one ring with respect to the bump in another (which is tantamount to detecting synchrony among the oscillations generated by different rings). When bump circulation is modulated around a well-defined base frequency (such as theta), the code is endowed with a temporal structure that may be beneficial in a number ways; for example, the carrier frequency defines a specific observational time frame for decoders to interpret the position signal (the length of a single theta cycle), and spike trains acquire a temporal structure that may be beneficial for driving spike-timing-dependent neural plasticity processes that are thought to support learning and memory functions in biological networks [30,32,33,59].

(b) Empirical evidence for synchronization coding
Synchronization coding offers parsimonious explanations for certain temporal properties of spatially tuned neurons in rodents, such as theta rhythmicity and phase precession of spike trains against the local field potential [9-20,26 -32,60]. In rats, pharmacological blockade of theta rhythm disrupts the spatial tuning of grid cells [61,62], as would be expected if grid cells derive their spatial tuning from synchronization of theta oscillations. However, place cells continue to exhibit spatial firing after similar disruptions of theta [62,63], raising questions about whether theta is essential for all spatial coding. In mammals other than rodents, such as bats [64], place and grid cells appear not to be strongly modulated by theta oscillations (but see [65]). Such findings raise further questions about whether theta oscillations play an essential role in spatial coding. However, from the standpoint of synchronization coding, there is nothing special about the theta frequency. The base frequency for the synchronization code (V(t) in equation (2.9)) need not lie in the theta band; it could be shifted to a higher or lower frequency without altering the essential properties of the code. In vitro studies of bat neurons suggest that these neurons may oscillate at a frequency lower than theta, so it is possible that they might implement a synchronization code in a different frequency band [66].
All synchronization coding models make one essential prediction: the brain should contain oscillators that shift phase against one another as a function of an animal's position in its environment. This prediction is well supported by data from rodents running on linear tracks, where field potential theta oscillations shift phase against the spikes of place cells [9,26,28,29], grid cells [27,67] and interneurons [29,68] as a function of the animal's position on the track. In two-dimensional open field environments, theta cell burst frequencies have been reported to vary with a rat's movement direction in a manner consistent with synchronization coding [17]. But phase precession of place cell spikes against the field potential in open fields seems to depend upon the distance the animal has travelled through a place cell's firing field, regardless of movement direction [26][27][28]. This is problematic, because if the animal's allocentric position in two-dimensional space is encoded by synchrony among theta oscillators, then phase precession should be sensitive to movement direction. Burgess [14] has proposed a possible explanation for this discrepancy, showing that phase precession would not depend upon direction if place and grid cells detected synchrony among theta oscillators with correlated amplitude and frequency. But if theta oscillations that provide input to these cells were recorded at their source of origin (rather than in a post-synaptic place or grid cell), they would still be predicted to shift phase against one another in a manner that depends upon movement direction, and this has not yet been observed. Further experiments are thus warranted to investigate whether any theta-modulated regions in the rodent brain produce oscillations that shift phase against one another in the manner that could support a synchronization code for space.