少点错误 05月30日 09:37
The Geometry of LLM Logits (an analytical outer bound)
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文探讨了大型语言模型(LLM)中Logits的几何特性,提出了一种分析外边界的方法。通过将LLM的更新过程分解为椭球体,并利用Minkowski和的概念,构建了Logits的几何表示。研究结果表明,Logits位于一个被称为椭圆体的集合中,为理解和优化LLM的输出提供了新的视角。该研究还强调了几何感知压缩和安全性的重要性,并为LLM的层级归因分析提供了支持。

🔑首先,文章的核心在于揭示了LLM中Logits的几何特性。通过将LLM的更新过程视为一系列椭球体的Minkowski和,为理解Logits的分布提供了几何框架。

💡关键在于,每个Transformer模块的更新都被限制在一个椭球体内。由于LayerNorm的存在,输入被规范化,而线性映射和Lipschitz激活函数的组合确保了更新的有限性,从而定义了椭球体。

📐其次,Logit空间是这些椭球体的仿射变换。通过对椭球体的线性变换和Minkowski和操作,文章构建了一个称为椭圆体的集合,Logits位于该集合中。

✅最后,文章得出的主要结论是,对于具有LayerNorm输入的Transformer模型,所有Logit向量都位于上述定义的椭圆体内。这为LLM的几何感知压缩、安全性分析和层级归因提供了理论基础。

Published on May 30, 2025 1:21 AM GMT

The Geometry of LLM Logits (an analytical outer bound)


1 Preliminaries

SymbolMeaning
width of the residual stream (e.g. 768 in GPT-2-small)
number of Transformer blocks
vocabulary size, so logits live in
residual-stream vector entering block
the update written by block
un-embedding matrix and bias

Additive residual stream.With (pre-/peri-norm) residual connections,

Hence the final pre-logit state is the sum of contributions (block 0 = token+positional embeddings):


2 Each update is contained in an ellipsoid

Why a bound exists.Every sub-module (attention head or MLP)

    reads a LayerNormed copy of its input, so where and is that block’s learned scale;applies linear maps, a Lipschitz point-wise non-linearity (GELU, SiLU, …), and another linear map back to .

Because the composition of linear maps and Lipschitz functions is itself Lipschitz, there exists a constant such that

Define the centred ellipsoid

Then every realisable update lies inside that ellipsoid:


3 Residual stream ⊆ Minkowski sum of ellipsoids

Using additivity and Step 2,

where is the Minkowski sum of the individual ellipsoids.


4 Logit space is an affine image of that sum

Logits are produced by the affine map .For any sets ,

Hence

Because linear images of ellipsoids are ellipsoids, each is still an ellipsoid.


5 Ellipsotopes

An ellipsotope is an affine shift of a finite Minkowski sum of ellipsoids.The set

therefore is an ellipsotope.


6 Main result (outer bound)

Theorem.For any pre-norm or peri-norm Transformer language model whose blocks receive LayerNormed inputs, the set of all logit vectors attainable over every prompt and position satisfies

where is the ellipsotope defined above.

Proof.Containments in Steps 2–4 compose to give the stated inclusion; Step 5 shows the outer set is an ellipsotope. ∎


7 Remarks & implications




Discuss

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

LLM Logits 几何 椭圆体 Transformer
相关文章