Investigating Layer Importance in Large Language Models

Yang Zhang, Yanfei Dong, Kenji Kawaguchi
9/22/2024
cs.CLcs.LG

No confident code implementation found for this paper.

Abstract

Large language models (LLMs) have gained increasing attention due to their prominent ability to understand and process texts. Nevertheless, LLMs largely remain opaque. The lack of understanding of LLMs has obstructed the deployment in safety-critical scenarios and hindered the development of better models. In this study, we advance the understanding of LLM by investigating the significance of individual layers in LLMs. We propose an efficient sampling method to faithfully evaluate the importance of layers using Shapley values, a widely used explanation framework in feature attribution and data valuation. In addition, we conduct layer ablation experiments to assess the performance degradation resulting from the exclusion of specific layers. Our findings reveal the existence of cornerstone layers, wherein certain early layers can exhibit a dominant contribution over others. Removing one cornerstone layer leads to a drastic collapse of the model performance, often reducing it to random guessing. Conversely, removing non-cornerstone layers results in only marginal performance changes. This study identifies cornerstone layers in LLMs and underscores their critical role for future research.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2024investigating,
  title  = {Investigating Layer Importance in Large Language Models},
  author = {Yang Zhang and Yanfei Dong and Kenji Kawaguchi},
  year   = {2024},
  eprint = {2409.14381},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.14381v1}
}

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/2409.14381.svg)](https://codeofpaper.com/paper/2409.14381)

Discussion