Measuring Layer-wise Intrinsic Dimensionality of FFNs in LLMs via PCA
Abstract
Modern large language models (LLMs) keep the feed-forward network (FFN) intermediate width identical across every layer, a convention inherited from the original Transformer. Yet mechanistic work suggests layers at different depths do qualitatively different work, raising a natural question: are their capacity demands also non-uniform, and if so, can a fixed parameter budget be allocated more wisely than uniformly? To probe this, we apply principal component analysis (PCA) to the input of each FFN down-projection and measure, for every layer, its intrinsic dimensionality as the smallest number of principal components needed to reconstruct the activation up to a fixed cosine similarity. Scanning 58 open-weight LLMs spanning 14 families and 70M to 72B parameters, we find a recurring middle-heavy profile in which middle layers carry higher intrinsic dimensionality than edge layers; the profile is robust to the calibration corpus, even across English and Chinese, and is largely preserved through post-training fine-tuning. As a direct test that this signal is structurally meaningful, we use it to guide width pruning in a knowledge-distilled student under a matched parameter budget: the PCA-guided allocation outperforms the uniform-width convention by +2.3 points on Qwen3-8B and +2.5 on Qwen2.5-3B, while lower-dispersion teachers show smaller gaps (+0.9 on Gemma-3-4B, +0.5 on LLaMA-3-8B), and a budget-matched inverted control does worst on all four teachers. Across these four teachers, the size of the gap tracks how unevenly the teacher's intrinsic dimensionality is distributed across layers (a single-number summary we call ), and the advantage persists through downstream supervised fine-tuning. Code is available at https://github.com/naver-ai/lidf.
Create a lesson
Metadata
- Categories
- cs.LG, cs.CL
- Comments
- Accepted to NeurIPS 2026. 20 pages, 7 figures, 11 tables
Related papers
Gated Concept Adapters: Layer-Wise Concept Bottlenecks for Auditable Text Understanding
Shared title terminologycs.LGNiloofar Ranjbar, Saeedeh Momtazi, Mohammad Mehdi Homayounpoor
LATEC: Learned Axial TEnsor Compression for High-Dimensional Scientific Data
Shared title terminologycs.LGHippolyte Verninas, Hadrien Hendrikx, Thomas Moreau
Fix How It Acts, Not How It Thinks: Surgical Fine-Tuning of Frontier LLMs
Shared title terminologycs.LGSandeep Singh Sandha, Prann Bansal, Arvind Sundararajan
Layer-Readout Interfaces in EEG Foundation Models: Predictive Accessibility and Cross-Dataset Transfer
Shared title terminologycs.LGYanlin Fu, Wei Liu, Liming Zhao