Hidden Holes: topological aspects of language models
Not on the map. Why?
Abstract (arXiv)
We explore the topology of representation manifolds arising in autoregressive neural language models trained on raw text data. In order to study their properties, we introduce tools from computational algebraic topology, which we use as a basis for a measure of topological complexity, that we call perforation. Using this measure, we study the evolution of topological structure in GPT based large language models across depth and time during training. We then compare these to gated recurrent models, and show that the latter exhibit more topological complexity, with a distinct pattern of changes common to all natural languages but absent from synthetically generated data. The paper presents a detailed analysis of the representation manifolds derived by these models based on studying the shapes of vector clouds induced by them as they are conditioned on sentences from corpora of natural language text. The methods developed in this paper are novel in the field and based on mathematical apparatus that might be unfamiliar to the target audience. To help with that we introduce the minimum necessary theory, and provide additional visualizations in the appendices. The main contribution of the paper is a striking observation about the topological structure of the transformer as compared to LSTM based neural architectures. It suggests that further research into mathematical properties of these neural networks is necessary to understand the operation of large transformer language models. We hope this work inspires further explorations in this direction within the NLP community.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Builds on 10 of its 24 references that are in the map. First posted on arXiv 9 Jun 2024.
Builds on
10 of 24 references.
References · 10
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2019Optuna: A Next-generation Hyperparameter Optimization Frameworkcited by 2,455
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
- 2021Deduplicating Training Data Makes Language Models Bettercited by 705
- 2016Language Modeling with Gated Convolutional Networkscited by 688
- 2020SE(3)-Transformers: 3D Roto-Translation Equivariant Attention Networkscited by 602
- 2017Regularizing and Optimizing LSTM Language Modelscited by 205
- 2023Scaling Transformer to 1M tokens and beyond with RMTcited by 97
Built on by
Citing papers per year: 2024: 1; 2025: 2; 2026: 3.
6 papers.
- 2024Topological Data Analysis Applications in Natural Language Processing: A Surveycited by 2
- 2026Trust in One Round: Confidence Estimation for Large Language Models via Structural Signalscited by 2
- 2025When Annotators Disagree, Topology Explains: Mapper, a Topological Tool for Exploring Text Embedding Geometry and Ambiguitycited by 1
- 2025Testing the Machine Consciousness Hypothesiscited by 0
- 2026The Shape of Addition: Geometric Structures of Arithmetic in Large Language Modelscited by 0
- 2026Topological Attribution Distance (TAD): Revealing Segment-Level RAG Influence on LLM Output Geometry for Incident Log Analysiscited by 0
- 2026Topological Attribution Distance (TAD): Revealing Segment-Level RAG Influence on LLM Output Geometry for Incident Log Analysis17 Aug 2026
- 2026The Shape of Addition: Geometric Structures of Arithmetic in Large Language Models29 May 2026
- 2026Trust in One Round: Confidence Estimation for Large Language Models via Structural Signals1 Feb 2026
- 2025Testing the Machine Consciousness Hypothesis30 Nov 2025
- 2025When Annotators Disagree, Topology Explains: Mapper, a Topological Tool for Exploring Text Embedding Geometry and Ambiguity20 Oct 2025
- 2024Topological Data Analysis Applications in Natural Language Processing: A Survey15 Nov 2024