Skip to content Skip to navigation

Connexions

You are here: Home » Content » A Model of a Grid Cell

Navigation

Recently Viewed

This feature requires Javascript to be enabled.

A Model of a Grid Cell

Module by: Kathryn Ward, Steven J. Cox. E-mail the authors

User rating (How does the rating system work?)
Ratings

Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

How to rate a module

Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

:
(0 ratings)

Summary: The brain has the ability to build an internal map of its environment, and an active area of research concerns understanding how the brain performs this important function. One type of cell believed to play a vital role is known as a grid cell. Many experiments are being performed in which the researcher records the firing patterns of grid cells as a rat explores an environment, and it is often necessary to simulate these experiments. This module explains how to set the grid, simulate the rat's motion, calculate the rat's distance to the grid, and determine the firing pattern of a grid cell.

Note: Your browser may not currently support MathML. See our browser support page for additional details. You can always view the correct math in the PDF version.

Introduction

A network spanning several regions in the brain provides the mechanisms for spatial representation. The hippocampus, a center for both learning and memory, is an important component of this network (O'Keefe and Nadel [1]). The majority of cells in the hippocampus will primarily spike at one location in an environment. These cells, known as place cells, can collectively represent the position within an environment (Solstad et al. [3]). One large source of input to place cells are a group of cells in the medial entorhinal cortex (MEC) known as grid cells, which primarily spike in hexagonal patterns in the environment (Witter and Moser [4]). Thus, in order to understand the brain's spatial representation of its environment, it is essential to understand the behavior of grid cells in the MEC, place cells in the hippocampus, and the interaction between them. The work presented here focuses on one portion of this problem: modelling grid cells. We consider the setting of a rat exploring a rectangular enclosure, but this model could easily be extended to a variety of settings.

Properties of the Grid

To simulate the behavior of a grid cell, it is first necessary to set its grid. We parameterize a grid with three scalars, the tilt

0 θ < π / 3 , 0 θ < π / 3 , (1)

the base length

0 < b < , 0 < b < , (2)

and the offset δ=(ρ,φ),δ=(ρ,φ), which has a magnitude

0 < ρ < b 0 < ρ < b (3)

and a direction

0 φ < 2 π . 0 φ < 2 π . (4)

We will make frequent use of the grid height

h = b tan ( π / 3 ) / 2 h = b tan ( π / 3 ) / 2 (5)

and grid center

c = ( ρ cos φ , ρ sin φ ) . c = ( ρ cos φ , ρ sin φ ) . (6)

The set of grid points, G(θ,b,δ),G(θ,b,δ), forms hexagonal patterns. This set is the union of two sets, G1(θ,b,δ)G1(θ,b,δ) and G2(θ,b,δ),G2(θ,b,δ), that are staggered with respect to each other. The set is defined by

G ( θ , b , δ ) = G 1 ( θ , b , δ ) G 2 ( θ , b , δ ) , G ( θ , b , δ ) = G 1 ( θ , b , δ ) G 2 ( θ , b , δ ) , (7)

where

G 1 ( θ , b , δ ) = c + k b ( cos θ , sin θ ) + 2 j h ( - sin θ , cos θ ) : j , k Z , G 1 ( θ , b , δ ) = c + k b ( cos θ , sin θ ) + 2 j h ( - sin θ , cos θ ) : j , k Z , (8)
G 2 ( θ , b , δ ) = c + ( k + ( 1 / 2 ) ) b ( cos θ , sin θ ) + ( 2 j - 1 ) h ( - sin θ , cos θ ) : j , k Z . G 2 ( θ , b , δ ) = c + ( k + ( 1 / 2 ) ) b ( cos θ , sin θ ) + ( 2 j - 1 ) h ( - sin θ , cos θ ) : j , k Z . (9)

Figure 1 shows an example of G,G, where the elements of G1 are marked with black circles, and the elements of G2 are marked with red diamonds. The three grid parameters, height, and center are also shown.

The latitudes of the grid have slope m=tanθ.m=tanθ. The grid meridian, M, is the line that intersects the grid center and runs perpendicular to the grid latitudes, given by

M = ( y 1 , y 2 ) 2 : y 2 = c 2 - y 1 - c 1 m if θ 0 , M = ( y 1 , y 2 ) 2 : y 2 = c 2 - y 1 - c 1 m if θ 0 , (10)
M = ( y 1 , y 2 ) 2 : y 1 = 0 if θ = 0 . M = ( y 1 , y 2 ) 2 : y 1 = 0 if θ = 0 . (11)

The grid meridian is marked with a bold line in Figure 4.

Figure 1: Graphical demonstration of parameters. This plot shows an example of a grid, G(θ,b,δ)G(θ,b,δ), where θ=0.925,b=1.146,ρ=0.496,θ=0.925,b=1.146,ρ=0.496, and φ=0.925.φ=0.925. The black circles and red diamonds represent the elements of G1 and G2,G2, respectively. We have drawn a large circle around the grid center, c.
Figure 1 (gridParam.png)

Motion of the Rat

We model experiments in which a rat explores a rectangular enclosure. Before determining the behavior of the grid cells, we must simulate the rat's motion within its enclosure. We begin by uniformly discretizing over time and setting the parameters defined in Table 1 and Figure 2.

Table 1: Parameter Definitions. The rat's motion is determined by its position, velocity, and acceleration vectors. We assume the rat is confined in a rectangular enclosure defined by its width s1 and height s2.s2. We also assume the rat is rectangular and specify its its radius r=(r1,r2),r=(r1,r2), where r1 is half the rat's length, and r2 is half the rat's width. We take the rat's position, x,x, to be the location of the rat's center.
s = ( s 1 , s 2 ) s = ( s 1 , s 2 ) (width, height) of enclosure
r = ( r 1 , r 2 ) r = ( r 1 , r 2 ) rat's dimensions
x = ( x 1 , x 2 ) x = ( x 1 , x 2 ) rat's position
v = ( v 1 , v 2 ) v = ( v 1 , v 2 ) rat's velocity
a = ( a 1 , a 2 ) a = ( a 1 , a 2 ) rat's acceleration
Δ t Δ t length of each time interval
Figure 2: Demonstration of parameters specifying the rat's size.
Figure 2 (ratFig.png)

We let ti=iΔti>0.ti=iΔti>0. We assume the rat's acceleration is constant over each time interval and set ai=a(t)ai=a(t) for tit<ti+1.tit<ti+1. We begin by initializing the rat's position and velocity, x(t0)x(t0) and v(t0).v(t0). Then, i>0i>0, given x(ti)x(ti) and v(ti)v(ti), we follow the algorithm outlined below to find x(ti+1)x(ti+1) and v(ti+1).v(ti+1). This algorithm is adapted from the algorithm presented by Samsonovich and Ascoli [2].

Algorithm: Simulation of the Rat's Motion

  1. Select a˜ia˜i from a Gaussian distribution with mean μ=0μ=0 and standard deviation σ.σ.
  2. Set x˜(ti+1)=x(ti)+v(ti)Δt+a˜i(Δt)2/2.x˜(ti+1)=x(ti)+v(ti)Δt+a˜i(Δt)2/2.
  3. If rjxj˜(ti+1)sj-rjrjxj˜(ti+1)sj-rj for j=1,2,j=1,2, the proposed new position, x˜(ti+1),x˜(ti+1), is within the enclosure. Set x(ti+1)=x˜(ti+1)x(ti+1)=x˜(ti+1) and ai=a˜i.ai=a˜i. Proceed to step (4). If not, the proposed position is outside the enclosure. Reject x˜(ti+1)x˜(ti+1) and a˜ia˜i and repeat steps (1) through (3).
  4. Set v(ti+1)=v(ti)+aΔt.v(ti+1)=v(ti)+aΔt.

By following the above algorithm, the rat's motion can be simulated for any finite length of time. There are two modifications to the above algorithm, however, that make the resulting path more realistic. First, specify a maximum velocity, vmax.vmax. In step (4), if |v(ti+1)||vmax|,|v(ti+1)||vmax|, reduce v(ti+1)v(ti+1) to 90 percent of its value, effectively forcing the rat to decelerate over the next time interval. Second, if an acceptable value for a˜ia˜i has not been found after several tries, set v(ti)=(0,0).v(ti)=(0,0). This signifies that the rat has been stopped by a wall of the enclosure.

Distance to the Grid

We define the distance of the rat to the grid using the metric

d ( x , G ( θ , b , δ ) ) = min { | x - y | : y G ( θ , b , δ ) } , d ( x , G ( θ , b , δ ) ) = min { | x - y | : y G ( θ , b , δ ) } , (12)

where x denotes the position of the rat. We follow the algorithm outlined below to efficiently calculate d(x,G).d(x,G). All formulas given are derived by examining the geometry of the grid and are based on the assumption that θ0.θ0. Figure 3 and (Reference) each show an example of G(θ,b,δ)G(θ,b,δ) that may assist in the understanding of the algorithm.

Figure 3: Demonstration of the distance algorithm. This example demonstrates our algorithm for calculating d(x,G).d(x,G). As in Figure 1, G1 is marked with black circles, and G2 is marked with red diamonds. The position of the rat is denoted with a large X. We have marked the grid meridian with a dark line, drawn a large circle around the grid center c, and drawn a large square around p, the projection of x onto the meridian. For this example, n1=1,n1=1,n2=3,n2=3,b11(g2)=b21(g2),b11(g2)=b21(g2), and b12(g1)=b22(g1).b12(g1)=b22(g1). We used the following parameter values: θ=0.819,b=1.146,ρ=0.496,φ=1.745,θ=0.819,b=1.146,ρ=0.496,φ=1.745, and x=(-0.5,-1.8).x=(-0.5,-1.8).
Figure 3 (gridEx1.png)
Figure 4: Another demonstration of the distance algorithm. As in Figure 3, this example demonstrates our algorithm for calculating d(x,G).d(x,G). For this example, n1=0,n1=0,n2=1,n2=1,b11(g1)=b22(g1),b11(g1)=b22(g1), and b12(g2)=b21(g2).b12(g2)=b21(g2). We used the following parameter values: θ=0.641,b=1.349,ρ=0.319,φ=0.641,θ=0.641,b=1.349,ρ=0.319,φ=0.641, and x=(1.5,0.3).x=(1.5,0.3).
Figure 4 (gridEx2.png)

Algorithm: Calculation of d(x,G)d(x,G)

  1. Find p=(p1,p2)p=(p1,p2), the projection of x onto the meridian, given by
    p1=m2x1-mx2+mc2+c1m2+1, and p2=c2-p1-c1m,p1=m2x1-mx2+mc2+c1m2+1, and p2=c2-p1-c1m,(13)
    where c=(c1,c2).c=(c1,c2). We have drawn a large square around this projection in Figure 4.
  2. Compute the two distances
    1|p-c| and 2|p-x|1|p-c| and 2|p-x|(14)
    and the associated integers
    n1= floor (1/h) and n2= floor 2(b/2).n1= floor (1/h) and n2= floor 2(b/2).(15)
    These values permit us to box in the position, x.x. The four lines used to create this box are shown by dotted lines in Figure 4 and are given by
    b1k=(y1,y2)2:y2=q2k+(y1-q1k)m, for k=0,1,b1k=(y1,y2)2:y2=q2k+(y1-q1k)m, for k=0,1,(16)
    b2k=(y1,y2)2:y2=w2k-(y1-w1k)/m, for k=0,1,b2k=(y1,y2)2:y2=w2k-(y1-w1k)/m, for k=0,1,(17)
    where
    (q1k,q2k)=c+sign(p2-c2)(n1+k)h(-sinθ,cosθ)(q1k,q2k)=c+sign(p2-c2)(n1+k)h(-sinθ,cosθ)(18)
    and
    (w1k,w2k)=p+sign(x1-p1)(n2+k)(b/2)(cosθ,sinθ).(w1k,w2k)=p+sign(x1-p1)(n2+k)(b/2)(cosθ,sinθ).(19)
    The line b1k parallels the latitudes, and the line b2k parallels the meridian, for k=0,1.k=0,1.
  3. Find g1G1g1G1 and g2G2,g2G2, the two elements of the grid G(θ,b,δ)G(θ,b,δ) that lie on the boundary of the box. These two vertices are the closest vertices to the rat with respect to the metric d(x,G).d(x,G). The four corners of the box are given by the four intersections of the lines b1k and b2k for k=0,1.k=0,1. For j=0,1,j=0,1, if nj is even, bj0 crosses only elements of G1, and bj1 crosses only elements of G2.G2. On the other hand, if nj is odd, bj0 crosses only elements of G2,G2, and bj1 crosses only elements of G1.G1. Thus, the two corners of the box corresponding to the grid vertices g1 and g2 form a diagonal pair given by solving
    b10(g)=b20(g) and b11(g')=b21(g') if n1+n2 is even ,b10(g)=b20(g) and b11(g')=b21(g') if n1+n2 is even ,(20)
    b10(g)=b21(g) and b11(g')=b20(g') if n1+n2 is odd .b10(g)=b21(g) and b11(g')=b20(g') if n1+n2 is odd .(21)
  4. Calculate
    d2(x,G(θ,b,δ))=min{|x-g1|2,|x-g2|2}.d2(x,G(θ,b,δ))=min{|x-g1|2,|x-g2|2}.(22)

Firing Pattern

All that remains is to determine the firing pattern of the grid cell. Each grid cell has an efficacy value, ε,ε, that incorporates a refractory period. When the cell spikes, ε is set to 0. Then, ε recovers exponentially to its base value of 1 at a rate determined by the time constant τ,τ,

ε ( t ) = 1 - exp ( - ( t - t s ) / τ ) , ε ( t ) = 1 - exp ( - ( t - t s ) / τ ) , (23)

where ts is the time of the most recent spike of the cell.

The probability, P(x,G,ε,γ)P(x,G,ε,γ), that a grid cell fires is then taken from a Gaussian distribution with a width dependent on the rat's distance to the grid, the grid's base, the cell's efficacy value, and the scaling parameter γ,γ,

P ( x , G , ε , γ ) = exp - ε d 2 ( x , G ) γ b 2 . P ( x , G , ε , γ ) = exp - ε d 2 ( x , G ) γ b 2 . (24)

The parameter γ is a constant used to determine the spread of the firing fields of the grid cell. After calculating the probability P,P, we select a random number η from a uniform distribution. If Pη,Pη, the grid cell fires; if P<η,P<η, the grid cell does not fire. Figure 4 shows the resulting firing fields for three different values of γ.γ. As expected, the firing fields of the grid cell form hexagonal patterns as the rat explores its enclosure.

Figure 5: Comparison of the effect of γ values on the firing fields of the cell. As γ increases, the width of the Gaussian increases, causing the spread of the firing fields to increase. (top left) Each dot represents a grid point in the set G(θ,b,δ).G(θ,b,δ). For all plots, θ=π4θ=π4 radians, b=15b=15 cm, ρ=2ρ=2 cm, and φ=π4φ=π4 radians. The rat runs the same trajectory for all values of γ, and each red dot represents a spike of the grid cell. Values of γ: 0.01 (top right), 0.03 (bottom left), and 0.05 (bottom right).
Figure 5 (gammaComp.png)

References

  1. O'Keefe, J. and Nadel, L. (1978). The Hippocampus as a Cognitive Map. Clarendon: Oxford.
  2. Samsonovich, A. and Ascoli, G. (2005). A simple neural network model of the hippocampus suggesting its pathfinding role in episodic memory retrieval. Learning and Memory, 12, 193-208.
  3. Solstad, T. and Moser, E. and Einevoll, G. (2006). From grid cells to place cells: a mathematical model. Hippocampus, 16, 1021-1031.
  4. Witter, M.P. and Moser, E.I. (2006). Spatial representation and the architecture of the entorhinal cortex. Trends in Neuroscience, 29, 671-678.

Content actions

Give Feedback:

E-mail the module authors | Rate module ( How does the rating system work?)

Rating system

Ratings

Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

How to rate a module

Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

(0 ratings)

Download:

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.

| A lens (?)

Definition of a lens

Lenses

A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual Connexions member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks