Vector Quantization in the Brain: Grid-like Codes in World Models
Authors: Xiangyuan Peng
Xingsi Dong
Si Wu
Venue: NeurIPS 2025 spotlight ()
Keywords: Vector quantization
Brain inspired AI
Grid-like code
World models
Primary area: neuroscience_and_cognitive_science

Abstract: We propose Grid-like Code Quantization (GCQ), a brain-inspired method for compressing observation-action sequences into discrete representations using grid-like patterns in attractor dynamics. Unlike conventional vector quantization approaches that operate on static inputs, GCQ performs spatiotemporal compression through an action-conditioned codebook, where codewords are derived from continuous attractor neural networks and dynamically selected based on actions. This enables GCQ to jointly compress space and time, serving as a unified world model. The resulting representation supports long-horizon prediction, goal-directed planning, and inverse modeling. Experiments across diverse tasks demonstrate GCQ's effectiveness in compact encoding and downstream performance. Our work offers both a computational tool for efficient sequence modeling and a theoretical perspective on the formation of grid-like codes in neural systems.

Vector Quantization in the Brain: Grid-like Codes in World Models
Xiangyuan Peng" 1900012762peng0pzxu edu. cn
Xingsi Dong*t dxs dxs199806050pku edu. cn
Si Wu siwu@pku. edu. cn
PKU-Tsinghua Center for Life Sciences, Academy for Advanced Interdisciplinary Studies. IDG/McGovern Institute for Brain Research, Center of Quantitative Biology, Peking University.
School of Psychological and Cognitive Sciences,
Key Laboratory of Machine Perception (Ministry of Education).
*: Equal contribution.
:: Corresponding authors.
Abstract
We propose Grid-like Code Quantization (GCQ), a brain-inspired method for com- pressing observation-action sequences into discrete representations using grid-like patterns in attractor dynamics. Unlike conventional vector quantization approaches that operate static inputs, GCQ performs spatiotemporal compression through an aetion-conditioned codebook, where codewords are derived from continuous attractor neural networks and dynamically selected based actions. This enables GCQ to jointly compress space and time, serving as a unified world model. The resulting representation supports mong-horzoon prediction, goal-directed planning, and inverse modeling. Experiments across diverse tasks demonstrate GCQ's effec- tiveness in compact encoding and downstream performance. Our work offers both a computational tool for efficient sequence modeling and theoretical perspective on the formation of grid-like codes in neural systems.
Introduction
VQ-VAE introduces discrete latent variables into the autoencoding framework through vector quantization (VQ) (2), allowing the model to compress high-dimensional continuous inputs into discrete, tokenized representations. This capability has led to its widespread application across various domains, including images [3] video [5). speech [6], actions 77], and multimodal data (8), demonstrating its versatility in handling complex, diverse inputs. The success of VQ-VAE under- scores the utility of compressing inputs into reusable codes as a general computational strategy for preprocessing and organizing data across wide range of tasks.
Biological systems face the similar challenge: how to process and represent figh-dimensional. contin- inputs arising from multiple sensory and motor modalities. In parallel, the brain exhibits grid-like codes (GCs), which serve as general-purpel purpose neural patterns for encoding information. GCs are ex- tensively observed across various brain regions. Initially identified in the medial entorhinal cortex for spatial navigation (9. GCs have since been observed in the neocortex 11 12) and associated with representing abstract concepts beyond space, such time and relational knowledge (TO) 11 [3] 14]
This widespread neural activity is characterized by bump-like patterns, periodicity, and typically disentangled representations.
Building on this insight, we propose a brain-inspired VQ method, Grid-like Code Quantization (GCQ), which uses the principles of GCs to structure the codebook. Specifically, to generate grid-like activity patterns, where each stable
continuous attractor
neural networks (CANNs) 15
39th Conference on Neural Information Processing Systems (NcurIPS 2025).

---

