## 2 Spatial Navigation Cell Model
### Grid Cell Update Model Based on Boundary Information  
LAHN is designed as an unsupervised neural network that can obtain the best features from the input information [27]. The superiority of this network is also reflected in the fact that when the input information is limited by the external environment, the network itself can still update the output in real time by adjusting the lateral connections to adapt to the environmental changes [28]. When considering the influence of environmental boundary information on the distribution pattern of grid cells during the movement of the rat, LAHN is introduced in this paper to model the grid cell update mechanism. The self-motion information and boundary cell response values acquired by the encoder are mapped to the input layer of LAHN during the exploration of the environment by the mobile robot, while the excitation level and inhibition level of the grid cells are updated in real time with the movement of the mobile robot. The update rules of this are as follows:  
\[\frac{d\left(\chi_{j}^{\textit{inh}}\right)}{dt}=-\chi_{j}^{\textit{src}} \bigg{[}f(R,\theta)+vw \begin{bmatrix}\cos(\theta_{s})\\ \sin(\theta_{s})\end{bmatrix} \bigg{]}+\chi_{j}^{\textit{inh}}\left[1-\left( \chi_{j}^{\textit{inh}2}+\chi_{j}^{\textit{exc}2}\right)\right] \tag{10}\]  
\[\frac{d\left(\chi_{j}^{\textit{src}}\right)}{dt}=\chi_{j}^{\textit{inh}} \bigg{[}f(R,\theta)+vw \begin{bmatrix}\cos(\theta_{s})\\ \sin(\theta_{s})\end{bmatrix} \bigg{]}+\chi_{j}^{\textit{exc}}\left[1-\left( \chi_{j}^{\textit{inh}2}+\chi_{j}^{\textit{exc}2}\right)\right] \tag{11}\]  
where \(\theta_{s}\) is the angular velocity-aware information and \(W\) is the self-organizing mapping input weight matrix, \(\theta\) represents the directional sensory information of the mobile robot. \(v\) is the current velocity of the mobile robot, where the value of \(\chi_{j}^{\textit{inh}}\) is a negative number indicating the inhibition level of the \(j\)-th grid cell. The value of \(\chi_{j}^{\textit{exc}}\) is a positive number indicating the \(j\)-th grid cell excitation level and \(f(R,\theta)\) is the boundary cell response value. LAHN uses a bipolar activation function and the dependent variable of the activation function takes values from \(-1\) to \(1\), which is when the input and output of the activation  
Figure 4: Activated boundary cells in different scenarios. (**a**) Activated boundary cells under scenario A. (**b**) Activated boundary cells under scenario B. (**c**) Activated boundary cells under scenario C. (**d**) Activated boundary cells under scenario D. (**e**) Activated boundary cells under scenario E. (**f**) Activated boundary cells under scenario F.  
function have the same sign and where the network connection weight is increased, otherwise the network connection weight is instead decreased. The network output value is the grid cell response value and the LAHN output value is shown in Equation (12):  
\[\xi_{i}(t)=\sum\limits_{j=1}^{m}q_{ij}[\chi_{j}^{exc}(t)+\chi_{j}^{inh}(t)]+ \sum\limits_{k=1}^{n}w_{ik}\xi_{k}(t-1) \tag{12}\]  
where \(q_{ij}\) is the forward channel weight, \(w_{ik}\) is the lateral channel weight, \(\xi_{k}(t-1)\) is the grid cell response value at the previous time, \(m\) is the total number of neurons in the LAHN layer, and \(n\) is the number of grid cells. The grid cell distribution maps and their corresponding grid cell firing rate maps were obtained by exploring in the trilateral, pentagonal, and nine-sided environments, respectively, as shown in Figure 5a,c. The control analysis shows that the grid cell clusters converge with the highest firing rate in the center, decreasing layer by layer toward the periphery. In this paper, we introduced the grid cell scoring mechanism, which is shown in Equations (13) and (14) [29; 30; 31]. This mechanism was constructed to score the distribution and activity of the grid cells that are obtained in the three different environments.