arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.02013cs.LGcs.AIcs.CL
收藏

逐层解析:揭示语言模型中的隐藏表示

Layer by Layer: Uncovering Hidden Representations in Language Models

University of Kentucky(肯塔基大学);Mila-Quebec AI Institute(魁北克AI研究所);University of Montreal(蒙特利尔大学);New York University(纽约大学);University of California, Los Angeles(加州大学洛杉矶分校);Meta FAIR

Oscar Skean, Md Rifat Arefin, Dan Zhao, Niket Patel, Jalal Naghiyev, Yann LeCun, Ravid Shwartz-Ziv

AI总结:

本研究挑战大语言模型依赖最终层的传统认知,提出基于信息论等的表示质量度量框架,通过32个文本嵌入任务实验证明中间层特征更强,为获取更鲁棒准确的表示开辟新方向。

摘要:

从特征提取到文本生成,大语言模型(LLM)的输出通常依赖最终层,这遵循了早期层仅捕获低级线索的传统认知。然而,我们的分析表明,中间层能够编码更丰富的表示,通常能提升一系列下游任务的性能。为解释并量化这些隐藏层的特性,我们提出了一个基于信息论、几何学以及对输入扰动的不变性的表示质量度量统一框架。该框架揭示了每一层如何平衡信息压缩与信号保留,解释了为何中间深度嵌入的性能能超过最后一层。我们在32个文本嵌入任务上开展了广泛实验,涵盖多种架构(transformer、状态空间模型)与领域(语言、视觉),结果表明中间层始终能提供更强的特征,这对最终层嵌入的标准观点提出了挑战,并为利用中间层表示获得更鲁棒、准确的表示开辟了新方向。

英文摘要:

From extracting features to generating text, the outputs of large language models (LLMs) typically rely on the final layers, following the conventional wisdom that earlier layers capture only low-level cues. However, our analysis shows that intermediate layers can encode even richer representations, often improving performance on a range of downstream tasks. To explain and quantify these hidden-layer properties, we propose a unified framework of representation quality metrics based on information theory, geometry, and invariance to input perturbations. Our framework highlights how each layer balances information compression and signal preservation, revealing why mid-depth embeddings can exceed the last layer's performance. Through extensive experiments on 32 text-embedding tasks across various architectures (transformers, state-space models) and domains (language, vision), we demonstrate that intermediate layers consistently provide stronger features, challenging the standard view on final-layer embeddings and opening new directions on using mid-layer representations for more robust and accurate representations.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