Skip to main content
QUICK REVIEW

[Paper Review] Grid-World Representations in Transformers Reflect Predictive Geometry

Sasha Brenner, Thomas R. Knösche|arXiv (Cornell University)|Mar 17, 2026
Neural Networks and ApplicationsComputer Science0 citations
TL;DR

The paper trains decoder-only transformers on constrained 2D grid-walker sequences and shows their internal representations align with analytically derived predictive vectors, revealing world-model–style geometry emerging from next-token prediction in a toy system.

ABSTRACT

Next-token predictors often appear to develop internal representations of the latent world and its rules. The probabilistic nature of these models suggests a deep connection between the structure of the world and the geometry of probability distributions. In order to understand this link more precisely, we use a minimal stochastic process as a controlled setting: constrained random walks on a two-dimensional lattice that must reach a fixed endpoint after a predetermined number of steps. Optimal prediction of this process solely depends on a sufficient vector determined by the walker's position relative to the target and the remaining time horizon; in other words, the probability distributions are parametrized by the world's geometry. We train decoder-only transformers on prefixes sampled from the exact distribution of these walks and compare their hidden activations to the analytically derived sufficient vectors. Across models and layers, the learned representations align strongly with the ground-truth predictive vectors and are often low-dimensional. This provides a concrete example in which world-model-like representations can be directly traced back to the predictive geometry of the data itself. Although demonstrated in a simplified toy system, the analysis suggests that geometric representations supporting optimal prediction may provide a useful lens for studying how neural networks internalize grammatical and other structural constraints.

Motivation & Objective

  • Investigate how next-token prediction induces internal world-model–like representations in a controlled setting.
  • Derive analytic predictive vectors for a constrained grid-walker process.
  • Assess alignment between transformer activations and ground-truth predictive vectors across layers.
  • Examine the dimensionality and geometric structure of learned representations.
  • Discuss implications for interpreting grammar and world-models in neural networks.

Proposed method

  • Define a 2D grid-walker process with a fixed endpoint and time horizon to generate analytically tractable next-step probabilities."
  • Train decoder-only transformers on prefixes sampled from the exact distribution of these walks with next-token cross-entropy loss.
  • Compute ground-truth 2D sufficient predictive vectors v_t and map transformer activations to these vectors via a weighted affine probe.
  • Evaluate alignment using R^2 of the affine fit and linear centered kernel alignment (lCKA) across layers.
  • Analyze intrinsic dimensionality of representations via PCA on layer activations.
  • Use six identical transformers trained on six grid-walker configurations (six walkers) and three time horizons to explore predictive geometry.
Figure 1: Transformer layer representations closely resemble the ground-truth predictive vectors of Equation 4 (as computed in Appendix A.3 ). The left column corresponds to the ground-truth principal components (PCs), and the right column shows the PCs of the last layer norm representation, after P
Figure 1: Transformer layer representations closely resemble the ground-truth predictive vectors of Equation 4 (as computed in Appendix A.3 ). The left column corresponds to the ground-truth principal components (PCs), and the right column shows the PCs of the last layer norm representation, after P

Experimental results

Research questions

  • RQ1Do transformer activations align with analytically derived sufficient predictive vectors in a grid-walker task?
  • RQ2Is the predictive geometry encoded in a low-dimensional manifold within transformer representations?
  • RQ3How does layer depth and time horizon affect the alignment between learned representations and predictive vectors?
  • RQ4Can predictive-state geometry provide intuition about grammar-like constraints in sequence modeling?

Key findings

  • Transformers consistently exhibit high linear alignment between layer activations and ground-truth predictive vectors across layers, with LayerNorm activations showing particularly strong similarity.
  • The learned representations often live in a low-dimensional subspace, with 2 dimensions sufficing for final representations in some cases.
  • Alignment metrics (R^2 and lCKA) vary by walker, horizon, and layer type, with longer horizons generally reducing similarity for a given endpoint.
  • The ground-truth predictive vectors correspond to the “world locations” divided by the time left, illustrating a concrete world-model geometry emergent from predictive learning.
  • Final LayerNorm representations in several settings converge to a 2-dimensional space, while earlier layers show varying dimensionality.
  • The grid-walker predictive states form a curved 2D manifold within the probability simplex, supporting a link between predictive geometry and world-model representations.
Figure 2: Linear similarity metrics between layer activations and ground-truth predictive vectors. (A) and (D): Both $R^{2}$ and $\rm{lCKA}$ are high and tend to increase with layer depth, with LayerNorms generally exhibiting stronger similarity. Moreover, walkers with longer time horizons $T$ have
Figure 2: Linear similarity metrics between layer activations and ground-truth predictive vectors. (A) and (D): Both $R^{2}$ and $\rm{lCKA}$ are high and tend to increase with layer depth, with LayerNorms generally exhibiting stronger similarity. Moreover, walkers with longer time horizons $T$ have

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.