Cognitive Maps in Language Models: A Mechanistic Analysis of Spatial Planning
- URL: http://arxiv.org/abs/2511.13371v1
- Date: Mon, 17 Nov 2025 13:46:19 GMT
- Title: Cognitive Maps in Language Models: A Mechanistic Analysis of Spatial Planning
- Authors: Caroline Baumgartner, Eleanor Spens, Neil Burgess, Petru Manescu,
- Abstract summary: We train GPT-2 models on three spatial learning paradigms in grid environments.<n>Using behavioural, representational and mechanistic analyses, we uncover two fundamentally different learned algorithms.
- Score: 2.1115884707107715
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: How do large language models solve spatial navigation tasks? We investigate this by training GPT-2 models on three spatial learning paradigms in grid environments: passive exploration (Foraging Model- predicting steps in random walks), goal-directed planning (generating optimal shortest paths) on structured Hamiltonian paths (SP-Hamiltonian), and a hybrid model fine-tuned with exploratory data (SP-Random Walk). Using behavioural, representational and mechanistic analyses, we uncover two fundamentally different learned algorithms. The Foraging model develops a robust, map-like representation of space, akin to a 'cognitive map'. Causal interventions reveal that it learns to consolidate spatial information into a self-sufficient coordinate system, evidenced by a sharp phase transition where its reliance on historical direction tokens vanishes by the middle layers of the network. The model also adopts an adaptive, hierarchical reasoning system, switching between a low-level heuristic for short contexts and map-based inference for longer ones. In contrast, the goal-directed models learn a path-dependent algorithm, remaining reliant on explicit directional inputs throughout all layers. The hybrid model, despite demonstrating improved generalisation over its parent, retains the same path-dependent strategy. These findings suggest that the nature of spatial intelligence in transformers may lie on a spectrum, ranging from generalisable world models shaped by exploratory data to heuristics optimised for goal-directed tasks. We provide a mechanistic account of this generalisation-optimisation trade-off and highlight how the choice of training regime influences the strategies that emerge.
Related papers
- TagaVLM: Topology-Aware Global Action Reasoning for Vision-Language Navigation [70.23578202012048]
Vision-Language Navigation (VLN) presents a unique challenge for Large Vision-Language Models (VLMs) due to their inherent architectural mismatch.<n>We propose TagaVLM (Topology-Aware Global Action reasoning), an end-to-end framework that explicitly injects topological structures into the VLM backbone.<n>To enhance topological node information, an Interleaved Navigation Prompt strengthens node-level visual-text alignment.<n>With the embedded topological graph, the model is capable of global action reasoning, allowing for robust path correction.
arXiv Detail & Related papers (2026-03-03T13:28:07Z) - TopoCurate:Modeling Interaction Topology for Tool-Use Agent Training [53.93696896939915]
Training tool-use agents typically rely on Supervised Fine-Tuning (SFT) on successful trajectories and Reinforcement Learning (RL) on pass-rate-selected tasks.<n>We propose TopoCurate, an interaction-aware framework that projects multi-trial rollouts from the same task into a unified semantic quotient topology.<n>TopoCurate achieves consistent gains of 4.2% (SFT) and 6.9% (RL) over state-of-the-art baselines.
arXiv Detail & Related papers (2026-03-02T10:38:54Z) - GenPlanner: From Noise to Plans -- Emergent Reasoning in Flow Matching and Diffusion Models [0.0]
GenPlanner is an approach based on diffusion models and flow matching, along with two variants: DiffPlanner and FlowPlanner.<n>We demonstrate the application of generative models to find and generate correct paths in mazes.
arXiv Detail & Related papers (2026-02-21T12:12:45Z) - Wireless Traffic Prediction with Large Language Model [54.07581399989292]
TIDES is a novel framework that captures spatial-temporal correlations for wireless traffic prediction.<n> TIDES achieves efficient adaptation to domain-specific patterns without incurring excessive training overhead.<n>Our results indicate that integrating spatial awareness into LLM-based predictors is the key to unlocking scalable and intelligent network management in future 6G systems.
arXiv Detail & Related papers (2025-12-19T04:47:40Z) - MapFormer: Self-Supervised Learning of Cognitive Maps with Input-Dependent Positional Embeddings [5.647131476818603]
A cognitive map is an internal model which encodes the abstract relationships among entities in the world.<n>We introduce MapFormers, new architectures based on Transformer models, which can learn cognitive maps from observational data.<n>MapFormers have broad applications in both neuroscience and AI, by explaining the neural mechanisms giving rise to cognitive maps.
arXiv Detail & Related papers (2025-11-24T16:29:02Z) - Learning from Reward-Free Offline Data: A Case for Planning with Latent Dynamics Models [79.2162092822111]
We systematically evaluate reinforcement learning (RL) and control-based methods on a suite of navigation tasks.<n>We employ a latent dynamics model using the Joint Embedding Predictive Architecture (JEPA) and employ it for planning.<n>Our results show that model-free RL benefits most from large amounts of high-quality data, whereas model-based planning generalizes better to unseen layouts.
arXiv Detail & Related papers (2025-02-20T18:39:41Z) - TrajLearn: Trajectory Prediction Learning using Deep Generative Models [4.097342535693401]
Trajectory prediction aims to estimate an entity's future path using its current position and historical movement data.<n>To address these challenges, we introduce TrajLearn, a novel model for trajectory prediction.<n>TrajLearn predicts the next $k$ steps by integrating a customized beam search for exploring multiple potential paths.
arXiv Detail & Related papers (2024-12-30T23:38:52Z) - Persistent Topological Features in Large Language Models [0.6597195879147556]
We introduce topological descriptors that measure how topological features, $p$-dimensional holes, persist and evolve throughout the layers.<n>This offers a statistical perspective on how prompts are rearranged and their relative positions changed in the representation space.<n>As a showcase application, we use zigzag persistence to establish a criterion for layer pruning, achieving results comparable to state-of-the-art methods.
arXiv Detail & Related papers (2024-10-14T19:46:23Z) - NNPP: A Learning-Based Heuristic Model for Accelerating Optimal Path Planning on Uneven Terrain [5.337162499594818]
We propose the NNPP model for computing the region, enabling foundation algorithms like Astar to find the optimal path solely within this reduced search space.
The NNPP model learns information about start and goal locations, as well as map representations, from numerous pre-annotated optimal path demonstrations.
It is able to textcolorrevisionaccelerate path planning on novel maps.
arXiv Detail & Related papers (2023-08-09T08:31:05Z) - Learning to Predict Navigational Patterns from Partial Observations [63.04492958425066]
This paper presents the first self-supervised learning (SSL) method for learning to infer navigational patterns in real-world environments from partial observations only.
We demonstrate how to infer global navigational patterns by fitting a maximum likelihood graph to the DSLP field.
Experiments show that our SSL model outperforms two SOTA supervised lane graph prediction models on the nuScenes dataset.
arXiv Detail & Related papers (2023-04-26T02:08:46Z) - PDSketch: Integrated Planning Domain Programming and Learning [86.07442931141637]
We present a new domain definition language, named PDSketch.
It allows users to flexibly define high-level structures in the transition models.
Details of the transition model will be filled in by trainable neural networks.
arXiv Detail & Related papers (2023-03-09T18:54:12Z) - Localized active learning of Gaussian process state space models [63.97366815968177]
A globally accurate model is not required to achieve good performance in many common control applications.
We propose an active learning strategy for Gaussian process state space models that aims to obtain an accurate model on a bounded subset of the state-action space.
By employing model predictive control, the proposed technique integrates information collected during exploration and adaptively improves its exploration strategy.
arXiv Detail & Related papers (2020-05-04T05:35:02Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.