arXiv:2412.09563cs.LGcs.CL2024-12中稿 · NeurIPS被引 34

发现大模型中间层比输出层更有信息量,改写对模型理解的认知。

Does Representation Matter? Exploring Intermediate Layers in Large Language Models

  • 用熵、曲率等指标评估中间层表征质量
  • 中间层在下游任务中表现优于最终层,尤其在长提示时
  • 揭示训练数据与层间熵的双峰现象,适合模型优化研究者

理解大语言模型中优质表征的定义是理论与应用的关键。本文研究了Transformer和状态空间模型等多种架构中中间层的表征质量。结果表明,中间层通常比最终层更适合作为下游任务的表征。我们引入并应用了一系列已有指标(如提示熵、曲率、增广不变性)来评估表征质量。实证分析揭示了架构间的显著差异,表征随训练过程的变化规律,以及输入随机性与提示长度对各层的影响。值得注意的是,部分中间层出现熵的双峰分布,可能与训练数据有关。整体结果深化了对大模型内部机制的理解,为架构优化与训练策略提供指导。

原文摘要 · Abstract (English)

Understanding what defines a good representation in large language models (LLMs) is fundamental to both theoretical understanding and practical applications. In this paper, we investigate the quality of intermediate representations in various LLM architectures, including Transformers and State Space Models (SSMs). We find that intermediate layers often yield more informative representations for downstream tasks than the final layers. To measure the representation quality, we adapt and apply a suite of metrics - such as prompt entropy, curvature, and augmentation-invariance - originally proposed in other contexts. Our empirical study reveals significant architectural differences, how representations evolve throughout training, and how factors like input randomness and prompt length affect each layer. Notably, we observe a bimodal pattern in the entropy of some intermediate layers and consider potential explanations tied to training data. Overall, our results illuminate the internal mechanics of LLMs and guide strategies for architectural optimization and training.

表征学习大模型分析中间层

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。