arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.00073cs.CLcs.LG
收藏

因果Transformer中位置信息通过邻近嵌入的相似性在无位置编码情况下涌现

Position Information Emerges in Causal Transformers Without Positional Encodings via Similarity of Nearby Embeddings

Johns Hopkins University(约翰斯·霍普金斯大学);University of Toronto(多伦多大学)

Chunsheng Zuo, Pavel Guerzhoy, Michael Guerzhoy

AI总结:

本文提出并验证了因果Transformer无需位置编码即可通过邻近嵌入相似性存储位置信息的假设,并证明该模式在训练和随机初始化模型中均会出现。

摘要:

具有因果注意力的Transformer可以在不使用位置编码的情况下解决需要位置信息的任务。本文提出并研究了一个关于如何在不使用显式位置编码的情况下存储位置信息的新假设。我们观察到,邻近的嵌入彼此之间比远距离的嵌入更相似,这使得Transformer有可能重建token的位置。我们表明,在一系列常见的超参数范围内,这种模式可以出现在经过训练的和随机初始化的、具有因果注意力且没有位置编码的Transformer模型中。

英文摘要:

Transformers with causal attention can solve tasks that require positional information without using positional encodings. In this work, we propose and investigate a new hypothesis about how positional information can be stored without using explicit positional encoding. We observe that nearby embeddings are more similar to each other than faraway embeddings, allowing the transformer to potentially reconstruct the positions of tokens. We show that this pattern can occur in both the trained and the randomly initialized Transformer models with causal attention and no positional encodings over a common range of hyperparameters.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