state bump acts as a codeword. Due to the finite number of neurons, these bumps naturally form discretized representation [88. Unlike traditional VQ methods that use a static codebook, GCQ introduces an cetion-conditioned codebook: dynamic set of codewords formed by CANN-generane bumps whose transitions are modulated by actions. This enables GCQ to perform quantization not on isolated observations, but on abservation-action sequences, allowing the representations to capture temporal dependencies and behavioral context. Moreover, assigning distinct CANNs to different action types naturally yields disentangled representations, facilitating generalization and compositionality.
The overall GCQ pipeline follows an encoder- quantizer decoder architecture, adapted for action- conditioned sequence compression (Fig. 2 Specifically, the model processes an observation-action sequence, where the action sequence is used to construct an action- conditoondd codebook. and the observation sequence passed through the encoder to produce a corresponding latent sequence. This latent sequence is then quantized via template matching with the action-conditioned codebook. The matched codewords are passed to the decoder, which reconstructs the original observation sequence. Since the codebook is fixed, training requires only commitment loss and reconstruction loss. To enable gradient flow through the discrete quantization step, we use a straight- estimator (STE).
GCQ is a dynamic compression approach that operates on observation action sequences, and therefore serves form of world model [19] [2)]. Unlike prior world models that rely on a two-stage design to separately compress space and time- ttpeiiallllly using models like TQ-VAE for static spatial observations and autoregressive models [21] for temporal dynamics- GCQ performs spatial and temporal compression jointly.
In summary, our contributions are as follows:
To the best of our knowledge, GCQ is the first model to unify spatial and temporal compres- sion through an action-conditiiond quantization process. This enables direct compression of observation action sequences, offering an integrated alternative conventional two-stage world models. (Sec.
GCQ's 's spatiotemporal compression yields a cognitive map, which supports long-horizon prediction, goal coal-directed planning, and the derivation of an inverse model. In particular, goal-directed planning becomes computationally simple, as it reduces to finding sequence of valid bump transitions on the map. (Sec. 5).
GCQ offers insights into the formation of GCs in the brain, enhancing our understanding of neural representations (Sec.p) 6).
2
Related Work
VQ methods Vanilla VAES 122 often suffer from posterior collapse in their latent spaces when compressing gigh-dimensional data 223 impairing downstream tasks. VQ-VAEs [[] address this by enforcing a structured latent space through discretization. Due to their superior compression efficiency and tokenization paradigm, VQ has become standardized module in single-modal preprocessing pipelines in machine learning [3] [.. In multimodal settings, these compressed tokens further act as a universal interface across modalities [5]. Meanwhile, numerous studies have proposed diverse codebook designs to enhance compression rates (24 25 26). Unlike most learnable codebooks, FSQ uses predefined codebook. Similarly, our GCQ utilizes a fixed codebook derived from continuous attractor dynamics. Critically, our method diverges from conventional VQ approaches by performing eequence-to-sequeene template matching rather than single-frame matching.
World models [19 20 provide a framework for predicting future observations conditioned on actions. Most world models based on encoder-decoder architectures first compress observations using a VAE, and then model temporal dynamics in the latent space using temporal predictors such as RNNs [27 28), Transformers (29). S4 models [30], or continuous Hopfield networks [31]. These approaches typically follow a two-stage design, with spatial and temporal compression handled separately. In contrast, GCQ is also an encoder-decoder world model, but it performs spatial and temporal compression jointly. There also exist decoder-only world models [32 that skip explicit compression and directly predict future observations. However, these models often struggle with planning due to the high computational cost of operating in the raw observation space. GCQ, by

---

(A)
(B)
(C)
Attractors
Template matching
Neural activity
Energy
U
etr
CANN
Neural space
366
(D)
(E)
%,0 + 0p
+ Pp
C0p +
Cnp +
Figure I: (A) Schematic of CANN: Each green dot represents neuron uniformly distributed torus. The neurons receive external input I. (B) Energy landscape of CANN dynamies: Each local minimum in the energy landscape corresponds to attractor state, which manifests as 2D Gaussian bump on the torus. (C) Template matching via CANN dynamics: The CANN inherently performs template matching between the external input I and its attractor states. The input / is matched to the attractor that maximizes their inner product. (D) Attractor transition: Under four distinct actions, the attractor initially position (0, O) stabilizes to four attractor states. (E) Due to the periodic boundary conditions of the CANN, bump movements along the two axes naturally form grid-like patterns.
compressing both space and time into compact latent representation, enables efficient planning and inference.
Cognitive map with CANNs Unlike classical attractor networks 33 which store discrete, un- structured Materns-CANNy encode structured patterns organized by metric relationships. This geometric regularity facilitates flexible state transitions through predefined operators (44, enabling operations like metric- based navigation and relational inference. Recent advances [35] have harnessed predefined CANNs as structured latent states for representation learning, empirically validating their ability to model neural population dynamics. Further work [36] proposes that structured latent spaces map biologically memory. However, existing implementations rely on biologically constrained online learning, which limits scalability. Our GCQ framework uses offline learning, enhancing parallelism and enabling application to large-scale datasets.
the entorhinal-hippooampaa loop,
circuit for spatial and episodic
3 CANNs and Template Matching
In this section, we will briefly introduce CANNs, explain how they can form bumps as attractor states. In parallel, for VQ, the latent state obtained by the encoder must undergo template matching with codewords. We will demonstrate that CANNs inherently implement template matching between rep- resentations and bump states through their intrinsic dynamics. Finally, we will show how transitions between distinct attractor states can be mediated by actions.
GCs can naturally modeled by bumps in CANNs (Fig. []). The formation of CANNs does not require complex optimization but relies on cansllaiio-invariann connectivity and periodic boundary conditions. CANNs have been widely used as canonical models elucidate the encoding features in neural systems, including, for example, the encoding of orientation [37), head direction (38 and spatial location 17 39. CANNs can be expressed through various mathematical formulations. Here, we adopt a relatively concise form [16] to demonstrate their principles. We consider 22 neurons distributed on toroidal (S1 x S²) surface. These neurons are indexed by their positions on the torus 0 E (0 and &p E J where 0; and 22 are uniformly distributed over (- T] (Fig. I
Let (p. (t) and (t) denote the synaptic input and firing rate, respectively, of the neuron located

---

at (0, s0) at time t. The dynamics of the CANN are governed by:
(t),s(t) 01 = - (t) +
Σ Wo (0', & vo (t) + (t), 0',2'
(I)
where is the synaptic time constant and p is the neuronal density. (0', (p') is the recurrent neuronal connections weights between neuron (0, (p) and neuron (0', (8)),,
110 113 1lep & 1|'
We (0' (0)0)'))=-
exp
(2)
2Taa
2a
The norm |||ss denotes the shortest path between two points on the circle, ensuring periodic boundary and wranslation-invariant conditions. The parameters J and a control the strength and width of the Gaussian connectivity, respectively. The nonlinear relationship between the firing rate ro (t) and the synaptic input (t) is implemented by divisive normalization, which written as,
Up (1)
To (t) 1 kip Eer.e Wo (0', G/) 0 (1))
(3)
where I controls the normalization strength. In reality, divisive normalization could be implemented by shunting inhibition [40]
Previous studies [16 41l have established that the CANN dynamics governed by Eq. I possess N stationary states (attractors) when the external input l (t) = 0 (Fig. [B). Each state corresponds to 2D Gaussian bump the torus, centered at coordinates (0, sp), with the firing rate of the neuron at position (0', 44)) given by:
100
11' + 11p s
60.0 (6', ('))) = Acxp
2a
where A = [1 32 // J2 1/3] (4Taakkp) is the amplitude. When (t) is constant input, prior work [42] demonstrated that after its removal, the network converges to an attractor determined by:
8", 10" max Σ co, I' P.p
01.5p"
which demonstrates that CANN dynamics effectively perform template matching between the input and the N2 attractors according their inner product. (Fig. IC).
The bump in CANNs exhibit high mobility, enabling controlled movement through mechanisms such
anti-symmetric connections 443, negative feedback [4 [3), velocity neurons [45). Such bump
displacements correspond to transitions between attractor states. For the toroidal CANN described
above, each attractor can undergo local two-dimensional displacements in the 0, y plane. We define two orthogonal action bases aligned with the and &p axes (Fig. [P).
ag eb+A0,o e0,p1 at
e0 E9.yp-
(6)
where App and A denote small displacement step.
4 Grid-like Code Quantization
In this section, we first introduce the action-condittoned codebook GCQ and the template matching process for sequences. We then describe how GCQ enables bidirectional mapping between real- world actions and latent transitions, and propose a greedy operator for measuring distances on the cognitive map to support inverse modeling and planning.
4.1 Action-conditionnd codebook and sequence matching
We first introduce the key difference between GCQ and VQ from high-level perspective. In the VQ method, the encoder first compresses the observation into which is then matched to the closest codes the codebook through template matching, producing The decoder then reconstructs à from s. In GCQ, the input consists of an action-obserration sequence {01, a1, 02, a2...., ). The encoder

---

02
92
action-conditioned codebook
& + Abs
e + Au
91
My + 0g
My 0.2
Fy GLy
8x
Og + R
+ 9/2
Fg Asa
6x
0,
fi dapa
G
2y B0
3,
8,
6 6
Figure 2: Schematic of GCQ: The action-observatie sequence is encoded by the encoder into a latent state composed of m 3 codes. Through sequence template matching with the condiionodd codehook, the decoder reconstructs the predicted observations. The gray arrows indicate the template matching process, and the gray dashed boxes represent the matching targets.
compresses the observation sequence 01:n {0r, O2, ... On into $i:n. which is then matched the closest codes in the retion-conditional codebook via template matching, yielding $1m.. The decoder then reconstructs 01.. from 81:2-
In GCQ, each code corresponds to an attractor in the CANN (Fig. [3). In the previous section, used ( and yp index different attractors; for simplicity, will now natural numbers as attractor indices. Each code consists of d neurons, and the codebook contains K attractors. A where each attractor's center coincides with single neuron. Alternatively, we can set K > d, causing some attractor centers to fall between two neurons. In practice, different combinations of K and d can be selected. The state representation s; E Rm meaning that s; is composed of m codes.
simple implementation sets K
Additionally, manually define mapping between the action sequence a, E A from the dataset and the action combinations applied to the CANNs. For notational simplicity, we hereafter use 0; to refer to action in either the original space the CANN space. In the latter context, a; Rmxd represents the composite action over m bumps, with its component of E Rd denoting the action applied to the j-th bump in Eq. Each CANN supports five distinct actions, resulting in up to 5t possible action combinations across CANNs. Since this mapping is injective, the discrete action space must satisfy |A| < 5th For continuous actions, a CANN can define transitions in two directions, imposing the constraint dim(A)= S 2m.
After establishing the mapping, we quantize the latent representation St:n {sim This representation consists of a set of m parallel sequences, where each s'.,, corresponds to a sequence from one of the m CANNs (as depicted by the dashed lines in Fig. (2) The quantization process is performed independently for each these mn sequences. For each latent sequence si.n. we perform template matching procedure. This involves comparing o against a set of K candidate trajectories. Each candidate trajectory is generated by applying the known action sequence ai.n- to base bump state e;. We denote this operation as:
e, + a (er, + ai...., df.n-1h.
where e; + of ai.n-1 e; + Σー= d. The index of the best-matching codeword for the j-th latent sequence is found by minimizing a distance metric (e.g., the L2 norm) between the latent sequence and each of the K candidate trajectories:
ky = arg min (L...K
||$1.0 - (er @ mfn-1)
(8)
5

---

(A) Long-horizon prediction
(B) Goal-directed planning
0g
Opazi
ey 1
5g
Agraal
S1
Cy
Cy + 61
Et + B13
Ey + G1
By + M44
fy 400g
2 + 012
11.2
8g
9/
8g
3,
Apsal
8,
8/2
8,
Eguat e
8g
Bpoat e 9g
end if = ag
Figure 3: (A) Schematic of long-horizon prediction. The figure illustrates the process of initializing with sequence of length 3 and predicting two future observations. (B) Schematic of goal- goal-directed planning. Some gray arrows are omitted for clarity. The blue arrows represent the mapping from actions in the latent space real agent actions. Through iterative action generation, environment interaction, and observation, the agent continues until it outputs no-op action ag, indicating that the goal has been reached.
Finally, the quantized sequence si.. is constructed using this optimal codeword Eky- The complete quantized representation 81mn is the collection of these individually quantized sequences:
1: Cky + af..- and
$1n = ={ { Jー
When computing the loss in GCQ using backpropagation (BP), we adopt the same straight-through estimator (STE) as in the VQ method, copying gradients from the decoder input the encoder
output to enable gradient flow to the encoder. GCQ uses two loss terms: a reconstruction loss and commitment loss:
I. |0:: 01:1 -2 + ||s::n sg [11..
(10)
where sg[-] denotes the stop-gradient operation and 33 adjusts the strength of the commitment loss.
In GCQ, the encoder and decoder are not designed in the same way as in conventional VQ models. Traditional VQ architectures often use ResNet-based building blocks, which provide each code with only a limited receptive field. As a result, modifying single code typically leads to only local changes in the reconstructed observation. In contrast, GCQ assigns each code an action, and altering the action can result in global changes to the observation. This necessitates that each code has access to global information during encoding and decoding. To address this, we explore three architectural variants for the encoder and decoder: (1) ResNet followed by a fully connected layer, (2) ViT 46). and (3) a hybrid of ResNet and ViT. Among these, ViT achieves the best trade-off in terms of parameter efficiency, training stability, and overall performance (Table I
4.2 Operations cognitive map
GCQ uses a structured latent space, allowing an agent's 's actions in the real environment to correspond simple movements of bumps within the latent space. In effect, GCQ constructs space defined by bump dynamics, which can be interpreted as a cognitive map. By establishing a mapping between observations and this map, actions in the real space be projected onto the map to determine position changes, and conversely, movements within the map can be mapped back to real-space actions. This bidirectional mapping enables GCQ to support both inverse modeling and goal-directed planning, Specifically, to compute the distance between two states 8; and 8j, we define an operation on the cognitive map. Since bump movements are driven and only valid actions produce feasible transitions, we introduce the following operation:
+ 8
arg min |sj + sil. aEAÀ
(11)
This operation represents a greedy step: selects the best valid action a that moves 8, one step closer to

---

(A)
(B)
(C)
(D)
300
100
GCB VOrUNel
VL+
E70
50
50
80
29m 70M
112M
203M
37M 70M
112M
203M
Iital
27
Prodiction Steps
27
2
2
(E)
B sc
Figure 4: (A)(B) Reconstruction FID and prediction FID for GCQ and VQ+UNet across different model sizes. (C) Prediction FID of GCQ varies with changes in the initialization length. (D) Prediction FID of GCQ (#Para:1 12M), VQ+UNet (96M) and VO+Transformer (121M) changes as GSV dataset. The first patch in each represents the trajectory drawn by the action. The first three rows correspond to movement actions, while the last two rows correspond to rotation actions. In practice, different actions encoded within single GCQ, enabling their use. For visualization convenience, they are plotted separately here. Rows 2, and 4 show GCQ predictions with different initialization lengths (orange frames), predicting subsequent observations (blue frames). Rows and show VQ+UNet predictions under the same conditions. As the prediction length increases, the images become blurry.
the prediction length increases. (E) Predictions
5 Experiment
As spatiotemporal compression model, GCQ first evaluated in ablation studies to demonstrate its ability to compress and reconstruct observations. We then show that GCQ, when used as a world model, supports long-horizon prediction, goal-directed planning, and inverse modeling. Compared to traditional two-stage models, GCQ exhibits superior performance in long-range prediction tasks.
Datasets. We evaluate GCQ on four datasets, all of which contain image-based observations. The 2DMaze (7) dataset is virtual environment where actions correspond to the agent's movements. Each observation contains full view of the maze, providing complete information. The Google Street View (GSV) dataset represents real-world environments with partial observations; the actions include both translational movements and rotational head turns two directions. In the MPI3D 48 and 3DShapes 49 datasets, actions are defined as abstract feature-level changes.
Baselines. We compare GCQ with traditional two-stage world models. VQ-VAE is used in the first stage for spatial compression. The codebook size in GCQ and VQ-VAE is kept the same for fair comparison. For modeling temporal relationships,
UNet that predicts the next latent state 8+11 based on the current latent state 8, and action aN We refer to this baseline as 'VQ+UNet." For action embedding the UNet, we follow the approach from LAPO 77. To further model temporal dependencies, we also adopt Transformer-basee architecture following TransDreamer 22 We refer this baseline "VQ=Transformer:
Evaluation Metrics. To evaluate the quality of the model-generated observations, we report peak signal-to-noise ratio (PSNR) for pixel-level reconstruction fidelity, and use the Fréchet Inception Distance (FID) 500 to assess the quality of generated images.
Ablations We first conducted ablation experiments the GSV dataset. Table presents the performance of three different encoder-decoder network building blocks. can be observed that the ViT and Hybrid models achieve better performance with fewer parameters. However, during the
7

---

experiments, we found that the Hybrid model was less stable in training and converged more slowly than VIT. Therefore, unless otherwise specified, all subsequent experiments utilized the ViT-structured network. The GCQ exhibits scalability with model size similar to VQ+UNet, both in reconstruction and prediction. (Fig. A..).
Model type
Image size
#Para.
FIDr
FIDp4
PSNRrt
PSNRpt
Resnet
3 x 80 x 40
330M
48.05
48.57
25.70
25.59
80 x 40
64M
21.29
22.31
29.07
28.54
Hybrid
3 x 128 x 128
140M
41.55
41.91
26.31
25.59
3 x 80 x 40
90M
13.27
13.92
31.32
31.34
VIT
3 x 128 x 128
112M
42.56
43.41
27.82
27.77
Table 1: Model comparisons on the Street View dataset. FIDr, FIDp, PSNRR, and PSNRp represent the FID and PSNR scores for reconstruction and prediction, respectively. 4 and f indicate that lower or higher values are better. The ResNet model was not trained on higher resolution images because its architecture includes fully connected layer after the convolutional backbone, resulting in an excessively large number of parameters.
We also make the bump-like codes in the codebook learnable by using the following loss function:
L = || 01:n11 + ||s1:n - sg [61==]1] ||sg [s1=]] - $1.11
(12)
However, our experiments show that making the codes learnable actually degrades performance. We attribute this to the fact that, unlike the relatively simple codes in VQ, codes exhibit more complex dynamic relationships. Allowing the codes themselves to be trained may therefore reduce training stability.
Model
FIDpl
PSNRpt
GCQ (fixed)
43.41
27.77
GCQ (learnable)
47.76
24.48
Table 2: Effect of learnable vs. fixed codes in GCQ.
Long-horizon prediction. After being initialized with an observation action sequence, GCQ can perform actions directly in the latent space to predict future observations (Fig. (AA). Notably, its prediction performance remains stable regardless of the length of the initialization sequence (Fig. 4C; Fig. 4 rows 1-2). shown in Fig. 4D, the performance of the VQ method degrades as the prediction horizon increases, whereas GCQ maintains robust predictive quality due to its stable latent structure (Fig. 4E, rows 2-3). This is a key advantage of GCQ: by constructing a consistent cognitive map, it effectively addresses the instability issues commonly seen in current world models [51 -uch as inaccurate predictions after completing a full rotation the environment (Fig. 4 rows 4-5). GCQ also demonstrates strong zero-shot prediction capabilities on relatively simple datasets. As shown in 55 rows 1-2, the model produces reasonable predictions in environments it has never encountered during training. Furthermore, by treating abstract feature transitions form of action, GCQ can also be used to predict observation changes driven by abstract-level variations. These predictions likewise exhibit long-range stability (Fig. 5 rows 3-4).
Goal-directed planning. Given goal and an initial position, the GCQ can utilize the distance the cognitive map generate the most desirable action for the current step. After executing the action, new observation is obtained, and this process is iterated, continuously reducing the distance to the goal in the cognitive map until the goal is reached (Fig. 3B, Fig, rows, 1-2). The computation of the action at each step is of constant complexity.
Inverse model. Given sequence of observations, the GCQ can first map them onto the cognitive map and then use goal-directed planning to determine the action or sequence of actions between adjacent observations, thus implementing the inverse model. The corresponding action sequence can be applied to the latent representation of another observation, and using the prediction capability, the generated sequence under this set of actions can be obtained (Fig. rows, 3-4).
8

---

color
Figure 5: With the same setup as Fig. c, Rows 1-2: Prediction on the 2DMaze dataset. Rows 3-4: Prediction on the 3DShapes dataset.
Goal-directed planning
Inverse modeling
Figure 6: Rows 1-2: Goal-directed planning. The first patch shows the trajectory after planning, with orange indicating the starting point, red indicating the endpoint, and blue representing the planned route. The subsequent red-framed patches represent the endpoint, frage-framed patches represent the starting point, and flamef patches represent intermediate observations encountered during the process. Rows 3-4: Inverse modeling. The top row displays the given observation sequence. The bottom row starts with the first patch showing the action trajectory inferred from the observation sequence, with orange indicating the given initial observation, followed by the sequence generated based on the action trajectory.
6 Discussion
In this work, we introduced GCQ, brain-inspired framework for compressing observation-acio sequences into discrete, structured representations. GCQ uses continuous attractor dynamics to generate grid-like codewords, and selects them in an action--ondiitoned manner capture both spatial and temporal dependencies. This spatiotemporal quantization process produces compact latent representations that serve cognitive maps, enabling long- horizon prediction, goal-directed planning, and inverse modeling. Our experiments demonstrate that GCQ supports generalization across tasks while offering interpretability through its structured latent space.
Insights for Neuroscience. Beyond its practical performance, GCQ also offers a new computational hypothesis for the emergence of GCs in the brain. Traditionally, the formation of neurons with structured tuning properties was approached through handcrafted models [52). which provided only limited explanatory power. In contrast, the machine learning paradigm offers a data-driven framework: artificial neural networks are optimized to perform cognitive tasks, and their internal representations are analyzed reveal emergent coding principles. Following this approach, prior studies have shown that GCs can arise when networks are trained to perform path integration under biologically constraints [53 54 55). Subsequent work has emphasized the importance predictive rather than reconstructive objectives [56] and extended the analysis to more general frameworks such as world models and predictive learning [57] Efforts to induce disentangled representations through architectural or loss function constraints have further refined these insights [58] 59) However, the robustness of grid-like pattern emergence remains debated [60, with some studies 61 suggesting that specific architectural features (c.g., one-hot inputs) necessary.

---

Recent developmental findings add a new dimension to this discussion. Experiments show that toroidal activity patterns emerge the medial entorhinal cortex even before sensory experience [62] Intriguingly, such toroidal structures can be naturally modeled by bump attractors in CANNs. This suggests that the brain may possess preconfigured low-dimensional structures capable of bump activity, even prior to learning. Consistent with this, recent work has argued that GCs likely emerge from internal CANN mechanisms rather than from purely feedforward architectures
[63]
This leads us to a novel hypothesis inspired by GCQ: GCs may arise not from optimizing networks, but from learning to map sensory experience onto set of preexisting bump-based activity patterns. In GCQ, the codebook is defined by CANN-generate bumps before learning begins. The learning process then consists of associating observation action sequences with combinations of these fixed codewords. Similarly, we speculate that the brain may use a fixed set of toroidal patterns pproduedd by CANNs-as a biological codebook. Through experience, the brain learns map external sensory inputs onto these internal structures, endowing them with meaning and interpretability, allowing for the decoding of grid-like patterns. This perspective suggests unified model of how the brain may simuitaneously achieve compression and semantic organization of sensory information.
Static Setting. We also evaluated GCQ in static setting, where the sequence length is 1. In this case, we compared GCQ with VQ-VAE on ImageNet [64], finding that GCQ suffered minimal performance degradation. This suggests that the use of a fixed codebook does not significantly harm performance on static tasks. For further details, refer to Appendix A
Scalability of Action. Our current work utilizes 21D attractors, where each has potential transitions (four shifts and one stationary). With such m CANNs, the model can represent 5thh distinct actions. use P-dimensional attractors, the number of states per CANN will become 2 2 1, yielding total action space of (2P + 1)a. Therefore, GCQ can be scaled to higher-dimensional action spaces by adjusting both m and P. For the experiments in this paper, which involve relatively low-dimensional actions, 2D attractors are sufficient.
Future Work. A promising direction for advancing GCQ lies in enabling the encoder and decoder to process entire sequences holistically, rather than treating each sequence element independently. Incorporating ViTs with apatial-temporre attention could serve as an effective approach toward this goal. Moreover, scaling GCQ to larger and more diverse datasets would facilitate a deeper investigation into its generalization capabilities and robustness across broader range of tasks and domains.
Acknowledgments
This work was supported by the National Natural Science Foundation of China (no. T2421004 to S.W.), the Science and Technology Innovation 1930-Brain Science and Brain-inspired Intelligence Project (no. 20212D0200204, W.).
10

---

References
[1] Aaron Van Den Oord, Oriol Vinyals, et al. Neural discrete representation learning. Advances in neural information processing systems, 30, 2017.
[2] Robert Gray. Vector quantization. IEEE Assp Magazine, 1(2):429,, 1984.
[3] Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High- resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF conference computer vision and pattern recognition, pages 10684-10695, 2022.
[4] Patrick Esser, Robin Rombach, and Bjorn Ommer. Taming transformers for high-resolution image synthesis. In Proceedings of the IEEE/CVE conference computer vision and pattern recognition, pages 12873-12883, 2021.
[5] Andreas Blattmann, Robin Rombach, Huan Ling, Tim Dockhorn, Seung Wook Kim, Sanja Fidler, and Karsten Kreis. Align your latents: High-resolution video synthesis with latent diffusion models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 22563-22577 2023.
[6] Tuan Vu Ho. Quoe Huy Nguyen, Masato Akagi, and Masashi Unoki. Vector-quantized varia- tional autoencoder for phase-aware speech enhancement. 2022.
[7] Dominik Schmidt and Minqi Jiang. Learning to act without actions. arXiv preprint arXiv:2312.10812. 2023.
[8] Yecheng Wu, Zhuoyang Zhang, Junyu Chen, Haotian Tang, Dacheng Li, Yunhao Fang, Ligeng Zhu, Enze Xie, Hongxu Yin, Li Yi, al. Vila-u: unified foundation model integrating visual understanding and generation. arXiv preprint arXiv:2409.04422 2024.
[9] Torkel Hafting, Marianne Fyhn, Sturla Molden, May-Britt Moser, and Edvard I Moser. Mi- crostructure of a spatial map in the entorhinal cortex. Nature, 436(7052) 2005.
[10] Christian F Doeller, Caswell Barry, and Neil Burgess. Evidence for grid cells in human memory network. Nature,
2010.
[11] Alexandra O Constantinescu, Jill X O' O'Reilly, and Timothy EJ Behrens. Organizing conceptual knowledge humans with gridlike code. Science, 1644-168,, 2016.
[12] Joshua Jacobs, Christoph T Weidemann, Jonathan F Miller, Alec Solway, John F Burke, Xue- Xin Wei, Nanthia Suthana, Michael Sperling, Ashwini D Sharan, Itzhak Fried, et Direct recordings of grid-like neuronal activity in human spatial navigation. Nature neuroscience, 16(9): 180-)118811199 190, 2013.
[13] KiJung Yoon, Sam Lewallen, Amina A Kinkhabwala, David W Tank, and Ila R Fiete. Grid cell responses in ld environments assessed slices through 2d lattice. Neuron, 1985-1088-1, 2016.
[14] Dmitriy Aronov, Rhino Nevers, and David Tank. Mapping non-spatial dimension by the hippocampal-entorhinndd circuit. Nature, 543(7647):719-722,, 2017.
[15] Shun-ichi Amari. Dynamics of pattern formation in lateral-inhibitiinn type neural fields. Biolog- ical cybernetics, 27(2):77-87, 1977.
[16] Si Wu, Kosuke Hamaguchi, and Shun-ichi Amari. Dynamics and computation of continuous attractors. Neural Computation, 20(4):994-1025 2008
[17] Yoram Burak and Ila R Fiete. Accurate path integration in continuous attractor network models of grid cells. PLoS computational biology, 5(2)xe10002) 2009.
[18] Marcella Noorman, Brad K Hulse, Vivek Jayaraman, Sandro Romani, and Ann M Hermundstad. Maintaining and updating accurate internal representations of continuous variables with handful of neurons. Nature Neuroscience,
2024.
11

---

[19] Jürgen Schmidhuber. Making the world differentiable; On using self- sulf-supervised fully recurrent eu al networks for dynamic reinforcement learning and planning in -oa-ttaiionayy environments, 1990.
[20] Yann LeCun. A path towards autonomous machine intelligence version 0.9. 2, 2022-06-27. Open Review, 62(1), 2022.
[21] Grégoire Delétang, Anian Ruoss, Paul- Paul-Ambooise Duquenne, Elliot Catt, Tim Genewein, Christo- pher Mattern, Jordi Grau-Moya, Li Kevin Wenliang, Matthew Aitchison, Laurent Orseau, et al. Language modeling is compression. arXiv preprint arXiv:2309. 10668, 2023.
[22] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
[23] Ananya Harsh Jha, Saket Anand, Maneesh Singh, and VS Rao Veeravasarapu. Disentangling factors of variation with cycle-consistent variational auto-encoders. In Proceedings of the European Conference on Computer Vision (ECCV), pages 805-820, 2018.
[24] Sander Dieleman, Charlie Nash, Jesse Engel, and Karen Simonyan. Variable-rate discrete representation learning. arXiv preprint arXiv:2103.06089, 2021.
[25] Aurko Roy, Ashish Vaswani, Arvind Neelakantan, and Niki Parmar. Theory and experiments on vector quantized autoencoders. arXiv preprint arXiv: 1066, 2018.
[26] Fabian Mentzer, David Minnen, Eirikur Agustsson, and Michael Tschannen. Finite scalar quantization: Vq-vae made simple. arXiv preprint arXiv:2309.155500 2023.
[27] Junyoung Chung, Kyle Kastner, Laurent Dinh, Kratarth Goel, Aaron C Courville, and Yoshua Bengio. A recurrent latent variable model for sequential data. Advances in neural information processing systems, 28, 2015.
[28] Danijar Hafner, Timothy Lillicrap, Ian Fischer, Ruben Villegas, David Ha, Honglak Lee, and James Davidson. Learning latent dynamics for planning from pixels. In International conference on machine learning, pages 2555-2565, PMLR, 2019.
[29] Chang Chen, Yi-Fu Wu, Jaesik Yoon, and Sungjin Ahn. Transdreamer: Reinforcement learning with transformer world models. arXiv preprint arXiv: 09440, 2022.
[30] Mohammad Reza Samsami, Artem Zholus, Janarthanan Rajendran, and Sarath Chandar. Mas- tering memory tasks with world models. arXiv preprint arXiv:2403.04253, 2024.
[31] James Whittington, Timothy Muller, Shirely Mark, Caswell Barry, and Tim Behrens. Gener- alisation of structural knowledge in the hippocampal-entorhing system. Advances in neural information processing systems, 31, 2018.
[32] Amir Bar, Gaoyue Zhou, Danny Tran, Trevor Darrell, and Yann LeCun. Navigation world models. arXiv preprint arXiv:2412.03577, 2024.
[33] S-I Amari. Learning patterns and pattern sequences by self- self-organizing nets of threshold elements. IEEE Transactions on computers, (00(1))1119-111 1972.
[34] Junfeng Zuo, Ying Nian Wu. Si Wu, and Wenhao Zhang. The motion planning neural circuit in goal-directed navigation as lie group operator search. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024.
[35] Xingsi Dong, Xiangyuan Peng, and Si Wu. Predictive learning in energy-based models with attractor structures. arXiv preprint 37Xiv 2025.
[36] Sarthak Chandra, Sugandha Sharma, Rishidev Chaudhuri, and Ila Ficte. Episodic and associative memory from spatial scaffolds in the hippocampus. Nature, pages 1 1-13, 2025.
[37] Ben- Yishai, R Lev Bar-Or, and Sompolinsky. Theory of orientation tuning in visual cortex. Proceedings of the National Academy of Sciences, (19))3844-3848 1995.
12

---

[38] Kechen Zhang, Representation of spatial orientation by the intrinsic dynamics of the head- direction cell ensemble: a theory. The Journal of Neuroscience, 16(6):2112-212,, 1996.
[39] Bruce L McNaughton, Francesco P Battaglia, Ole Jensen, Edvard I Moser, and May-Britt Moser. Path integration and the neural basis of the cognitive map'. Nature Reviews Neuroscience, 7(8):663-678, 2006.
[40] Simon J Mitchell and R Angus Silver. Shunting inhibition modulates neuronal gain during synaptic excitation. Neuron, 38(3):433 2003.
[41] C. C Alan Fung, K. Y. Michael Wong, and Si Wu. A moving bump in a continuous manifold: comprehensive study of the tracking dynamics of continuous attractor neural networks. Neural Computation, 22(3)755--792, 2010.
[42] Sophie Deneve, Peter Latham, and Alexandre Pouget. Reading population codes: neural implementation of ideal observers. Nature Neuroscience, 2(8):740-745, 1999.
[43] Yuanyuan Mi, CC Fung, KY Wong, and Si Wu. Spike frequency adaptation implements anticipative tracking in continuous attractor neural networks. Advances in neural information processing systems, 27, 2014.
[44] K Wong, He Wang. Si Wu, and Chi Fung. Attractor dynamics with synaptic depression. Advances in Neural Information Processing Systems, 23, 2010.
[45] Wenhao Zhang, Ying Nian Wu, and Si Wu. Translation-equiiariaat representation in recurrent networks with a continuous manifold of attractors. Advances in Neural Information Processing 3 35:15770-177788,, 2022.
[46] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010. 1929, 2020.
[47] Karl Cobbe, Christopher Hesse, Jacob Hilton, and John Schulman. Leveraging procedural generation to benchmark reinforcement learning. arXiv preprint arXiv: 2019.
[48] Muhammad Waleed Gondal, Manuel Wuthrich, Djordje Miladinovic, Francesco Locatello, Martin Breidt, Valentin Volchkov, Joel Akpo, Olivier Bachem, Bernhard Schölkopf, and Stefan Bauer. On the transfer of inductive bias from simulation to the real world: a new disentanglement dataset. In H. Wallach, H. Larochelle, A. Beygelzimer, d' d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019.
[49] Chris Burgess and Hyunjik Kim. 3d shapes dataset. https///gthhbbooom/ee/mmn///aaas dataset/, 2018
[50] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. Advances in neural information processing systems, 30, 2017.
[51] Fei Deng, Junyeong Park, and Sungjin Ahn. Facing off world model backbones: Rnns. transformers, and s4. Advances in Neural Information Processing Systems, 36:72904-72930, 2023.
[52] David H Hubel and Torsten N Wiesel. Receptive fields and functional architecture of monkey striate cortex. The Journal of physiology, 195(1):15--243 1968.
[53] Christopher Cueva and Xue-Xin Wei. Emergence of grid-like representations by training recurrent neural networks to perform spatial localization. arXiv preprint 17x3v:1803.07770. 2018.
[54] Andrea Banino, Caswell Barry, Benigno Uria, Charles Blundell, Timothy Lillicrap, Piotr Mirowski, Alexander Pritzel, Martin J Chadwick, Thomas Degris, Joseph Modayil, et al. Vector- based navigation using grid-like representations artificial agents. Nature, 557(7705):4294433 2018.
13

---

[55] 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.
[56] Stefano Recanatesi, Matthew Farrell, Guillaume Lajoie, Sophie Deneve, Mattia Rigotti, and Eric Shea-Brown Predictive learning as network mechanism for extracting www-dmensiooal latent space representations. Nature communications, 12(1):1417, 2021.
[57] James CR Whittington, Timothy H. Muller, Shirley Mark, Guifen Chen, Caswell Barry, Neil Burgess, and Timothy EJ Behrens. The tolman-eichenbaur machine: unifying space and relational memory through generalization in the hippocampal formation. Cell, 183(5):1249- 1263, 2020.
[58] James CR Whittington, Will Dorrell, Surya Ganguli, and Timothy EJ Behrens. Disentanglement with biological constraints: A theory of functional cell types. arXiv preprint arXiv:2210.01768, 2022.
[59] Yusi Chen, Huanqiu Zhang, Mia Cameron, and Terrence Sejnowski. Predictive sequence learning in the hippocampal formation. Neuron, 112(15):245-22658 2024.
[60] Ben Sorscher, Gabriel Mel, Aran Nayebi, Lisa Giocomo, Daniel Yamins, and Surya Ganguli. When and why grid cells appear not in trained path integrators. bioRxiv, pages 2022-11, 2022.
[61] Rylan Schaeffer, Mikail Khona, and lla Fiete. No free lunch from deep learning in neuroscience: case study through models of the wwwtorhinal-ippocaaaaee circuit. Advances in neural information processing systems, 35:16052-16067, 2022.
[62] M. GUARDAMAGNA, E. HERMANSE, J. CARPENTER, C. LYKKEN, B. DUNN, E. I. MOSER, and M.-B. MOSER. ieniiienne--deeeedeentt emergence toroidal and ring manifolds in the entorhinal cortex. Neuroscience Meeting Planner. Chicago, II. Society for Neuroscience, 2024. Online, (PSTR 190.07. 2024), 2024.
[63] Richard Gardner, Erik Hermansen, Marius Pachitariu, Yoram Burak, Nils A Baas, Benjamin A Dunn, May-Britt Moser, and Edvard I Moser. Toroidal topology of population activity in grid cells. Nature, 602(7895):123-1222 2022.
[64] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large- scale hierarchical image database. In 2009 IEEE conference on computer vision and pallern recognition, pages 248-255 Icce, 2009.
14

---

NeurIPS Paper Checklist
1. Claims
Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?
Answer: [Yes]
Justification:
Our abstract and introduction accurately reflect the paper's contributions and
scope.
Guidelines:
The answer NA means that the abstract and introduction do not include the claims made the paper.
The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No
NA answer to this question will not be perceived well by the reviewers.
The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.
is fine to include aspirational goals as motivation as long as is clear that these goals not attained by the paper.
2. Limitations
Question: Does the paper discuss the limitations the work performed by the authors?
Answer: [Yes]
Justification: See Section 6
Guidelines:
The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.
The authors are encouraged to create a separate "Limitations" section their paper.
The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect how these assumptions might be violated in practice and what the implications would be.
The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on few datasets or with few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.
The authors should reflect on the factors that influence the performance of the approach. For example, facial recognition algorithm may perform poorly when image resolution is low images are taken in low lighting. Or speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.
The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.
If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.
While the authors might fear that complete honesty about limitations might used by reviewers as grounds for rejection, worse outcome might be that reviewers discover limitations that aren't 't acknowledged judgment and recognize that individual actions in favor of transparency play impor- tant role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.
the paper. The authors should use their best
3. Theory assumptions and proofs
Question: For each theoretical result, does the paper provide the full set of assumptions and complete (and correct) proof?
Answer: [Yes]
15

---

Justification:
See Section
Guidelines:
The answer NA means that the paper does not include theoretical results.
All the theorems, formulas, and proofs in the paper should be numbered and cross- referenced.
All assumptions should be clearly stated referenced in the statement of any theorems.
The proofs can either appear in the main paper or the supplemental material, but they appear in the supplemental material, the authors are encouraged to provide short proof sketch provide intuition.
Inversely, any informal proof provided in the core of the paper should complemented by formal proofs provided in appendix or supplemental material.
Theorems and Lemmas that the proof relies upon should be properly referenced.
4. Experimental result reproducibility
Question: Does the paper fully disclose all the information needed to reproduce the main ex- perimental results of the paper to the extent that affects the main claims and/or conclusions of the paper (regardless whether the code and data are provided or not)?
Answer: [Yes]
Justification: See Section 5 and the code in supplementary material.
Guidelines:
The answer NA means that the paper does not include experiments.
If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.
If the contribution is dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.
Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g.. in the case of large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.
While NeurIPS does not require releasing code, the conference does require all submis- sions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example
(a) the contribution is primarily a new algorithm, the paper should make clear how to reproduce that algorithm.
(b) the contribution is primarily a new model architecture, the paper should describe the architccture clearly and fully.
(c) If the contribution is new model (e.g., a large language model), then there should either way to access this model for reproducing the results or way to reproduce the model (e.g., with an open-source dataset instructions for how to construct the dataset).
(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reprodueibility. the case of closed-source models, may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers have some path to reproducing or verifying the results.
5. Open access to data and code
Question: Does the paper provide open access to the data and code, with sufficient instruc- tions to faithfully reproduce the main experimental results, as described in supplemental material?
16

---

Answer: [Yes]
Justification:
We have included the code for reproducing the main results supplementary
material.
Guidelines:
The answer NA means that paper does not include experiments requiring code.
Please see the NeurlPS code and data submission guidelines (https://nips.. cc/
for more details.
While we encourage the release of code and data, we understand that this might not be possible, "No" is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).
The instructions should contain the exact command and environment needed to run reproduce the results. See the NeurlPS code and data submission guidelines (https /nipss.cc/pullic//uu guwdes/ddee/// Cot//ooooeeesiseeeeeeeeee wwwplimmsssioooooooooooooooi for more details.
The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.
The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. only subset of experiments are reproducible, they should state which ones are omitted from the script and why.
At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).
Providing as much information possible in supplemental material (appended to the paper) recommended, but including URLs to data and code is permitted.
6. Experimental setting/details
Question: Does the paper specify all the training and test details (e.g., data splits, hyper- parameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?
Answer: [Yes]
Justification: See Section 5
The answer NA means that the paper does not include experiments.
The experimental setting should be presented in the core the paper to a level of detail that is necessary appreciate the results and make sense of them.
The full details can be provided either with the code, appendix, or as supplemental material.
7. Experiment statistical significance
Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Question:
Answer: [Yes]
Justification:
We used fid and PSNR to evaluate our work.
Guidelines:
The answer NA means that the paper does not include experiments.
The authors should answer "Yes" if the results are accompanied by error bars, confi- dence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.
The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, overall run with given experimental conditions).
The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)
The assumptions made should be given (e.g.. Normally distributed errors).
should be clear whether the error bar is the standard deviation the standard error of the mean.
17

---

It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have 96% CI, if the hypothesis of Normality of enrors is not verified.
For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out range (e.g. negative error rates).
If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.
8. Experiments compute resources
For each experiment, does the paper provide sufficient information on the com- puter resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?
Question:
Answer: [Yes]
Justification: See Section
Guidelines:
The answer NA means that the paper does not include experiments.
The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.
The paper should provide the amount compute required for each of the individual experimental runs well estimate the total compute.
The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g.. preliminary or failed experiments that didn't make into the paper).
9. Code of ethics
Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https: htt.://......ouloccccttccicaaaaa
Answer: [Yes]
Justification: Our work conform with the NeurlPS Code Ethics.
Guidelines:
The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.
If the authors answer No, they should explain the special cireumstances that require deviation from the Code of Ethics.
The authors should make sure to preserve anonymity (e.g., if there is a special consid- eration due to laws or regulations their jurisdiction).
10. Broader impacts
Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?
Answer: [NA]
Justification: There is societal impact of the work performed.
Guidelines:
The answer NA means that there is no societal impact of the work performed.
If the authors answer NA or No. they should explain why their work has no societal impact or why the paper does not address societal impact.
Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.
The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that improvement in the quality of generative models could be used to
18

---

generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people train models that generate Deepfakes faster.
The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.
there are negative socictal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).
11. Safeguards
Does the paper describe safeguards that have been put in place for responsible release of data models that have high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?
Question:
Answer: [NA]
Justification: The paper poses such risks.
Guidelines:
The answer NA means that the paper poses no such risks.
Released models that have high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.
Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.
We recognize that providing effective safeguards challenging, and many papers do require this, but we encourage authors to take this into account and make best faith effort.
12. Licenses for existing assets
Are the creators original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?
Question:
Answer: [Yes]
Justification: We cite the related paper.
Guidelines:
The answer NA means that the paper does not use existing assets.
The authors should cite the original paper that produced the code package dataset.
The authors should state which version of the asset is used and, if possible, include URL.
The name of the license (e.g., CC-BY 4.0) should be included for each asset.
For scraped data from a particular source (c.g., website), the copyright and terms of service of that source should be provided.
If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, wwppppswpptseeee wwworeewwthhhe....c. com/ datasets has curated licenses for some datasets. Their licensing guide can help determine the license of dataset.
For existing datasets that are re-packaged, both the original license and the license of the derived asset (if has changed) should be provided.
this information is not available online, the authors are encouraged to reach out to the asset's is creators.
13. New assets
Question: Are new assets introduced in the paper well documented and the documentation provided alongside the assets?
19

---

Answer: [Yes]
Justification:
See the documentation in supplementary material.
Guidelines:
The answer NA means that the paper does not release new assets.
Researchers should communicate the details the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.
The paper should discuss whether and how consent was obtained from people whose asset used.
At submission time, remember to anonymize your assets (if applicable). You can either create anonymized URL or include an anonymized zip file.
14. Crowdsourcing and research with human subjects
Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well details about compensation (if any)?
Answer: [NA]
Justification:
The paper does not involve crowdsourcing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Including this information the supplemental material is fine, but if the main contribu- tion of the paper involves human subjects, then as much detail as possible should be included the main paper.
According to the NeurIPS Code of Ethics, workers involved in data collection, curation, other labor should be paid at least the minimum wage in the country of the data collector.
Institutional review board (IRB) approvals or equivalent for research with human subjects
Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or equivalent approval/review based on the requirements of your country or institution) were obtained?
Answer: [NA]
Justification: The paper does not involve crowdsourcing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Depending on the country in which research is conducted, IRB approval (or equivalent)
may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.
We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.
For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.
16. Declaration of LLM usage
Question: Does the paper describe the usage of LLMs if it is an important, original, or non-standard component of the core methods in this research? Note that if the LLM is used only for writing, editing, or formatting purposes and does not impact the core methodology, scientific rigorousness, originality of the research, declaration is not required.
Answer: [NA]
20

---

Justification:
LLM is used only for writing.
Guidelines:
The answer NA means that the core method development in this research does not involve LLMs as any important, original, or non-standard components.
Please refer to LLM policy htteas////earrppcocc////o/rreerp for what should or should not be described.
21

---

A
Static Setting
40
Epoch=20
(8)
Epoch=50
GCQ
GCQ
VQ
20
VQ
15
20
10
10 24
2
26
2
2
2
24
2
26
2
2
2
Codebook Size K
Codebook Size
(C)
Figure 7: To evaluate the performance of GCQ in a static setting, we conducted experiments on the CIFAR-10 and ImageNet datasets. Figures (A) and (B) show that, for both GCQ and VQ. the FIDr decreases as the codebook size K increases. At 20 training epochs, GCQ outperforms VQ. whereas at 50 epochs VQ achieves better results. Figure (C) compares the reconstructions produced by GCQ and VQ on ImageNet: the first row shows the original images, the second row the reconstructions obtained with GCQ, and the third row those obtained with VQ.
B Experiment Details
Here are the hyperparameters used in the experiment. All programs run on an NVIDIA A100-SXM4- 80GB. The experiments reported in this paper, including the ViT, ResNet, and Hybrid networks, required 8-12 hours of training each. For ViT and hybrid architectures, we trained for 40 epochs with learning rate of le-4; for the ResNet network, we trained for 100 epochs with learning rate of 3e-4. All training runs used the Adam optimizer.
C Python Implementation
Our Python implementation of GCQ is fully vectorized, relying exclusively matrix operations without any for loops. This design makes it highly amenable to parallelization.
def (self, latents: Tensor, label: Tensor) Tensor]:
Tuple [Tensor,
Vector quantization for sequence data with parallel processing support for batch dimensions
Args:
latents: Tensor of shape [B x S x x W] label: Tensor of shape [B S 4] representing the change from current frame next frame
Returns:
10
quantized: Quantized tensor of shape [B X vq_loss: Vector quantization loss
22

---

B, S, D. H, latents. shape #
14
15
device latents device
16
Reshape to processable form latents latenta. view (B, S, D, N) permute 3, 4, 1, 2).
contiguous() [B, 4, N, S, = latents. view 4, N, s D)
19
20
Construct expanded embeddings without 1oops rearrange to [B, 4, 8] shout_amounts (label (label.permute permute 2, 1) 1)ngo self.steph # [B,
22
label: [B, S,
23
4, S]
# Construct indices for rolling: for each shift_amoumt against self. embedding.weight
25
First generate indices [k], then calculate new indices via broadcasting: new_idx = (arange (K) shift) % K
26
k_idx = torch. arange (sengesself... (self.K, device=device). (1, 1, 1, self.K) [1,1,1,K]
27
After expanding shift_amounts: [B,4,8,1] rolled_indices
28
(k_idx shift_amounts unsqueeze (-1)) % self.K
[B, 4, S, K]
# Using rolled_ indices extract embeddings from
enbedding_ resulting shape [B,4,8,K,D]
exbended_embed self embedding. [ndiced_ irolledei [B,4,8,K D]
30
31
# Adjust dimensions: exchange [K] and [S] positions before merging and
32
expanded_ embed expanded_ embed permute (0, 1, 3, 2, contiguous [B,4,K,S,D] Finally reshape to [B, 4, K, S*D]
33
expanded_eemeddding
embed (B, 4, self. K, s D)
36
Calculate nearest neighbor indices factor_latents:
37
A = factor_latente (B,,, expanded_ [B,4,K,
38
# [B,4, 1B,4,N,S*DD
B B_expand = sepaaded_embeedeee
# [B,4,K,S*D] b_ay (A ** 2). sum (dim=-1, keepdim=True)
[B,4,8,1]
41
B_sq (B_expand
2). sum (dim=-1) unsqueeze (-2) [B 4,1,K]]] cross = torch. matmul (A, B_expand. (ranspose(-11 -2)) [B,4,N,
42
K]
dist = b_sq B_sq cross # [B,4,N,K]
44
encoding.inds dist. arggiin(i((d)))-)) [B,4,N]
45
46
# Sample vectors from expanded according to indices
using torch gather
expanded_embeddine shape [B,4,K, sampling on dim=2
48
incoding_inds_ert encoding_inds unsqueeze (-1) ( -1, -1,
D) # [B,4,N,
49
embedding_resulte torch gather (expanded 2,
encoding.iids__zp) [B,4,N,S+D]
51
commitment_low F. memm seee_oss
factor_latent
embedding.results factor laatots (embedding_resuutt
factor_latente detach
[B,4,N,S=D]
55
embedding.resulte umbedding_reaulte view 4, N, S, D)
54
embedding. mabedding_resute permute (0, 3, 4, 1, 2).
(ontiguous(..veeee view s, D, H. W)
return embedding_results. commitment_los
23


Reviews:
[{"review_id": "4GCR2S5IT6", "reviewer": "Reviewer_rhSR", "summary": "Quantization/discretization are widely used in tokenization for generative models, producing compositional or interpretable token , bottlenecking information flow within a model and many other application. However, most discretization method have their own limitation, such as unnecessary information loss and difficulty of optimization due to non-differentiable steps.\n\nThe authors proposed a brain-inspired quantization method that uses attractor which allows conditional generation of codes(concepts), which allows the quantizer to be used as a dynamic/world model to capture trajectory of action-state sequences. Under different actions/condition,\nthe attractor stabilizes at attractor states.  The authors provided a detailed explanation of CANNs , which provides necessary backgrounds to reviewer unfamiliar to the field ,like me. The inspiration of the method design was drawn from grid cells from animal/human brains and the method creates space similar to bump dynamics in human brain, which the authors interpreted as a cognitive map.\n\nEvaluation of the model was conducted on  Street View dataset, 2DMaze and other 2 datasets, in which use cases method really works like a world model", "questions": "I am not an expert of attractors but the attactors do not have to stablize , right? Therefore, the method can be used for a mixture of continuous and discrete tokens?", "limitations": "The main limitation is , the experiments only show adv. of the quantization method in dynamic modelling/world modeling applications. However, there many other cases quantization are needed, where are not discussed/experimented on in this study", "rating": 6, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 4, "clarity": 4, "significance": 4, "originality": 4, "strengths_and_weaknesses": "Strength:\n\n1) important quantization contribution that conditioned on action \n2) interesting idea to use attractor to generate code \n3) amazingly show the potential use as a world model \n4) detailed explanation inspiration (equations 1-8)\n5) well designed and conducted experiments \n\nWeekness:\n\n1) Though it is nice to draw inspiration from the brain , some parts are \"over inspired\" such as the cognitive map. Simply use description such as \"landscape\" or \"manifolds\" will work\n\n2)The experimental design focus on dynamic/world model like behaviors . If that is the major focus of the author, the tittle and introduction need to pitch that way", "was_revised": true, "final_justification": "I looked the authors' replies to my questions , as well as to other reviewers' questions, especially reviewer  imb7 and wNwm. The quality of the work is high and the quality of the reply are decent. Therefore, I like to raise my score and wish this work can help improve discrete tokenization methods used widely in generative model community", "rebuttal": "Thanks for your positive and constructive reviews. We are grateful for your recognition of our work's originality and primary contributions—the quantization method and the concept of attractor-as-code—and for your encouraging comments on that our model has potential to be used as a world model and that our experiments are well designed.\n\n---\n\n### **Response to Weakness**\n\n1.  Thank you for the constructive suggestion. We agree that using more standard terminology improves the paper's clarity. Accordingly, we will revise the manuscript by replacing 'cognitive map' with 'attractor landscape' throughout the text. We believe this change makes the concept more accessible to broader audience, and we appreciate your suggestion on this.\n\n2.  We agree to highlight the focus of our work is on dynamic/world model. Indeed, a key contribution of our work is replacing the conventional codebook in VQ with attractors (GCQ), thereby directly compressing spatiotemporal information in sequential data. As a result, GCQ can handle all tasks that standard VQ can, such as image, video, speech, action, and multimodal data. In the design of our experiments we chose to demonstrate GCQ’s strengths in the context of world modeling, as it is the most natural application. We appreciate this insightful suggestion and agree that emphasizing this aspect more strongly would benefit readers. We will revise both the title and introduction accordingly in the final version to underscore GCQ’s role as a world model.\n\n---\n\n### **Response to Questions**\n\nThanks for raising this insightful question. Your intuition is absolutely correct, and you’ve highlighted a fascinating aspect of attractor networks. While the term \"attractor\" implies stability, the structure of that stability is not limited to a single, fixed point. This leads to different types of representations:\n\n- Discrete Attractors: In many classic networks (like Hopfield networks), the system stabilizes into one of several isolated, discrete points in the state space. These are ideal for representing discrete tokens.\n\n- Continuous Attractors: It is also possible for attractors to form continuous structures (e.g., a line or a ring of stable states). These are perfectly suited for encoding continuous-valued tokens.\n\nThis leads directly to your main point: yes, our method can be used for a mixture of continuous and discrete tokens, specifically, continuous attractors for continuous-valued tokens and discrete attractors for discrete tokens.\n\n---\n\n### **Response to Limitations**\n\nWe agree that quantization is needed in many contexts. Thus, our method has broad applicability and potential contributions across a range of domains, including those mentioned in the response to Weakness 2. In this paper, we chose to focus our experiments on dynamic/world model settings where GCQ’s advantages are most direct. We also demonstrate an additional application to image compression in Appendix A. We will add discussions about these potential applications in the revised manuscript, and in future work, we will explore them through extensive experiments. \n\n---\n\nOnce again, we sincerely thank you for your recognition of our contributions, the novelty of our idea, and the rigor of our experimental studies. Your positive evaluation and feedback are invaluable to us. We also appreciate your constructive suggestions on terminology, presentation, and broader applicability. We are committed to incorporating the corresponding revisions in the final version of the paper."}, {"review_id": "St9RNyGBuq", "reviewer": "Reviewer_imb7", "summary": "Grid-like Code Quantization or GCQ is introduced as a brain-inspired alternative to conventional vector-quantization schemes. Instead of learning a static codebook, GCQ derives its discrete codes from bumps in continuous-attractor neural networks or CANNs, whose periodic lattice naturally mirrors the grid-cell patterns seen across the cortex. By letting actions shift these bumps, the method performs action-conditioned quantization of entire observation–action sequences, jointly compressing space and time into a single latent representation that functions as a world model and a cognitive map.\n\nGCQ retains the familiar encoder, quantizer, and decoder pipeline but replaces frame-wise template matching with sequence-to-sequence matching against an action-conditioned codebook. Each latent slot is tied to one CANN; valid actions translate the bump within that CANN, so planning becomes a search for a legal bump trajectory. The authors test three backbone families, finding a ViT encoder-decoder comes out on top. Across four vision datasets GCQ matches or surpasses a two-stage baseline that couples VQ-VAE with a UNet dynamics model, which isolates the strength of the CANN-based codebook. Because its latent map is intrinsically stable, GCQ’s prediction FID stays flat as rollout length grows, whereas the baseline blurs quickly. The same map also enables constant-time goal-directed planning and an inverse-model that infers the action sequence connecting two observations. Ablations show the ViT variant attains the best reconstruction (PSNR) and prediction quality with far fewer parameters than a ResNet counterpart.\n\nBeyond engineering gains, the authors frame GCQ as a new hypothesis for how grid codes may emerge based on recent debates in the field between learned representations versus baked-in architectural constraints. Rather than being learned, the toroidal bump manifold could be pre-wired, with learning devoted to mapping sensory streams onto these pre-existing codewords. This view reconciles recent developmental data showing toroidal structure before experience, and it suggests that efficient compression and semantic organization may share a single neural substrate. Future work will scale GCQ to larger datasets and explore sequence-level ViT architectures, while probing the limits of fixed codebooks in more complex settings.", "questions": "I would welcome a clearer picture of how the proposed model relates to canonical hippocampal place-cell phenomena. Right now the paper analyses only grid-like bumps; showing receptive-field heat-maps or other evidence of place-like units—or explaining why such units do not emerge—would ground the biological claims and sharpen the contribution. Relatedly, the mapping from environment actions to CANN displacements is currently hard-coded. Please either supply a short empirical justification for this choice (e.g., ablation showing that a learned mapping offers no benefit) or re-frame it explicitly as future work so that readers understand the design trade-off. In Section 3, the three pages of continuous-attractor derivations interrupt the narrative flow; moving those equations into Methods or an appendix and replacing or adding to Figure 2 with a simpler schematic (perhaps with an inset zoom on the “multi-CANN codebook to decoder” path) would greatly improve readability. Finally, the sentence that cites “instability issues commonly seen in current world models” needs a reference, and the very last paragraph would read more professionally if phrased less casually.\n\nAddressing the first two points (place-cell analysis and a justification (or learning) of the action-to-CANN mapping) would directly increase the perceived biological and methodological rigor, lifting my Quality and Significance scores by at least one notch. Conversely, if the final version retains the current ambiguity on those fronts, my overall rating may drop to the “borderline” range despite the paper’s conceptual appeal.", "limitations": "There is no broader societal impact to consider in this work and the paper is correct to not address this point.\n\nThe paper could do a better job at considering limitations in the hard-coding of action sets as mentioned in previous sections of this review and could in general situate itself more productively between the two aims of world modelling and constructing a biologically-plausible computational cognitive map. If the aim is more to be a strong world modelling model, then the paper should have much more robust benchmarks against the existing cited world model papers, particularly on downstream RL tasks. If the aim is to be a more biologically-plausible grid cell model, then the paper should carefully consider and explain certain decisions such as offline learning, completely separated CANN modules, and hard-coded action sets.", "rating": 5, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 4, "originality": 4, "strengths_and_weaknesses": "Overall, the paper offers a creative and technically appealing proposal. The mathematical development of the CANN codebooks is careful and correct; the derivations tie neatly to the implementation, demonstrating solid technical quality. The work sits at an interesting and important intersection of machine-learning world models and neuroscientific cognitive map theory, and, if substantiated, could inspire new latent-space designs for long-horizon prediction while providing hypotheses about grid-cell coding. The conceptual novelty is genuine: although VQ-based world models and cognitive-map transformers exist, none combine several CANN lattices with vector quantization in order to achieve the stated architecture-based biological realism and improvements over existing world model implementations. Finally, the prose is readable and the related-work section does a good job of situating the contribution.\n\nDespite this, the paper displays several significant limitations. The model is benchmarked against only a single, hand-rolled baseline, with no modern Dreamer- or RSSM-family comparisons and no statistical uncertainty reported; planning success is illustrated with image strips rather than quantitative metrics. Including further benchmarks could aid in cementing a model such as this as an important bridge between the fields of computational cognitive mapping and world modelling. Important implementation details such as hyper-parameters, compute budget, and codebook ablations are relegated to a one-page appendix, undermining reproducibility. The paper may gain improvements in readability by moving the technically dense description of the CANN architecture to the Methods section. (which, though not unique to this paper, has several parts of its description which are crucial to the understanding of the new model). Several of the figures are confusing, particularly Figure 2. This figure is too dense in its current state to be introduced so early in the text, and should more clearly indicate that the blank rows indicate separate CANNs. The paper would benefit from a few more additions in order to support its claims about biological insight: namely, some discussion of the analog to place cells would be appropriate in a model meant to emulate hippocampal dynamics at a fine enough grain to have grid cell analogs. Additionally, the paper makes a potentially bold stride away from biological realism in its hard-coded actions and should include either further justification of this choice or some discussion of how this could be rectified in future work. The paper also makes a bold claim in its discussion about current world model solutions facing collapse, which should be cited or shown in experimental comparisons against the new model. Finally, the discussion section lapses into a conversational tone that dilutes the scholarly narrative, and there are a few minor spelling and grammatical errors which should be screened for the final version.", "was_revised": true, "final_justification": "In light of the very useful modifications made during the rebuttal of my review for this paper, I would like to update my overall score from a 4 to a 5. In particular, a more rigorous defense of the use of hard-coded actions with an ablation study and further discussion, as well an appropriate rebuttal for my question regarding place cells, influenced my decision. I also felt that the discussion with reviewer wnzM regarding the VQ-VAE setup was particularly helpful, and that the VQ+Transformer baseline addition by the authors better situates this work in the current literature. Finally, though I cannot currently review the improvements that were made in response to my critiques on the formatting, references, and Figure 2, I appreciate that the authors took on these updates and I believe that the paper is stronger with these and the other changes.", "rebuttal": "Thank you for your positive and insightful review. It is rewarding to hear that you found our proposal 'creative and technically appealing' and the mathematical derivations of 'solid technical quality'.  We are glad that you recognized our work has the potential to inspire new latent-space designs, especially for challenging long-horizon prediction tasks. We believe this brain-inspired perspective allows us to introduce a novel and effective architecture to the machine learning community. Your appreciation—acknowledging that our 'conceptual novelty is genuine', the theoretical derivations show 'solid technical quality', and the paper is 'readable'—are greatly encouraging to us.\n\n---\n\n### **Responses to Questions**\n\n* We thank the reviewer for this insightful question. It allows us to clarify the conceptual framing of our work and its relationship with computational neuroscience.  \n\n  &nbsp;\n\n  To begin, we'd like to outline the distinct functional roles of the two cell types in question. Grid cells are fundamentally associated with path integration \\[1]. Their activity is conditioned by self-motion (i.e., they are **bound to action**) and they provide a universal spatial metric that does not globally remap across different environments. In contrast, place cells are crucial for localization by recognizing specific places. Their firing is driven by environmental sensory cues, causing them to **remap** when the environment changes \\[2], and they are not directly bound to specific actions.\n\n  &nbsp;\n\n  Given this functional distinction, the design of our model and its core objective naturally align with the principles of grid cells. The main reason for not considering place-like cells is that our model aims to build an **action-conditioned world model**, a task we see as a generalization of the principle underlying grid cells. Specifically, the world model learns to predict a future latent state based on the current state and a given action ($s_{t+1} = s_t+a_t$) as expressed by Eq.(6-7). This process of modeling the environment's transition dynamics is a generalized form of path integration. Consequently, the latent representation our model utilizes is naturally a grid-cell-like code that is bound to the applied action.\n\n  &nbsp;\n\n  The emergence of place cells, on the other hand, is tightly linked to binding specific sensory inputs (e.g., visual landmarks) to locations. Our model is not optimized for this sensory-associative function. By focusing on the generalized transition dynamics, our architecture is designed to factor out environment-specific sensory details in favor of a universal state representation. Therefore, the absence of place cells is confirmatory evidence that our architecture has effectively isolated and replicated the specific neural computational mechanism we target for: a universal, action-based state prediction.\n\n  &nbsp;\n\n  We agree that integrating a place-cell-like mechanism is a valuable direction for future work. As the reviewer suggests, this would sharpen the model's biological grounding and expand its capabilities. For instance, in future work on SLAM tasks where recognizing and relocalizing within previously seen environments is crucial, a place-cell-like module would be essential. This module could help bind the grid-like representations from our current modules to a specific environmental context, providing a mechanism for global remapping. However, this is beyond the scope of our current contribution.\n\n* Regarding your second point, we would like to provide a clear justification for our choice of hard-coded actions. Our approach is grounded in experimental evidence showing that grid-like bumps shift in correlation with an animal’s movements [3]. In our model, this principle translates to the mapping between an action and its corresponding displacement in the latent CANN space. While the scaling factor of this mapping could be learnable, we opted to fix it in our design.\n\n  &nbsp;\n\n  To validate this choice, we conducted an ablation study where the scaling factor was learnable. The results showed a decline in performance compared to using hard-coded actions. We hypothesize that this is because a non-stationary (i.e., constantly changing) latent transition destabilizes the training process. A constantly shifting transition makes it significantly more difficult for the model to learn the mapping between latent states and observations, thus hindering convergence. The outcomes of this ablation are shown in the table below (For FIDp, lower is better. For PSNRp, higher is better).\n\n  |             |   FIDp | PSNRp |\n  | ----------- | ------ | ------ | \n  | GCQ (fixed)   | 43.41 |27.77|\n  | GCQ (learnable) | 47.76 | 24.48|\n\nWe hope this explanation and ablation study address your **two main questions**. We will incorporate these clarifications into the final version of the paper to address the ambiguity. Please don’t hesitate to discuss them with us if further questions arise. Now, we turn to your remaining questions.\n\n* We agree with your recommendation to move the continuous attractor derivations from Section 3 to the **Methods** section in the final version for improved clarity and narrative flow.\n\n* Regarding Figure 2, we will revise it to add an inset zoom on the “multi-CANN codebook to decoder” path, to more clearly indicate that the blank rows correspond to separate CANNs. (Apologies that we cannot include the revised figure here due to the rebuttal policy.)\n\n* Thank you for pointing this out. We will add reference [4] to support the statement on “instability issues commonly seen in current world models.” Additionally, we would like to point out that the experiment shown in Figure 4(D) provides empirical evidence, showing that the performance of the VQ method degrades as the prediction horizon increases.\n\n* We will also revise the phrasing in the last paragraph to adopt a more academic tone.\n\n---\n\n### **Responses to Weaknesses**\n\n* As you suggested, we have conducted a comparative experiment with a stronger benchmark by replacing the UNet with a Transformer whose architecture is based on TransDreamer [6] (Transformer-SSM is a variant of RSSM). The table below shows the FIDp score as a function of the prediction step, similar to the analysis in Fig. 4D. Lower is better.\n\n  |    Prediction Steps  |  1  | 2   | 4 | 8 |16|32|\n  | ----------- | ------ | ------ | ------ |------ |------ |------ |\n  | VQ+Unet (96M) | 51| 78| 115| 149| 159| 164|\n  | VQ+Transformer (121M) | 61 | 64 | 71 | 79 | 88 | 111 |\n  | GCQ (112M) | 42| 44| 43| 44|44 |44|\n\n  Additionally, we report the planning success rate as a quantitative metric for evaluation(2DMaze dataset). \n\n  |             | 542M   | 307M   | 140M   |\n  | ----------- | ------ | ------ | ------ |\n  | seen goal   | 97/100 | 93/100 | 68/100 |\n  | unseen goal | 91/100 | 88/100 | 65/100 |\n\n  We believe these additional benchmarks strengthen our model's claims. While we were unable to complete the full statistical uncertainty analysis due to time constraints, we commit to including these results and the complete analysis in the final version of the paper.\n\n  We also commit to including more detailed hyper-parameters, compute budget, and codebook ablations in the final appendix. We have submitted our experimental code in the Supplementary Material to ensure reproducibility.\n\n* The remaining points you raised—including relocating technically dense description to the Methods section, providing further discussion on place cells and hard-coded actions, citing instability issues in world models along with empirical support, and adopting more academic language in the discussion—have all been addressed in detail in the **Responses to Questions** section above. We also commit to carefully proofreading the final manuscript to eliminate 'minor spelling and grammatical errors'. We sincerely thank you for your attentive review.\n\n---\n\n### **Response to Limitations**\n\nAs addressed in **Response to Questions**(point two), we provide a detailed justification for the hard-coding of action sets, along with ablation results comparing to a learnable mapping variant. \n\nAs clarified in **Response to Weaknesses**, our work focuses on world modeling, and we included an additional benchmark using a stronger modern baseline (TransDreamer). Our experiments on goal-directed planning and inverse modeling are common downstream tasks for world models [5]. In future work, we plan to incorporate other modules such as place cells and boundary cells to support a broader range of downstream RL tasks and SLAM.\n\n---\n\nIn summary, we sincerely thank you again for your positive assessment and constructive suggestions on our work. We have responded thoroughly to your concerns, especially the two main clarification requests mentioned in your *Questions*. We hope our responses help to increase the perceived biological plausibility and methodological rigor of the work. We commit to implementing all proposed revisions in the final version of the paper. We hope our responses have answered all your questions and please feel free to reach out if any further clarification is needed.\n\n---\n\n[1] Microstructure of a spatial map in the entorhinal cortex. \n\n[2] Hippocampal remapping and grid realignment in entorhinal cortex. \n\n[3] Path integration and the neural basis of the'cognitive map'.\n\n[4] Facing off world model backbones: Rnns, transformers, and s4.\n\n[5] Learning to act without actions.\n\n[6] TRANSDREAMER: REINFORCEMENT LEARNING WITH TRANSFORMER WORLD MODELS."}, {"review_id": "bCLvB9Vaqy", "reviewer": "Reviewer_wnzM", "summary": "The paper introduces Grid-like Code Quantization (GCQ) which observation–action sequences into discrete codes by leveraging grid-pattern attractor dynamics. GCQ compresses both spatial and temporal information via an action-conditioned codebook: codewords are generated from continuous attractor neural networks and are selected dynamically based on the executed action. Experimental results show that GCQ delivers significant gains in long-horizon prediction, goal-directed planning, and inverse modeling tasks.", "questions": "Please see strengths and weaknesses.", "limitations": "Yes", "rating": 5, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 3, "strengths_and_weaknesses": "### **Strengths**\n\nThe proposed Grid-like Code Quantization (GCQ) for compressing observation–action sequences into discrete representations is novel. As discussed in the experiments, this quantization delivers clear advantages for long-horizon prediction and goal-directed planning through an inverse-model interpretation.\n\n### **Weaknesses**\n\nThe method and experimental sections are overly generic and omit several important implementation details.\n\n**Method**\n\n- Section 3 states that, given an input $I$, GCQ maps $I$ onto one of $N^2$ attractors that make up the codebook. Equation (6) then defines two orthogonal action bases whose indices align with those attractors, yielding an action-conditioned codebook. The authors claim that GCQ compresses both spatial and temporal information.\n\n  For comparison, consider VQ. Given an embedding $z$, VQ usually partitions z into m subvectors, $z = \\[z_1, …, z_m\\]$, each of which is mapped to its closest codeword (product quantization). When a sequence of observations is quantized, consecutive observations may share codewords and thus capture temporal correlation. Because the manuscript does not specify the exact VQ variant, it is unclear how the baselines were configured. Could the authors specify the set-up used for VQ?\n\n- Figure 2 (“Schematic of GCQ: latent state composed of m = 3 codes”) is difficult to follow. Equation (6) implies that an action corresponds to a transition between attractors (or observations). If a single observation is represented by m attractors, how is the composite action defined? Please clarify how multiple codes are jointly updated when one atomic action is applied.\n\nTo aid readability, it would help to first describe a typical VQ configuration and then highlight how GCQ deviates from it. This parallel presentation would create a more intuitive bridge for the machine-learning community.\n\n**Experiments**: The experimental setup lacks critical details for adjust the advantage and avaluate the comparision.\n\nTable 1 is the sole quantitative result, yet it does not convincingly demonstrate the efficacy of GCQ. Additional metrics—for example, reconstruction error and planning success rate—would strengthen the empirical evidence.\n\n\n - Please clarify what “model size” denotes in Figure 4a. In VQ-VAE the codebook size is crucial, so does your reported size include the codebook parameters or only the encoder–decoder backbone? How do you ensure the comparison is fair?\n\n- Line 204-205: Because the action embedding builds on Latent Action Policies (LAPO), it is unclear that **goal-directed planning and Inverse model properties** are gained stem from GCQ and which stem from LAPO. A direct LAPO baseline is therefore necessary.\n\n- Goal-directed planning: Line 229 states that a goal and an initial position are provided. Is goal conditioning seen during training, or is it only applied at test time?\n\n**0verall:** \n- I think the method is innovative and potentially very impactful, but the manuscript needs substantial improvements in clarity and completeness.\n\n- I apologize for any misunderstandings; I am happy to revisit my evaluation and adjust the score once these points are clarified.", "was_revised": true, "final_justification": "I have carefully reviewed the rebuttal discussion and additional experiments, which address my concerns, specifically:\n- The author has clarified the design of the VQ model, which was unclear in the initial paper, and has promised to update this in the revised paper.\n- The author has committed to adding a description of the typical VQ configuration before introducing GCQ, ensuring such a comparison will benefit readers.\n- The author has conducted additional experiments (planning success rate), which I would have liked to see in the rebuttal.\n\nI also reviewed the author's rebuttal to the other reviewer. Based on these responses, I raise the overall score to 5 and adjust the quality and clarity scores accordingly.", "rebuttal": "Thank you for the valuable and constructive comments, the recognition of the novelty of our work on using GCQ for compressing observation–action sequences,  and the acknowledgement of our method’s potential advantages for long-horizon prediction and goal-directed planning.\n\n   ---\n\n### **Response to Weaknesses**\n\n#### **Method**\n\n* We would like to clarify the set-up used for the VQ baseline. As stated in the Baselines section (line 201) of the manuscript, the model referred to as “VQ” is in fact a two-stage architecture, consisting of a VQ-VAE [1] followed by a UNet. We adopted this term as a shorthand for brevity, and we apologize if this naming led to any confusion.\n\n  &nbsp;\n\n  The rationale for this design is as follows: This two-stage architecture is essential for our world modeling task, which requires processing sequences of observations and actions. The VQ-VAE component handles the compression of static images into discrete latent codes ($o_t\\to z_t$). However, to model the evolution of these codes over time, an explicit temporal model is necessary. The UNet's role, therefore, is to explicitly model the temporal dynamics across the sequence of these latent codes ($(z_t,a_t)\\to z_{t+1})$. It is worth noting that unlike the VQ baseline model, our GCQ does **not** rely on a two-stage architecture, as it integrates spatiotemporal compression within a unified framework— which represents a key contribution of our work. \n\n  &nbsp;\n\n   It is important to note that this two-stage design is a standard and widely adopted practice in recent world modeling literature. Many state-of-the-art methods first use a VQ-VAE or VAE for spatial compression and then employ a separate, powerful sequence model (like a Transformer, RNN or UNet) to capture temporal dependencies [2][3]. Our choice of the baseline model is therefore consistent with established approaches in the field.\n\n  &nbsp;\n\n   To ensure this is clear to all readers, we will revise the manuscript to replace the \"VQ\" shorthand with the full term \"**VQ+UNet**\" throughout the text, tables, and figures. We hope this explanation clarifies our experimental setup, and we thank you for helping us improve the precision of our paper.\n\n  &nbsp;\n\n   In our main experiments, the specific UNet architecture we used is identical to the one proposed in the LAPO paper . To further strengthen our comparison and demonstrate the robustness of our approach, we also conducted additional experiments with a **VQ+transformer** baseline. For this, we replaced the UNet with a Transformer whose architecture is based on TransDreamer [2]. The results, summarized below, show that our proposed method outperforms both the UNet-based and the Transformer-based baselines. The table below shows the FIDp score as a function of the prediction step, similar to the analysis in Fig. 4D. Lower is better.\n\n  |    Prediction Steps  |  1  | 2   | 4 | 8 |16|32|\n  | ----------- | ------ | ------ | ------ |------ |------ |------ |\n  | VQ+Unet (96M) | 51| 78| 115| 149| 159| 164|\n  | VQ+Transformer (121M) | 61 | 64 | 71 | 79 | 88 | 111 |\n  | GCQ (112M) | 42| 44| 43| 44|44 |44|\n\n* Let us first clarify the notation. In the paper, each frame is compressed to $m$ codes and $e_j$ denotes the $j$-th code ($j=1,...,m$). $a_i$ refers to the action vector applied to all codes at time step $i$. When an action $a_i$ is applied to a latent state composed of $m$ codes, each code $e_j$ undergoes a transition determined by the $j$-th component of $a_i$, denoted $a_{i,j}$. To make this process clearer, we have revised the manuscript and replaced Equation (7) with the following:\n   $$\n   e_j \\oplus a_{1:n-1} = \\lbrace e_j, e_j + a_{1,j}, \\dots, e_j + a_{1:n-1,j} \\rbrace \\tag{7*}\n   $$\n\n  &nbsp;\n\n   As an example, for a latent state composed of $m = 3$ codes, consider a moving agent. We would first manually define the overall bump transitions corresponding to different movements. For instance, \"move left\" is defined as $a_{left} = [a_\\theta^+, 0, 0]$ (the first bump moves slightly in the positive theta direction, while the other two bumps remain stationary). At time step $i$, the latent code is $s_i$, and the movement at the $i$-th time step is to the left, i.e., $a_i = a_{left}$. Then, $s_{i+1} = s_i + a_i$ (the first bump of $s_i$ moves slightly in the positive theta direction, while the other two bumps remain stationary).We hope this clarification and the updated equation address your concern.\n\n This is a great suggestion—we will add a description of the typical VQ configuration prior to introducing GCQ, as we agree that such a comparison would benefit readers.\n\n---\n\n#### **Experiments**\n\nFirst, we would like to point out that Table 1 reports PSNR—a widely used metric for **reconstruction error** that serves as a perceptual measure of image compression performance. Also the FID scores reported in Table 1, Figure 4(A)(B)(C)(D), and Figure 7(A)(B) are also standard and widely adopted metrics for assessing the quality of generated images.\n\nAdditionally, we have conducted supplementary experiments measuring the planning success rate, and the results are shown in the table below(2DMaze dataset):\n\n\n|             | 542M   | 307M   | 140M   |\n| ----------- | ------ | ------ | ------ |\n| seen goal   | 97/100 | 93/100 | 68/100 |\n| unseen goal | 91/100 | 88/100 | 65/100 |\n\n\nWe will incorporate these results into the final version of the paper. We hope these additional experiments help substantiate the effectiveness of GCQ.\n\n1. In the case of GCQ, the model size refers to the encoder–decoder backbone, as the codebook in GCQ is non-trainable and does not contain learnable parameters. In contrast, the VQ baseline requires both a VQ-VAE and an additional network (e.g., UNet) to complete the experimental tasks—VQ-VAE alone is insufficient. Therefore, we reported the total parameter count of this two-stage pipeline. Importantly, GCQ and VQ are matched in terms of compression ratio and codebook size, ensuring a fair comparison. The reported model sizes reflect all learnable parameters in the entire systems.\n\n2. In fact, **GCQ alone** is fully capable of learning action embeddings and accomplishing all tasks in our experiments, including long-horizon prediction, goal-directed planning, and inverse modeling. This is a key advantage of GCQ over VQ. While VQ requires additional modules—such as the UNet from LAPO—to construct a two-stage world model, GCQ integrates spatiotemporal compression into a single, unified framework without relying on any auxiliary architecture.\n\n   Importantly, LAPO components are used **only** for the VQ-based baselines and play no role whatsoever in the implementation, training, or evaluation of GCQ. We hope this clarification resolves any potential misunderstanding.\n\n3. For the GSV dataset, we used images seen during training as the goals for goal-directed planning. In contrast, for the 2DMaze dataset, we used goals that were unseen during training. This approach was chosen because the GSV dataset has a complex data distribution, and the limited amount of data used for our training makes generalization challenging. In our future work, we plan to leverage a larger dataset to enable planning to unseen locations within the GSV dataset.\n\n---\n\nFinally, we once again thank you for recognizing the innovative nature and potential impact of our work. We hope our responses address your concerns and misunderstandings regarding both the methodology and experimental design. We also appreciate your constructive suggestions, and we commit to incorporating the corrected equation and additional experiments into the final version of the paper.\n\n---\n\n[1] Neural discrete representation learning.\n\n[2] Transdreamer: Reinforcement learning with transformer world models.\n\n[3] Efficient World Models with Context-Aware Tokenization."}, {"review_id": "jfSmr8Ygdx", "reviewer": "Reviewer_NYvu", "summary": "The authors propose grid-like code quantization (GCQ) as a brain-inspired method for compression of observation-action sequences into discrete tokens through grid-cell-like bumps in continuous attractor neural networks. GCQ builds an action-conditioned codebook for (spatio-)temporal data rather than a fixed codebook on static inputs. They provide experiments on 2DMaze, Google Street View, MPI3D, 3DShapes and static CIFAR/ImageNet tasks to show how GCQ outperforms standard VQ baselines (which are coupled with a U-Net for temporal sequences). GCQ also demonstrates superior long-horizon prediction, goal-directed planning and inverse modeling compared to the baselines. The authors connect their model to neuroscience literature and provide a theoretical perspective on grid-cell emergence in the brain.", "questions": "- Can you confirm that the number of CANNs required $m$ scales logarithmically with the number of possible actions $|A|$ that can be represented by the GCQ model?\n- What is the computational cost of the matching, is it $O(mKn)$ (for $n$ sequence length, $m$ CANNs and $K$ attractors)? In that case, matching cost would become prohibitive for video-scale resolutions and $n>>10$. Is there a way around this?", "limitations": "- The paper does not address how to handle continuous action spaces, or scalability to very large discrete action spaces. \n- GCQ depends critically on action labels, which limits its applicability on real-world data that doesn't have action labels.", "rating": 5, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 4, "strengths_and_weaknesses": "**Strengths**\n- GCQ integrates spatial and temporal quantization into a unified model for spatiotemporal compression via an action-conditioned codebook (avoiding two-stage pipelines like VQ+U-Net).\n- Actions correspond to explicit bump shifts in the attractor network which yields a cognitive map with interpretable latent structure that is conducive to inverse modeling. \n- Empirical results show strong performance of the method on relevant benchmarks, while also still performing well on static image benchmarks. Particularly, the long-horizon predcition and planning is impressive.\n- The authors offer a data-driven hypothesis (that is grounded in strong performance on real ML benchmarks) for how grid-cell codes exist in attractor networks and support learning sensory representations that are effective for predictions and planning. \n- It appears that GCP is compatible with any encoder-decoder backbone and the authors present an ablation of different backbones that shows that the ViT backbone strives a good trade-off between efficiency and performance. \n\n**Weaknesses**:\n- GCQ requires explicit, discrete action labels and an injective mapping $|A| \\leq 5^m$ which limits applicability where actions are unknown or continuous. \n- It is not clear how fine-grained actions or high-dimensional control can be captured with the fixed bump shifts without scaling $m$. This scaling of $m$ (and thus, compute) on more  complex tasks  is not studied.\n- Evaluated primarily on small-scale image sequences and synthetic mazes; scalability to complex, real-time video or continuous-control domains remains untested (e.g., BAIR robot pushing, Kinetics-600, driving benchmarks).\n- Impact of noise or action-mislabeling on the template-matching quantizer is not analyzed.\n\nMinor: \n- Line 276: \"GCQ converged faster\" is not quite right because the performance of GCQ has not converged yet at the point of comparison. It simply performed better at lower training time but was eventually surpassed by VQ.", "was_revised": true, "final_justification": "I appreciate the additional experiments and explanations that the authors provided during the rebuttal. I would encourage the authors to include their explanation for scaling the dimensionality of attractors $P$ and the number of CANNs $m$ in the paper, I found it very instructive. I am happy to keep my score of 5 in support of this work.", "rebuttal": "We sincerely thank the reviewer for your positive and insightful feedback. We are very encouraged by your recognition of our work's key strengths, including our unified GCQ model that integrates spatial and temporal quantization via an action-conditioned codebook, the interpretable latent structure yielding a cognitive map conducive to inverse modeling, the strong empirical performance, particularly on long-horizon prediction and planning, and our well-supported, data-driven hypothesis for the function of grid-cell codes. Your accurate summary and positive assessment are greatly appreciated.\n\n---\n\n### **Response to Weaknesses**\n\n1.  The reviewer correctly points out that the version of GCQ presented in this manuscript is designed for tasks with explicit, discrete action labels. We totally agree that extending GCQ to continuous or unknown action spaces is a valuable research direction. In fact, we have already begun theoretical and experimental explorations of GCQ variants for these scenarios.\n    *   For continuous action spaces, we plan to use a variant to replace the discrete bump shifts with rotation matching based on continuous rotation angles  (similar to RoPE method) .\n    *   For unlabeled action spaces, we leverage the strong temporal correlation between adjacent frames in a sequence as a supervisory signal, enforcing that the codes for proximate frames should also be closely related.\n\n    Our preliminary results indicate that these variants are not only feasible but also achieve promising performance. We consider this a significant avenue for future work and plan to report our findings in a subsequent publication.\n\n2.  The reviewer raises an important point about scaling to finer-grained or higher-dimensional action spaces. There are two primary mechanisms to scale the representative capacity of GCQ:\n    *   Increasing the number of CANNs ($m$).\n    *   Increasing the dimensionality of the attractors ($P$).\n    As described in Line 123, our current work utilizes 2D attractors, where each has 5 potential transitions (four shifts and one stationary). With $m$ such CANNs, the model can represent $5^m$ distinct actions. If we use P-dimensional attractors, the number of states per CANN will become $(2P+1)$, yielding a total action space of $(2P+1)^m$. Therefore, GCQ can be scaled to higher-dimensional action spaces by adjusting both $m$ and $P$. For the experiments in this paper, which involve relatively low-dimensional actions, 2D attractors are sufficient.\n\n3.  We concur with the reviewer that evaluating GCQ on complex domains such as real-time video and continuous control is a great direction for extending our work. As mentioned in our response to point 1, the variant using continuous rotation matching is well-suited for continuous control tasks and it is designed with an efficient matching algorithm to maintain computational performance. We have already conducted preliminary experiments on datasets like TartanDrive, RECON, SCAND, and HuRoN with positive results, sorry we are unable to present figures here due to the rebuttal policy. The datasets suggested by the reviewer (e.g., BAIR robot pushing, Kinetics-600) are highly relevant, and we will consider them for future investigation.\n\n4.  We thank the reviewer for this excellent suggestion to test the model's robustness. We have performed supplementary experiments to analyze the impact of noisy action labels. The table below shows the FIDp score as a function of the noise level, \n\n    |    Noise level  |  1%  |  2%   | 4% | 8% |16%|\n    | ----------- | ------ | ------ | ------ |------ |------ |\n    | GCQ (112M) | 44 | 44 | 46| 52| 58 |\n\n    We believe these results effectively demonstrate the robustness of our method. We commit to including this analysis and discussion in the final version of the paper.\n\n5.  *Minor (Line 276):* We agree with the reviewer's observation and appreciate the suggestion for more precise phrasing. The statement \"GCQ converged faster\" is indeed not entirely accurate at that point of comparison. In the final version, we will revise this to state that \"GCQ demonstrated superior performance in the early stages of training\" and will consider adding a plot of the training loss over time to provide clearer evidence of its convergence behavior.\n\n---\n\n### **Response to Questions**\n\n1.  Yes, we can confirm that the number of CANNs ($m$) scales logarithmically with the number of representable actions.  To provide a more detailed clarification: each 2D CANN is built upon two orthogonal bases, and each base supports transitions in two opposing directions. Together with the option to remain stationary, this yields a total of 5 discrete transitions per CANN (i.e., 2 bases × 2 directions + 1 stationary option). Since the $m$ CANNs operate independently, the total set of possible actions is the Cartesian product of the individual action sets. This results in a total of $5^m$ unique representable actions. Consequently, the number of CANNs required, $m$, is related to the total number of actions, $|A|$, by $m = \\log_5(|A|)$.\n\n2.  The reviewer's analysis of the computational cost as $O(mKn)$ is correct. However, we would like to clarify that this matching operation is highly parallelizable. When executed on a GPU, the computations across $m$,  $K$, and $n$ can be performed in parallel, which significantly mitigates the computational burden and prevents it from becoming a bottleneck, even for larger-scale inputs. We include the relevant codes for the matching algorithm here:\n\n```python\ndef forward(self, latents: Tensor, label: Tensor) -> Tuple[Tensor, Tensor]:\n    \"\"\"\n    Vector quantization for sequence data with parallel processing support for batch dimensions\n\n    Args:\n        latents: Tensor of shape [B x S x D x H x W]\n        label: Tensor of shape [B x S x 4] representing the change from current frame to next frame\n\n    Returns:\n        quantized: Quantized tensor of shape [B x S x D x H x W]\n        vq_loss: Vector quantization loss\n    \"\"\"\n    B, S, D, H, W = latents.shape\n    N = H * W // 4\n    device = latents.device\n\n    # Reshape to processable form\n    latents = latents.view(B, S, D, 4, N).permute(0, 3, 4, 1, 2).contiguous()  # [B, 4, N, S, D]\n    factor_latents = latents.view(B, 4, N, S * D)\n\n    # Construct expanded embeddings without loops\n    # label: [B, S, 4] -> rearrange to [B, 4, S]\n    shift_amounts = (label.permute(0, 2, 1).long() * self.step)  # [B, 4, S]\n    # Construct indices for rolling: for each shift_amount against self.embedding_weight\n    # First generate indices [K], then calculate new indices via broadcasting: new_idx = (arange(K) - shift) % K\n    k_idx = torch.arange(self.K, device=device).view(1, 1, 1, self.K)  # [1,1,1,K]\n    # After expanding shift_amounts: [B,4,S,1]\n    rolled_indices = (k_idx - shift_amounts.unsqueeze(-1)) % self.K  # [B, 4, S, K]\n    # Using rolled_indices to extract new embeddings from embedding_weight, resulting shape [B,4,S,K,D]\n    expanded_embed = self.embedding_weight[rolled_indices]  # [B,4,S,K,D]\n    # Adjust dimensions: exchange [K] and [S] positions before merging S and D\n    expanded_embed = expanded_embed.permute(0, 1, 3, 2, 4).contiguous()  # [B,4,K,S,D]\n    # Finally reshape to [B, 4, K, S*D]\n    expanded_embedding = expanded_embed.view(B, 4, self.K, S * D)\n\n    # Calculate nearest neighbor indices\n    # factor_latents: [B,4,N,S*D]; expanded_embedding: [B,4,K,S*D]\n    A = factor_latents  # [B,4,N,S*D]\n    B_expand = expanded_embedding  # [B,4,K,S*D]\n    A_sq = (A ** 2).sum(dim=-1, keepdim=True)  # [B,4,N,1]\n    B_sq = (B_expand ** 2).sum(dim=-1).unsqueeze(-2)  # [B,4,1,K]\n    cross = 2 * torch.matmul(A, B_expand.transpose(-1, -2))  # [B,4,N,K]\n    dist = A_sq + B_sq - cross  # [B,4,N,K]\n    encoding_inds = dist.argmin(dim=-1)  # [B,4,N]\n\n    # Sample vectors from expanded_embedding according to indices using torch.gather\n    # expanded_embedding shape [B,4,K,S*D], sampling on dim=2\n    encoding_inds_exp = encoding_inds.unsqueeze(-1).expand(-1, -1, -1, S * D)  # [B,4,N,S*D]\n    embedding_results = torch.gather(expanded_embedding, 2, encoding_inds_exp)  # [B,4,N,S*D]\n\n    commitment_loss = F.mse_loss(embedding_results.detach(), factor_latents)\n    embedding_results = factor_latents + (embedding_results - factor_latents).detach()  # [B,4,N,S*D]\n    embedding_results = embedding_results.view(B, 4, N, S, D)\n    embedding_results = embedding_results.permute(0, 3, 4, 1, 2).contiguous().view(B, S, D, H, W)\n    return embedding_results, commitment_loss\n```\n  As illustrated in the code, we have replaced all iterative loops with matrix operations so the time complexity does not become a bottleneck in practice. However, we acknowledge that the space complexity does scale with the input size. Therefore, parameters such as $m$ and $K$ should be adjusted based on the available hardware resources during deployment to strike a balance between performance and memory footprint.\n\n---\n\n### **Response to Limitations**\n\n*   As detailed in our **Response to Weaknesses 1**, we are actively developing GCQ variants to address continuous action spaces and scenarios where action labels are unavailable. While these extensions are beyond the scope of the current paper, they are a primary focus of our future research.\n*   The strategy for scaling to very large discrete action spaces by adjusting the number of CANNs ($m$) and the attractor dimensionality ($P$) is outlined in our **Response to Weaknesses 2**.\n---\n\nOnce again, we thank the reviewer for your positive assessment and constructive suggestions. We are particularly grateful for the suggestions regarding GCQ variants for continuous and unlabeled actions, which align perfectly with the focus of our future research. We hope our responses have addressed all your concerns. We welcome any further questions or suggestions."}]

Author rebuttal:

Meta-review: This paper introduces Grid-like Code Quantization (GCQ), a method for tokenizing world models. In distinction to typical approaches that uses VQ-VAE and similar models to discretize states in latent space without reference to action, GCQ builds on ideas from grid cells in the neuroscience literature to construction a series of toroidal attractors that encode (world, action) pairs in the algebra of attractor bump positions. Through a series of experiments, the authors show improvements in both planning and long-horizon prediction, as well as FID scores on scene reconstruction. The model works with any encoder-decoder backbone, allowing it to be used as a drop-in replacement in many training pipelines.

Reviewers were enthusiastic about the novelty of the proposed method, though they were mixed about the clarity of presentation. Some reviewers found the experimental results very strong, while others noted they were somewhat limited in scope. Overall, however, the consensus was that this was a well-executed study likely to be of interest to both the neuroscience and machine learning communities.

During rebuttal, authors clarified several conceptual points and proposed readability improvements. They also provided additional results using a vision transformer in place of a U-net backbone, strengthening results. At the end of this period, reviewers showed a strong consensus for acceptance.
Decision: Accept (spotlight)