揭示LLM在数值任务中表现好坏的关键——嵌入空间的各向同性
When can isotropy help adapt LLMs' next word prediction to numerical domains?
- 通过各向同性分析,揭示语言模型如何适应数值预测
- 各向同性嵌入可解决softmax函数的平移不变性问题,提升预测稳定性
- 适合关注大模型可靠性与数学推理能力的研究者
预训练大语言模型(LLMs)的上下文嵌入向量在时间序列预测等数值领域表现优异,但其易产生幻觉的问题在能源、金融、医疗等领域可能带来严重后果。为确保预测可靠性,需揭开模型黑箱并提供性能保证。然而,现有研究缺乏对预训练模型为何能有效解决数值下游任务的理论理解。本文基于嵌入空间的各向同性概念,提出一种新型分析框架,聚焦于语言模型头(自注意力输出层)中的softmax结构。研究表明,在对数值数据进行上下文建模时,若隐藏表示具备满足softmax平移不变性的结构,则可实现顶尖性能。通过形式化自注意力梯度结构,证明了各向同性嵌入能保持表示的内在结构,从而解决平移不变性难题并提供性能保障。实验表明,不同数值数据特性和模型架构对各向同性影响显著,且这种差异直接影响模型表现。
原文摘要 · Abstract (English)
Vector representations of contextual embeddings learned by pre-trained large language models (LLMs) are effective in various downstream tasks in numerical domains such as time series forecasting. Despite their significant benefits, the tendency of LLMs to hallucinate in such domains can have severe consequences in applications such as energy, nature, finance, healthcare, retail and transportation, among others. To guarantee prediction reliability and accuracy in numerical domains, it is necessary to open the black box behind the LLM and provide performance guarantees through explanation. However, there is little theoretical understanding of when pre-trained language models help solve numerical downstream tasks. This paper seeks to bridge this gap by understanding when the next-word prediction capability of LLMs can be adapted to numerical domains through a novel analysis based on the concept of isotropy in the contextual embedding space. Specifically, a log-linear model for LLMs is considered in which numerical data can be predicted from its context through a network with softmax in the output layer of LLMs (i.e., language model head in self-attention). For this model, it is demonstrated that, in order to achieve state-of-the-art performance in numerical domains, the hidden representations of the LLM embeddings must possess a structure that accounts for the shift-invariance of the softmax function. By formulating a gradient structure of self-attention in pre-trained models, it is shown how the isotropic property of LLM embeddings in contextual embedding space preserves the underlying structure of representations, thereby resolving the shift-invariance problem and providing a performance guarantee. Experiments show that different characteristics of numerical data and model architectures have different impacts on isotropy, and this variability directly affects the performances.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。