跳到正文
HuggingFace Daily Papers· Daehee Kim·· 3 天前AI 评分31

通过PCA测量LLM中FFN的逐层内在维度

Measuring Layer-wise Intrinsic Dimensionality of FFNs in LLMs via PCA

AI 导读

研究对58个开放权重LLM(14个家族、70M至72B参数)的FFN降维投影输入做PCA,发现中间层内在维度高于边缘层的"中重"分布,且对校准语料与中英文均稳健。用该信号指导知识蒸馏学生的宽度剪枝,在匹配参数预算下Qwen3-8B提升2.3分、Qwen2.5-3B提升2.5分,优于均匀宽度方案。

正文 · 原文

View PDF HTML (experimental)

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 $\sigma_{99}$), and the advantage persists through downstream supervised fine-tuning. Code is available at this https URL.
Comments: Accepted to NeurIPS 2026. 20 pages, 7 figures, 11 tables
Subjects: Machine Learning (cs.LG); Computation and Language (cs.CL)
Cite as: arXiv:2611.32782 [cs.LG]
  (or arXiv:2611.32782v1 [cs.LG] for this version)
  https://doi.org/10.48550/arXiv.2611.32782

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Daehee Kim [view email]
[v1] Tue, 24 Nov 2026 15:11:53 UTC (177 KB)

来源:HuggingFace Daily Papers · arxiv.org