IC-1317Llama-2 and Pythia models contain linear representations of space and time that improve with depth and model scale

Wes Gurnee, Max Tegmark

SourceLanguage Models Represent Space and Time

The paper trains linear ridge regression probes on the internal activations of Llama-2 (7B, 13B, 70B) and Pythia (160M to 6.9B) to predict latitude/longitude of places or timestamps of events. Probes achieve high out-of-sample R² (e.g., 0.911 for world locations in Llama-2-70B), and representation quality increases smoothly through the first half of layers before plateauing. Nonlinear MLP probes yield minimal improvement over linear probes, confirming linearity. The representations are robust to prompting variations and unified across entity types (cities, landmarks, historical figures, etc.).

Evidence
correlational
Key metric
Llama-2-70B linear R² at 60% depth: world 0.911, usa 0.864, nyc 0.359, historical 0.835, entertainment 0.885, headlines 0.746; corresponding MLP R²: 0.926, 0.869, 0.312, 0.839, 0.884, 0.739
Caveat
High probe accuracy does not by itself imply the model uses these representations for its own predictions; the authors note this limitation explicitly and address it with neuron ablations in a separate experiment.
Model
Llama 2 / Llama 2 base, Pythia
Concepts
Linear representation, Depth-dependent structure, Scale-dependent behaviour
Datasets
NYC Places [eval]
Methods
Linear Probing / Ridge regression linear probing / Linear probe / Linear probe fine-tuning / Linear regression probing / Linear ridge regression probes / Supervised probing / ERM linear probe [primary]
Related work
Llama 2 / Llama 2 base [context], Pythia [context], Probing classifiers / MLP probing classifiers / Q16 classifier [builds-on], Emergent linear representations in world models of self-supervised sequence models [context]
Related findings
IC-1318
Extraction
automatic-extraction