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

通过位置编码比较图Transformer

Comparing Graph Transformers via Positional Encodings

School of Electrical Engineering and Computer Science, Oregon State University(俄勒冈州立大学电气与计算机工程学院)

Mitchell Black, Zhengchao Wan, Gal Mishne, Amir Nayyeri, Yusu Wang

AI总结:

本文研究了图Transformer中绝对位置编码与相对位置编码的关系,证明了两者在区分能力上等价且可互换,并基于理论比较了多种位置编码的区分能力,为未来设计提供指导。

摘要:

图Transformer的区分能力与位置编码的选择密切相关:位置编码是用于增强基础Transformer的图信息特征。位置编码主要有两种类型:绝对位置编码(APE)和相对位置编码(RPE)。APE为每个节点分配特征,并作为输入提供给Transformer。RPE则为每对节点分配特征(例如图距离),用于增强注意力模块。先验地看,尚不清楚哪种方法能更好地最大化图Transformer的能力。本文旨在理解这些不同类型位置编码之间的关系。有趣的是,我们发现使用APE和RPE的图Transformer在区分能力上是等价的。具体而言,我们展示了如何互换APE和RPE,同时保持其对图Transformer的区分能力。基于理论结果,我们对几种APE和RPE(包括电阻距离和最近引入的稳定且具表达力的位置编码(SPE))进行了研究,并比较了它们在Transformer上的区分能力。我们相信这项工作将有助于在众多位置编码中做出选择,并为未来图Transformer的位置编码设计提供指导。

英文摘要:

The distinguishing power of graph transformers is closely tied to the choice of positional encoding: features used to augment the base transformer with information about the graph. There are two primary types of positional encoding: absolute positional encodings (APEs) and relative positional encodings (RPEs). APEs assign features to each node and are given as input to the transformer. RPEs instead assign a feature to each pair of nodes, e.g., graph distance, and are used to augment the attention block. A priori, it is unclear which method is better for maximizing the power of the resulting graph transformer. In this paper, we aim to understand the relationship between these different types of positional encodings. Interestingly, we show that graph transformers using APEs and RPEs are equivalent in terms of distinguishing power. In particular, we demonstrate how to interchange APEs and RPEs while maintaining their distinguishing power in terms of graph transformers. Based on our theoretical results, we provide a study on several APEs and RPEs (including the resistance distance and the recently introduced stable and expressive positional encoding (SPE)) and compare their distinguishing power in terms of transformers. We believe our work will help navigate the huge number of choices of positional encoding and will provide guidance on the future design of positional encodings for graph transformers.

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

↑