Papers › Language Models Represent Space and Time

Language Models Represent Space and Time

3 Oct 2023arXiv:2310.02207archive 2025-07-28

Wes Gurnee, Max Tegmark

The capabilities of large language models (LLMs) have sparked debate over whether such systems just learn an enormous collection of superficial statistics or a set of more coherent and grounded representations that reflect the real world. We find evidence for the latter by analyzing the learned representations of three spatial datasets (world, US, NYC places) and three temporal datasets (historical figures, artworks, news headlines) in the Llama-2 family of models. We discover that LLMs learn linear representations of space and time across multiple scales. These representations are robust to prompting variations and unified across different entity types (e.g. cities and landmarks). In addition, we identify individual "space neurons" and "time neurons" that reliably encode spatial and temporal coordinates. While further investigation is needed, our results suggest modern LLMs learn rich spatiotemporal representations of the real world and possess basic ingredients of a world model.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2310.02207")

Code

Syntology Ran 11 of 24 code samples harvested from 1 repository linked to this paper; 13 have no recorded run. Of those that ran: 11 ran with no contract checked.

By repository: official repository: 24 samples from 1 repository, 11 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

wesg52/world-models officialmentioned in paperpytorchMIT report
jettjaniak/chainscope mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

24 samples harvested; 11 ran; 0 honoured the contract we drafted; 13 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

11ran
13unverified

Licence: 0 of the 24 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from wesg52/world-models. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

adjust_precision wesg52/world-models/utils.py official repository ran MIT (permissive) · c0e20198c0c90a86 · report
get_model_family wesg52/world-models/utils.py official repository ran MIT (permissive) · 9931b4001e67bb95 · report
get_top_neurons wesg52/world-models/model_composition.py official repository ran MIT (permissive) · 69dc982a438d4f48 · report
load_activation_probing_dataset wesg52/world-models/save_activations.py official repository ran MIT (permissive) · 80563515302e7660 · report
load_activation_probing_dataset_args wesg52/world-models/save_activations.py official repository ran MIT (permissive) · a7b32ab38a32b07a · report
load_all_probe_evals wesg52/world-models/evaluate_probes.py official repository ran MIT (permissive) · e40d500a0bbcefbe · report
load_evaluation wesg52/world-models/evaluate_probes.py official repository ran MIT (permissive) · cd39e9fbf2e85bb4 · report
load_model wesg52/world-models/load.py official repository ran MIT (permissive) · cd24389a9fa9621c · report
load_probe_results wesg52/world-models/probe_experiment.py official repository ran MIT (permissive) · 3bf568dbe6a7fbb8 · report
process_activation_batch wesg52/world-models/save_activations.py official repository ran MIT (permissive) · c4e9a9eec8e92cc3 · report
remove_lower_specificity_duplicates wesg52/world-models/feature_datasets/space_world.py official repository ran MIT (permissive) · f13f4939cf537d87 · report
compute_prox_error wesg52/world-models/generalization_experiment.py official repository unverified MIT (permissive) · 1be061eaded8779b · report
load_generalization_experiment wesg52/world-models/generalization_experiment.py official repository unverified MIT (permissive) · 7f131954ed6e43de · report
load_tokenizer wesg52/world-models/make_prompt_datasets.py official repository unverified MIT (permissive) · ec78e0b3d6261ed5 · report
make_correlation_df wesg52/world-models/model_composition.py official repository unverified MIT (permissive) · 4a1ed06862b5c9c0 · report
make_generalization_rdf wesg52/world-models/analysis/generalization.py official repository unverified MIT (permissive) · 403d8927d15ed841 · report
make_natural_place_entity_df wesg52/world-models/feature_datasets/space_world.py official repository unverified MIT (permissive) · c070305f38faca0e · report
make_structure_entity_df wesg52/world-models/feature_datasets/space_world.py official repository unverified MIT (permissive) · 926cbc77347d1214 · report
place_neuron_correlations wesg52/world-models/model_composition.py official repository unverified MIT (permissive) · 5043e7864198f632 · report
place_probe_experiment wesg52/world-models/probe_experiment.py official repository unverified MIT (permissive) · 94dc1fb81c6a70d6 · report
place_probe_generalization_experiment wesg52/world-models/prompt_gen_experiment.py official repository unverified MIT (permissive) · cd2f271c58a3f210 · report
run_experiment wesg52/world-models/generalization_experiment.py official repository unverified MIT (permissive) · eeab6f68b890a0fb · report
time_probe_experiment wesg52/world-models/probe_experiment.py official repository unverified MIT (permissive) · af9c1c4eb6c780a6 · report
time_probe_generalization_experiment wesg52/world-models/prompt_gen_experiment.py official repository unverified MIT (permissive) · 88794b7e8476006e · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections