Learning Grid Cells as Vector Representation of Self-Position Coupled with Matrix Representation of Self-Motion

1 INTRODUCTION . Imagine you are walking in your living room in the dark at night without any visual cues . Purely based on your self-motion , you know where you are while you are walking simply by integrating your self-motion . This is called path integral ( Hafting et al . ( 2005 ) ; Fiete et al . ( 2008 ) ; McNaughton et al . ( 2006 ) ) . You can also plan your path to the light switch or to the door . This is called path planning ( Fiete et al . ( 2008 ) ; Erdem & Hasselmo ( 2012 ) ; Bush et al . ( 2015 ) ) . You need to thank your grid cells for performing such navigation tasks . Figure 1 ( a ) shows Dr. May-Britt Moser , who together with Dr. Edvard Moser , won the 2014 Nobel Prize for Physiology or Medicine , for their discovery of the grid cells ( Hafting et al . ( 2005 ) ; Fyhn et al . ( 2008 ) ; Yartsev et al . ( 2011 ) ; Killian et al . ( 2012 ) ; Jacobs et al . ( 2013 ) ; Doeller et al . ( 2010 ) ) ∗Equal contributions . in 2005 . Their thesis advisor , Dr. John O ’ keefe , shared the prize for his discovery of the place cells ( O ’ Keefe ( 1979 ) ) . Both the place cells and grid cells are used for navigation . The discoveries of these cells were made by recording the activities of the neurons of the rat when it moves within a square region . See Figure 1 ( b ) . Some neurons in the Hippocampus area are place cells . Each place cell fires when the rat moves to a particular location , and different place cells fire at different locations . The whole collection of place cells cover the whole square region . The discovery of grid cells was much more surprising and unexpected . The grid cells exist in the Entorhinal cortex . Each grid cell fires at multiple locations , and these locations form a regular hexagon grid . See Figure 1 ( c ) . The grid cells have been discovered across mammalian species , including human . See Figure 1 ( d ) . In this paper , we propose a representational model to explain the hexagon patterns of the grid cells , and to explain how the grid cells perform path integral and path planning . We shall show that the grid cells are capable of error correction , which provides a justification for the grid cells . Figure 2 illustrates our model . The 2D self-position of the agent is represented by a highdimensional vector , and the 2D self-motion or displacement of the agent is represented by a matrix that acts on the vector . Each component of the vector is a unit or a cell . In Figure 2 , x denotes the 2D self-position , v ( x ) is the high-dimensional vector representation of the 2D x . ∆x is the self-motion or one-step displacement . M ( ∆x ) is the matrix representation of ∆x . The model consists of the following three sub-models . ( 1 ) Vector-matrix multiplication . The movement from the current position x to the next position x + ∆x is modeled by matrix-vector multiplication , i.e. , the vector of the next position v ( x + ∆x ) is obtained by multiplying the matrix of the motion , M ( ∆x ) , to the vector of the current position v ( x ) . ( 2 ) Magnified local isometry . The angle between two nearby vectors equals the Euclidean distance |∆x| between the two corresponding positions multiplied by a magnifying factor . ( 3 ) Global adjacency kernel . The inner product between two vectors 〈v ( x ) , v ( y ) 〉 measures the adjacency between the two corresponding positions , which is defined by a kernel function f of the Euclidean distance |x − y| between the two positions x and y . One additional feature is that the whole vector v ( x ) is partitioned into multiple sub-vectors , and each sub-vector is driven by an associated sub-matrix . The whole system is like a multi-arm clock , with each arm rotating at a magnified speed and spanning a 2D sub-manifold on a high-dimensional sphere . Our experiments show that sub-models ( 1 ) and ( 2 ) are sufficient for the emergence of the hexagon grid patterns of the grid cells . Sub-model ( 2 ) makes the vector representation robust to noises or errors due to the magnification of the distance . Sub-model ( 3 ) enables unique decoding of the position from the vector , because f is unimodal and peaked at 0 , and it may serve as the link between the grid cells and place cells . Together with sub-model ( 1 ) , sub-model ( 3 ) enables path integral and path planning , because the adjacency 〈v ( x ) , v ( y ) 〉 informs the Euclidean distance |x − y| . All the three sub-models can be implemented by one-layer neural networks . 2 CONTRIBUTIONS AND RELATED WORK . The following are the contributions of our work . ( 1 ) We propose a representational model for grid cells , where the self-position is represented by a vector and the self-motion is represented by a matrix that acts on the vector . ( 2 ) We show that our model can learn hexagon grid patterns . ( 3 ) We show our model is capable of path integral , path planning , and error correction . Many mathematical and computational models ( Burak & Fiete ( 2009 ) ; Sreenivasan & Fiete ( 2011 ) ; Blair et al . ( 2007 ) ; de Almeida et al . ( 2009 ) ) have been proposed to explain the formation and function of grid cells . Compared to previous computational models on grid cells , our model only makes very generic assumptions about the algebra and geometry of the representational scheme , without assuming Fourier plane waves or clock arithmetics . Recently , deep learning models ( Banino et al . ( 2018 ) ; Cueva & Wei ( 2018 ) ) have been proposed to learn the grid-like units for navigation . Our work was inspired by them . Compared with these models , our model has explicit algebra and geometry . In terms of algebra , our model has explicit matrix representation of self-motion , and the change of self-position is modeled by vector-matrix multiplication . In terms of geometry , our model assumes that the vector rotates while the agent moves , and our model assumes magnified local isometry and global adjacency kernel based on the angles between the vectors . Expressing the adjacency kernel as the inner product between the vectors is related to the kernel trick ( Cortes & Vapnik ( 1995 ) ) , random Fourier basis ( Ng et al . ( 2002 ) ) , and spectral clustering ( Ng et al . ( 2002 ) ) . 3 REPRESENTATIONAL MODEL OF GRID CELLS . Consider an agent navigating within a domainD = [ 0 , 1 ] × [ 0 , 1 ] ( actually the shape does not matter , and it can be R2 ) . We can discretize D into an N × N lattice . N = 40 in our experiments . Let x = ( x1 , x2 ) ∈ D be the self-position of the agent . x is 2D . Suppose the agent wants to represent its self-position by a d-dimensional hidden vector v ( x ) . We introduce the following three sub-models . 3.1 SUB-MODEL 1 ABOUT MOTION ALGEBRA : VECTOR-MATRIX MULTIPLICATION . Suppose at a position x , the self-motion or one-step displacement is ∆x , so that the agent moves to x+ ∆x after one step . We assume that v ( x+ ∆x ) = M ( ∆x ) v ( x ) , ( 1 ) where M ( ∆x ) is a d × d matrix that depends on ∆x . While v ( x ) is the vector representation of the self-position x , M ( ∆x ) is the matrix representation of the self-motion ∆x . We can illustrate the motion model by the following diagram : Motion : xt +∆x −−−−−→ xt+1 ↓ ↓ ↓ v ( xt ) M ( ∆x ) × −−−−−→ v ( xt+1 ) ( 2 ) See Figure 2 ( 1 ) . Both v ( x ) and M ( ∆x ) are to be learned . We can discretize ∆x , and learn a motion matrix M for each ∆x . We can also learn a parametric model for M . To this end , we can further parametrize M = I + M̃ ( ∆x ) such that each element of M̃ ( ∆x ) is a quadratic ( or polynomial ) function of ∆x = ( ∆x1 , ∆x2 ) : M̃ij ( ∆x ) = β ( 1 ) ij ∆x1 + β ( 2 ) ij ∆x2 + β ( 11 ) ij ∆x 2 1 + β ( 22 ) ij ∆x 2 2 + β ( 12 ) ij ∆x1∆x2 , ( 3 ) where the coefficients β are to be learned . The above may be considered a second-order Taylor expansion which is expected to be accurate for small ∆x ∈ ∆ , where ∆ is the allowed collection of one-step displacements , e.g. , ±3 grid points in each direction on the 40× 40 grid . The motion model can be considered a linear recurrent neural network ( RNN ) . However , if we are to interpret M as the weight matrix , then the weight matrix is dynamic because it depends on the motion ∆x . One may implement it by discretizing ∆x , so that we have a finite set of ∆x , and thus a finite set of M ( ∆x ) . Then at each time step , the RNN switches between the finite set of motion matrices . This is like the gearing operation of a multi-speed bicycle . 3.2 DISENTANGLED BLOCKS OR MODULES . For the sake of estimation accuracy and computational efficiency , we further assume that M ( ∆x ) is block diagonal , i.e. , we can divide v into K blocks of sub-vectors , v = ( v ( k ) , k = 1 , ... , K ) , and v ( k ) ( x + ∆x ) = M ( k ) ( ∆x ) v ( k ) ( x ) . That is , the vector v consists of sub-vectors , each of which rotates in its own subspace , so that the dynamics of the sub-vectors are disentangled . The assumption of disentangled blocks in our model is related to the modular organization of grid cells in neuroscience ( Stensola et al . ( 2012 ) ) , where a module refers to a region of grid cells where all cells share similar grid scales and orientations . 3.3 SUB-MODEL 2 ABOUT LOCAL GEOMETRY : MAGNIFIED LOCAL ISOMETRY . The above motion algebra alone is not sufficient for learning the vector matrix representations , because a trivial solution is that all the v ( x ) are the same , and the matrix M ( ∆x ) is always identity . We need to properly displace the vectors v ( x ) . So we shall model 〈v ( x ) , v ( y ) 〉 both locally and globally . Let d be the dimensionality of v ( k ) , i.e. , the number of grid cells within the k-th block . For the local geometry , we assume that for each block , 〈v ( k ) ( x ) , v ( k ) ( x+ ∆x ) 〉 = d ( 1− αk|∆x|2 ) , ( 4 ) for all x and ∆x such that αk|∆x|2 ≤ c , i.e. , ∆x ∈ ∆ ( αk ) = { ∆x : αk|∆x|2 ≤ c } . In our experiments , we take c = 1.5. αk can be either designed or learned . Based on sub-model ( 4 ) , ‖v ( k ) ( x ) ‖2 = d for every x . The inner product on the left hand side is d cos ( ∆θ ) where ∆θ is the angle between v ( k ) ( x ) and v ( k ) ( x + ∆x ) . 1 − αk|∆x|2 on the right hand side may be considered a second order Taylor expansion of a function f ( r ) such that f ( 0 ) = 1 , f ′ ( 0 ) = 0 , i.e. , 0 is the maximum , and f ′′ ( 0 ) = −2αk . It is also an approximation to cos ( √ 2αk|∆x| ) . Let ωk = √ 2αk , we have Magnified local isometry : ∆θ = ωk|∆x| , ( 5 ) i.e. , the angle between v ( x ) and v ( x+ ∆x ) magnifies the distance |∆x| by a factor of ωk uniformly for all x . See Figure 2 ( 2 ) . The factor ωk defines the metric of block k .

Summary: This paper proposes a simple and elegant approach to learning "grid-cell like" representations that uses a high-dimensional encoding of position, together with a matrix for propagating position that involves only local connections among the elements of the vector.  The vectors are also constrained to have their inner products reflect positional similarity.  The paper also shows how such a representation may be used for path planning.