More than Correlation: Do Large Language Models Learn Causal Representations of Space?

Yida Chen, Yixian Gan, Sijia Li, Li Yao, Xiaohan ZhaoarXiv 2023 · DOI

Introduction

A fundamental question in artificial intelligence is whether Large Language Models (LLMs) are merely "stochastic parrots"—predicting tokens based on surface-level statistical patterns—or if they develop emergent "world models" that represent the underlying structure of reality. While previous research has shown high correlations between LLM activations and geospatial coordinates, correlation does not imply causation. This study investigates the "causality gap" to determine if LLMs build functional, internal "mental maps" that they actively use during reasoning tasks.

Methodology

The researchers evaluated DeBERTa-v2 (1.5B) and GPT-Neo (1.3B) using a multi-faceted approach:

  1. Representational Similarity Analysis (RSA): Comparing the geometric distance between city representations in hidden layers to their true physical distances on Earth.
  2. Geospatial Probing: Training auxiliary models to predict latitude and longitude from internal states. A key innovation was the GeoDist Loss function, based on the Haversine equation, which accounts for the Earth's spherical geometry (e.g., the wrap-around at ±180° longitude).
  3. Causal Intervention: To prove functional utility, the authors performed "causal steering." By using probe gradients to modify the hidden state of a city (e.g., shifting "Tokyo" to the coordinates of "Buenos Aires"), they observed whether the model's downstream predictions shifted accordingly.

Data and Experimental Setup

The study utilized a curated world cities dataset, filtering for the top 100 countries by city count to ensure high-quality data. To resolve ambiguities (e.g., "London, UK" vs. "London, Ontario"), city names were concatenated with their administrative districts. The models were prompted with a standardized template: "The latitude and longitude of [city] is" to extract clean internal representations.

Results and Analysis

Emergence of Spatial Awareness

Spatial accuracy is not present at the input level but emerges as information flows through the model's layers. As shown in Figure 1, both Mean Squared Error (MSE) and GeoDist loss decrease significantly in the early-to-middle layers, with "kink points" identifying critical stages of representational development.

MSE and GeoDist loss across hidden layers in DeBERTa-V2, showing spatial awareness stabilizing after layer 12.

The model's internal "map" typically stabilizes around the 12th layer. Visualizations of these representations (Figure 2) demonstrate that the model effectively clusters cities by their real-world geographic regions, with the map becoming increasingly refined in deeper layers.

Visualizing the internal spatial representations at layer 12 and the final layer, showing clear regional clustering.

Spherical Geometry and Non-linearity

Probes trained with the spherical GeoDist loss consistently outperformed standard Euclidean MSE probes, suggesting that LLMs capture the actual curvature of the globe rather than a flat 2D projection. Furthermore, while linear probes are effective, non-linear probes achieved higher accuracy, indicating that spatial information is stored in a complex, multi-dimensional format.

Causal Evidence: "Teleportation" Experiments

The most significant finding was the success of causal interventions. By "steering" the hidden state of a city toward a new location, the researchers could predictably manipulate the model's output. For instance, nudging the activation for "Tokyo" to resemble "Buenos Aires" caused the model's logit scores for South American countries to rise while Asian country scores dropped. This confirms that the internal spatial map is not just a byproduct but a functional component used to determine a city's country.

Conclusion and Future Work

This research provides strong evidence that LLMs develop causal, functional representations of the physical world. However, several questions remain. It is unclear how models situate non-geospatial concepts (e.g., "Human," "Tree") within these coordinate systems. Additionally, while the models use these maps for simple city-to-country mapping, future research should explore their role in more complex reasoning, such as geopolitical relationships or travel logistics.

Summary updated

BibTeX
@misc{chen2023more,
  author = {Yida Chen and Yixian Gan and Sijia Li and Li Yao and Xiaohan Zhao},
  title = {{More than Correlation: Do Large Language Models Learn Causal Representations of Space?}},
  year = {2023},
  eprint = {2312.16257},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.16257},
}
Figure