Tracing the Complexity Profiles of Different Linguistic Phenomena Through the Intrinsic Dimension of LLM Representations¶
Conference: EMNLP 2026
Paper: ACL Anthology
Code: https://github.com/franfranz/syntactic_complexity_in_LLMs
Area: LLM Reasoning
Keywords: Intrinsic Dimension, Linguistic Complexity, Syntactic Nesting, Minimal Pairs, Structure Building
TL;DR¶
By evaluating the intrinsic dimension (TwoNN) and directional information imbalance of residual stream representations across six prominent LLMs on controlled minimal pairs, this paper reveals that complex linguistic structures—particularly recursive subordination—systematically elevate representation manifold dimensionality, with mid-layer ID peak regions playing a causally essential role in building hierarchical syntactic structures.
Background & Motivation¶
Large language models (LLMs) display remarkable syntactic and semantic competence, yet how linguistic processing unfolds across their deep internal layers remains an open challenge at the intersection of mechanistic interpretability and cognitive science. While early investigations relied heavily on supervised linear probing or causal tracing to detect grammatical knowledge within hidden states, probing classifiers frequently suffer from confounding surface lexical biases, memorization, and local token collocations. Concurrently, geometric perspectives on neural activations have supported the manifold hypothesis: despite residing in high-dimensional ambient activation spaces, hidden representations are constrained to nonlinear submanifolds with degrees of freedom orders of magnitude smaller than the ambient dimension. Previous research identified that LLMs exhibit a characteristic per-layer intrinsic dimension (ID) profile characterized by an intermediate-layer peak corresponding to the emergence of abstract linguistic capabilities; however, these geometric analyses were conducted exclusively on generic text corpora or coarse-grained text classification tasks, leaving open how specific linguistic phenomena shape internal manifold geometry.
The fundamental tension lies in the gap between well-established theoretical distinctions in formal and psycholinguistics—such as formal complexity (hierarchical recursion and constituent depth) versus functional/processing complexity (working memory retrieval and attachment ambiguity competition)—and the coarse nature of current representational geometry probes. Generic corpus sequences inextricably tangle lexical diversity, topic shifts, and syntactic depth, preventing researchers from identifying whether geometric fluctuations reflect superficial lexical variability or the cognitive burden of synthesizing syntactic structures.
To address this challenge, this paper introduces tightly controlled linguistic minimal pairs spanning three foundational contrasts: coordination versus subordination (flat vs. recursive hierarchical nesting), right-branching versus center-embedding (local vs. long-distance dependency resolution), and unambiguous versus ambiguous relative clause attachment (deterministic vs. competitive attachment). Across six diverse open-source LLMs spanning 7B to 14B parameters (Llama-3-8B, OLMo-2-13B, Pythia-12B, Gemma-2-9b, Mistral-7B-v0.1, and Qwen-2.5-14B), the authors perform layer-by-layer geometric tracking and causal layer-pruning interventions. Core idea: using rigorously controlled linguistic minimal pairs as probes, this work tracks the per-layer intrinsic dimension (TwoNN) and asymmetric information imbalance of residual stream representations, demonstrating that structural nesting systematically inflates manifold degrees of freedom and establishing that intermediate-layer ID peaks serve a causally crucial role in synthesizing nested syntactic hierarchies.
Method¶
Overall Architecture¶
The experimental framework follows a systematic pipeline: controlled synthetic minimal pair generation \(\to\) residual stream last-token representation extraction \(\to\) manifold intrinsic dimension estimation and directional information imbalance measurement \(\to\) causal single-layer pruning intervention. For each linguistic contrast, synthetic templates construct tens of thousands of sentence pairs that strictly balance lexical content, length, and surface vocabulary while isolating syntactic manipulations. The models process these inputs to yield last-token representations \(X \in \mathbb{R}^{N \times D}\) from the residual stream of each Transformer decoder layer. The intrinsic dimensionality across layers is estimated using TwoNN, while neighborhood divergence between paired conditions is quantified using directional Information Imbalance (\(\Delta\)). Finally, iterative single-layer pruning of attention and MLP sublayers provides causal validation of the functional role of the identified peak layers.
%%{init: {'flowchart': {'rankSpacing': 24, 'nodeSpacing': 28, 'padding': 6, 'wrappingWidth': 400, 'subGraphTitleMargin': {'top': 8, 'bottom': 16}}}}%%
flowchart TD
A["Controlled Linguistic Minimal Pair Inputs<br/>(Coord/Subord, Right/Center, Ambiguous/Unambiguous)"] --> B["Residual Stream Extraction<br/>Extract last-token hidden states X in R^(N x D)"]
B --> C["Geometric Intrinsic Dimension Estimation<br/>TwoNN local Poisson process measures manifold degrees of freedom"]
C --> D["Directional Information Imbalance<br/>Asymmetric ranking Delta(A -> B) tracks manifold topology overlap"]
D --> E["Causal Layer-Pruning Interventions<br/>Iterative Attention + MLP removal validates structure-building role"]
Key Designs¶
1. Geometric Intrinsic Dimension Estimation: Isolating manifold degrees of freedom from ambient dimensionality
Because the ambient activation dimension (\(D \ge 3500\)) is vastly inflated by embedding projection spaces, measuring raw vector distances obscures the actual degrees of freedom governing linguistic processing. To obtain an unbiased estimate of the underlying nonlinear manifold dimensionality, the TwoNN estimator is applied to the last-token representations in each layer's residual stream. TwoNN operates under the minimal assumption that data points are locally distributed as a homogeneous Poisson point process up to their second nearest neighbor. For each data point \(x_i\), let \(\delta^{(i)}_1\) and \(\delta^{(i)}_2\) denote the Euclidean distances to its first and second nearest neighbors, yielding the distance ratio \(\mu_i = \delta^{(i)}_2 / \delta^{(i)}_1 \in [1, \infty)\). The cumulative distribution function of \(\mu\) follows \(F(\mu) = (1 - \mu^{-d})\mathbb{I}_{[\mu \ge 1]}\), where \(d\) represents the intrinsic dimension. Solving via maximum likelihood over all \(N\) data points yields:
This metric provides a robust, non-parametric measure that strips away ambient dimensions. Across all evaluated LLMs, more complex linguistic structures (such as recursively embedded subordinate clauses) consistently elicit higher intrinsic dimensions across layers than simpler structures (such as iteratively conjoined coordinate clauses).
2. Directional Information Imbalance: Asymmetric neighborhood ranking to capture representation subsumption
Because minimal pairs share nearly identical lexical components and word order, standard symmetric similarity metrics like Centered Kernel Alignment (CKA) lack the sensitivity to distinguish which representation space serves as an informational superset of the other. The authors utilize Information Imbalance (\(\Delta\)), an asymmetric metric measuring neighborhood conservation between representation spaces \(A\) and \(B\). Let \(r_{ij}^X\) denote the neighbor rank of data point \(j\) relative to data point \(i\) in space \(X\). The information imbalance from space \(A\) to space \(B\) is defined as:
When the nearest neighbors in \(A\) are also close nearest neighbors in \(B\), \(\Delta(A \to B) \to 0\), indicating that space \(A\) contains sufficient local information to predict space \(B\). If the rank distribution in \(B\) degrades to random uniformity, \(\Delta \to 1\). Crucially, beneath the intermediate generic ID peak, \(\Delta(\text{coord} \to \text{subord})\) becomes substantially larger than \(\Delta(\text{subord} \to \text{coord})\). This asymmetry demonstrates that representations of subordinated sentences preserve coordinate propositions while incorporating hierarchical clausal embedding that cannot be predicted from coordinate structures.
3. Causal Layer-Pruning Interventions: Verifying the causal necessity of the generic ID peak for syntactic recursion
To prove that intermediate-layer ID peaks actively execute complex structure-building operations rather than merely correlating with them, the authors conduct layer-wise intervention experiments. For each layer \(l\), the combined contribution of self-attention and MLP modules is removed, directly passing the residual stream from layer \(l-1\) to layer \(l+1\) (\(x_{l+1} = x_{l-1}\)). The impact is quantified using pruning accuracy (the proportion of inputs where the pruned model preserves the exact top-1 next-token prediction of the intact model) as well as continuous output distribution divergence:
For 4 out of 6 models, pruning layers within the generic ID peak span produces a sharp, selective drop in accuracy (and an accompanying spike in KL divergence) for subordinated sentences compared to coordinated ones. In contrast, no corresponding selective degradation occurs for center-embedding or attachment ambiguity, establishing the specific causal role of intermediate peak layers in sustaining recursive structural nesting.
Benchmark & Evaluation Protocol¶
The empirical evaluation uses three primary controlled minimal-pair datasets and several supplementary variants, split into 5 independent partitions (10k sentences each for clausal/branching sets, 2,176 triplets for ambiguity) to report mean and standard errors across runs: - Coordination vs. Subordination: 50k pairs. The primary benchmark features 4-clause sentences using identical propositional verbs and nouns, varying solely in the connecting conjunctions (and vs. that). Supplementary sets evaluate 3-clause and 2-clause sentences, as well as disjunctive or-coordination. - Right-Branching vs. Center-Embedding: 50k pairs matching transitive verbs and human subjects. Right-branching sentences place the relative clause sentence-finally, while center-embedded sentences insert the relative clause between the main subject and verb, inducing long-distance agreement dependencies. Extensions include subject relative clauses (SRC) versus object relative clauses (ORC). - Unambiguous vs. Ambiguous RC Attachment: 32,640 sentences (10,880 triplets) testing relative clause attachment disambiguated via lexical semantics (age, gender, role constraints) towards low-attachment, high-attachment, or unresolvable ambiguous attachment. - Evaluated Models: Gemma-2-9b (42 layers), Llama-3-8B (32 layers), OLMo-2-13B (40 layers), Mistral-7B-v0.1 (32 layers), Pythia-12B (36 layers), and Qwen-2.5-14B (48 layers).
Key Experimental Results¶
Main Results: Baseline Surprisal Verification Across Six LLMs¶
Prior to geometric analysis, mean per-token surprisal (nats \(\pm\) 1 SE) was computed on 1,000 sampled sentences per condition across all six models to ensure that LLM token predictions reflect standard psycholinguistic complexity hierarchies (one-sided t-test, \(\alpha = 0.05\)):
| Model | Coord | Subord | Right Branch | Center Embed | Low Attach | High Attach | Ambiguous |
|---|---|---|---|---|---|---|---|
| Llama-3-8B | 5.39 ± 0.01 | 5.65 ± 0.01 | 7.74 ± 0.02 | 7.98 ± 0.02 | 6.07 ± 0.02 | 6.08 ± 0.02 | 6.11 ± 0.02 |
| OLMo-2-13B | 4.87 ± 0.01 | 5.11 ± 0.02 | 6.51 ± 0.02 | 6.75 ± 0.02 | 5.10 ± 0.02 | 5.16 ± 0.02 | 5.18 ± 0.02 |
| Pythia-12B | 4.77 ± 0.01 | 5.14 ± 0.01 | 6.66 ± 0.02 | 7.06 ± 0.02 | 5.37 ± 0.02 | 5.39 ± 0.02 | 5.39 ± 0.02 |
| Gemma-2-9b | 6.86 ± 0.02 | 7.62 ± 0.02 | 10.35 ± 0.04 | 10.58 ± 0.04 | 6.79 ± 0.03 | 6.75 ± 0.03 | 6.90 ± 0.03 |
| Mistral-7B-v0.1 | 4.87 ± 0.01 | 5.22 ± 0.02 | 6.86 ± 0.02 | 7.00 ± 0.02 | 5.50 ± 0.02 | 5.52 ± 0.02 | 5.58 ± 0.02 |
| Qwen-2.5-14B | 4.77 ± 0.01 | 5.05 ± 0.01 | 6.44 ± 0.02 | 6.61 ± 0.02 | 5.13 ± 0.02 | 5.15 ± 0.02 | 5.17 ± 0.02 |
Across all architectures, every complex condition yields statistically significant higher mean surprisal (\(p < 0.05\)), validating that the models' probability distributions accurately track human processing difficulty.
Ablation Study & Representation Dynamics: Intrinsic Dimensionality and Pruning Profiles¶
The layer-wise geometric measurements and intervention responses across the examined architectures are summarized below (ambient dimension \(D \ge 3500\)):
| Experimental Dimension | Llama-3-8B | OLMo-2-13B | Pythia-12B | Qwen-2.5-14B | Cross-Model Phenomenological Synthesis |
|---|---|---|---|---|---|
| Generic Corpus ID Peak Span | Layers 13–21 | Layers 17–28 | Layers 11–20 | Layers 16–30 | Spans 30%–60% depth; aligns with top probing accuracy |
| Subordination vs. Coordination Divergence | Diverges @ L15 | Diverges @ L19 | Diverges @ L12 | Diverges @ L10 | Curves diverge beneath generic peak; subord ID dominates |
| Peak ID Values (Subord vs. Coord) | ~21 vs. ~17 | ~23 vs. ~18 | ~19 vs. ~15 | ~24 vs. ~18 | Subordination elicits 3–5 additional effective dimensions |
| Center vs. Right-Branching Transition | Center > Right pre-peak; inverts post-peak | Center > Right pre-peak; inverts post-peak | Center > Right pre-peak; merges post-peak | Center > Right pre-peak; inverts post-peak | Agreement solved early; final nested clause raises right ID late |
| Ambiguous vs. Unambiguous Attachment | Ambiguous higher throughout (~15 vs ~13) | Ambiguous higher throughout (~13 vs ~12) | Ambiguous higher throughout (~15 vs ~14) | Ambiguous higher throughout (~15 vs ~14) | Monotonic downward trend; ambiguity sustains global noise |
| Information Imbalance Asymmetry | \(\Delta(\text{c}\to\text{s}) > \Delta(\text{s}\to\text{c})\) | \(\Delta(\text{c}\to\text{s}) > \Delta(\text{s}\to\text{c})\) | \(\Delta(\text{c}\to\text{s}) > \Delta(\text{s}\to\text{c})\) | Symmetric divergence | 5/6 models confirm subordination is informational superset |
| Layer Pruning Accuracy Impact | Severe dip in peak (subord drops more) | Severe dip in peak (subord drops more) | Severe dip in peak (subord drops more) | Severe dip post-peak (subord drops more) | 4/6 models exhibit selective accuracy drop below 0.2 in peak layers |
Key Findings¶
- Hierarchical nesting is the dominant driver of manifold dimensionality: The subordination-coordination contrast elicits the most pronounced and consistent ID divergence across all models. In 4-clause sentences, subordination expands manifold dimensionality by 3 to 5 effective dimensions. This divergence weakens in 3-clause sentences and disappears in 2-clause sentences, indicating that structural recursion requires a critical depth threshold to leave a geometric footprint.
- Distinct linguistic phenomena activate distinct processing schedules: Formal syntactic nesting (subordination) emerges squarely within the intermediate generic-ID peak span and persists through deep layers. Conversely, functional processing difficulty stemming from long-distance agreement (center-embedding) resolves early in the network before the generic peak, indicating an architectural separation between lexical-bound feature agreement and global phrase-structure composition.
- Directional information imbalance proves asymmetric subsumption: The inequality \(\Delta(\text{coord} \to \text{subord}) > \Delta(\text{subord} \to \text{coord})\) indicates that representations of subordinated sentences predict coordinated structures far better than the reverse, confirming that hierarchical structures contain an informational superset of flat structures.
- Causal pruning establishes functional specialization of ID peaks: Pruning layers within the generic ID peak causes catastrophic degradation on subordinated structures while sparing coordinate structures, demonstrating that intermediate peak layers actively compute recursive clausal hierarchies.
Highlights & Insights¶
- Bridging manifold geometry and formal linguistic theory: While prior geometric studies examined uncurated naturalistic corpora, this paper grounds manifold intrinsic dimension and information imbalance in rigorous minimal-pair methodology, endowing geometric metrics with precise cognitive interpretations.
- Empirical evidence for a two-stage linguistic processing hierarchy: The discovery that agreement-driven complexity resolves in early layers while recursive clausal embedding concentrates in mid-to-late layers provides concrete geometric backing for the emergence of an NLP pipeline inside Transformer models.
- Methodological utility of non-parametric geometric probes: By combining TwoNN distance ratios with asymmetric Information Imbalance (\(\Delta\)), the paper offers an interpretability suite that bypasses probe-training artifacts, directly adaptable to evaluating formal complexity in programming language ASTs, mathematical proofs, and reasoning trajectories.
Limitations & Future Work¶
- Scale bounded between 7B and 14B parameters: Due to the computational cost of extracting layer-wise activations and running full-model combinatorial pruning, experiments were restricted to mid-sized models; whether 70B+ frontier models further compress or shift these geometric profiles remains untested.
- Restricted to English synthetic templates: The evaluation relies exclusively on synthetic English templates generated via constrained prompting. Extending this geometric analysis to natural corpora and typologically diverse languages with richer morphology or freer word order (such as German, Basque, or Japanese) is necessary to confirm universality.
- Coarse-grained circuit localization: While layer-wise pruning validates the macro-level importance of intermediate stages, it does not identify specific attention heads (e.g., recursive induction heads) or MLP key-value circuits responsible for modulating the intrinsic dimension.
Related Work & Insights¶
- vs. Cheng et al. (2025) & Valeriani et al. (2023) (Manifold ID in Transformers): Prior works identified the existence of intermediate ID peaks on generic text and linked them broadly to abstract representations. This work dissects the specific linguistic operations responsible for that peak, demonstrating that hierarchical syntactic nesting is the primary driver of the dimensional expansion.
- vs. Hewitt & Manning (2019) (Supervised Structural Probing): Linear and structural probes require training auxiliary diagnostic parameters, risking false positives driven by classifier capacity. In contrast, TwoNN and Information Imbalance are completely unsupervised geometric estimators computed directly on the residual stream geometry.
- vs. Centered Kernel Alignment (CKA): CKA provides a symmetric similarity coefficient that cannot detect asymmetric information subsumption. Directional Information Imbalance (\(\Delta\)) resolves this limitation by identifying directional topological preservation between paired sentence spaces.
Rating¶
- Novelty: ⭐⭐⭐⭐⭐ Pioneering integration of psycholinguistic minimal pairs with manifold intrinsic dimensionality and directional information imbalance.
- Experimental Thoroughness: ⭐⭐⭐⭐⭐ Rigorous coverage of 6 diverse LLM architectures, multiple linguistic phenomena, non-parametric statistics, and causal pruning interventions.
- Writing Quality: ⭐⭐⭐⭐⭐ Exceptionally clear narrative, elegant formal mathematical framing, and insightful psycholinguistic discussion.
- Value: ⭐⭐⭐⭐⭐ Provides a foundational methodological bridge between mechanistic interpretability, representation geometry, and formal syntactic theory.