Designing effective positional encodings for graphs is key to building powerful graph transformers and enhancing message-passing graph neural networks. Although widespread, using Laplacian eigenvectors as positional encodings faces two fundamental challenges: (1) \emph{Non-uniqueness}: there are many different eigendecompositions of the same Laplacian, and (2) \emph{Instability}: small perturbations to the Laplacian could result in completely different eigenspaces, leading to unpredictable changes in positional encoding. Despite many attempts to address non-uniqueness, most methods overlook stability, leading to poor generalization on unseen graph structures. We identify the cause of instability to be a "hard partition" of eigenspaces. Hence, we introduce Stable and Expressive Positional Encodings (SPE), an architecture for processing eigenvectors that uses eigenvalues to "softly partition" eigenspaces. SPE is the first architecture that is (1) provably stable, and (2) universally expressive for basis invariant functions whilst respecting all symmetries of eigenvectors. Besides guaranteed stability, we prove that SPE is at least as expressive as existing methods, and highly capable of counting graph structures. Finally, we evaluate the effectiveness of our method on molecular property prediction, and out-of-distribution generalization tasks, finding improved generalization compared to existing positional encoding methods.
翻译:设计有效的图位置编码是构建强大的图Transformer和增强消息传递图神经网络的关键。尽管拉普拉斯特征向量作为位置编码被广泛使用,但面临两个根本性挑战:(1)非唯一性:同一拉普拉斯矩阵存在多种不同的特征分解方式;(2)不稳定性:拉普拉斯矩阵的微小扰动可能导致完全不同的特征空间,从而引起位置编码的不可预测变化。尽管已有许多方法尝试解决非唯一性问题,但大多数忽略了稳定性,导致对未见图结构的泛化能力较差。我们识别出不稳定的根源是特征空间的"硬划分"。为此,我们提出稳定且具表达性的位置编码(SPE),这是一种利用特征值对特征空间进行"软划分"的特征向量处理架构。SPE是首个(1)可证明稳定且(2)对基不变函数具有普适表达能力(同时尊重特征向量的所有对称性)的架构。除了保证的稳定性,我们还证明SPE至少与现有方法具有同等表达能力,并且高度擅长计数图结构。最后,我们在分子性质预测和分布外泛化任务上评估了该方法的有效性,发现与现有位置编码方法相比具有更好的泛化性能。