Transformer的热力学等价性:一种拉格朗日方法用于注意力动态
Entropy-Generated Attention Beyond Softmax and Entmax: Kaniadakis and Reciprocal-Symmetric Abe Operators
AI总结:
本文提出了一种基于拉格朗日方法的热力学视角,分析Transformer注意力动态,揭示了注意力机制与统计力学的关联。
摘要:
我们提出了一种有效的场论框架,用于通过热力学视角分析Transformer注意力。通过在配备Fisher度量的信息流形上构建拉格朗日量,我们表明,在香农-玻尔兹曼熵框架下,Softmax函数作为最小化亥姆霍兹自由能函数的 stationary 解出现。这建立了缩放点积注意力与canonical ensemble统计之间的正式对应关系。将这种映射扩展到宏观可观测变量,我们定义了一个与注意力能量景观波动相关的有效比热。在模块化加法任务(p=19-113)的受控实验中,我们观察到这种波动度量出现的稳健峰值,一致地在泛化开始之前出现。虽然在有限深度的范围内未检测到渐近幂律发散,但能量方差的可重复增强表明了伴随表示再组织的临界型相变。我们的框架为注意力缩放、训练动态和位置编码提供了统一的统计力学视角,将这些现象解释为有效热力学系统的涌现属性,而不是孤立的启发式方法。尽管目前的结果表明是有限尺寸的相变行为而不是严格的相变,但它们激励了进一步研究深度架构的缩放极限,通过基于波动的可观测变量。
英文摘要:
We derive two attention operators from generalized statistical entropies. Kaniadakis entropy yields an exact full-support normalization whose weights and low-score sensitivities decay algebraically, rather than exponentially as in Softmax or by exact truncation as in entmax. Classical Abe entropy yields an implicit reciprocal-symmetric operator. With $q=e^ε$, the involution $q\leftrightarrow q^{-1}$ removes every odd correction about Softmax; we obtain the normalized second- and fourth-order terms, including the deformation of the normalization multiplier. These stationary laws follow from a Fisher-metric Lagrangian on the probability simplex, whose Shannon sector recovers scaled dot-product Softmax. We also give a tangent-gradient test for deciding whether changing the entropy changes the attention profile or only its scale. Rényi and two-parameter Sharma--Mittal entropies retain the Tsallis--entmax inverse-gradient shape, but their global moments make the effective temperature input dependent when the external temperature is fixed. Distinguishing profile-shape equivalence from fixed-parameter operator equivalence separates new normalization shapes from adaptive rescalings and organizes the operators by support, tail behavior, and realization complexity.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。