Topoformer: brain-like topographic organization in Transformer language models through spatial querying and reweighting
Not on the map. Why?
Abstract (arXiv)
Spatial functional organization is a hallmark of biological brains: neurons are arranged topographically according to their response properties, at multiple scales. In contrast, representations within most machine learning models lack spatial biases, instead manifesting as disorganized vector spaces that are difficult to visualize and interpret. Here, we propose a novel form of self-attention that turns Transformers into "Topoformers" with topographic organization. We introduce spatial querying - where keys and queries are arranged on 2D grids, and local pools of queries are associated with a given key - and spatial reweighting, where we convert the standard fully connected layer of self-attention into a locally connected layer. We first demonstrate the feasibility of our approach by training a 1-layer Topoformer on a sentiment classification task. Training with spatial querying encourages topographic organization in the queries and keys, and spatial reweighting separately encourages topographic organization in the values and self-attention outputs. We then apply the Topoformer motifs at scale, training a BERT architecture with a masked language modeling objective. We find that the topographic variant performs on par with a non-topographic control model on NLP benchmarks, yet produces interpretable topographic organization as evaluated via eight linguistic test suites. Finally, analyzing an fMRI dataset of human brain responses to a large set of naturalistic sentences, we demonstrate alignment between low-dimensional topographic variability in the Topoformer model and human brain language network. Scaling up Topoformers further holds promise for greater interpretability in NLP research, and for more accurate models of the organization of linguistic information in the human brain.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 19 of its 73 references that are in the map. First posted on arXiv 21 Oct 2025.
Builds on
19 of 73 references.
References · 19
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
- 2023Sparse Autoencoders Find Highly Interpretable Features in Language Modelscited by 1,359
- 2015Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Bookscited by 1,041
- 2019BLiMP: The Benchmark of Linguistic Minimal Pairs for Englishcited by 553
- 2016Assessing the Ability of LSTMs to Learn Syntax-Sensitive Dependenciescited by 350
- 2020A Systematic Assessment of Syntactic Generalization in Neural Language Modelscited by 163
- 2020On the Predictive Power of Neural Language Models for Human Real-Time Comprehension Behaviorcited by 115
- 2022Why Does Surprisal From Larger Transformer-Based Language Models Provide a Poorer Fit to Human Reading Times?cited by 111
7 more
- 2022Cramming: Training a Language Model on a Single GPU in One Daycited by 81
- 2023Scaling laws for language encoding models in fMRIcited by 68
- 2020Human Sentence Processing: Recurrence or Attention?cited by 51
- 2020Unsupervised deep learning identifies semantic disentanglement in single inferotemporal neuronscited by 33
- 2022Neural Language Models are not Born Equal to Fit Brain Data, but Training Helpscited by 26
- 2022COMPS: Conceptual Minimal Pair Sentences for testing Robust Property Knowledge and its Inheritance in Pre-trained Language Modelscited by 15
- 2023End-to-end topographic networks as models of cortical map formation and human visual behaviour: moving beyond convolutionscited by 8
Built on by
Citing papers per year: 2026: 1.
1 paper.