平均上下文嵌入的范数决定其方差
Norm of Mean Contextualized Embeddings Determines their Variance
AI总结:
本研究证明上下文嵌入的范数与方差遵循统计公式,发现范数越小方差越大,且随层数加深簇内方差相对增大,与各向异性研究一致。
摘要:
上下文嵌入会因上下文而变化,即使对于相同的词元也是如此,并在嵌入空间中形成一个分布。为了分析该分布,我们关注平均嵌入的范数和嵌入的方差。在本研究中,我们首先证明这些值遵循统计学中众所周知的方差公式,并提供一种高效的顺序计算方法。然后,通过观察多个Transformer模型中间层的嵌入,我们发现范数与方差之间存在强烈的权衡关系:当平均嵌入更接近原点时,方差增大。这种权衡可能受到Transformer模型中使用的层归一化机制的影响。此外,当词元嵌入的集合被视为簇时,我们表明整个嵌入集合的方差在理论上可以分解为簇内方差和簇间方差。我们通过实验发现,随着Transformer模型层数的加深,嵌入远离原点,簇间方差相对减小,而簇内方差相对增大。这些结果与现有关于各层嵌入空间各向异性的研究一致。
英文摘要:
Contextualized embeddings vary by context, even for the same token, and form a distribution in the embedding space. To analyze this distribution, we focus on the norm of the mean embedding and the variance of the embeddings. In this study, we first demonstrate that these values follow the well-known formula for variance in statistics and provide an efficient sequential computation method. Then, by observing embeddings from intermediate layers of several Transformer models, we found a strong trade-off relationship between the norm and the variance: as the mean embedding becomes closer to the origin, the variance increases. This trade-off is likely influenced by the layer normalization mechanism used in Transformer models. Furthermore, when the sets of token embeddings are treated as clusters, we show that the variance of the entire embedding set can theoretically be decomposed into the within-cluster variance and the between-cluster variance. We found experimentally that as the layers of Transformer models deepen, the embeddings move farther from the origin, the between-cluster variance relatively decreases, and the within-cluster variance relatively increases. These results are consistent with existing studies on the anisotropy of the embedding spaces across layers.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。