Actionable Neural Representations: Grid Cells from Minimal Constraints
Authors: Will Dorrell
Peter E. Latham
Timothy E. J. Behrens
James C. R. Whittington
Venue: ICLR 2023 poster (2023)
Keywords: Grid Cells
Representation Theory
Theoretical Neuroscience
Normative Models

Abstract: To afford flexible behaviour, the brain must build internal representations that mirror the structure of variables in the external world. For example, 2D space obeys rules: the same set of actions combine in the same way everywhere (step north, then south, and you won't have moved, wherever you start). We suggest the brain must represent this consistent meaning of actions across space, as it allows you to find new short-cuts and navigate in unfamiliar settings. We term this representation an  `actionable representation'. We formulate actionable representations using group and representation theory, and show that, when combined with biological and functional constraints - non-negative firing, bounded neural activity, and precise coding - multiple modules of hexagonal grid cells are the optimal representation of 2D space. We support this claim with intuition, analytic justification, and simulations. Our analytic results normatively explain a set of surprising grid cell phenomena, and make testable predictions for future experiments. Lastly, we highlight the generality of our approach beyond just understanding 2D space. Our work characterises a new principle for understanding and designing flexible internal representations: they should be actionable, allowing animals and machines to predict the consequences of their actions, rather than just encode.

Published as a conference paper at ICLR 2023
ACTIONABLE NEURAL REPRESENTATIONS: GRID CELLS FROM MINIMAL CONSTRAINTS
William Dorrell, Peter Latham
Timothy E.J. Behrens UCL & Oxford
James C.R. Whittington
Gatsby Unit, UCL
Oxford & Stanford
dorrell 1 com
jerwhi tt tt aetingtonngmma comm
ABSTRACT
To afford flexible behaviour, the brain must build internal representations that mir- ror the structure of variables in the external world. For example, 2D space obeys rules: the same set of actions combine in the same way everywhere (step north, then south, and you won't have moved, wherever you start). We suggest the brain must represent this consistent meaning of actions across space, as allows you to find new short-cuts and navigate in unfamiliar settings. We term this repre- sentation an 'actionable representation'. We formulate actionable representations using group and representation theory, and show that, when combined with biolog- ical and functional constraints non-negative firing, bounded neural activity, and precise coding- multiple modules of hexagonal grid cells the optimal repre- sentation of 2D space. We support this claim with intuition, analytic justification, and simulations. Our analytic results normatively explain a set of surprising grid cell phenomena, and make testable predictions for future experiments, Lastly, we highlight the generality of our approach beyond just understanding 2D space. Our work characterises new principle for understanding and designing flexible inter- nal representations: they should be actionable, allowing animals and machines predict the consequences of their actions, rather than just encode.
INTRODUCTION
Animals should build representations that afford flexible behaviours. However, different representa- tion make some tasks easy and others hard; representing red versus white is good for understanding wines but less good for opening screw-top versus corked bottles. central mystery in neuroscience is the relationship between tasks and their optimal representations. Resolving this requires under- standing the representational principles that permit flexible behaviours such as zero-shot inference.
Here, introduce actionable representations, representation that permits flexible behaviours. Being actionable means encoding not only variables of interest, but also how the variable transforms. Actions cause many variables transform in predictable ways. For example, actions in 2D space obey rules; north, east, south, and west, have universal meaning, and combine in the same way everywhere. Embedding these rules into a representation of self-position permits deep inferences: having stepped north, then east, then south, an agent can infer that stepping west will lead home, having never taken that path a zero-shot inference (Figure TA).
A)
B)
GRID CELL
MODULE OF GRIDS
THREE GRID CELLS IN OTHER MODULES
s
W
Figure 1: A 2D space is defined by rules, e.g. at all positions north south. B Left: Entorhinal grid cells are hexagonally tuned cells (orange). Different cells within module are translated copies (orange/blue/greem). Right: Different modules have different lattice scale (pink/blue/green).

---

