TL;DR
When a large language model reads a snippet of text, the geometric complexity of its internal representation changes systematically depending on the grammar and style of that specific sentence. By zooming in from dataset-wide averages to individual text excerpts, the authors show that dense, technical writing settles into lower-dimensional neighborhoods, while dynamic, narrative passages spread out across many more independent directions. Even better: you can predict this hidden geometry directly from basic linguistic features, especially in the model’s middle layers.
What Problem Does This Paper Address?
Language models embed text into spaces with thousands of coordinates, yet the data rarely uses all of that room. Instead, representations cluster along lower-dimensional surfaces. Researchers measure the effective complexity of these surfaces using Intrinsic Dimensionality (ID)—essentially counting how many independent directions the data actually varies along.
Historically, studies have calculated a single, aggregate ID score for an entire dataset or layer. While that reveals broad trends—like a spike in complexity in middle layers—it blurs everything together, hiding how one sentence differs from the next. If you wanted to test how syntax affects geometry, you had to painstakingly slice datasets into rigid, controlled buckets. What has been missing is a way to look at a single input and ask: how do its continuous, overlapping linguistic properties shape the local geometry around it?
Methods
The authors shift from global averages to pointwise ID, assigning every individual text excerpt its own geometric complexity score across three decoder-only models: Pythia-6.9B, Qwen2.5-7B, and Apertus-8B (plus pretraining checkpoints).
Here is how the pipeline works:
- Disjoint Reference Neighborhoods (Novel Twist): Instead of measuring queries against each other (which biases the geometry toward the evaluation set), the authors build a fixed "reference sky" of 15,000 random excerpts. For each query excerpt, they extract the final token's hidden state at early, middle, and late layers, find its $k=1000$ nearest neighbors in the reference set, and compute its local dimensionality primarily using Expected Simplex Skewness (ESS)—which measures the angular and volumetric shapes formed by neighboring points.
- Linguistic Profiling & Prediction: Each excerpt is tagged with 43 interpretable features from Profiling-UD (covering raw text length, parts-of-speech, dependency trees, and clause structures) plus 3 token-frequency controls. Random forest regressors then try to predict the excerpt's pointwise ID from this 46-feature profile, using permutation importance and Accumulated Local Effects (ALE) to unpack which linguistic traits drive dimensionality up or down.
Datasets
Both the 15,000-excerpt fixed reference set and the disjoint evaluation excerpts are sampled from The Pile (originally Pythia's pretraining corpus). Excerpts are capped at 100 tokens and truncated cleanly at period boundaries. No new benchmarks are introduced.
Key Insights and Ideas
- Middle layers are the linguistic sweet spot: Across all models, pointwise ID swells in the intermediate layers—and that is precisely where linguistic features best predict local geometry. This aligns neatly with the idea that transformers do their heaviest abstract linguistic lifting in the middle of the network.
- Depth reweights form into meaning: Early layers care mostly about surface mechanics (token count, punctuation, word length). As representations move deeper into intermediate and late layers, geometry increasingly reflects how a text organizes entities and events—shifting weight toward common and proper nouns, pronouns, subjects, and verbal roots.
- Two distinct geometric "styles": Excerpts with lower local ID look like expository or technical prose—packed with long words and dense common nouns that pack into regular, constrained neighborhoods. Excerpts with higher local ID look like informal or narrative writing—full of pronouns, proper nouns, explicit subjects, and verbs, requiring more independent contextual directions to keep track of who is doing what to whom.
- Geometry isn't just model surprise: Log-perplexity and bag-of-words (TF-IDF) baselines fail to explain what the grammatical profiles capture, showing that local geometry reflects genuine structural organization rather than mere word rarity or model confusion.
Key Results
Mean ESS-estimated pointwise ID across early, intermediate, and late layers in Pythia, Qwen, and Apertus.
- Strong mid-layer predictability: Using the full 46-feature linguistic profile, five-fold cross-validated $R^2$ peaks sharply at intermediate layers across all three models: 0.547 in Qwen2.5-7B (layer 14), 0.505 in Pythia-6.9B (layer 16), and 0.439 in Apertus-8B (layer 16), compared to ~0.25–0.27 in early layers.
- Crushing the baselines: In those same middle layers, 46-feature TF-IDF unigram baselines only reach $R^2$ scores of 0.258 to 0.323, while using log-perplexity alone yields near-zero or negative $R^2$ (-0.077 to 0.006).
- Ablation resilience: Dropping token-frequency controls barely moves $R^2$ (e.g., 0.505 to 0.504 in mid-layer Pythia). Removing raw surface features hurts early layers (e.g., Apertus layer 2 drops from 0.270 to 0.206) far more than middle or late layers.
- Early emergence in pretraining: Across Apertus checkpoints, the intermediate-layer advantage and core feature rankings are already firmly established by the first available checkpoint (210B tokens, $R^2 = 0.446$) and persist all the way to 15T tokens.
Limitations and Future Work
The study focuses strictly on short English passages (up to 100 tokens) from The Pile, evaluated on three similarly sized (7B–8B) decoder-only models using only the final token's hidden state. Whether these geometric-linguistic links hold across other languages, longer documents, encoder architectures, or intermediate token positions remains an open question. Additionally, linguistic features naturally correlate with topic and genre, meaning ablations only partially untangle syntax from subject matter. Finally, unequal pretraining checkpoint spacing between Pythia and Apertus leaves room for future work with denser early-stage sampling to pinpoint the exact moment these geometric structures crystallize.
Summary updated