Manuscript Offprint

arXiv:2609.07053

A Hyperbolicity Atlas of Large Language Model Hidden States

Zhichao Yang, Yuanze Hu, Gen Li, Qingchen Yu, Shiying Duan, Xinyu Wang, Ye Qiu, Zeming Liu, Guangxu Chen, Zhaoxin Fan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

LLM hidden states are ordinary vectors, but the distances among those vectors may still show hierarchical structure. To our knowledge, this paper is the first systematic study of whether prompt-token hidden states in contemporary LLMs exhibit Gromov Hyperbolicity (GH), a distance-based measure of tree-likeness. Using 818,904 sample-layer measurements from ten open-weight models across MATH500, HumanEval, WinoGrande, and TruthfulQA, we build a GH map over four axes: parameter scale, layer depth, model family, and input domain. The clearest pattern is depth, not scale: middle layers usually form a high-δrel\delta_{\text{rel}} plateau, while final layers often become substantially more tree-like. Scale effects are weak and non-monotonic, matched 7/8B model families differ strongly, and domains interact with model specialization. These findings make GH useful as a practical diagnostic: it shows where hierarchical distance structure appears, how specialization changes it, and which model–layer–domain comparisons deserve closer analysis.

1 Introduction

Transformer language models store token information in Euclidean vectors, yet many things they process are hierarchical: lexical taxonomies, entailment relations, syntactic trees, discourse dependencies, program blocks, and multi-step derivations. Hyperbolic geometry is useful for analyzing such structure because negatively curved spaces can represent trees and hierarchies with low distortion (Nickel and Kiela, 2017, 2018; Ganea et al., 2018). This observation has already shaped hyperbolic word and sentence embeddings (Dhingra et al., 2018; Tifrea et al., 2018), multilingual and multimodal representation guidelines (Sawhney et al., 2024), and recent hyperbolic fine-tuning or architecture proposals for LLMs (Yang et al.,

2026; He et al., 2026; Patil et al., 2025). For contemporary LLMs, however, an important question remains open: even when the model is not trained in a hyperbolic manifold, do its internal hidden states exhibit tree-like metric organization?

Existing representation analyses answer related but different questions. Probing classifiers test whether a feature is recoverable; anisotropy and intrinsic-dimension analyses characterize spread or local complexity; structural probes show that some linguistic relations are geometrically recoverable (Ethayarajh, 2019; Hewitt and Manning, 2019; Valeriani et al., 2023). These methods do not directly test whether distances among hidden states behave like a hierarchy. Gromov Hyperbolicity (GH) provides a simple complementary test: it asks whether distances among hidden-state vectors behave more like distances in a tree. To our knowledge, this paper is the first systematic study of GH for prompt-token hidden states in modern open-weight LLMs.

We use the word “atlas” in a literal sense: we map the statistic across several axes instead of giving one number per model. For a model mm, layer ℓ\ell, domain dd, and prompt xx, we measure the normalized statistic

A(m,ℓ,d,x)=δrel(Xm,ℓ,x),(1)\mathcal{A}(m,\ell,d,x)=\delta_{\mathrm{r e l}}(X_{m,\ell,x}), \tag{1}

where Xm,ℓ,xX_{m,\ell,x} is the set of prompt-token hidden states for that layer. This map is necessary because the axes need not move together. A larger model may change the final layer without changing the middle layers; a domain may be tree-like for one specialization but not for another; and a family difference at matched parameter count can exceed a scale difference within a family. The empirical question is therefore not whether “LLMs are hyperbolic,” but where lower or higher GH appears across models, layers, and domains.

We organize the study around four questions: 1) within a family, does normalized hyperbolicity

*Corresponding author: zhaoxinf@buaa.edu.cn.

change when scale grows from 1.5B to 7B parameters? 2) Within a model, how does hyperbolicity vary across transformer layers? 3) At matched scale, do comparable 7/8B model families exhibit different final-layer profiles? 4) For a fixed model, how does hyperbolicity change across math, code, commonsense, and truthfulness prompts?

To answer these questions, we compute prompt-only hidden states for ten open-weight checkpoints from Llama, Qwen2.5, Qwen2.5-Math, Qwen2.5-Coder, and DeepSeek-R1-Distill-Qwen families on MATH500, HumanEval, WinoGrande, and TruthfulQA. For each prompt and layer, we sample quadruples of token hidden states, estimate four-point GH, and normalize by the largest pairwise distance in that set. This design keeps the comparisons aligned: within-family scale contrasts, layer-wise trajectories, matched 7/8B family comparisons, and fixed-model domain comparisons are all produced by the same measurement protocol. It also avoids a common shortcut: generated responses are excluded so that prompt geometry is not confounded with decoding length, answer correctness, or model-specific generation behavior.

The resulting map yields four conclusions. First, scale alone is weak and non-monotonic: Qwen2.5-7B-Base is more tree-like than Qwen2.5-1.5B on some domains but less tree-like on others, while the math track moves upward in δrel\delta_{rel}. Second, depth dominates the geometry: middle layers form a high- δrel\delta_{rel} plateau, and final layers usually drop toward more tree-like structure. Third, matched 7/8B families occupy distinct value ranges, with family and specialization gaps larger than the pooled scale shifts. Fourth, domains interact with specialization: HumanEval is high- δrel\delta_{rel} for Qwen2.5-7B-Base but becomes the lowest- δrel\delta_{rel} domain for Qwen2.5-7B-Coder-Instruct.

Our contribution is this GH map and its interpretation as a diagnostic tool. GH does not prove symbolic reasoning or identify a causal circuit by itself. Its value is narrower and more concrete: it tells us where prompt-token distances become more tree-like, where they do not, and which model-layer-domain comparisons deserve closer follow-up.