CLFeb 10, 2025

Demystifying Singular Defects in Large Language Models

arXiv:2502.07004v2h-index: 7Has CodeICML
Originality Highly original
AI Analysis

This research addresses a problem relevant to developers and researchers of large language models, providing new insights into the internal mechanisms of these models, which is an incremental yet significant step forward in the field.

This paper tackles the problem of singular defects in large language models, providing theoretical insights and empirical validation that explain the causes of high-norm tokens, and achieves practical applications such as improving quantization schemes. The findings lead to a better understanding of the internal mechanisms of large language models.

Large transformer models are known to produce high-norm tokens. In vision transformers (ViTs), such tokens have been mathematically modeled through the singular vectors of the linear approximations of layers. However, in large language models (LLMs), the underlying causes of high-norm tokens remain largely unexplored, and their different properties from those of ViTs require a new analysis framework. In this paper, we provide both theoretical insights and empirical validation across a range of recent models, leading to the following observations: i) The layer-wise singular direction predicts the abrupt explosion of token norms in LLMs. ii) The negative eigenvalues of a layer explain its sudden decay. iii) The computational pathways leading to high-norm tokens differ between initial and noninitial tokens. iv) High-norm tokens are triggered by the right leading singular vector of the matrix approximating the corresponding modules. We showcase two practical applications of these findings: the improvement of quantization schemes and the design of LLM signatures. Our findings not only advance the understanding of singular defects in LLMs but also open new avenues for their application. We expect that this work will stimulate further research into the internal mechanisms of LLMs. Code is released at https://github.com/haoqiwang/singular_defect.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes