mlsanityData to 14 Oct 2026

MapFormer: Self-Supervised Learning of Cognitive Maps with Input-Dependent Positional Embeddings

arXiv 2511.19279 ↗First posted 24 Nov 2025cs.LG cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

A cognitive map is an internal model which encodes the abstract relationships among entities in the world, giving humans and animals the flexibility to adapt to new situations, with a strong out-of-distribution (OOD) generalization that current AI systems still do not possess. To bridge this gap, we introduce textitMapFormers, new Transformer-based architectures, which can learn cognitive maps from observational data and perform path-integration without supervision. Cognitive maps are learned in the model by disentangling structural relationships in the inputs from their specific content, a property that can be achieved by updating position encodings with input-dependent matrices, built as exponentials of learned combinations of Lie-algebra generators. We developed two variants of textitMapFormers that unify absolute and relative positional encoding to model episodic (EM) and working memory (WM), respectively. We tested textitMapFormers on several formal tasks targeting distinct cognitive capacities, including gating, 2D navigation and nested hierarchies (Dyck Languages). Our results demonstrate that textitMapFormers significantly outperform current AI architectures, achieving near-perfect OOD generalization where standard models fail. Furthermore, we show that textitMapFormers are scalable; evaluations on naturalistic data yield perplexity improvements over baselines, suggesting that these principles extend to large-scale, real-world domains. These results are obtained through efficient parallel computation on commutative maps, though our models can also learn non-commutative cognitive maps via sequential path-integration. Overall, these results suggest that input-dependent matrices provide a critical structural bias, by disentangling abstract relations from content in order to drive robust OOD generalization.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 23 of its 42 references that are in the map. First posted on arXiv 24 Nov 2025.

Builds on

23 of 42 references.

References · 23

  1. 2017Attention Is All You Needcited by 60,361
  2. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
  3. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  4. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  5. 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,465
  6. 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
  7. 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
  8. 2017The NarrativeQA Reading Comprehension Challengecited by 597
  9. 2019BLiMP: The Benchmark of Linguistic Minimal Pairs for Englishcited by 564
  10. 2024Evaluating the World Model Implicit in a Generative Modelcited by 113
  11. 2021Self-Attention Networks Can Process Bounded Hierarchical Languagescited by 105
  12. 2021Relating transformers to models and neural representations of the hippocampal formationcited by 62
11 more
  1. 2024Contextual Position Encoding: Learning to Count What's Importantcited by 54
  2. 2025PaTH Attention: Position Encoding via Accumulating Householder Transformationscited by 34
  3. 2019Memory-Augmented Recurrent Neural Networks Can Learn Generalized Dyck Languagescited by 31
  4. 2022Disentanglement with Biological Constraints: A Theory of Functional Cell Typescited by 30
  5. 2024On the Out-Of-Distribution Generalization of Multimodal Large Language Modelscited by 30
  6. 2020On the Practical Ability of Recurrent Neural Networks to Recognize Hierarchical Languagescited by 22
  7. 2022Actionable Neural Representations: Grid Cells from Minimal Constraintscited by 10
  8. 2025Decoupling the "What" and "Where" With Polar Coordinate Positional Embeddingscited by 10
  9. 2025Meta-Learning Neural Mechanisms rather than Bayesian Priorscited by 8
  10. 2025SPaRC: A Spatial Pathfinding Reasoning Challengecited by 5
  11. 2025Rethinking Addressing in Language Models via Contexualized Equivariant Positional Encodingcited by 4

Built on by

Not cited yet.