Spectral Insights into Data-Oblivious Critical Layers in Large Language Models

Xuyuan Liu, Lei Hsiung, Yaoqing Yang, Yujun Yan
5/31/2025
cs.LGcs.CL

No official code found. Best implementation: GraphmindDartmouth/Data-Oblivious-Critical-Layers (11 stars, last commit 2025-06-17).

Abstract

Understanding how feature representations evolve across layers in large language models (LLMs) is key to improving their interpretability and robustness. While recent studies have identified critical layers linked to specific functions or behaviors, these efforts typically rely on data-dependent analyses of fine-tuned models, limiting their use to post-hoc settings. In contrast, we introduce a data-oblivious approach to identify intrinsic critical layers in pre-fine-tuned LLMs by analyzing representation dynamics via Centered Kernel Alignment(CKA). We show that layers with significant shifts in representation space are also those most affected during fine-tuning--a pattern that holds consistently across tasks for a given model. Our spectral analysis further reveals that these shifts are driven by changes in the top principal components, which encode semantic transitions from rationales to conclusions. We further apply these findings to two practical scenarios: efficient domain adaptation, where fine-tuning critical layers leads to greater loss reduction compared to non-critical layers; and backdoor defense, where freezing them reduces attack success rates by up to 40%.

View on arXivView PDF

Code Implementations(1)

Code for Spectral Insights into Data-Oblivious Critical Layers in Large Language Models.

112Shell, PythonApr 7, 20251 years ago

Cite this paper

@article{liu2025spectral,
  title  = {Spectral Insights into Data-Oblivious Critical Layers in Large Language Models},
  author = {Xuyuan Liu and Lei Hsiung and Yaoqing Yang and Yujun Yan},
  year   = {2025},
  eprint = {2506.00382},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.00382v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.00382.svg)](https://codeofpaper.com/paper/2506.00382)

Discussion