Published as a conference paper at ICLR 2023
Indeed biology represents 2D space in structured manner. Grid cells in medial entorhinal cortex represent an abstracted 'cognitive map' of 2D space (Tolman 1948). These cells fire in a hexagonal lattice of positions (Hafting et al. 2005), (Figure BB), and are organised in modules; cells within one module have receptive fields that are translated versions of one another, and different modules
have firing lattices of different scales and orientations (Figure( (Stensola et al. 2012).
Biological representations must be more than just actionable they must be functional, encoding the world efficiently, and obey biological constraints. We formalise these three ideas actionable, functional, and biological and analyse the resulting optimal representations. We define actionabil- ity using group and representation theory, as the requirement that each action has corresponding matrix that linearly updates the representation: for example, the 'step north' matrix updates the representation to its value one step north. Functionally, we want different points in space to be rep- resented maximally differently, allowing inputs to be distinguished from one another. Biologically, we ensure all neurons have non-negative and bounded activity. From this constrained optimisation problem we derive optimal representations that resemble multiple modules of grid cells.
Our problem formulation allows analytic explanations for grid cell phenomena, matches experi- mental findings, such as the alignment of grids cells to room geometry (Stensola et al. 2013). and predicts some undcrappreciated aspects, such as the relative angle between modules. In sum, we 1) propose actionable neural representations to support flexible behaviours; 2) formalise the actionable constraint with group and representation theory; 3) mix actionability with biological and functional constraints create constrained optimisation problem; 4) analyse this problem and show that in 2D the optimal representation is a good model of grid cells, thus offering a mathematical under- standing of why grid cells look the way they do; 5) provide several neural predictions; 6) highlight the generality of this normative method beyond 2D space.
1.1 RELATED WORK
Neuroscientists have long explained representations with normative principles like information max- imisation (Attneave) 1954 Barlow et al. 196T). sparse (Olshausen & Field 1996) or independent (Hyvärinen 2010) latent encodings, often mixed with biological constraints such non-negativity (Snguupaa et al. 2018), energy budgets (Niven et al.) 2007). or wiring minimisation (Hyvärinen al.) 2001) On the other hand, deep learning learns task optimised representations. A host of representation--earriig principles have been considered (Bengio et al. 2013); but our work is most related to geometric deep learning (Bronstein et al. (222] which emphasises input transformations, and building neural networks which respect (cquivariant) or ignore (invariant) them. This is similar in spirit but not in detail our approach, since equivariant networks do not build representations in which all transformations of the input are implementable through matrices. Most related are [Pac-] canaro & Hinton (200T), who built representations in which relations (e.g. x is the father of y are enacted by a corresponding linear transform, exactly like our notion of actionable!
There is much previous theory on grid cells, which can be categorised as relating to our actionable, functional, and biological constraints. Functional: Many works argue that grid cells provide an efficient representation of position, that hcxagons are optimal (Mathis et al. 2012a bJ Sreenivasan & Fiete 201T Wei et al. 2013) and make predictions for relative module lengthscales (Wei et al. 2015). Since we use similar functional principles, we suspect that some of our novel results, such as grid-to-room alignment, could have been derived by these authors. However, in contrast to work, these authors assume a grid-like tuning curve. Instead we give a normative explanation of why be grid-like at all, explaining features like the alignment of grid axes within module, which are detrimental from a pure decoding view (Stemmler et al. 2015). Actionability: Grid cells are thought to basis for predicting future outcomes (Stachenfeld al. 2017 Yu al. 2020). and have been classically understood as affording path-integration (integrating velocity to predict position) with units from both hand-tuned Burak & Fiete (2009) and trained recurrent neural network resembling grid cells (Cueva & Weil 2018)) Banino et al., 2018)) Sorscher et al., 2019). Recently, these recurrent network approaches have been questioned for their parameter dependence (Schaeffer et al. (022). or
relying on decoding place cells with bespoke shapes that are not observed experimentally (Sorscher et al. 2019; Dordek et al. 2016). Our mathematical formalisation of path-integration, combined with biological and functional constraints, provides clarity this issue. Our approach is linear, in that actions update the representation linearly, which has previously been explored theoretically (Issa
& Zhang 2012), and numerically, in two works that learnt grid cells (Whitiinton et al. 2020 Gao
2

---

Published as a conference paper at ICLR 2023
et al. 2021). Our work could be seen extracting and simplifying the key ideas from these papers that make hexagonal grids optimal (see Appendix H.. and extending them to multiple modules, something both papers had to hard code. Biological: Lastly, both theoretically (Sorscher et al. 2019) and computationally (Dordek et al., 2016) Whittington et al. 2021). non-negativity has played key role in normative derivations of hexagonal grid cells, as it here.
ACTIONABLE NEURAL REPRESENTATIONS: AN OBJECTIVE
We seek representation ((x) E R of position T where N is the number of neurons. Our representation is built using three ideas: functional, biological, and actionable; whose combination will lead multiple modules of grid cells, and which we'll now formalise.
To be useful, the representation must encode different positions differently. However, it is more important distinguish positions 1km apart than 1mm, and frequently visited positions should be separated the most. To account for these, we ask our representation to minimise
Functional:
liote)) g(an'1 ((x, x' a')p(''))))))))) (pp())p(()) dadda
C
c-
The red term measures the representational similarity of æ and æ²; it is large if their representations are nearer than some distance a in neural space and small otherwise. By integrating over all pairs and x', L measures the total representational similarity, which we seek to minimise. The green term is the agent's position occupancy distribution, which ensures only visited points contribute to the loss, for now simply a Gaussian of lengthscale L. Finally, the blue term weights the importance of separating each pair, encouraging separation of points more distant than a lengthscale,
-m 21
1m12
( x²)
p(x)
21
Biological: Neurons have non-negative firing rates, so we constrain gx()) 2 0. Further, neurons can't fire arbitrarily fast, and firing is energetically costly, constrain each neuron's response (x) via J 5% (x)
Actionable: Our final constraint requires that the representation is actionable. This means each transformations of the input must have its own transformation neural space, independent of po- sition. For mathematical convenience we enact the neural transformation using a matrix. Labelling this matrix T TAAx) E NgN' for transformation Aæ, this means that for all positions x,
g(x + Ar) = (Ax)gg())
For intuition into how this constrains the neural code g(x), consider simple example of two neurons representing an angle 0 E [0, 2m). Replacing æ with 0 in equation 3 we get the equivalent constraint: g + A0) T (()) Here the matrix T performs rotation, and the solution (up to linear transform) for T to be the standard 2 2 rotation matrix, with frequency n.
g( A0) = cos(n(( + AB)) +A0) (n A07
(os(nAA) sin(nA0)
sin(ns0) cos(nA0)) (in(n() = T(A0)g()) (4)
(co((nf)
Thus rotates by 2n the neural representation traces out a circle integer number, n, times. Thanks to the problem's linearity, extending to more neurons is easy. Adding two more neurons lets the population contain another sine and cosine some frequency, just like the two neurons in equation 4 Extrapolating this we get our actionability constraint: the neural response must be constructed from some invertible linear mixing of the sines and cosines of D N. frequencies.
g(0) = 0gg + Σ sin(nn))))) + by cos(nna)
for integer nh
(5)
d=1
The vectors (a., ba 2= E N coefficient vectors that mix together the sines and cosines, of which there are D. ag is the coefficient vector for a frequency that cycles times.
This argument comes from area of maths called Representation Theory (a different meaning of representation!) that places constraints on the matrices T for variables whose transformations form mathematical object called group. This includes many of interest, such position circle,
3

---

Published as a conference paper at ICLR 2023
torus, sphere. These constraints matrices can be translated into constraints actionable neural code just like we did for g(0) (see Appendix Aj. When generalising the above example to 2D space (a torus), must consider few things: First, the space is two-dimensional, compared to our previous equation [ the frequencies, denoted ky, are now two dimensional. Second, to approximate finite region of flat 2D space, consider a similarly sized region of torus. As the radius of the torus grows this approximation becomes arbitrarily good (see Appendix [A.4 for discussion). Periodicity constrains the frequencies equation t be 2 for integer and ring radius R. As the loop (torus in 2D) becomes very large these permitted frequencies become arbitrarily close, so we drop the integer constraint,
D g = au + Σ ag sin x) + ba cos(Ka x))
(6)
Our constrained optimisation problem is complete. Equation 6 specifies the set of actionable rep- resentations. Without additional constraints these codes meaningless: random combinations of sines and cosines produce random neural responses (Figure A We will choose from amongst the set of actionable codes by optimising the parameters an. {a,, b, kal to minimise L, subject to biological (non-negative and bounded firing rates) constraints.
3 OPTIMAL REPRESENTATIONS
Optimising over the actionable codes to minimise L with biological constraints gives multiple modules of grid cells (Figure B). This section will, using intuition and analytics, explain why.
A)
RANDOM ACTIONABLE REPRESENTATION
B)
OPTIMAL ACTIONABLE REPRESENTATION
Figure 2: A Random actionable representations (equation 6 are meaningless combinations of sines and cosines. (g)(x) plotted for different neurons, n) Optimising among actionable codes to achieve functional and biological constraints produces multiple modules of ~hexagonal grid cells. (Figure shows that all the neurons the population belong to one of these three modules)
3.1 NON-NEGATIVITY LEADS TO MODULE LATTICE CELLS
To understand how non-negativity produces modules of lattice responses we will study the following simplified loss, which maximises the Euclidean distance between representations of angle, g
4 /
1
Lu
(0) ([')
This is equivalent to the full loss (equation for uniform p(0). x0) = 1, and o very large. Make mistake, this is bad loss. For contrast, the full loss encouraged the representations of different positions to be separated by more than o, enabling discrimination" Therefore, sensibly, the representation is most rewarded for separating nearby (closer than σ) points. Co does the opposite! grows quadratically with separation, so g()) is most rewarded for pushing apart already well- separated points, terrible representational principle! Nonetheless, Lo will give key insights.
'or could be interpreted noise level, minimum discriminable distance, then points should he far enough away for downstream decoder distinguish them.
4

---

Published as a conference paper at ICLR 2023
Since actionability gives parameterised form of the representations (equation 5 pute the integrals to obtain the following constrained optimisation problem (details: Appendix C
com-
Bounded firing rites
Non-negativity
min (an.D
Co
Σ
|aall "alli+ with g 0,
a
aad + 1|bball N 1
Where N is the number of neurons. This is now something we can understand. First, reminding ourselves that the neural code, g(f), is made from constant vector, ag and dedepedennt parts (equation 5) Figure 3 we can see that Lo separates representations by encouraging the size of each varying part, a + ||b2||², be maximised. This effect is limited by the firing rate bound, |aoll² L = N. Thus, to minimise Lo we must minimise the constant vector, an- This would be easy without non negativity (when any code with |aoll is optimal), but no sum of sines and cosines can be non non-negative for all & without an offset. Thus the game is simple: choose frequencies and coefficients so the firing rates are non-negative, but using the smallest possible constant vector.
A)
(N(0)
B) ONE FREQ
Br TWo FREQS
gi THREE FREQS
8: MANY FREQS
8
ba
ao
(
ADD FREQ
Go.5
ADD FREQ
Go
[0)
(1(
KEEP ADDING
E )
MMMAAA
(o(
16 1
SIMULATIONS CIRCLE (O)
91(0) (0)
(2)
(0)
1 (n)
12
0
0
7I
TI
TI
11g
5ng
D)
SIMULATIONS - TORUS
ky
kx
Figure 3: A The neural activity consists of a constant vector, ao, and dependent loops. B Pro- gressively adding harmonic frequencies increases the code's minima, allowing the code be made non-negative using the smallest possible ag. This give a grid-like tuning curve. Simulations results confirm this heuristic C ID and D 2D, right: frequency spectrum, 2D dot size frequency power.
One lattice cell. We heuristically argue, and confirm in simulation, that the optimal solution for a single neuron is a lattice tuning curve (see Appendix G for why this problem non-convex). Starting with a single frequency component, e.g. sin(O), achieving non-negativity requires adding constant offset, sin( + 1 (Figure 3B). However, we could also have just added another frequency. In particular adding harmonics of the base frequency (with appropriate phase shifts) pushes up the minima (Figure BB. Extending this argument, we suggest non-negativity, for a single cell, can be achieved by including grid of frequencies. This gives lattice tuning curve (Figure 33 right).
Module of lattice cells. Achieving non negaatiity for this cell used up many frequencies. But as discussed (Section 2). actionability only allows a limited number frequencies in the population (< since each frequency uses 2 neurons (sine and cosine)), thus how can we make lots of neurons non- negative with limited frequencies? Fortunately, we can do so by making all neuron's tuning curves translated versions of each other, translated curves contain the same frequencies but with different phases. This is a module of lattice cells. We validate our arguments by numerically optimising the coefficients ag {a,, ba and frequencies (nd).2 to minimise Lo subject to constraints, producing a module of lattices (Figure details in Appendix[Bi These arguments equally apply to representations of periodic 2D space (a torus; Figure 3D).
5

---

Published as a conference paper at ICLR 2023
Studying Co has told why lattice response curves good. But surprisingly, all lattices equally good, even at infinitely high frequency. Returning to the full loss will break this degeneracy.
3.2 PRIORITISING IMPORTANT PAIRS OF POSITIONS PRODUCES HEXAGONAL GRID CELLS
Now we return the full loss and understand its impact in two steps, beginning with the reintroduc- tion of X and p. which break the lattice degeneracy, forming hexagonal grid cells.
Le(m) niw 111 (a,, x' )p(x)p((2)) 'dxdx''
20
1=-2'12
ensures very distant inputs have different representations, while allowing similar inputs to have similar representations, up resolution, l. This encourages low frequencies ([| < t), which separate distant points but produce similar rep- resentations for pairs closer than I (Analyties: Appendix D.Ip. At this stage, for periodic 2D space, the lowest frequency lattices, place cells, are optimal (see Appendix Sengupta et al. (2018).
X prefers low frequencies: recall that X
p(x) prefers high frequencies: However, the occupancy distribution of the animal, p(æ), counters X- On an infinite 2D plane animals must focus on representing a limited area, of lengthscale L. This encourages high frequencies ([kall 1.) whose response varies among the visited points (Analytics: Appendix (.2).. More complex p(æ) induce more complex frequency biases, but, to first order, the effect always high frequency bias (Figure F--G, Appendix D).
A)
ky
ky
ky
Kx
Kx
Xx
B)
GaIDs
C)
HARMONICALLY RelATED: dd, 1. Sa02
NON-HAMMONICAUP ReLAtED: ab, 1. 1.44
Figure 4: A x and p(æ) induce bias towards frequencies with magnitudes between 7 and }- Since, of all lattices, hexagons fit the most frequencies within the annulus, they are preferred, and hexagonal frequency lattices lead to hexagonal grid cells. B Simulations confirm. C Harmonically related frequencies co-repeat more often than non-harmonic, meaning that, as a pair, harmonically related frequencies worse at encoding, since they encode many points in the same way.
Combination -> Hexagons: Satisfying non-negativity and functionality required lattice of many frequencies, but now p and X bias our frequency choice, preferring those beyond 1 (to separate points the animal visits) but smaller than 1 (to separate distant visited points). Thus to get as many of these preferred frequencies possible, Goldilocks annulus in frequency space (Figure444) This is hexagonal lattice in frequency space which leads a hexagonal grid cell. Simulations with few neurons agree, giving a module of hexagonal grid cells (Figure 4B).
want the lattice with the densest packing within
3.3 HARMONIC TUSSLE PRODUCES MULTIPLE MODULES
Finally, we will study the neural lengthscale a, and understand how it produces multiple modules.
[w(e) gte 2 ((x, x' ))()))( ydxda
2o2
(10)

---

Published as a conference paper at ICLR 2023
As discussed, & prioritises the separation of poorly distinguished points, those whose representations
are closer than Ø. This causes certain frequencies to be desired in the overall population, in particular those unrelated
existing frequencies by simple harmonic ratios, i.c. not W1 fwz (Figure 4C; see Appendix [ for a perturbative derivation of this effect). This is because pairs of harmonically related frequencies represent more positions identically than non-harmonically related pair, worse for separation (similar to arguments made in Wei et al. (2015)).
This, however, sets up 'harmonic tussle' between what the population wants non-harmonically related frequencies for L and what single neurons want - hatt-hharmmllll related frequency lattices for non-negativity (Section p.1). Modules of grid cells resolve this tension: harmonic frequencies exist within modules to give -egaaiiiv,,,,,, and non- non-harmonically related modules allow for separation, explaining the earlier simulation results (Figure B; further details in Appendix F..3
This concludes our main result. We have shown three constraints on neural populations actionable, functional, and biological lead to multiple modules of hexagonal grid cells, and we have understood why. We posit this is the minimal set of requirements for grid cells (see Appendix [ for ablations simulations and discussion).
4 PREDICTIONS
Our theory makes testable predictions about the structure of optimal actionable codes for 2D space. We deseribe three here: tuning curve sharpness scales with the number of neurons module; the optimal angle between modules; and the optimal grid alignment to room geometry.
4.1 LATTICE SIZE:FIELD WIDTH RATIO SCALES WITH NUMBER OF NEURONS IN MODULE
In framework the number of neurons controls the number of frequencies in the representation (equation (). A neuron within a module only contains frequencies from that module's 's frequency lattice since other modules have non-harmonically related frequencies. More neurons in module, means more and higher frequencies in the lattice, which sharpen grid peaks (Figure 5A). We for- malise this (Appendix J and predict that the number of neurons within module scales with the square of the lattice lengthscale, V. to field width, μt, ratio, N x (#)² This matches the intuition that the sharper module's peak, the more neurons you need to tile the entire space. In a rudimentary analysis, our predictions compare favourably to data from SStnsola al. (2012) assuming uniform sampling of grid cells across modules (Figure 5B). We are eager to test these claims quantitatively.
4.2 MODULES ARE OPTIMALLY ORIENTED AT SMALL OFFSETS (~ 49)
In section 3.3 we saw how frequencies of different modules are maximally non- con-harmonically related in order to separate the representation of as many points as possible. To maximise oon-harmonicity between two modules, the second module's frequency lattice can be both stretched and rotated relative to the first. or 30 relative orientations are particularly bad coding choices as they align the high density axes of the two lattices (Figure 5C). The optimal angular offset of two modules, calculated via a frequency overlap metric (Appendix K). is small (Figure 5D); the value depends on the grid peak and lattice lengthscales, l and v, but varies between 3 and 8 degrees. Multiple modules should orient at a sequence of small angles (Appendix K). In rudimentary analysis, our predictions compare favourably to the observations Stensola al. (2012) (Figure SE).
4.3 OPTIMAL GRIDS MORPH TO ROOM GEOMETRY
In Section 3.2 (and Appendix D) we showed that p(x), the animal's occupancy distribution, intro- duced high frequency bias grid cells must peak often enough to encode visited points. However, changing p(x) changes the shape of this high frequency bias (Appendix L). In particular, we ex- amine animal's 's encoding of square, circular, or rectangular environments, Appendix D with the assumption that p(x:) is uniform over that space. In each case the bias is coarsely towards high fre- quencies, but has additional intricacies: in square and rectangular rooms optimal frequencies lie on a lattice, with peaks at integer multiples of 2 along one of the cardinal axes, for room width/height T (Figure 5F); whereas in circular rooms optima are at the zeros of Bessel function (Figure 5G).
7

---

Published as a conference paper at ICLR 2023
A)
(0) A +
B)
Probability
ADD NEURONS
3.5
30 Grid Spacing 100
OVERLAP BETWEEN Two LATTICES MINIMISED -4"
D)
OVERLAP DENSITY Vs. OFFSET
30
Á
Grid Spacing (cm) F)
ORIENTATION AND SPACING OF ALL GRID CELLS IN MULTIMODULE ANIMALS FROM STENSOLA ET AL. 2012
120
60
-20
20
-
20
0
20
-2
0
20
20 0
20
20
0
20
-2
0
20
Grid Orientation (degrees)
F)
SQUARE ROOM FREQUENCY BIAS
G)
CIRCULAR ROOM FREQUENCY BIAS
_(k)
Log[[(k)]
10 7.
L(k)
Log[[(k)]
2
ky
ky
-12
10m
10x
kx
10tt
10m
0
kg
L
H)
1 WAVE GRID
SQUASHES
WAVE GRID SQUASHES
WAVE GRID JUMPS
L
L
(
2Tz
43
6X
L
L
2L
B
A
3
Figure 5: A Adding neurons to module sharpens the grid peaks. B In data from Stensola et al. 2012) the most sharply peaked grids were recorded most often (2nd from left), and the broadest least (rightmost). C Aligning the high-density axes of two lattices creates high overlap, while small offsets minimise
D We quantified the overlap as function offset angle (Appendix K) and found the minima occured at 4" from aligned (aligned= 6 maxima, 4" offsets are the 12 minima). The orientation and spacing of all grids animals with multiple modules recorded by Stensola misaligned by small offsets, matching
et al. 2012). Many modules G circular rooms create complex frequency biases, L(k) is the loss for one frequency code of fixed amplitude. H The optimal frequencies along axis of box occur 25 for integer nı: Squishing room makes the optimal frequencies expand. Grids should change to fit the optimal patterns in the recorded environment, unless they happen be optimal for both, as Gn is. I Most grid cells scale with the room, but, when one side is squashed by a factor 2/3, those at I are stable.
prediction. F Square or
8

---

Published as a conference paper at ICLR 2023
These ideas make several predictions. For example, grid modules in circular rooms should have lengthscales set by the optimal radii in Figure 5G, but they should still remain hexagonal since the Bessel function is circularly symmetric. However, the optimal representation in square rooms should not be perfectly hexagonal since p(x)) induces a bias inconsistent with a hexagonal lattice (this effect negligible for high frequency grids). Intriguingly, shearing towards squarer lattices is observed in square rooms (Stensola et al. 2015), and it would be interesting to test its grid-size dependence.
Lastly, these effects make predictions about how grid cells morph when the environment geometry changes. A grid cell that is optimal in both geometries can remain the same, however sub-optimal grid cells should change. For example turning square into squashed square (i.e. a rectangle), stretches the optimal frequencies along the squashed dimension. Thus, some cells are optimal in both rooms and should stay stable, will others will change, presumably to nearby optimal frequencies (Figure H)) Indeed (Stensola et al. (2012) recorded the same grid cells in square and rectangular environment (Figure 5)) and observed exactly these phenomena.
DISCUSSION & CONCLUSIONS
We have proposed actionability as a fundamental representational principle to afford flexible be- haviours. We have shown in simulation and with analytic justification that the optimal actionable representations of 2D space are, when constrained to be both biological and functional, multiple modules of hexagonal grid cells, thus offering mathematical understanding of grid cells. We then used this theory to make three novel grid cell predictions that match data on early inspection.
While this is promising for our theory, there remain some grid cell phenomena that, as it stands, it will never predict. For example, grid cell peaks vary in intensity (Dunn et al. (017). and grid lattices bend in trapezoidal environments (Krupic al. 2015). These effects may be due incorporation of sensory information or uncertainty things we have not included to better infer position. Including these may recapitulate these findings, similar Ocko al. (2018) and Kang et al. (2023)
Our theory is normative and abstracted from implementation. However, both modelling (Burak & Fiete 2009) and experimental (Gardner et al., 2022 Kim et al., (017) work suggests that continu- ous attractor networks (CANs) implement path integrating circuits. Actionability and CANs imply seemingly different representation update equations; future work could usefully compare the two.
While we focused understanding the optimal representations of 2D space and their relationship to grid cells, our theory is more general. Most simply, it can be applied to behaviour in other, non 2D, spaces. In fact many variables whose transformations form group relatively easily anal- ysed. The brain represents many such variables, e.g. heading directions. (Finkelstein et al. 2015), object orientations, (Logothetis et al. 1995), the 4heo4-lopp task' of et al. (2020) or 3-dimensional space (Grieves et al. 2021] Ginosar et al. 2021). Interestingly, our theory predicts 3D representa- tions with regular order (Figure 19E in Appendix MM,, unlike those found in the brain (Grieves al.,
2021 Ginosar et al. 2021 suggesting the animal's 's 3D navigation is sub-optimal.
variables not one at a time, but simultane- ously; at times mixing these variables into a common representation (Hardcastle et al.] 2017). at others giving each variable its own set of neurons (e.g. grid cells, object-vector cells Hydal et al. 2219)) ). Thus, one potential concern about our work is that it assumes a separate neural popula- tion represents each variable. However, in a companion paper, we show that our same biological and functional constraints encourage any neural representation to encode independent variables in separate cob-populations (Whittington al., 2023), to which our theory can then be cleanly applied.
Further, the brain represents these differenttl-strreeuure
But, most expansively, these principles express view that representations must be more than just passive encodings of the world; they must embed the consequences of predictable actions, allow- ing planning and inferences in never-before-seen situations. We codified these ideas using Group and Representation theory, and demonstrated their utility in understanding grid cells. However, the underlying principle is broader than the crystalline nature of group structures: the world and your tions within it have endlessly repeating structures whose understanding permits creative analogising and flexible behaviours. A dell-designed representation should reflect this.

---

Published as a conference paper at ICLR 2023
ACKNOWLEDGEMENTS
We thank Cengiz Pehlevan for insightful discussions, the Parietal Team at INRIA for helpful com- earlier version of this work, Changmin Yu for reading draft of this work, the Math- ematies Stack Exchange user Roger Bernstein for pointing us to equation 69 and Pierre Glaser for teaching the ways of numpy array broadcasting. We thank the following funding sources: the Gatsby Charitable Foundation to W.D.; the Gatsby Charitable Foundation and Wellcome Trust 1//11//2/)/ P.E.L.; Wellcome Principal Research Fellowship (219525/2/19/2)) Wellcome Collaborator award (2143147218/Z2) and Gean-Franois and Marie-Laure de Elermont-Tonmen Foundation award (JSMF220020372) to T.E.J.B.; Sir Henry Wellcome Post-doctoral Fellowship (2228 17/2/22Z2 J.C.R.W. W.; the Wellcome Centre for Integrative Neuroimaging and Wellcome Centre for Human Neuroimaging are each supported by core funding from the Wellcome Trust (20113//Z/1/2 2011////666
REFERENCES
Fred Attneave. Some informational aspects of visual perception. Psychological review, 61(3):183, 1954.
Andrea Banino, Caswell Barry, Benigno Uria, Charles Blundell, Timothy Lillicrap. Piotr Mirowski, Alexander Pritzel, Martin Chadwick, Thomas Degris, Joseph Modayil, al. Vector-based navigation using grid-like representations in artificial agents. Nature, 557(7705):429-433 2018.
Horace B Barlow et al. Possible principles underlying the transformation of sensory messages. Sensory communication, 1(01), 1961.
Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE transactions pattern analysis and machine intelligence, 3788)11788-1888, 2013.
Michael Bronstein, Joan Bruna, Taco Cohen, and Petar Velickovic. Geometric deep learning: Grids, groups, graphs, geodesics, and gauges. arXiv preprint arXiv:2104. 13478, 2021.
Yoram Burak and lla R Fiete. Accurate path integration in continuous attractor network models of grid cells. PLoS computational biology, 100)210 2009.
1000291,
Christopher J Cueva and Xue-Xin Wei. Emergence of grid-like representations by training recurrent neural networks to perform spatial localization. arXiv preprint arXiv: 2018.
Yedidyah Dordek, Daniel Soudry, Ron Meir, and Dori Derdikman. Extracting grid cell character- istics from place cell inputs using non-negative principal component analysis. Elife, 5:e10094, 2016.
Bogdan Dumitrescu. Positive trigonometric pol.:ooommrrriiiooomiomoocomoo polynomials and signal processing applications, volume 103. Springer, 2007.
Benjamin Dunn, Daniel Wennberg, Ziwei Huang, and Yasser Roudi. Grid cells show field-to-field variability and this explains the aperiodic response of inhibitory interneurons. arXiv preprint arXiv:1701.04893 2017.
Arseny Finkelstein, Dori Derdikman, Alon Rubin, Jakob N Foerster, Liora Las, and Nachum Ulanovsky. Three-dimensional head-direction coding in the bat brain. Nature, 517(7533):159- 164, 2015.
William Fulton and Joe Harris. Representation Theory: A First Course. Springer-Verlag 1991.
Ruiqi Gao, Jianwen Xie, Xue-Xin Wei, Song-Chun Zhu, and Ying Nian Wu. On path integration of grid cells: isotropic metric, conformal embedding and group representation. Advances in neural information processing systems, 34, 1.2
Richard J Gardner, Erik Hermansen, Marius Pachitariu, Yoram Burak, Nils A Baas. Benjamin A Dunn, May-Britt Moser, and Edvard Moser. Toroidal topology of population activity in grid cells. Nature, 602(7895):1233-222 2022.
10

---

Published as a conference paper at ICLR 2023
Gily Ginosar, Johnatan Aljadeff, Yoram Burak, Haim Sompolinsky, Liora Las, and Nachum Ulanovsky. Locally ordered representation of 3d space in the entorhinal cortex. Nature, 596 (7872):404-40) 409, 2021.
Roddy M Grieves, Selim Jedidi-Ayoub, Karyna Mishchanchuk, Anyi Liu, Sophie Renaudineau, fléonore Duvelle, and Kate J Jeffery. Irregular distribution of grid cell firing fields in rats explor- ing 3d volumetric space. Nature neuroscience, 24(11):1567-1573 2021.
Torkel Hafting, Marianne Fyhn, Sturla Molden, May-Britt Moser, and Edvard I Moser. Microstruc- ture of a spatial map in the entorhinal cortex. Nature, 436(7052):801-886 2005.
Kiah Hardcastle, Niru Maheswaranathan, Surya Ganguli, and Lisa M Giocomo. A multiplexed, heterogeneous, and adaptive code for navigation in medial entorhinal cortex. Neuron, 94(2): 375-387, 2017.
Aapo Hyvärinen. Statistical models of natural images and cortical visual representation. Topics in Cognitive Science, 2(2):251-264, 2010.
Aapo Hyvärinen, Patrik O Hoyer, and Mika Inki. Topographic independent component analysis. Neural computation, 13(7):1527-1558, 2001.
yvind Ame Hydal, Emilie Ranheim Skyten, Sebastian Ola Andersson, May-Britt Moser, and Ed- vard Ingjald Moser. Object-vector coding in the medial entorhinal cortex. Nature, 568(7752): 400-404, 2019.
John Issa and Kechen Zhang. Universal conditions for exact path integration in neural systems. Proceedings of the National Academy of Sciences, (00(17):6716-722)) 2012.
Joseph Ivanic and Klaus Ruedenberg, Rotation matrices for real spherical harmonies. direct deter- mination by recursion. The Journal of Physical Chemistry, 100((5):6342-6344 1996.
Joseph Ivanic and Klaus Ruedenberg. Rotation matrices for real spherical harmonics. direct deter- mination by recursion. The Journal of Physical Chemistry A, 102(45):009--900, 1998.
Yul HR Kang, Daniel M Wolpert, and Máté Lengyel. Spatial uncertainty and environmental geom- etry in navigation. bioRxiv, pp. 2023-01, 2023.
Sung Soo Kim, Hervé Rouault, Shaul Druckmann, and Vivek Jayaraman. Ring attractor dynamics in the drosophila central brain. Science, 356(6340))849 853, 2017.
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv: 1412.6990 2014.
Anthony W. Knapp. Lie Groups Beyond an Introduction. Springer, 2002.
Julija Krupic, Marius Bauza, Stephen Burton, Caswell Barry, and John OKeefe. Grid cell symmetry is shaped by environmental geometry. Nature, 518(7538) - 2015.
Nikos K Logothetis, Jon Pauls, and Tomaso Poggio. Shape representation in the inferior temporal cortex of monkeys. Current biology, 5(5):552-563, 1995.
Alexander Mathis, Andreas VM Herz, and Martin Stemmler. Optimal population codes for space: grid cells outperform place cells. Neural computation, 24(9):220--2317 2012a.
Alexander Mathis, Andreas VM Herz, and Martin B Stemmler. Resolution of nested neuronal representations can be exponential in the number of neurons. Physical review letters, 109(1): 018103, 2012b.
Jeremy Niven, John Anderson, and Simon B Laughlin. Fly photoreceptors demonstrate energy- information trade-offs in neural coding. PLoS biology, 5(4):e 16, 2007.
Samuel A Ocko, Kiah Hardcastle, Lisa M Giocomo, and Surya Ganguli. Emergent elasticity in the neural code for space. Proceedings of the National Academy of Sciences, 115(50):E1175) 1798- E1 1 1806, 2018.
11

---

Published as a conference paper at ICLR 2023
Bruno A Olshausen and David J Field. Emergence of simple-cell receptive field properties by learning a sparse code for natural images. Nature, 381(6583):007-609 1996.
Alberto Paccanaro and Geoffrey E Hinton. Learning hierarchical structures with linear relational embedding. Advances in neural information processing systems, 14, 2001.
Cengiz Pehlevan and Dmitri B Chklovskii. Neuroscience-inspiree online unsupervised learning algorithms: Artificial neural networks. IEEE Signal Processing Magazine, 36(6):88-99)) 2019.
Archontis Politis et al. Microphone array processing for parametric spatial audio techniques. 2016.
Danilo Jimenez Rezende and Fabio Viola. Taming vaes. arXiv preprint arXiv:1810.0000 2018.
Rylan Schaeffer, Mikail Khona, and Ila Ficte. No free lunch from deep learning in neuroscience: A case study through models of the entorhinal hhpppiiapaaapppppppallllaa circuit. ICML 2022 Workshop A14Science, 2022.
Anirvan Sengupta, Cengiz Pehlevan, Mariano Tepper, Alexander Genkin, and Dmitri Chklovskii. Manifold-tiling localized receptive fields are optimal in similarity-peseervin neural networks. Advances in neural information processing systems, 31, 2018.
Ben Sorscher, Gabriel Mel, Surya Ganguli, and Samuel Ocko. A unified theory for the origin of grid cells through the lens of pattern formation. Advances neural information processing systems, 32, 2019.
Ben Sorscher, Gabriel C Mel, Aran Nayebi, Lisa Giocomo, Daniel Yamins, and Surya Ganguli. When and why grid cells appear or not in trained path integrators. bioRxiv, 2022.
Sameet Sreenivasan and Ila Fiete. Grid cells generate an analog error-correcingg code for singularly precise neural computation. Nature neuroscience, 14(10):1330-1337, 2011.
Kimberly I. Stachenfeld, Matthew M Botvinick, and Samuel Gershman. The hippocampus predictive map. Nature neuroscience, 20(1 20(11):14331153. 2017.
Martin Stemmler, Alexander Mathis, and Andreas VM Herz. Connecting multiple spatial scales to decode the population activity of grid cells. Science Advances, 1(11):e150081 16, 2015.
Hanne Stensola, Tor Stensola, Trygve Solstad, Kristian Frøland, May-Britt Moser, and Edvard I Moser. The entorhinal grid map is discretized. Nature, 492(7427):72-78, 2012.
Tor Stensola, Hanne Stensola, May-Britt Moser, and Edvard Moser. Shearing-induced asymmetry in entorhinal grid cells. Nature, 518(75388:00-2222 2015.
Chen Sun, Wannan Yang, Jared Martin, and Susumu Tonegawa. Hippocampal neurons represent events as transferable units of experience. Nature neuroscience, 23(5):651-663, 2020.
Edward C Tolman. Cognitive maps in rats and men. Psychological review, 55(4), 1948.
Xue-Xin Wei, Jason Prentice, and Vijay Balasubramanian. A principle of cconomy predicts the functional architecture of grid cells. Elife, 4:e08362, 2015.
James C. R. Whittington, Will Dorrell, Surya Ganguli, and Timothy Behrens. Disentanglement with biological constraints: A theory of functional cell types. In The Eleventh International Conference on Learning Representations, 2023. URL https:/ /tt..tt/////ppeeeeeleeer.. wwt.:/et/////u/eo/ d=
Gfh2nGH
James CR Whittington, Timothy H Muller. Shirley Mark, Guifen Chen, Caswell Barry, Neil Burgess, and Timothy EJ Behrens. The ory through generalization in the hippocampal formation. Cell, 183(5):1299-1263 2020.
machine: unifying space and relational mem-
James CR Whittington, Joseph Warren, and Timothy Behrens. Relating transformers to models and neural representations of the hippocampal formation. arXiv preprint 12.00033, 2021.
Changmin Yu, Timothy EJ Behrens, and Neil Burgess. Prediction and generalisation over directed actions by grid cells. arXiv preprint arXiv:2006.03355, 2020.
12

---

Published as a conference paper at ICLR 2023
A CONSTRAINING REPRESENTATIONS WITH REPRESENTATION THEORY
Having an actionable code means the representational effect of every transformation of the variable, Ax, can be implemented by matrix:
g + Ax) = = T(Az)g(()
(11)
In Section we outlined rough argument for how this equation leads to the following constraint on actionable representations of 2D position, that was vital for our work:
D
g(x)) = 0g + Σ ag sin(ka x) + ba cos a))
(12)
In this section, we'll repeat this argument more robustly using Group and Representation Theory. In doing so, it'll become clear how broadly our version of actionability can be used to derive clean analytic representational constraints; namely, the arguments presented here can be applied to the representation of any variable whose transformations form group whose representations are well understood.
Sections A.1 and A.2 contain review of the Group and Representation theory used. Section A.3
applies it to our problem.
A.1 GROUP THEORY
mathematical group is a collection of things (like the set of integers), and way combine two members of the group that makes third (like addition of two integers, that always creates another integer), in a way that satisfies a few rules:
There is an identity element, which is a member of the group that when combined with any other element doesn't change it. For adding integers the identity element is 0, since a + a for all a.
2. Every member of the group has an inverse, defined by its property that combining an ement with its inverse produces the identity element. In our integer-addition example the inverse of any integer is aa, since -a + a = 0, and 0 the identity element.
3. Associativity applies, which just means the order in which you perform operations doesn't matter: (a + b) + + (b + c)
Groups ubiquitous. We mention them here because they will be route to understanding tionable representations representations which transformations are also encoded consistently. The set of transformations of many variables of interest are groups. For example, the set of trans- formations of 2D position, i.c. 2D translations Aæ, is group if you define the combination of two translations via simple vector addition, A A + Arz. We can easily check that they satisfy all three of the group rules:
1. There is an identity translation: simply add 0.
2. Each 2D translation has its inverse: -Ax + Ax = 0
3. Associativity: (Aa + Ab) + Ac = Aa + (Ab + Ac)
The same applies for the transformations of an angle, 6, or of positions on torus or sphere, and much else besides. This is nice observation, but in order put work we need second area of mathematics, Representation Theory.
A.2 REPRESENTATION THEORY
Groups are abstract, in the sense that the behaviour of many different mathematical objects can embody the same group. For example, the integers modulo P with an addition combination rule
13

---

Published as a conference paper at ICLR 2023
form group, called Cp. But equally, the P roots of unity (fe 3r" )P=)) with multiplication combination rule obey all the same rules: you can create 1-1 correspondence between the integers O through P and the P roots of unity by labelling all the roots with the integer that appears in the exponent = and, under their respective combination rules, all additions of integers will exactly match onto multiplication of complex roots (i.e. 24w
2amg
2e mod pinn tw2l
In this work we'll be interested in particular instantiation of our groups, defined by sets of matrices, T T( combined using matrix multiplication. For example, matrix version of the group Cp would be the set of 2-by-2 rotation matrices that rotate by
2 increments:
T(n)= = [OSs( Zmn P
sin 2mm P 2m1
such that ((m))T((2) = T(modp(n) + n2)) (13)
sin(
cos
Combining these matrices using matrix multiplication follows all the same patterns that adding the integers modulo P. multiplying the P roots of unity, followed; they all embody the same group.
Representation theory is the branch of mathematics that specifies the structure of sets of matrices that, when combined using matrix multiplication, follow the rules of particular group. Such sets of matrices are called representation of the group: to avoid confusion arising from this unfortunate though understandable convergent terminology, we distinguish group representations from neural representations by henceforth denoting representations of group in italics. We will make use of one big result from Representation Theory, hinted at in Section 2 the Peter- Weyl theorem (Knapp) 2002). For compact topological groups (which include transformations of a point on a circle, torus, and sphere) any matrix that a representation
group can be composed from the direct product of set of blocks, called irreducible representations, or irreps for short, up to linear transformation. Le. TT (Aa) is representation of the group of transformations of some variable a:
Ii (Aa)
0
0
0
I2(Aa
0
T(Aa) S
0
0
(s(aa)
S
(14)
ID(Aa)
where Ia(Aa) are the irreps of the group in question, which are square matrices not necessarily of same size as d varies, and some invertible square matrix.
To motivate our current rabbit hole further, this is exactly the result we hinted towards in Sec- tion 2 We discussed T ((0)) and, in 2-dimensions, argued it was, up to a linear transform, the 2-dimensional rotation matrix. Further, discussed how every extra two neurons allowed you to add another frequency, i.e. another rotation matrix. This was an attempt to motivate the plausibility of the Peter- Peter-Weyl theorem: the rotation matrices are the irreps of the group of transformations of an angle, and adding two neurons allows you to create larger T ((10) ( by stacking rotation matrices on
top of one another. Now including the invertible linear transform, S, we can state the 4-dimensional version of equation
(cos( 1z A0) sin(n, A0) cos n Ad) 0
0
sin n1 A0) 0
T(A0)
S-1
(15)
(n Ain(n)20)
sin(nz20) cos (os(n120))
In performing this decomposition the role of the rotation matrices irreps is clear. There infinitely many types, each specified by an integer frequency, na, and their direct product produces any representation of the rotation group.
We can now return to actionable neural representations of periodic 2D space, a torus, where this theorem comes in very useful. We sought codes, g(x), that could be manipulated via matrices:
g( + Am) T (x))
(16)
14

---

Published as a conference paper at ICLR 2023
Now recognise that we're asking T(Ar) to be representation of the transformation group of æ, and we know the shape T()x) must take to fit this criteria. To specify T T(Ax) from this constrained class must simply choose set of irreps that fill up the dimensionality of the neural space, stack them one on top each other, and rotate and scale them using the matrix S.
A final detail is that there is trivial way to make representation of any group: choose T(Ø) IN, the N-by-N identity matrix. This also fits our previous discussion, but corresponds to representa- tion made from the direct product of N copies of something called the trivial irrep, I-dimensional irrep, Inivial Aa)=1.
Armed with this knowledge, the following subsection will show how this theory can be used to constrain the neural code, g(x). To finish this review subsection, we list the non-trivial irreps of the groups used in this work. To be specific, in all our work we use only the real-valued irreps, ie all elements of T are real numbers, since firing rates are real numbers. These are less common than complex irreps, which is often what implied by the simple name irreps.
Transtormation group of which variable
Non-trivial Real Irreps
cos(nA0)
sin(n
An angle on unit circle, 0 Position on a very big circle a line, x
for E Z (os(n
sin(n
(os(w>A)
sin(wAA)
for w E R
sin(wA0)
cos(wA6)
cos(a AO)
-in(a A0)
Angles on unit torus,
for a. E Z²
sin(a AO)
cos(a A0)
cos(k: Aar)
sin(k: k:
Aw)
Position very big torus = plane,
for le E R
sin(k Ar)
cos(k: Ar)
Position on a unit sphere, Ø
Real Wigner-D Matrices
Proofs and discussions for deriving these irreps of the circle, torus, and sphere transformation groups can be found in any textbook the representation theory of compact Lie Groups (e.g. |napp (202 ) The step from complex to real irreps can be done using the Frobenius-Schur indicator, which gives recipe for mapping from the complex irreps of compact group the real irreps Fuutonn & Harris 1991). The real Wigner D-Matrices were calculated recursively as detailed in
Ivanic Ruedenberg 1996 1998). by translating matlab code from Politis et al. (2016) into python.
Our derivations of the irreps on the very large circle and torus are simple. In ID the constraint that the frequencies n be integers only because lives on the unit circle. Then the frequencies are constrained such that after rotating by 2I the function is identical. If you change the radius of you take the circle's radius to infinity, in the process making finite sections of the circle better and better approximation of finite patches of flat ID space, the lattice of permitted frequencies wa becomes arbitrarily close together. Eventually they are separated by machine precision, and so we can simply implement the code as they were continuous, hence Wa E R. The same argument applies analogously for 2D frequencies very very large torus.
the circle this constraint becomes Wa = ng
π where nd is any integer.
A.3 REPRESENTATIONAL CONSTRAINTS
Finally, will translate these constraints transformation matrices into constraints the neural code. This is, thankfully, not too difficult. Consider the representation of an angle for simplicity. and take some arbitrary origin in the input space, On 0. The representation of all other angles can be derived via:
(0)
0
0
0
(0)
0
0
g(0) = T())
0
0
I₂(0)
S S-'g(0)
(17)
0
0
0
15

---

Published as a conference paper at ICLR 2023
In the case of angle, each irrep, Ia(O), is just 2-by-2 rotation matrix frequency d, table A.2 N. and for an N-dimensional T we can fit maximally π (for N even) different frequencies, where N the number of neurons. Hence the representation, g is just linear combination of the sine and cosine of these different frequencies, exactly quoted previously:
g(0) = 0o + Σ as sis((nn)))) + by cos(na0) for integer rid;
(18)
d=1
ag corresponds to the trivial irrep, and we include since we know it must be in the code to make the firing rates non-negative for all 0. It also cleans up the constraint the number of allowable frequencies, for even or odd N we require D < N. This is because if N is odd one dimension is used for the trivial irrep, the rest can be shared up amongst N-1 frequencies, so D must be an -
T.
integer smaller than T. If N is even, one dimension must still be used by the trivial irrep, so D can still maximally be only the largest integer smaller than 2
Extending this to other groups is relatively simple, the representation is just a linear combination of the functions that appear in the irrep of the group in question, see (able(A.2 For position on a circle, line (very large circle), torus, plane (very large torus), they all take the relatively simple form as in equation 18 but requiring appropriate changes from I to dimensions, or integer to real frequencies. Representations of position linear combinations of sets of spherical harmonics.
sphere slightly more complex, instead being constructed from
A.4 PERIODIC VS INFINITE SPACES
We finally give further details about a key step in our argument for representations of flat 2D space. We approximate a finite region of the infinite 2D plane by a finite region of a very large periodic 2D space, the torus. We do this because the representation theory the group of 2D translations not as well characterised (to the best our knowledge there is no equivalent of the Peter-Weyl theorem that could be used to provide a target for optimisation). Fortunately, any animal only cares about a finite region of 2D space (encoded in equation 2 via the lengthscale L). We therefore approximate this finite region flat 2D space with an equivalently sized region of torus. This enables us to use the fully characterised representation theory of the set of translations of periodic space.
Now, there are legitimate concerns over whether this a reasonable approximation, Fortunately, we free choose the radii of the torus we wish, and make use of this freedom make the approximation the finite flat 2D space arbitrarily good. As the radii increase to infinity the small region of torus approximates the flat 2D space arbitrarily well.
This use of periodic space does exclude some representations of the full set of 2D translations, for example:
T(Ax) = S 6 Ar Ay
S-1
(19)
There are two reasons not to be concerned by this. First, this solution would never have been allowed, as including it ensures that your representation, g(x), cannot have non-negative or bounded firing rates (we suspect this would be the case for such additional representations of flat 2D translations). Second, any result which was dependent would be highly suspect. After all, animals are not truly representing flat 2D space, rather they are representing approximately flat section of the surface of sphere (the Earth).
these kind of boundary effects at
16

---

Published as a conference paper at ICLR 2023
B NUMERICAL OPTIMISATION DETAILS
In order to test our claims, we numerically optimise the parameters that define the representation to minimise the loss, subject to constraints. Despite sharing many commonalities, optimisation procedures are different depending on whether the variable being represented lives in a very large periodic space (approximations to the line, plane, or volume) finite (circle, torus, sphere). We describe each of these schemes in turn, beginning with the very large spaces, All code is available on github: https://gitthe: com/wi lburDoz IILR_ Ant.RAcciinabbl... e__ess
B.1 NUMERICAL OPTIMISATION FOR VERY LARGE SPACES
We will use the representation of a point on a line for explanation, planes or volumes are a simple extension, gax) parameterised follows:
g(x) + Σ aa cos(wax) + ba sin(waz) d=1
an, {as, baj E ERR E
(20)
Our loss is made from three terms: the first the functional objective, the last two enforce the non-negativity and boundedness constraint respectively:
C = Liunctional Ap + Aboundded
(21)
To evaluate the functional component our loss we sample a set points { from p(x) and calculate their representations { To make the bounded constraint approximately satisfied (there's still some work to be done, taken care of by Lioumdee) we calculate the following neuron-wiss norm and use normalise each neuron's 's firing:
fn( 1 9n
|1gn|1 Σ In (mm)²
(o)
(22)
The functional form of Liunctional varies, as discussed in the main paper. For example, for the full loss we compute the following using the normalised firing, discrete approximation to equation]
M
M
l8txm) 3i=m/)1 211 X Fmn)
Ltunctional
20
(23)
M
m== m
Now we come to our two constraints, which enforce that the representation is non-negative and bounded. We would like our representation to be reasonable (i.e. non-negative and bounded) for all values of If we do not enforce this then the optimiser finds various trick solutions in which the representation is non-negative and bounded only in small region, but negative and growing explo- sively outside of this, which is completely unbiological, and uninteresting, Of course, is infinite, so we cannot numerically ensure these constraints are satisfied for all и. However, ensuring they are true in region local to the animal's explorations (which are represented by p(x)) suffices remove most of these trick solutions. As such, sample second set of Ms 'shift positions', {rm Jm= M from a scaled up version of p(æ), using a scale factor S. We then create a much larger set of posi- tions, by shifting the original set by each of the 'shift positions', creating dataset of size M * Ms, and use these to calculate our two constraint losses.
Our neganiiiy loss penalises negative firing rates:
Ms Σ m,=1 m=1 n=1
Cnon-oogativity
1īn (Xm, (m))) xmm) < 0)
(24)
M M
Where I the indicator function, 1 if the firing rate is negative, 0 else, i.c we just average the magnitude of the negative portion of the firing rates.
17

---

Published as a conference paper at ICLR 2023
The bounded loss penalises the deviation of each neuron's 's norm from in each of the shifted rooms:
N
Ms
M
Liounded
Σ === my m=1
(mm, + Fm) - 1)2
(25)
NMS
That completes our specification of the losses. We minimise the full loss over the parameters (ao, {a,, ba, wald=1) using gradient-based algorithm, ADAM (Kingma & Ba, 2014). We ini- tialise these parameters by sampling from independent zero-mean gaussians, with variances as in B.33
The final detail of our approach the setting of Xp and λs which control the relative weight of the constraints vs. the functional objective. We don't I want the optimiser to strike tradcoff between the objective and constraints, since the constraints must actually be satisfied. But we also don't 't want to make A large that the objective is badly minimised in the pursuit of only constraint satisfaction. To balance these demands we use GECO (Rezende & Viola 2018), which specifies a set of stepwise updates for Ap and λB- These ensure that if the constraint is satisfied their coefficients increase, else they decrease allowing the optimiser to focus on the loss. The dynamics that implement this are follows, for timestep.
GECO defines a log-space measure of how well the constraint is being satisfied:
L = log((e)) -
(26)
(or small variations on this), where & is fog-threshold that sets the target log-size of the constraint loss question, and L, is the value the loss at timestep t. Le is then smoothed:
L, aL, + +1 -1-a)L
(27)
And this smoothed measure of how well the constraint is being satisfied controls the behaviour of the coefficient:
A+11 ALi
(28)
This specifies the full optimisation, parameters are listed in table B.3
B.2 NUMERICAL OPTIMISATION FOR FINITE SPACES
Optimising the representation of finite variables has added difficulty, and simplification. Again, we have a parameterised form, e.g. for an angle 8:
D g a. Σ FP cos(n) + ba sin(na0)
ag. fas, RNN, an E
(29)
The key difficulty is that each frequency, n.,, has to be an integer, so we cannot optimise it by gradient descent. Similar problems arise for positions on torus, or sphere. We shall spend the rest of this section outlining how we circumvent this problem. However, we do also have one major simplification. Because the variable is finite, we can easily ensure the representation is non-negative and bounded across the whole space, avoiding the need for an additional normalisation constraint. Further, for the uniform occupancy distributions we consider in finite spaces, we can analytically calculate the neuron norm, and scale the parameters appropriately to ensure it is always 1:
D
l1 (0)1
(0)00 = ||a0 2
a 12 + ||aall
(30)
2x
2
d=1
9n.
(0)
(31)
1l (0)l
18

---

Published as a conference paper at ICLR 2023
As such, we simply sample set of angles {0m }o and their normalised representations [g(0m))m and compute the appropriate functional and non-negativity loss, as equations 23 & &2
The final thing we must clear up is how to learn which frequencies, nhs to include in the code. To do this, make code that contains many many frequencies, up some cutoff maxx where Duux bigger than N:
Duss
g(0) = ag Σ ad (o8 + by sin(d0)
ag: {ad, bald RR.
(32)
We then add a term to the loss that forces the code choose only D of these D frequencies, setting all other coefficient vectors to zero, and hence making the code actionable again but allowing functional loss.
optimiser to do so a way that minimises
The term that we add to achieve this is inspired by the representation theory we used to write these constraints, Section A.2 We create first a max + 1-dimesional vector, I(0), that contains all the irreps i.e. each of the Diax sines and cosines and constant. We then create (2 max + 1) x (2Dmax + -iddimensional transition matrix, Gy (A)) that is a representation of the rotation group in this space: G G)(A0)I(0) = I(O A0). G₁ can be simply made by stacking 2-by-2 rotation matrices. Then we create the neural code by projecting the frequency basis through a rectangular weight matrix, W: g(f) WI(@). Finally, we create the best possible representation of the group in the neural space:
G( = WABWW,)
(33)
Where W* * denotes the Moore-Penrose pseudoinverse. We then learn W, which equivalent to learning ag and {aa, b-r
Pus.
Reprexentation theory tells us this will not do perfect job rotating the neural representation, unless the optimiser chooses W to cut out all but D the frequencies. such, we sample a set of shifts {0m, JM m,, and measure the following discrepancy:
M
M
Transformation
Σ
Σ
((0m,)))(0m)) g(0m + mm,))
(34)
MsM
m==1 m=
Minimising it as we minimised the other constraint terms will force the code to choose D frequencies and hence make the code actionable.
Since calculating the pseudoinverse is expensive, we replace W with matrix B that we also learn by gradient descent. quickly learns to approximate the pseudoinverse, speeding our computations.
That wraps up our numerical description. We are again left with three loss terms, two of which enforce constraints. This can be applied to any group, even if you can't do gradient descent through their irreps, at the cost of limiting the optimisation to subset of irreps below certain frequency, maxx-
L Lunctional + upfoon-ncgativit + Aransooooomiii
(35)
B.3 PARAMETERS VALUES
We list the parameter values used generate the grid cells in Figure B and show the full population of neurons in figure 6
19

---

Published as a conference paper at ICLR 2023
Parameter
Meaning neural lengthscale X lengthscale
Value
0.2
0.5
T
number of gradient steps number of neurons
150000
64
M
number of sampled points every reesample steps
150
Ms
number of room shifts sampled every Plesamplc steps standard deviation of normal for shift sampling number of steps per resample of points initial positivity weighting coefficient
15
3
Presample
5
Apo
0.1
Kp
log positivity target
-9
Opp
positivity target smoothing positivity coefficient dynamics coefficient
0,9
0.0001
Ono
same set of GECO parameters for norm constraint
0.005
kin
ditto
4
On
ditto
0.9
ditto
0.0001
Eur
coefficient gradient step size frequency gradient step size exponential moving average of first gradient moment
0.1
com
0.1
S1
0.9
32
exponential moving average of second moment
0.9
n
ADAM non-exploding term
x 10
Figure 6: All the neurons for the population in figure 2 all neurons fall into one of three modules.
20

---

Published as a conference paper at ICLR 2023
B.4 ROBUSTNESS TO PARAMETER VALUES
In this section we explore the parameler-deeendennce of our numerical solutions. Most of the pa- rameters in table B.3 control the behaviour of the optimisation scheme (for example controlling the behaviour of ADAM (Kingma & Bal (014)) or GECO (Rezende & Viola 2018)). These were tuned so that the optimiser found the best solutions possible; any parameter dependence in these does not seem deeply worrying, reflecting the optimisers used rather than the core problem we're solving.
We therefore focus our explorations on the parameters that define key parts of the loss function: the neural lengthscale, 0, the two spatial lengthscales, L and I, and the number of neurons, N. We choose the units of the input space such that L = 1, leaving us with three parameters to explore. (The neural space units are not so arbitrary, due to the firing rate constraint)
Our theory actually makes predictions for how these parameters should change the representation. As discussed in appendix E.3 if the ratio of N and a is small there should be one module of neurons, and increasing it should increase the number of modules in the optimal solutions. / enforces the push to hexagons, so, assuming there's 's only one module for simplicity, if is sufficiently large the optimal solution should be hexagonal grid cells. If / is very small then it will have no effect, so all sufficiently high frequency grids should be equal and their shape should matter less.
We verify these claims in a series of numerical experiments, and we show that there are reasonably large parameter regimes in which our suggested qualitative solutions emerge (one module for high 0, as in figure 4 multiple modules for low a, as in figure 2). In these experiments most other parameters are kept the values in table barring the number of steps which was varied with the
number of neurons, and Apo and ono which should be scaled with the approximate size of the loss, that varies as a and / vary.
B.4.1 EFFECT OF VARYING
The top 6 panels of figure show that for a fixed number of neurons one module of hexagonal grids is optimal for a range of L. We start at I = 1. as that corresponds to the rough lengthscale of the environment. Eventually for small the optimiser chooses other, non non-hexagonal grids. While hexagons are optimal for a reasonable range of I, we might wonder why our arguments do not hold for even smaller !?
We believe this is due to the small number of neurons we are using. We argued hexagons were optimal because they packed the most frequencies into Goldilocks annulus in frequency space, fig- 4 As decreases the outer ring of this annulus moves further away, providing a larger Goldilocks region. When the number of neurons in a module, i.c. the number of frequencies, is small this per- mits many different lattices to pack frequencies within the Goldilocks annulus equally well, figure So, for a given number of neurons, there is a (-threshold, beyond which there is no longer push towards hexagons, and this threshold can be decreased by increasing the number of neurons.
We verify this in the last panel of figure S where we show that at / = 0.1, where 64 neuron modules not hexagonal, 100 neuron modules were. Therefore, expect for modules containing many neurons (like those in the brain) hexagons are optimal for a much larger range of l.
ky
K
Kx
kx
Figure 7: For small I, relative to the number of frequencies, many different lattices pack frequencies into the Goldilocks annulus equally well, e.g. these square and hexagonal lattice.
21

---

Tubiiadoi as a conterenoo paper at (CLR 2023
64 NEZDONS
1 = 1
L
- --113
-05 0.5
7 - 0.25
7 -
7 - 50.G5
1 - -= 0.1
0.1 - 100 MEtpoow,
Figure 8: For 64 peuronn with カ = 0.4 one madille of grids is conssteertt itons oonamiee one module with D.thoonalll
opiimaui
tropsscrtte all
the mooduces are all hexagonal, for low other therr one stray neuron with a ganolel
highi i eesponss, At
aridds start peperngge like
grids
band cells
or squana grida.
when Decause This is likely due to the small number of peguoom used.
the pumbee of nncresse we
Peskgoona at lower talues of i. peurons to 100 as in the bottom plot the moddle vemainn
22

---

Published as a conference paper at ICLR 2023
B.4.2 EFFECT OF VARYING
As discussed in Appendix E.3 varying varies the push towards non- harm-nimmtnttyy and hence how many modules we would expect in the optimal solution. We confirm this in Figure D For large we get one hexagonal module, decreasing it leads solutions with more modules.
(up to
The more modules the less hexagonal they are. We suspect this is again partly finite neuron effect, as in Appendix [B.4J]] Future work could usefully explore whether more constraints are needed to robustly generate many hexagonal modules, or whether more neurons is enough as it was in figure
σ = 0.15
7
NUMBER OF MODULES
O = 0.2
o 0.45
1
0.1
σ
0.45
Figure 9: For fixed 0.2 and N 64 we vary a and count the number of modules. For large (including up to a = 1) there is consistently one hexagonal module. As a decreases you get more modules. Error bars standard deviation over multiple simulations. Inset the module shapes in one simulation for each of three values.
B.4.3 VARYING NUMBER OF NEURONS
Figures 10 and I show that vary the number of neurons (with fixed !), we can find values of a for which the population produces either one module of hexagonal grids (Figure 10) or multiple modules (Figure I1). Hence, qualitative solution types are found across range of population sizes.
23

---

Published as a conference paper at ICLR 2023
N 25, o = 0.32
23 NEURONS
2 NEURONS
N = 36, o = 0.32
33 NEURONS
3 NEURONS
N = 49, o = 0.39
45 NEURONS
4 NEURONS
N = 64, o = 0.45
63 NEURONS
1 NEURON
Figure 10: Each row of this figure summarises one simulation, and each simulation has a different population size, N. We fix L 0.5 and show a a value which almost all neurons form one hexagonal module.
24

---

Published as a conference paper at ICLR 2023
N 25, o 0.2
12 NEURONS
9 NEURONS
4 NEURONS
N 36, o = 0.22
24 NEURONS
11 NEURONS
1 NEURON
N = 49, o = 0.27
34 NEURONS
14 NEURONS
1 NEURON
N = 64,0 = 0.2
37 NEURONS
21 NEURONS
6 NEURONS
Figure 11: Each row of this figure summarises one simulation, and each simulation has a different population size, N. We fix I 0.5 and show value at which the population falls into multiple modules.
25

---

Published as a conference paper at ICLR 2023
C ANALYSIS OF SIMPLEST LOsS THAT LEADS TO ONE LATTICE MODULE
In this section we analytically study the simplified loss suggested in section 3.1 and derive equa- The actionability constraint tells that:
tion g
( + Σ ad assin() + ba (os( E Z
(36)
d=1
Where D is smaller than half the number of neurons (Appendix A). We ensure nd + ny if d' by combining like terms. Our loss is:
4m [[_ -10))))((00)] ((0')l1 dodd
Lo
(37)
Developing this and using trig identities for the of sines and cosines:
4T /[ lg(()) g(0')12
Σ 4T²
1
Co
(gn(0) - ()(
(38)
na + 6')
8¹)
bn sin na(l - 0¹)
ma 0¹,
d0d0'
= =-
Σ an cos
sin
sin 2
2
2
(39)
We now change variables to = 0-6' and B 0-6' This introduces a factor of two from the Jacobian (5), which we cancel by doubling the range of the integral while keeping the same limits, despite the change of variable, Figure 12 This gives
1
an CO8 naj sin nga bn,d sin na3 sin naa)²² 2 dod
(40)
an sin(naa) sin(n () cos( 3)
d.
sin na 3) an sin an sin (n a) cos
(41)
an sin (n sin ()) sin (na cos (nd B)
bn.abn ain(n sin(n sin( sin sn 3) dad3
(0 + 87 B = 2
+2m
-2n
6'
2m
-2m
The original integral is shown in orange. We rotate the purple axes and, for conve- nience, use the same limits (i.e. -r to T). This corresponds to adding the green area to the integral but, using the fact that these functions are unchanged by shifts of 2n in either 0' we can see that the green region is equal to the original orange region. Therefore, performing the full purple integral just gets us twice our desired integral.
Figure 12:
26

---

Published as a conference paper at ICLR 2023
Performing these integrals is easy using the fourier orthogonality relations; the two terms with mixed sin and cos of 3 are instantly zero, the other two terms are non-zero only if nd = Rd's Le. d d'. When d = d' these integrals evaluate x², giving:
Lo
= - + a
(42)
n.d
Exactly quoted in equation 7 We can do the same development for the firing rate constraint:
1 2T (0) ob,
b2, =,
vi=1..., N
(43)
Again using the orthogonality relation. These are the constraints that must be enforced. For il- lustration useful to see one slice of the constraints made by summing over the neuron index:
N |
2 + Σ d=1
aall |ball
(44)
This is the constraint shown in equation 8 and is strongly intuition guiding. But remember it is really a stand-in for the N constraints, one per neuron, that must each be satisfied!
This analysis be generalised to derive exactly the same result in 2D by integrating over pairs of points on the torus. It yields no extra insight, and no different, so we just quote the result:
Co
llg(ar) - g(x')ll dand'' =
Σ ||aa|
|ball
(45)
16
D ANALYSIS PARTIALLY SIMPLIFIED LOSS THAT LEADS TO MODULE OF HEXAGONAL GRIDS
In this section we will study an intermediate loss: it will compute the euclidean distance, like in Appendix C but we'll include and p. We'll show that they induce a frequency bias, X for low frequencies, and p for high, which together lead to hexagonal lattices. We'll study first for repre- sentations of circular variable, then we' study p for representations of line, then we'll we'll combine them. At each stage generalising to 2-dimensions is a conceptually trivial but algebraically nasty operation with utility, so we do not detail here. In Appendix [ we will return to the differences between 1D and 2D, and show instances where they become important.
D.1 Low FREQUENCY BIAS: PLACE CELLS ON THE CIRCLE
We begin with the representation of an angle on circle, introduce X. and show the analytic form of the low frequency bias it produces. Since we're on a circle must depend on distance on the circle,
rather than on line (i.e. not X 1 1x=='12
We define the obvious generalisation of this to periodic spaces, Figure I3A, which is normalised to integrate to one under a uniform p(0):
* ck cos((000))
x(0,0')
(46)
e (A:)
Where To is the zeroth-order modified Bessel function. Hence the loss is:
4 //" [l)(0) (00))
e cos(0-00) 0²)
Li
do
(47)
ek To(k)
In this expression & is parameter that controls the generalisation width, playing the inverse role of I the main paper. Taking the same steps as in Appendix C we arrive at:
an COS naB sin nya bn.d sin naB3 sin ) et cc00(()))
2 Σ
c - Io(k) dad3 (48)
27

---

Published as a conference paper at ICLR 2023
The B integral again kills the cross terms:
(" + an [ sin (naa)
e ccccoe(2a) e Io(
Σ
de
(49)
n.
These integrals can be computed by relating them to modified Bessel functions of the first kind, which can be defined for integer n as:
1 { ch cos(f) cos(n0)d0
(ak
(50)
2T
Hence the loss is:
C1 Eio + (2.d)) c² + lng (k)
(51)
e - [k)
n.d
This is basically the same result as before, equation 42 all the frequencies decouple and decrease the loss in proportion to their magnitude. However, we have added weighting factor, that decreases with frequency, Figure 138, i.e. a simple low frequency bias!
This analysis agrees with that of [Sengupta al. (2018), who argued that the best representation of angles on a ring for loss related to the one studied here should be place cells. We disentangle the relationship between asks us to build a module lattice neurons with as many low frequencies as possible. The optimal solution this the lowest frequency lattice, i.e. place cells! (we validate this numerically in Appendix M). Therefore, it is only additional developments of the loss, namely the introduction of an infinite space for which you prioritise the coding of visited regions, and the introduction of the neural lengthscale, that lead us to conclude that modules of grid cells are better than place cells.
works in Appendix F Regardless,
optimisation problem
D.2 HIGII FREQUENCY BIAS: OCCUPANCY DISTRIBUTION
Now we'll examine how a Gaussian p(x) affects the result, using representation of æ, 1- dimensional position:
L1 11=- // (l((z) g(x ((2))))((((((()pp((() Jdrdr' = 2T /ʃ (9(x) - g(('))(
24
26
dædæ
(52)
Developing the argument as before:
4
Σ
andd cos w sin waa - bn,d sin 3 sin wx))) -
22
24
dod3
(53)
T
The cross terms again zero, due to the symmetry of the 3 integral around 0.
Σ
and Cwwas wa I war [[] + bn,abm,d (Waa wa (
(54)
LL2
n,d,d'
Where we've wrapped up the details into the following integrals of trigonometrie functions over gaussian measure:
b(), / cos(ax) cos (bx))e 2 dx
LVVT
2 (e
e
(55)
b(a,b][L) = sin(az) sin(bx)e t dx
I (c
1a(a-))
(56)
2
So get our final expression for the loss:
Ci = Σ
an (e 1((
(wattaa))
+bn.abiir (e
(un wa 2w
n.d.d
Sine Weighting
Weighting
(57)
13(
Liiwa-war) 2 (u
Σ an,d0n.d + (e
Σ
bn.abn.d
-
d.d!
n
(58)
28

---

Published as a conference paper at ICLR 2023
A)
CIRCLE DISTANCE WEIGHTING
B)
Low FREQUENCY BIAS
1.45
x(40)
ex + (k)
e - 1o(k)
182
1.15
7I
0
10
C)
AO
HIGH FREQUENCY BIAS
PAIRWISE COSINE AND SINE WEIGHTING
0
1
w
5
0.0
0
4
1
5
D)
BOTH BIASES CREATE PEAK
PAIRWISE COSINE AND SINE WEIGHTING
0
1
w
See Aas
0.4
5
0
w
5
0
4
5
E)
HEXAGONS MAXIMISE BIASED EUCLIDEAN SEPARATION
F)
MAXIMISING EUCLIDEAN DISTANCE BY
REPRESENTING A SUBSET OF POINTS
Figure 13: A The circular version of (AO),, equation 46 weights the importance of separating different pairs on the circle. downweighting nearby points, closer than 1 B The Low Frequency Bias of equation 51 C High Frequency Bias of equation 57d and 59 Left: bias for isolated frequency (e.g. all frequencies when space encoded uniformly). Right: cosine and sine bias for pair of frequencies w and w/ Diagonals of right left. Right plots show both high frequency bias and a smoothing over similar frequencies, where similar means within 1.- (Here = 1) D High and Low Frequency Biases. Same as C for equation. 61 Notice peak around the inverse size. + = 1. Optimising neural code on equation 60 with constraints produces one module of hexagons, predicted. But, shown in F, each neuron activates in the same way, hence this is bad representation.
29

---

Published as a conference paper at ICLR 2023
The downstream consequence of this loss is simple if a module encodes all areas of space evenly. Encoding evenly implies the phases of the neurons in the module are evenly distributed. The phase of a particular neuron is encoded in the coefficients of the sine and cosine of the base frequency, 4n1 and by1- Even distribution implies that Gn1 oscillates from Ag. where Aa = max, On1. to -Aa and back again you sweep the neuron index. As you perform this sweep the subsidiary coefficients, such as aw2, perform the same oscillation, but multiple times. dx2 does it twice, since, by the arguments that led us grids, the peaks of the two waves must align (Figure B), and that implies the peak of the wave at twice the frequency moves at the same speed as you sweep the neuron number. This implies its phase oscillates twice as fast, and hence that Σn, ax19n2 O. Arguments like this imply the frequencies actually decouple for a uniform encoding of space, making the loss,
L1 -1= Σ
e1-e-21:
(1-e
wi ja (1 e- -112u88203
(59)
This is exactly high frequency bias! (Fig 13C Left)
However, uniform encoding of the space is actually not optimal for this loss, as can be seen either from the form of equation 57| and verified numerically using the loss in the next section, Figure 133- F. The weighting of the sine factor and the cosine factor differ, and in fact push toward sine, since plateaus at lower frequencies. Combine that with low frequency push, and you get an incentive to use only sines, which is allowed if you can encode only some areas of space, as the euclidean loss permits.
final interesting feature of this loss is the way the coupling between frequencies gracefully extends the decoupling between frequencies to the space of continuous (rather than integer) frequencies. In our most simplified loss, equation 42 each frequency contributed according to the square of its amplitude, | ||bal|². How should this be extended to continuous frequencies? Certainly, two frequencies were very far from one another we should retrieve the previous result, and their contributions would be expected to decouple, ||a, + || ||a||| + |bb]12 But if l/2 kn + 5k, for small 8k then the two frequencies are, for all intents and purposes, the same, so they should contribute an amplitude ||a, + a²ll² + ||b; + b * ||a,|l 1|2 + ||b 1|2 + ||a2| + |b211 Equation 57 Figure I3C right, performs exactly this bit of intuition. It tells us that the key lengthscale in frequency space is 7. Two frequencicss separated by more than this distance contribute in decoupled way, as in equation 37 Conversely, at very small distances, much smaller than + the contribution is exactly ||a: + ag
|b + boll?, as it should be. But additionally, it tells us the functional form of the behaviour between these two limits: Gaussian decay.
D.3 THE COMBINED EFFECT HIGH AND Low FREQUENCY BIAS
In this section we show that the simple euclidean loss with both and p can be analysed, and it contains both the high and low frequency biases discussed previously in isolation. This is not very surprising, but we include it for completeness.
p(x)p(x²)
L1 2= -f- (lg(z) g(x')ll
(n-=/)2 212
224 222
dxdx
(60)
2T
Following a very similar path before reach:
Σ nid,d'
and C(ura warl [ war II,, A) + Unabiaa AS(wa, warl LL A)S war [[]
n 1.2
(61)
AS(Wa, War [T,, A) S(wa, wa [L)) S(wa, war (IA)
(62)
1L
A This contains the low and high frequency penalisation, at lengthscales & and t. respectively. There 4 terms, 2 are identical to equation 57 and hence perform the same role. The additional two
since L>1
(63)
Vp 2L
V2
30

---

Published as a conference paper at ICLR 2023
terms positive, should be minimised, and they can be minimised by making the frequencies smaller than /. Figure D3D.
We verify this claim numerically by optimising neural representation of 2D position, g to minimise &1 subject to actionable and biological constraints. It forms a module hexagonal cells, Figure I3E, but the representation is shoddy, because the cells only encode small area of space well, as can be seen by zooming on the response, Figure T3]
E ANALYSIS OF FULL LOsS: MULTIPLE MODULES OF GRIDS
In this Section we will perturbatively analyse the full loss function, which includes the neural length- scale, Ø. The consequences of including this lengthscale will become most obvious for the simplest example, the representation of an angle on a ring. g with uniform weighting of the impor- tance of separating different points. We'll use it to derive the push towards hon-haamoni related modules.
Hence, we study the following loss:
C 1
(g(*) (0(")-
2e
d0d6'
(64)
4T
And examine how the effects of this loss differ from the euclidean verison studied in Appendix C
This loss is difficult to analyse, but insight can be gained by making an approximation. We assume that the distance in neural space between the representations of two inputs depends only on the difference between those two inputs, i.e.:
(lg(0) (00) d')
(65)
Looking the constrained form of the representation, we can see this is satisfied if frequencies orthogonal:
D
g = do
(nn + ba cos(na))
(as, ba) E ER, na EZ
(66)
d=1
a. 0. da. A
b. b& da. A?
(67)
ag b&
Then:
(g))) g
Σ
sin?
ndd (0- 87)
(68)
2
1=1
Now will combine this convenient form with the following expansion:
(m(x)
ar prconly) = Lo(x) + Σ
cos(
(69)
Io(x)
m=
Developing equation
64 using eqns. 69 and 68
Ed 43 and e
L
d0d0'
(70)
2
1
Ea A3 sin (mga))
da
(71)
2n
A3 (I=cos(2nza)) da
6
40
(72)
2T
1
A3 Iol
12
Im
40
1
+
cos cos(2nama)) da
(73)
2TT
402
Io
A
Term A
Term
31

---

Published as a conference paper at ICLR 2023
We will now look at each of these two terms separately and derive from each an intuitive conclusion. Term will tell us that frequency amplitudes will tend to be capped at around the legnthscale a. Term B will tell us how well different frequencies combine, and such, will exert the push towards non-harmonically related frequency combinations.
E.1 TERM A ENCOURAGES DIVERSITY HIGH AMPLITUDE FREQUENCIES IN THE CODE
Fig 14A shows plot of Io ( As can be seen there are couple of regimes, if Aa, the amplitude 42 ~ 1. On the other hand, as A. grows, To also grows.
of frequency is smaller than then Io Asymptoticall::
10
e 64
1o
(74)
Correspondingly Term A also behaves differently in the two regimes, when Aa is smaller than the loss decreases exponentially with the amplitude of frequency d:
43 Term A =e 20d
A2
43 402
Ad <
Lo
d
~eT
(75)
40
Alternatively:
42
20
Ag >
Term A = lo
(76)
46
Aa
So, up to a threshold region defined by the lengthscale a, there an exponential improvement in the loss you increase the amplitude. Beyond that the improvements drop being polynomial. This makes a lot of sense, once you have used a frequency to separate subset of points sufficiently well from one another you only get minimal gains for more increase in that frequency's 's amplitude, Figure [4 Since there are many frequencies, and the norm constraint ensures that few can have an amplitude of order o, it encourages the optimiser put more power into the other frequencies. In other words, amplitudes are only usefully increased to a lengthscale a, encouraging a diversity in high amplitude frequencies. This is moderately interesting, but will be a useful piece of information for the next derivation.
E.2 TERM ENCOURAGES THE CODE'S FREQUENCIES TO BE NON- HARMONICALLY RELATED
Term B is an integral of the product of D infinite sums, which seems very counter-productive to examine. We are fortunate, however. First, the coefficients in the infinite sum decay very rapidly with when the ratio of As is (()), Figure 14C. The previous section's arguments make it clear that, in any optimal code, A, will be smaller or of the same order as a. As such, the inifite sum is
smaller than 1, such can understand the role of Term B by analysing just the first few terms in the following series expansion.
rapidly truncated. Additionally, all of the coefficient ratios,
To
DC:
2
cos (2mmnaa)
Term B
1
Io
12
To=
Tm
A2 io
A3 Im 1-
Tm 102
+2
cos (2)m
cos (2s(2mna))cofs cos(2m' n +...
09 Order
Io(
d.d mm.
Io( 2
Io(
A²
Order
21dOrder
(77)
where, due to the rapid decay of
with m, each term is only non-zero for small m.
Tol 4o2
32

---

Published as a conference paper at ICLR 2023
A)
G)
D)
ZEROTH MODIFIED BESSEL FUNCTION
MODIFIED BESSEL RATIO
PAIRWISE (xx) EFFECT
25
A4
1o
A2
Im
40 -
e ''m''
A
4G
1
5
0
A3
A2
5
wm77
5
2
40
B)
Aa
0
A Modified Bessel Function. B Amplitude Usefully Increases to a limit o. When Aa then growing the amplitude pushes many points very usefully apart, hence the loss decreases quickly. However, once Ad ~ many points are already sufficiently separated. The only gains from growing the amplitude more are the small region that remain neighbouring, hence the loss starts decreasing much more slowly, and precious amplitude is much better invested in other smaller amplitude frequencies. C Ratios of Modified Bessel Functions. The terms appearing in the series expansion are, first, smaller than 1, so each additional term is the series, which is multiplied by an additional ratio smaller than 1, decays rapidly. And, second, these ratios decay rapidly with m, so the infinite sums within each term in the series expansion decay rapidly, containing roughly 3 or 4 non- zero terms for the largest amplitude frequencies in the code. D Pairwise Continuous Interactions. p(z) causes frequencies to be penalised for both being smaller than ~ Ż. and, to lesser extent, for being harmonically related, up to lengthscale 1. equation 85 This same interaction applies for all pairs of frequencies, and all pairs of harmonics of frequencres, though the contribution is more downweighted the higher the harmonics in the pair.
Figure 14:
The 9th order term is constant, and the 1st order term is when you integrate a. As such, the leading order effect of this loss on the optimal choice of frequencies arrives via the 2nd order term. The integral is easy,
[ cos cos (2mm)a))) cos a2m = vō(mmm - m va
(78)
We want to minimise the loss, and this contribution is positive, so any time the 2nd order term is non-zero it is penalty. As such, we want few frequencies to satisfy the condition in the delta function, mmy = mn nar Recall from equation 77 that these terms are weighted by coefficients that decay rapidly as m grows. As such, the condition that the loss penalising, mnd m'na'. is really saying: penalise all pairs of frequencies in the code, 7'd, nu', that can be related by some simple m' harmonic ratio, n4 Tl,, where and m' are small integers, roughly less than 5, Figure 14
This may seem obtuse, but is very interpretable! Simply harmonically related frequencies are exactly those that encode many inputs with the same response! Hence, they should be penalised, Fig
E.3 A HARMONIC TUSSLE NON-HARMONICS LEADS TO MULTIPLE MODULES
As described in Section 3.3
we now arrive at a dilemma. The arguments of Sections 3.1 and C
suggest that the optimal representation is comprised of lattice modules, i.e. the neurons must build code from a lattice of frequencies. A lattice is exactly the arrangement that ensures all the frequen- cies are related to one another by simple harmonic ratios. Yet, the arguments of the previous section
33

---

Published as a conference paper at ICLR 2023
suggest that frequencies with simple harmonic relations bad choice ie. a frequency lattice would be the worst option! How can this be resolved?
The resolution will depend the value of two parameters: the first, is the neural lengthscale; the second, .N, is the number of neurons, which, through the boundedness constraint, sets the scale of the amplitudes, Aa. We can already see this key ratio, Ae, appearing in the preceding arguments. Its role is to choose the compromise point in this harmonic tussle, and in doing so it chooses the number modules the code.
A simple Taylor expansion illustrates that tends towards the full loss reverts to the euclidean approximation that was the focus of Sections and in which the effect of the harmonic penalisa- tion drops zero.
(9(#) 9(e')1?? 2
= =1- -1 - 9(0))l2
20 + O
(79)
Hence, as a - Do we recover our original optimal solution: all the neurons belong to one module, whose shape determined by x and This explains why, with few neurons (equivalent the optimal solution is a single module perfectly hexagonal grids, fig 48
oc),
But decreases the effect of the harmonic penalisation becomes larger and larger. Eventually, one module no longer optimal. Yet, all the previous arguments that modularised codes are easily made non-negative, and hence valuable, still apply. The obvious solution is to have modules. Within each module all the neurons are easily made non-negative, but between modules you can have very non-harmonic relations, trading off both requirements.
As such increasing the ratio As, either by increasing the number of neurons decreasing a, creates an optimisation problem for which the high quality representations are modules of grids with more modules the ratio gets bigger. We observed exactly this effect numerically, and it explains the presence of multiple modules of grids in the full version of our problem for a range of values of a. Finally, we can extract from this analysis guiding light: that the frequencies in different modules should be maximally non-harmonically related. This additional principle, beyond the simple low and high frequency biases of Section D frames our normative arguments for the optimal arrangement of modules, that we explore Section 4.2 and Appendix
E.4 NON-HARMONICALLN RELATED CONTINUOUS FREQUENCIES A SMOOTHING EFFECT
We will address one final concern. When representing infinite variables the frequencies the code become real numbers. For example, when representing 1-dimensional continuous input, σ, the code, g(r), has the form,
g(x)= ag + Σ a sin(wax) + ba cos(war) Wa E
(80)
And it seems like the equivalent penalisation as in equation 78 8(mwa - m ('ww ). is very casy to avoid. If mwa m war and the code is being penalised, just increase wa by an infinitely small amount, dw, such that mwa + mdw + m' Wa' and suddenly this term does not contribute to the loss.
This, however, is not how the loss manifests. Instead frequencies penalised for being close to one another, where close defined by the size of the region the animal encodes, set by lengthscale L. This can be seen by analysing the following loss,
||
In(e) 2 2
C =
(x)p(a dddde'
(81)
Loix) (pix)=o(a' 201 20
2
21
dxda
(82)
2
34

---

Published as a conference paper at ICLR 2023
Making the same assumption in the previous Section, equation 67 tically,
and developing the loss iden-
C 2TL
1o
2 m=
cos 2wa
o² da (83)
2
To
Term
We again analyse this through the series expansion in equation 77 constant. The 1st order term proporational to,
The 0th order term is again
cos( cos(2mwga)e the da = 41.2mau
(84)
2/TL
i.., as in Section D.2 p(x) implements high frequency bias. In fact, the mathematical form of this penalty, a gaussian, identical to that in diagonal terms of the previously derived sum, equation 57
The 2nd order term is where we find the answer this Section's original concern,
2² (os wrae 37
C(2muia, 2m wax (|LL)
(85)
2 2/TL
2V -A1, (mwssmmmua
41 mmwummmau
(86)
Which is similar to the cross terms in equation 57 but with the addition of harmonic interactions. This the continuous equivalent the penalty equation 78 Frequencies and their low order harmonics are penalised for landing closer than from one another, Fig 14b. In conclusion, the logic gracefully transfers continuous frequencies.
F LINKS TO SENGUPTA ET AL. 2018
Sengupta et 2018) derive an optimal representation of structured variables, where their definition of structured exactly aligns with ours: the variable's transformations form a group (though the term they use is symmetric manifolds). Further, there are analytic similarities between the loss they study and ours. However, their optimal representations are place cells, and ours are multiple modules of grid cells. this section we will disentangle these two threads, explaining this difference, which arises from actionability principle, the neural lengthscale o, and use of infinite inputs.
Sengupta et al. (0188) study the optimisation a loss derived from a dot product similarity matching objective, an objective that has prompted numerous interesting discoveries (Pehlevan & Chklovskii 2019). Input vectors, æ, stacked into the matrix X, are represented by vectors neural activity, y. stacked into Y, that have be neg-negative and bounded. The loss measures the similarity between pairs of inputs, x" x', and pairs of outputs, y y'yy, and tries to optimise the neural representation, y. such that all input similarities above a threshold, a, are faithfully reproduced in the similarity structure of the neural representation.
min Y20
- -
(87)
diag(Y ( Y)531
where is matrix ones, and diag( YTY)= < 31 enforces the neural activity's norm constraint.
Our loss is strikingly similar. Our inputs are variables, such the angle, that play the role of a. Sengupta et al.'s input dot product similarity, x. x' a, plays the role of x(0, 8¹), measuring similarity in input space. The neural activities, 9, must, like y. be non-negative and bounded in L2 norm. And minimising the similarity matching loss is like minimising the simple euclidean form of the loss studied in Appendix D with the integrals playing the role of the trace,
4 /|" (g(()) g(0') (12))1xx(0) 0 '0'd''
C =
(88)
35

---

Published as a conference paper at ICLR 2023
The analogy then, is that minimising L1 is asking the most similar elements of the input to be represented most similarly, and dissimilar dissimilarly, as in the non-negative similarity matching objective; orthogonal motivation for our loss!
Sengupta et al. (2018) use beautiful convex optimisation techniques (that cannot, unfortunately, be applied directly to problem, Appendix [G] show that the optimal representation of the finite spaces they consider (circles and spheres) are populations of place cells. What is it about our losses that leads us different conclusions?
Our problems differ in a few ways. First, since they use dot-product similarities, their loss is closest our simplified losses, i.e. those without the presence of the neural lengthscale, a. So, due this difference, we would expect them to produce a single module of responses, as observed.
The second difference is the addition of actionability our code which produces harsh frequency content constraint, and is pivotal to our derivation (as can be seen from ablation studies, Appendix They, however, assume infinitely many neurons, which point the frequency constraint becomes, especially when there is only one module, relatively vacuous. So we could still see their analysis as the infinite neuron version ours.
Third, we use different measure of input similarity, though we do not believe this would have particularly strong effects on our conclusions.
Finally, we consider infinite spaces, like position line, by introducing a probability distribution over inputs, p(z).
As such, for representations of finite variables, like angle, the infinite neuron predictions of our simplified loss and Sengupta et al. should align. Thankfully, they do! As shown Appendix M we predict place-cell like tuning for the representation of circular variables. This follows from our previous discussions, Appendix [D.]] for finite spaces including a low frequency bias via the input similarity was argued to make the optimal representation module of the lowest frequency lattices, place cells!
Hence, relative to Sengupta al., by extending to the representation of infinite spaces with tionability we reach grids, rather than place cells. And by additionally including a, the neural lengthscale, produce multiple modules.
G OPTIMAL NON-NEGATIVE ACTIONABLE CODE A NON-CONVEX PROBLEM
In this section we highlight that actionability is what makes our problem non-convex. Specifically, choosing the set of frequencies difficult: for a fixed choice of frequencies the simplified loss (equation 7 and constraints are convex in the neural coefficients. We include it here to point towards tools that may useful in proving grid's optimality, rather than heuristically justifying them with numerically support,
have done.
Consider a representation g0)). For a fixed set of frequencies {na)2 we'll aim to optimise the coefficients (o {a., ba The losses take simple forms, the functional objective to minimised is min- Ea ||al| + |bb 12 The boundedness constraint is similarly quadratic in the coefficients, equation 8 The only potential trouble the non-negativity constraint. [Sengupta et al. (2018) solve this problem by having actionabtility and infintely many neurons, can take different ap- proach.
Our code is Positive Trigonometric Polynomial, function of the following form:
Dunx
9n. (0) =
T id8
(89)
D
where Dmax maxa Rad, type of polynomial studied in engineering and optimisation settings Dumitrescu (2007). Due to actionability our code is a sparse positive trigonometric polynomial, only 27 of the ra are non-zero.
36

---

Published as a conference paper at ICLR 2023
While positivity is hard constraint enforce, Bochner's theorem gives us hope. It tells that for In to be positive for all 8, its fourier transform, 9n (w) must be positive-defintt. This means that the following matrix, made from the fourier coefficients, must be positive-defintt:
Tno
n2
Tml
T'o
Q
Tn2
F'1
Tno
(90)
T'1
TnnDaux
Tn1
Two
The set of positive-definite matrices forms convex set. Even the set of matrices Qn where fixed diagonals are zero is a convex set. Further, this matrix displays all the right tradeoffs for positivity: Tno must be non-zero for the matrix to be positive-definite i.c. there must be constant offset to achieve non-negativity. Similarly, including harmonics makes achieving non-negativity easier than non-harmonics, just as in Figure 2
But even having made this link we cannot make progress, since we had to choose which frequencies had non-zero amplitude. Hence, the choice of frequency sparsity implied by actionability stops problem from being convex. A plausible solution might be to solve the convex optimisation problem for given set of frequencies, then to take gradients through that solution update the frequencies, but we have not implemented this.
H LINKS TO SOME OTHER PATH INTEGRATION MODELS
Our theory is theory of path-integrating representations. Actionability means you understand the rules of space (a representation should be unchanged after taking a step north then east then south then west), but does not mean you understand where you are, how fine-grained this understanding is (a representation that encodes all positions the same way satisfies the actionable rules for example). Our functional constraint rectifies this, as requires all relevant locations to be represented differently, up to certain spatial scale. Understanding rules, and representing locations differently is the same as path-integration now representation can updated according to the rules, and the underlying spatial variables can be decoded.
H.1 LINEAR PATH INTEGRATION MODELS
Linear path integration models of the entorhinal cortex, like ours, have, to the best of our knowledge, been suggested three times before (Issa & Zhang. 2012) Whittington et al.] 2020 Gao et al.) 2021). Whittington al. and Gao et al. are both simulation based, optimising losses related and show the resulting optimisations look like grid cells, though both papers only obtain multiple modules of grids by manually enforcing block diagonal transformation matrices. In this section we will discuss the differences between these two losses and ours, to explain their results in our framework much as possible.
ours,
Gao et al. optimise a representation of position and set of linear neural transition matrices to minimise series of losses. One loss enforces path integration, like our actionability constraint. Another bounds the firing rate of vectors, similar to our boundedness constraint. A final similarity is their version the functional objective, which enforces the ability to linearly readout place-cell- activity from the grid code.
However, additionally they enforce an 'isotropic scaling term'. This term measures how much the neural activity vector moves when you take small step in direction & in the input space, and encourages all the steps to be the same size independent the strong force towards hexagonality it produces: if you know your representation is some type of grid then all the two dimensional grid the one that is most symmetric is hexagons, with it's Co symmetry. Hence it will minimise this isotropic scaling.
vb This can be understood through
We have shown that is not necessary to include this term in the loss to produce hexagonal grids. However, there will be differences in behaviour between code minimising this constraint and
37

---

Published as a conference paper at ICLR 2023
code that doesn't. The stronger push towards hexagonality that isotopy exerts will make deviations from perfect hexagonality. such as shearing Stensola et al. (2013) less optimal. A careful analysis of the behaviour of the two losses, both with functional, actionable, and biological constraints, but adding or removing isotropy, in different rooms could produce different predictions. Further, each module would be more robustly hexagonal with this term added, which might be necessary make many many modules hexagonal.
Finally, the relation between our non-negative firing rates, and the concept of non-negativity in Gao et al. is slightly murky. Gao et al. use non-negative grid-to-placc-cell weights, but also show this non-negativity is not required to produce grids. How this meshes with our findings that non- negativity is vital for grid formation remains unclear. This discrepancy could be caused by the isotropy constraint, but we remain unsure.
Theoretically, Gao et al. develop rich group theory view for studying grid cells. We add to this work using Representation theory to make clear what constraints linear actionability implies (equation 5). Given this starting point are able to explain intuitively and with analytic insight why this loss leads to grid cells, extend to multiple modules, and make neural predictions.
Whittington et al. train recurrent neural network to path integrate, but also to separate the rep- resentation of different points in the input space by predicting different observations at different positions. Path integration is linear with action dependent matrices, exactly like our actionability, and the neural activitics are bounded. In recent versions of the model, Whittington et al. (202T), non- direct
negative firing rates are used, which gave hexagonal grid cells. This can be understood application of our framework, though the pressures on the representation are naturally more blurry since it is optimised with behavioural trajectories using recurrent neural network. In particular, the goldilocks frequency bounds (section (.2) can be thought of as coming from the finite map the agent explores (high frequency bias) and the discrete step-size in the environment (low frequency bias).
H.2 SORSCHER, MEL, ET AL.'S NON-LINEAR PATH INTEGRATION MODEL
Sorscher et al. (2019) provide nice theoretical analysis of how non-negativity and linear reconstruc- tion of place cells can lead to hexagonal grids, providing valuable insight into previous observations in the field such as that of Dordek et al. (2016).
The key difference between our theoretical analysis and theirs, is that they rely on the covariance structure of place cell input to obtain representation made from plane waves, whereas show that actionability (path integration) alone demands a representation built from plane waves. The reliance on partieular place cell covariance structure makes a strict constraint on the form place cells take whether this is compatible with observed place cells is a topic of much debate (Schaeffer et al.) 2022 Sorscher et al. 2022). The subsequent arguments that lead hexagonal grid cells bear some resemblance, but are different, as we outline here:
Sorscher al. (2019) discuss how finite room effects (i.e. the animal only exploring a limited region of space) lead to a discretisation of Fourier space onto a lattice. Their place cell covariance structure argument then says allowed frequencies should lie on a ring since the spectrum is peaked in a small band of frequencies. Lastly, including 3rd order regularisation on the code (such as non-negativity) induces a triplet interaction between frequencies on the ring, meaning they should add zero this is satisfied by hexagonal code.
Our argument also leads to lattice frequencies, but this is due to actionability and non-negativity. Then, from the space of all lattices, band-pass filter argument chooses hexagons: the high-pass arises because the animal only explores a limited region of space, and the low-pass because the animal only wants to encode space up to some useful resolution. This creates preferred an annulus in frequency space, and leads to a preference for a hexagonal lattice, since it most densely packs frequencies into the annulus that is optimal for encoding space.
So the arguments have similar components lattice frequencies, non-negativity, band-pass filters but they put these pieces together in different ways.
These technical differences, among others, lead our two theories to make different predictions. For example, we provide normative derivation of multiple modules, which we believe only arise in
38

---

Published as a conference paper at ICLR 2023
Sorscher et al. 2019) due to quantization effect. Finally, and crucially in opinion, predic- tions result from a normative framework for understanding generic representations.
I ABLATION STUDIES
We have argued that three principles - biological, functional, and actionable are necessary to pro- duce grid cells. In this section show that removing any of these three and numerically optimising produces fundamentally different patterns, and we explain these results with the theory we' ve devel- oped in this work.
We study the representation of a small torus, since for periodic spaces the three terms appear cleanly in the loss, can be easily excised, Appendix B cells emerging.
Figure 13 shows that removing any term stops grid
A)
REMOVE NON-NEGATIVITY
B)
REMOVE FUNCTIONALITY
C)
REMOVE ACTIONABILITY
Figure 15: A With no non-negativity the code is simply built from D non-harmonically related frequencies. B Without the functional term an optimal code can be made by increasing the constant vector sufficiently, and containing few frequencies, leaving à random pattern of sines and cosines. Without actionability there no push towards sparsity in fourier space. Bumps are still easy to positivise, without frequency sparsity there's 's no reason to arrange them into lattices. Hence, this response looks a bit like grid cells with the peak positions randomised.
39

---

module. this section we add slightly more Published as a conference paper at ICLR 2023
No Non-negativity Without non-negativity the code wants maximise the size of each of the limited number of frequencies in the code, ensuring that they are non-hammnnccaly related. As such, it builds wavey but fairly random looking code.
No Functional Without a functional term the loss simply wants the code to contain few frequencies and be non-negative, so produces random looking responses with sparse fourier spectrum and large constant offset to ensure non-negativity
No Actionability Without actionability the code wants to be non-negative but separable. Bumps easily positivised and encode the space well, but there is no reason to arrange them into lattices, and would actually be detrimental to co-ordinate the placement across neurons that any hypothetical lattice axes align. As such, it builds random but bumpy looking pattern. This observation will be important for discussion of the coding of 3-dimensional space, Appendix M
LATTICE SIZK:PEAK WIDTH RATIO SCALES WITH NUMBER OF NEURONS
Thanks the actionability constraint, the number of neurons in a module controls the number of frequencies available to build the module's ' response pattern. In our scheme the frequencies within one module organise into lattice, and the more frequencies in the module, the higher the top frequency, and the correspondingly sharper the grid peaks. This link allows us to extract the number of neurons from a single neuron's 's tuning curve justification to this link.
We begin with representation of 1D position, (ar). When there are enough neurons the griddy response can be approximated as,
(x) ~ (x 14) * DC((),
(91)
where DV(v) is Dirac comb with lengthscale v, is convolution, and l is the grid peak width, Fig 16 The fourier transform of this object is simple, Fig I6
In (w) ~ . w010, 1 x DC
1
(92)
9x(0)
(c)(
θ
(0) Gaussian({) Dirac Comb(v)
(w)) Gaussian
Dirac Comb
Figure 16: Approximate Large Neuron Responses. With many neurons the grid response is approxi- mately a dirac comb convolved with Gaussian, and hence the frequency response is approximately Gaussian multiplied by Dirac Comb. Actionability implies sparsity in fourier space, which we approximate as a finite number of frequencies having power above some threshold т. i.e. a suffi- ciently fast decay in frequency space, which corresponds sufficiently broad grid peak width.
We can now extract the tradeoff exactly. In this continuous approximation the equivalent of action- ability's 's sparsity in frequency space is that the frequency spectra must decay sufficiently fast i.e. the number of frequencies with power above some small threshold must be less than half the number of neurons. This number is controlled by the ratio of μ and v. We'll Wllll set threshold, т, which defines the power a frequency must have, relative to the constant component, to be considered member of the code. The actual value of is inconsequential, we just want
arbitrary low scaled
40

---

Published as a conference paper at ICLR 2023
scaling rules. Then we'll derive the scaling of the frequency at which the amplitude of the gaussian drops below threshold, w":
[W " 11o, !i11?
(93)
[ H)P
log( 1-
(94)
Now we can ask how many frequencies there are in the code, by counting the number of peaks of the Dirac comb that occur before this threshold. Counting from 0, because in ID negative frequencies are just scaled versions of positive frequencies:
D
log
(95)
2T
Therefore, ID, when there are enough neurons, the number of frequencies, and therefore the number of the neurons scales with the lattice to peak width ratio:
N V P
(96)
A completely analogous argument can be made in 2D, Again the cutoff frequency is w" x 1. A different scaling emerges, however, because the number of frequencies in dirac comb lower than some threshold scales with dimension. The frequency density of the dirac comb is proportional to 7 peaks per unit area with the specifics depending on the shape of the frequency lattice, so we'n asking how many peaks are there in a half circle of radius w*. This simple.
12 π
1
D
log
(97)
2
12
2
2T
Hence we recover the stated scaling,
N x
(98)
K OPTIMAL RELATIVE ANGLE BETWEEN MODULES
Our analysis of the full loss, Appendix suggested that optimal representations should contain multiple modules, and each module should be chosen such that its frequencies are optimally non- harmonically related to the frequencies in other modules. This is useful principle, but the full implications are hard to work through exactly. In this section coarse calculations to make estimates of one aspect of the relationships between modules: the op- timal relative angle between lattice axes. Our scheme begins by calculating smoothed frequency lattice density as a function of angle, p(w). It then aligns two of these smoothed densities, represent- ing modules, different angular offsets, and finds the angle which minimises the overlap. This angle is the predicted optimal angle. We then extend this to multiple modules by searching over all doubles or triples of alignment angles for the minimal overlap of three or four densities. We will talk through the details of this method, and arrive at the results that are quoted in section 4.2
use rough approximations and
If you imagine standing the origin in frequency space, corresponding to the constant component, and looking to infinity at an angle vi to the kg axis, the density function, p(1), measures, as a function of vb the number of smoothed frequencies that you see, fig I7A. We assume there are many neurons in this module, and hence many frequencies in the frequency lattice. Then we make the same approximation as in eqns. [91 and 99 that the frequency response is a hexagonal grid multiplied by decaying Gaussian. The lengthscale of this Guassian is the first parameter that will effect our results, and it scales linearly with the number neurons in the module. Then we try and capture the repulsive effects of the lattice. Each lattice point repels frequencies over nearby region, as calculated Section E.4 This region of size ~ 1 2F. where L is the exploration lengthscale of the animal. We therefore smooth the grid peaks in our density function by convolving the lattice with a Gaussian. We choose our units such that = 1, then the width of this smoothing Gaussian is also order 1. The second important parameter is then the grid lattice lengthscale. The larger the
41

---

Published as a conference paper at ICLR 2023
grid cell lengthscale the more overlapping the repulsive effects of the frequencies will be, and the smoother the repulsive density, (()). In maths,
00
N k
- 1
DC k (
0,
*N((l 1)k,
(99)
where k, is the radial part of the frequency. We calculate the obvious numerical approximation to this integral, Fig 17B, and in these calculations we ignore the effect of higher harmonics in equation E.4 This isn't as bad as is sounds, since higher harmonics contribute density at the same angle, vi, part of the reason we chose to calculate this angular density.
A)
B)
C)
SMOOTHED ANGULAR DENSITY
Two MODULE DENSITY OVERLAP
P(P)
PA(P))
Axp
D)
THREE MODULE DENSITY OVERLAP
THREE MODULE DENSITY OVERLAP Loo
A
AND
Figure 17: A: Smoothed Angular Density We stand at the origin and look out at angle tb. We then count the density of smoothed grid frequency peaks along this line, where the smoothing occurs over lengthscale 4. B: Smoothed Density Plot. C: Overlap of Density Plots at Offsets A&h This curve shows clear minima 4 degrees from perfect alignment of grid axes. D: Three Module Overlaps The overlap (left) and the log of the overlap (right) show similar patterns as function of the angular offsets between modules, and the overlap minimise for stepwise offsets of around 4 degrees.
The next stage is finding the optimal angle between modules, starting with two identical modules. We do this by overlapping copies of (vll,,,) For simplicity, we start with two identical lattices and calculate the overlap function of angular offset:
P2(Ambl v) 1" p(bll,, + Aulll, v)ds/
(100)
Then the predicted angular offset is,
Ao" arg min م (A AΦ
(101)
42

---

Published as a conference paper at ICLR 2023
Figure I7C shows this is small angular offset around degrees, though it can vary between 3 and degrees depending on i and v. An identical procedure can be applied to multiple modules. For example, for the arrangement of three modules define.
io(A A AW [ ((bll, + Adllu, D)p( + Aib + Anl Il,,, v)de
(102)
and find the pair of offiets that minimise the overlap. For identical modules this also predicts small offsets between modules, of around 4 degrees between each module, Figure[[7p. and similarly three identical modules should be oriented multiples of 4 degrees from a reference lattice (i.e. offsets of 4, 8, and 12). As shown in Figure SE, these small offsets appear to be present in data, validating our prediction.
There are many natural next steps for this kind of analysis. In future we will explore the effect of different lattice lengthscales and try to predict the optimal module arrangement. Another simple analysis you can do is explore how changing the grid lengthscale, effects the optimal relative angle. The larger the grid lattice lengthscale, the smaller its frequency lattice, and the more smooth the resulting repulsion density is. As result, the optimal relative angle between large modules is larger than between small modules, a prediction we would like to test data. would be interesting to apply more careful numerical comparisons, for example matching the and μ those measured in data, and comparing the real and optimal angular offsets.
L ROOM GEOMETRY ANALYSIS
The functional objective depends on the points the animal wants to encode, which we assume are the points the animal visits. As such, the exploration pattern of the animal determines the optimal rangement of grids, through the appearance of p(z) in the functional objective. Different constraints to the exploration of the animal, such different sized environments, will lead different optimal representations. In this section we analyse the functional objective for series of room shapes, and show they lead the intricate frequency biases suggested in Section 4.3
L.I I-DIMENSONAL BOX
To begin and to set the pattern for this section, we will study the representation of 1-dimensional position in finite box. Ignoring the effects of x for now, our loss is,
lefa) g(x')
==
20
dxdxx
(103)
L
Making the symmetry assumption in Section
D our loss is,
1
Ed ain? maals 20
== L
dxdx
(104)
Changing variables to x',
x', Figure 184
Ei 22 2in =m
d3da + [
Ei 13 um am? (g)))
C
20
6
20
d,3da
(105)
212
L+a
Lta Lta
1 L
Ed
2 Mao
202
(L- a)
(106)
1
Jo
Performing the expansion as in Section
we reach:
13 Io
ST
Im T
C =
1
cos(wama)
(L a)
(107)
12
402
A3 Io(
Term A
Term
43

---

Published as a conference paper at ICLR 2023
Term A behaves the same before, again study the series expension of term B, the analogue of equation 77 The 0 order term is constant with respect to the code, but the first order term provides the main frequency biasing effect, as Scction E.4
1/ LP
cos(mwaa)) adda m²12 1P (1 cos(mwaL))
(108)
Hence the I-dimensional box coarsely creates a high frequency bias (> 7)) also encourages frequencies that fit whole numbers of wavelengths within the length of the box, Figure I8B.
Before we move on we will study the second order term. We won't repeat this for future finite rooms as it shows basically the same effeet in Section E.4 coarsly frequencies repel cach other up to a lengthscale 1 7. However, as for the first order term, there additional structure, i.e. subsidiary optimal zeros in the loss, that could be of interest:
//"
d cos(miza)) cos(m' aL adda
2
(109)
1 cos cos(LLmuss m'ww))) (mwa + m (al' )
cos ( m war (mwa- - m (/)
This is fundamentally a repulsion between frequencies closer than from one another, fig 18 Additionally, the repulsion is zero when the difference between frequencies is exactly 2m times an integer.
A) a =
B =
-L
B
-L
x
-L
4
B
-L
B)
1D Box HIGH FREQUENCY BIAS
C)
FREQUENCY COUPLING
Los Box FREQUENCY COUPLING
0
8m
-12
0
4xt
6
8xt
6 Bir
8r L
L
Figure 18: A: Changing Integration Variables The logic behind the integration change in 105 B: ID Box Frequency Bias As in equation 108 shows both a high frequency bias and a preference for integer numbers of wavelengths in the box. C: ID Box Frequency Interaction Plot of equa- tion [09] shows both high frequency bias, repulsion between frequencies. and non-trivial optimal interaction differences.
L.2 2- D-MMENSIONLL BOX
very similar analysis can be applied to the representation of a 2-dimensional box, and used to derive the frequency bias plotted in Figure 5F. We reach exactly analogous point to equation 106
44

---

Published as a conference paper at ICLR 2023
2
1
Dia Ag uin" ddd " dy
==
20
(L- x) yydddy++
(110)
L7
Ed di oh sho Ras Haan
2n
(L x) + yddtrdy
(111)
Again we'll study the first order term of the series expansion.
cos(makkaa)) L) 1 cos(m,
AL1 x
(112)
m²222
m²kk dy
da
This is exactly the bias plotted in Figure 5
Changing to rectangles is easy, it is just rescaling of one axis, which just inversely scales the corresponding frequency axis.
L.3 CIRCULAR ROOM
The final analysis we do of this type is the hardest, a circular environment. It follows the same pattern, make the symmetry assumption, expand the series. Doing so we arrive at the following first order term:
AC - n R2 1/
I1 2T
cos(maks (æ - x' dddeddd or' drdr'
(113)
(r vb rsin
where (r, v)) is a radial co-ordinate system, æ spread the cosine, and rotating the 0 of each up variable to align with kas we get:
Using the double angle formula to
R fea I.
2x cos cos(mr [kall cos ve deprrdr)
R
2T {em
27
AC 2 R
+(
sin(mrllka) cos v debrrr
(114)
The second integral is O, because sine is odd and periodic, We can perform the first integral using the following Bessel function properties.
cos(a cos( 2
(115)
Hence,
4
(J." Jo(mr (kaal)rrr))
AC
(116)
R
Which can be solved using another Bessel function property,
f (Jr(arddr RJI(alt)
R
(117)
Therefore,
AC1 = 4. (ml ( R))
(118)
72 |k
This is exactly the circular bias plotted Figure 5G. Placing the hase frequencies of grid module on the zeros of this bessel function would be optimal, i.e. calling zero then the wavelengths of the grid modules should optimally align with,
2n V
(119)
&x
45

---

Published as a conference paper at ICLR 2023
This corresponds to grids with wavelengths that are the following multiples of the circle diameter: 0.82, 0.45, 0.31, 0.24, 0.19..... Though, as with the other predictions, the major effect is the poly- nomial decay with frequency, so these effects will all be of larger importance for the larger grid modules. As such, we might expect only the first two grid modules to this patter,, the others should, in our framework, focus on choosing their lattice parameters be optimally non-harmonic.
M REPRESENTATIONS OF CIRCLES, SPHERES, AND 3-DIMENSIONS
We believe our approach is relevant to the representation of many variables beyond 2- 2-dimensional space. Most simply we can directly apply the tools we' ve developed to the representation of any variable whose transition structure is group, Section A.I This is actually true for both numerical and analytic approaches, but here we focus mainly on the numerical approach. We discuss the representation of an angle on ring, point on sphere, and dimensional space. Additional interesting variables might include a position in hyperbolic space (since tree-like category structures, such as the taxonomic hierarchy of species, are best described by hyperbolic spaces), or the full orientation of an object 3 3-dimensional space.
For starters, we have frequently referenced the representation of an angle, g(0). This also some- thing measured in brain, in the famous head direction circuit, perhaps the most beautiful circuit in the brain (Kim et al., 2017). There, you measure neurons that have unimodal tuning to heading direction. We match this finding, A9A. This is understandable since, discussed, on finite space you still want lattice module, but X. encourages you to be low frequency and there is no high frequency bias, since the space is finite and p(0) is uniform. Thus, place cells optimal. If we included more neurons it would likely form multiple modules of cells with higher frequency response properties.
We can also apply our work to the representation of a point on a sphere. Again, with the low frequency bias place cells optimal, Figure 19B. Without or conceivably with enough neurons that multiple modules form, you can get many interesting patterns, Figure 19C-D. These could be relevant to the representation of object orientations, or virtual reality experiments where animals must truly explore spherical spaces.
Finally, we can equally apply our framework the representation of point in three dimensional space. Grid cells have been measured while an animal explores in 3D and shown to have irregular firing fields in both bats (Ginosar et al., (02T), and mice (Grieves al.) [202T]. Analogously to the griddy modules in one and two dimensions, our framework predicts griddy three dimensional responses that are similarly densely packing, which verified in I9 However, in Appendix [ we performed ablation studies and found that removing the actionable constraint led to multimodal tuning curves without structure, and we find the same for 3D. Figure [99F perhaps matching the multimodal but unstructured representation found in the brain (e.g. Figure 19G from Ginosar et al. (202T). ) As such, seems that in three dimensions the animals are building a non-negative and discriminative representation without the constraint path integrate. Therefore, we suggest that the animals have sacrificed the ability to manipulate their internal representations in 3D and instead focus on efficiently encoding the space.
46

---

Published as a conference paper at ICLR 2023
A)
B)
PLACE CELLS ON SPHERE
HEAD DIRECTION CELLS: PLACE CELLS ON RING
Longitude
Angle
Latitude
GRID CELLS SPHERE
D)
POLE & ORBIT CELLS ON SPHERE
Longitude
Longitude
Latitude
Latitude
E)
3D GRID CELLS
F)
3D GRID CELLS WITHOUT ACTIONABILITY CONSTRAINT
G)
MULTIMODAL CELLS RECORDED IN BAT ENTORHINAL CORTEX, GINOSAR ET AL. 2021
4.1 Hz
8.3
6.0 Hz
5.7 Hz
6.0
(m)
(m)
X
V (m))
4.5
5.8
Figure 19: Representation of an angle on ring. With a low frequency bias the optimal one module response is set of head-direction cells. B Representation of position on sphere. With a low frequency response place cells are again optimal. C-D Allowing the optimiser to find other modules produces funky looking responses
the sphere, like grids (C) and 'pole & orbit' cells (D.) E A module of densely packing grids in 3D space. The same cells without the actionability constraint, did for 2D in Figure 15 G Recordings of multimodal cells from bat entorhinal cortex from Ginosar et al. (2021)
47


Reviews:
[{"review_id": "n0e4WxLHil", "reviewer": "Reviewer_i5nn", "summary": "", "questions": "", "limitations": "", "rating": 8, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "In this paper, the authors provided a solution of how to parametrically hard code grid cells with learnable parameters in order to be functional, actionable, and biological by minimizing the objective function. Under these three constraints, they showed that hexagonal grid cells are the optimal representation of locations in 1D angular and 2D euclidean space.", "summary_of_the_review": "I’d recommend accepting this paper for ICLR, as it provides a normative explanation for why the multi-module representation of grid cells is the optimal representation of space. The paper is well-written and clearly communicated, but also please remake your hand-drawn figures.", "strength_and_weaknesses": "Strength:\n- To-date, most computational models on grid cell emergence have focused on training a neural network to solve path-integration tasks and selecting grid cells based on their known neuroscientific properties. This creates a possibility, which also applies to other EC-HPC representations, that the neural representations are simply due to correlation with different behavioral variables (i.e. “you see what you’re looking for”). In this paper, the authors only imposed normative constraints rather than assumptions about known properties of grid cells, and still observed grid cells, which fills the gap in the literature on why EC-HPC representations exist in the first place.\n\nMajor weaknesses:\n- Though it provides a good model for grid cell emergence, this framework is somewhat isolated in that it doesn’t consider the interactions between MEC (where grid cells are observed) and other regions in the EC-HPC circuit. For example, under this framework, do grid cells still help explain place cell remapping (Whittington et al., 2020)?\n- The metric described in this paper (i.e. functional, biological, actionable) still does not account for whether the grid cells representations are useful for behavior, which in my opinion is what “functional” should mean. I think it would make the paper even stronger if you could show the connection between your model and path integration behavior, or some other behavioral task, eg. train model on path integration task and do lesion study.\n- As raised in Schaeffer et al., 2022, grid cell emergence depends on hyperparameters and implementation choices. Is that also the case here? Eg. What happens when you increase the number of neurons? Or other hyperparameters listed in section B.3? It would be interesting to see whether the claim from Schaeffer et al. still holds when grid cells emerge from not path-integration but mathematical optimization.\n- One can also see grid cells in non-spatial settings (Whittington et al., 2020), where a different set of constraints may apply (eg. the resolution of representation does not necessarily follow a Goldilocks of frequency). And grid cells have been shown to represent other behaviourally relevant variables besides location, such as time and distance [(Kraus et al., 2015)](https://www.cell.com/neuron/fulltext/S0896-6273(15)00820-X?_returnURL=https%3A%2F%2Flinkinghub.elsevier.com%2Fretrieve%2Fpii%2FS089662731500820X%3Fshowall%3Dtrue) . How can your model account for this? Or is it only applicable to spatial location?\n\n\nMinor weaknesses:\n- Please remake all hand drawn figures, including the ones in appendix, with computer softwares\n- Page 5 first paragraph: “... and $\\theta$ dependent parts (equation 6; Figure 3A)”: 1) Adding a hyphen, i.e. $\\theta$-dependent, might be helpful for readers. 2) Do you mean equation 5?\n- Page 5 first paragraph: “...This effect is limited by the firing rate bound: $||a_0||^2 - 2 L_0 = N$...\"\nDo you mean $1/2 L_0$ ?\n\n", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "4: The contributions are significant, and do not exist in prior works.", "empirical_novelty_and_significance": "Not applicable"}, "extra_text": {}}, {"review_id": "gAxlEvtaJm", "reviewer": "Reviewer_XxrH", "summary": "", "questions": "", "limitations": "", "rating": 8, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "This paper seeks to explain the properties of grid cells. Linear group representation consideration leads to the superposition of sine and cosine plane waves. A specially designed loss function is proposed to explain the emergence of hexagon grid patterns under the constraints of non-negative and bounded firing rate. The paper makes several predictions based on the proposed theory. ", "summary_of_the_review": "The paper provides an interesting explanation of the emergence of hexagon grid patterns of the grid cells. However, the loss function is not minimalistic and the superposition of Fourier plane waves is not generic enough. ", "strength_and_weaknesses": "Strengths: \n\n(1) The proposed loss function is new and reasonable. \n\n(2) The explanation of the emergence of hexagon grid patterns is sound. \n\n(3) The predictions seem to be supported by empirical evidence. \n\nWeaknesses: \n\n(1) The mathematical analysis in the main text is not very rigorous, although it is quite insightful and intuitive. \n\n(2) The superposition of sine and cosine waves seems too restrictive, and may not model biological neurons. \n\n(3) The proposed loss function, although reasonable, is not simple enough to serve as a first principle. \n\n(4) The linear transformation model does not cover the continuous attractor network. \n\n\n", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "JeewcUDIVy", "reviewer": "Reviewer_7jav", "summary": "", "questions": "", "limitations": "", "rating": 5, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "This paper develops a theory to understand the grid cell responses by combining ingredients from existing studies. They articulate three properties that are needed for the grid responses to appear when representing space: actionable, functional, and biological.\nThis paper contains some quite interesting ideas. But at the same time,  it is also highly problematic in multiple ways.  These concerns greatly diminished my enthusiasm for this paper. ", "summary_of_the_review": "An ambitious attempt to unify grid coding theory with several major concerns. Various improvements could be made to strengthen the paper.\n\n==========\nThe revision addressed some of concerns and improved the paper, although some of my conerns remain. In my view, the revision has turned this into a borderline paper. I've increased my score from 3 to 5. ", "strength_and_weaknesses": "Strengths:\n\nThe attempt to unify a somewhat messy literature is ambitious and should be applauded.\nThe proposed three key requirements for the grid patterns, if true, would be a useful finding.\nThe argument in Section 3.1 seems to be quite insightful.\n\n\nWeaknesses:\n\n** The idea of “actionable representation” and the use of representation theory and group theory to study the grid cell system is not a new one (e.g., see a recent line of research in Gao et al, ICLR, 2019; Gao et al., NeurIPS, 2021). The current paper did refer to Gao et al 2021 in the Introduction and had a detailed comparison to that paper in the SI. But it did not acknowledge that using group theory to study the grid cell was a key idea in that line of work. \n\n** The math presented in the paper is not rigorous. Eq. (5) actually is a strong assumption. The paper seems to say that it is a necessary consequence of Eq. (3), thus misleading. Assuming matrix T consists of 1-by-1 and 2-by-2 blocks is a critical assumption that greatly simplified the problem.\n\n** The writing needs to be improved. Various statements need to be toned down. The math in the SI needs to be better organized. Phrases such as “big result” should probably be removed.\n\n** The comparison to the data is rather preliminary and unconvincing.\n\n** Eq. (1) needs to be better motivated. The second and third terms together lead to a band-pass filter— this seems to be rather post-hoc. Previously, it was known that band-pass filtering can lead to grid patterns (Sorscher, Mel, et al, NeurIPS 2019). Some previous studies used the different-of-Gaussian place fields as inputs to the grid cell network, leading to band-pass filtering. This connection needs to be explained.  How the present theory is different from Sorscher, Mel, et al, NeurIPS 2019 also needs to be better explained. \n\n** The study will benefit by treating neural noise more carefully.  It is unclear what assumption the model makes about the neural noise.\n\n** how are Eq (3) and the positivity constraint compatible theoretically? The author seems to impose positivity after using Eq (3). If that is the case, Eq. (3) is no longer satisfied. I’d appreciate further clarification on this point.\n\n\n---Other comments:\n**It is unclear what the next paragraph really means:\n “To motivate our current rabbit hole further, this is exactly the result we hinted towards in Section 2. We discussed T(∆θ), and, in 2-dimensions, argued it was, up to a linear transform, the 2-dimensional rotation matrix. Further, we discussed how every extra two neurons allowed you to add another frequency, i.e. another rotation matrix. These rotation matrices are the irreps of the rotation group, and adding two neurons allows you to create a larger T (∆θ) by stacking rotation matrices on top of one another. Now including the invertible linear transform, S, we can state the 4-dimensional version of equation 4.” \nI interpreted that the authors were making an important assumption here according to their math, but from the text,  it read like there is no assumption involved and everything just follows from the rule of deduction.\n\n**The following might be a useful paper to discuss. While the authors assume that the grid cells are representing one space, there is work suggesting that grid cells may represent multiple spaces.\nSpalla, Davide, et al. \"Can grid cell ensembles represent multiple spaces?.\" Neural Computation 31.12 (2019): 2324-2347.\n", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "2: Several of the paper’s claims are incorrect or not well-supported.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "2: The contributions are only marginally significant or novel."}, "extra_text": {}}]

Author rebuttal:

Decision: Accept: poster